From 796163b4e4e6030c1bab6c49b76df69df35bf0bd Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Fri, 30 Oct 2015 11:30:38 +0100 Subject: [PATCH 001/163] fix attributes --- Godeps/Godeps.json | 4 ++-- .../blablacar/attributes-merger/attributes/merger.go | 12 ++++++++---- work/env.go | 4 ++++ work/env/service.go | 4 ++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 7313d6f..baab03b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -19,8 +19,8 @@ }, { "ImportPath": "github.com/blablacar/attributes-merger/attributes", - "Comment": "0.1-2-gbf75c5b", - "Rev": "bf75c5bb64a5016808862fcf00917ebb8db6157a" + "Comment": "0.1-6-g431a372", + "Rev": "431a37282b0ef85175c8c30eb79f3918c378c7d1" }, { "ImportPath": "github.com/blablacar/cnt/log", diff --git a/Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/merger.go b/Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/merger.go index 30a77dd..630f14b 100644 --- a/Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/merger.go +++ b/Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/merger.go @@ -11,7 +11,11 @@ import ( "strconv" ) -func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) { +func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) map[string]interface{} { + + newMap := make(map[string]interface{}) + newMap["default"] = omap + // loop over attributes files // merge override files to default files for _, file := range files { @@ -31,14 +35,14 @@ func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) { } // data to map json := data.(map[string]interface{}) - omap = mergemap.Merge(omap, json) + omap = mergemap.Merge(newMap, json) } + return ProcessOverride(newMap) } func MergeAttributesFiles(files []string) map[string]interface{} { omap := make(map[string]interface{}) - MergeAttributesFilesForMap(omap, files) - return ProcessOverride(omap) + return MergeAttributesFilesForMap(omap, files) } func ProcessOverride(omap map[string]interface{}) map[string]interface{} { diff --git a/work/env.go b/work/env.go index d7283c5..ec7f736 100644 --- a/work/env.go +++ b/work/env.go @@ -9,6 +9,7 @@ import ( "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" "github.com/blablacar/green-garden/work/env" + "github.com/juju/errors" "io/ioutil" "os" "strings" @@ -122,6 +123,9 @@ func (e Env) RunFleetCmdGetOutput(args ...string) (string, error) { } func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) { + if e.attributes["fleet"] == nil || e.attributes["fleet"].(map[string]interface{})["endpoint"] == nil { + return "", errors.New("Cannot find ['fleet']['endpoint'] env attribute to call fleetctl") + } endpoint := "http://" + e.attributes["fleet"].(map[string]interface{})["endpoint"].(string) username := e.attributes["fleet"].(map[string]interface{})["username"].(string) strict_host_key_checking := e.attributes["fleet"].(map[string]interface{})["strict_host_key_checking"].(bool) diff --git a/work/env/service.go b/work/env/service.go index c4ea7d8..170c4f7 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -34,12 +34,12 @@ func NewService(path string, name string, env spec.Env) *Service { } func (s *Service) loadAttributes() { - attr := s.env.GetAttributes() + attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) if err != nil { s.log.WithError(err).WithField("path", s.path+spec.PATH_ATTRIBUTES).Panic("Cannot load Attributes files") } - attributes.MergeAttributesFilesForMap(attr, files) + attr = attributes.MergeAttributesFilesForMap(attr, files) s.attributes = attr s.log.WithField("attributes", s.attributes).Debug("Attributes loaded") } From 1d75b21cf3a2bd3f11321824819b329bc8533862 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Mon, 2 Nov 2015 17:42:51 +0100 Subject: [PATCH 002/163] refacto of cli commands --- commands/compare.go | 49 +++++++++++++++++++++++++++ commands/env.go | 80 +++++++++++++------------------------------- commands/generate.go | 10 ++++++ commands/gg.go | 5 +-- commands/run.go | 12 +++++++ work/env.go | 24 +++++-------- 6 files changed, 105 insertions(+), 75 deletions(-) create mode 100644 commands/compare.go create mode 100644 commands/run.go diff --git a/commands/compare.go b/commands/compare.go new file mode 100644 index 0000000..92403d1 --- /dev/null +++ b/commands/compare.go @@ -0,0 +1,49 @@ +package commands + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/work" + "github.com/spf13/cobra" + "strings" +) + +func compareEnv(cmd *cobra.Command, args []string, work *work.Work, envString string) { + logEnv := logrus.WithField("env", envString) + logEnv.Info("Running command") + + env := work.LoadEnv(cmd.Use) + + units, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + if err != nil { + logEnv.WithError(err).Fatal("Cannot list unit files") + } + + for _, unit := range strings.Split(units, "\n") { + logUnit := logEnv.WithField("unit", unit) + + content, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) + if err != nil { + logUnit.WithError(err).Fatal("Fleetctl failed to cat service content") + } + unitInfo := strings.Split(unit, "_") + if unitInfo[0] != cmd.Use { + logUnit.Warn("Unknown unit") + continue + } + + res, err := env.LoadService(unitInfo[1]).LoadUnit(unit).GetUnitContentAsFleeted() + if err != nil { + logUnit.WithError(err).Warn("Cannot read unit file") + continue + } + if res != content { + logUnit.Info("Unit is not up to date") + logUnit.WithField("source", "fleet").Debug(content) + logUnit.WithField("source", "file").Debug(res) + } + } +} + +func compareService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { + logrus.Fatal("Not implemented") +} diff --git a/commands/env.go b/commands/env.go index 54169b4..8bae900 100644 --- a/commands/env.go +++ b/commands/env.go @@ -5,7 +5,6 @@ import ( "github.com/blablacar/green-garden/config" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" - "strings" ) func loadEnvCommands(rootCmd *cobra.Command) { @@ -17,19 +16,24 @@ func loadEnvCommands(rootCmd *cobra.Command) { var envCmd = &cobra.Command{ Use: env, Short: "Run command for " + env, + } + + var compare = &cobra.Command{ + Use: "compare", + Short: "Compare local units with what is running on fleet on " + env, Run: func(cmd *cobra.Command, args []string) { - runner(cmd, args, work) + compareEnv(cmd, args, work, env) }, } var runCmd = &cobra.Command{ Use: "run", - Short: "run fleetctl command on " + env, + Short: "Run fleetctl command on " + env, Run: func(cmd *cobra.Command, args []string) { run(cmd, args, work, env) }, } - envCmd.AddCommand(runCmd) + envCmd.AddCommand(runCmd, compare) var generateCmd = &cobra.Command{ Use: "generate", @@ -46,64 +50,28 @@ func loadEnvCommands(rootCmd *cobra.Command) { var service = g var serviceCmd = &cobra.Command{ Use: service, - Short: "run command for " + service + " on env :" + env, + Short: "run command for " + service + " on env " + env, + } + + var compareCmd = &cobra.Command{ + Use: "compare", + Short: "Compare local units with what is running on fleet on " + env + "for " + service, Run: func(cmd *cobra.Command, args []string) { - generateService(cmd, args, work, env, service) + compareService(cmd, args, work, env, service) }, } - envCmd.AddCommand(serviceCmd) - } - } -} - -func run(cmd *cobra.Command, args []string, work *work.Work, env string) { - log.WithField("env", env).Debug("Running command") - work.LoadEnv(env).Run(args) -} - -func generateService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).GenerateUnits() -} - -func generateEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { - log.WithField("env", env).Debug("Generating units") - work.LoadEnv(env).Generate() -} - -func runner(cmd *cobra.Command, args []string, work *work.Work) { - logEnv := log.WithField("env", cmd.Use) - logEnv.Info("Running command") - - env := work.LoadEnv(cmd.Use) - - units, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") - if err != nil { - logEnv.WithError(err).Fatal("Cannot list unit files") - } - - for _, unit := range strings.Split(units, "\n") { - logUnit := logEnv.WithField("unit", unit) + var generateCmd = &cobra.Command{ + Use: "generate", + Short: "generate units for " + service + " on env :" + env, + Run: func(cmd *cobra.Command, args []string) { + generateService(cmd, args, work, env, service) + }, + } - content, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) - if err != nil { - logUnit.WithError(err).Fatal("Fleetctl failed to cat service content") - } - unitInfo := strings.Split(unit, "_") - if unitInfo[0] != cmd.Use { - logUnit.Warn("Unknown unit") - continue - } + serviceCmd.AddCommand(generateCmd, compareCmd) - res, err := env.LoadService(unitInfo[1]).LoadUnit(unit).GetUnitContentAsFleeted() - if err != nil { - logUnit.WithError(err).Warn("Cannot read unit file") - continue - } - if res != content { - logUnit.Info("Unit is not up to date") - logUnit.WithField("source", "fleet").Debug(content) - logUnit.WithField("source", "file").Debug(res) + envCmd.AddCommand(serviceCmd) } } } diff --git a/commands/generate.go b/commands/generate.go index 74ac5b0..0cfa689 100644 --- a/commands/generate.go +++ b/commands/generate.go @@ -1,6 +1,7 @@ package commands import ( + "github.com/Sirupsen/logrus" "github.com/blablacar/green-garden/config" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" @@ -17,3 +18,12 @@ var generateCmd = &cobra.Command{ } }, } + +func generateService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { + work.LoadEnv(env).LoadService(service).GenerateUnits() +} + +func generateEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { + logrus.WithField("env", env).Debug("Generating units") + work.LoadEnv(env).Generate() +} diff --git a/commands/gg.go b/commands/gg.go index 833b002..d9172e7 100644 --- a/commands/gg.go +++ b/commands/gg.go @@ -18,8 +18,6 @@ var buildArgs = builder.BuildArgs{} const FLEET_SUPPORTED_VERSION = "0.11.5" func Execute() { - // log.SetFormatter(new(log.JSONFormatter)) - config.GetConfig().Load() checkFleetVersion() @@ -47,8 +45,7 @@ func Execute() { func checkFleetVersion() { output, err := utils.ExecCmdGetOutput("fleetctl") if err != nil { - log.Error("fleetctl is required in PATH") - os.Exit(1) + log.Fatal("fleetctl is required in PATH") } scanner := bufio.NewScanner(strings.NewReader(output)) diff --git a/commands/run.go b/commands/run.go new file mode 100644 index 0000000..f592ab7 --- /dev/null +++ b/commands/run.go @@ -0,0 +1,12 @@ +package commands + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/work" + "github.com/spf13/cobra" +) + +func run(cmd *cobra.Command, args []string, work *work.Work, env string) { + logrus.WithField("env", env).Debug("Running command") + work.LoadEnv(env).Run(args) +} diff --git a/work/env.go b/work/env.go index ec7f736..aeb5254 100644 --- a/work/env.go +++ b/work/env.go @@ -127,14 +127,16 @@ func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) return "", errors.New("Cannot find ['fleet']['endpoint'] env attribute to call fleetctl") } endpoint := "http://" + e.attributes["fleet"].(map[string]interface{})["endpoint"].(string) - username := e.attributes["fleet"].(map[string]interface{})["username"].(string) - strict_host_key_checking := e.attributes["fleet"].(map[string]interface{})["strict_host_key_checking"].(bool) - sudo := e.attributes["fleet"].(map[string]interface{})["sudo"].(bool) - os.Setenv(FLEETCTL_ENDPOINT, endpoint) - os.Setenv(FLEETCTL_SSH_USERNAME, username) - os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, fmt.Sprintf("%t", strict_host_key_checking)) - os.Setenv(FLEETCTL_SUDO, fmt.Sprintf("%t", sudo)) + if e.attributes["fleet"].(map[string]interface{})["username"] != nil { + os.Setenv(FLEETCTL_SSH_USERNAME, e.attributes["fleet"].(map[string]interface{})["username"].(string)) + } + if e.attributes["fleet"].(map[string]interface{})["strict_host_key_checking"] != nil { + os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, fmt.Sprintf("%t", e.attributes["fleet"].(map[string]interface{})["strict_host_key_checking"].(bool))) + } + if e.attributes["fleet"].(map[string]interface{})["sudo"] != nil { + os.Setenv(FLEETCTL_SUDO, fmt.Sprintf("%t", e.attributes["fleet"].(map[string]interface{})["sudo"].(bool))) + } var out string var err error @@ -143,14 +145,6 @@ func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) } else { err = cntUtils.ExecCmd("fleetctl", args...) } - // if err != nil { - // e.log.WithError(err). - // WithField("FLEETCTL_ENDPOINT", endpoint). - // WithField("FLEETCTL_SSH_USERNAME", username). - // WithField("FLEETCTL_STRICT_HOST_KEY_CHECKING", strict_host_key_checking). - // WithField("FLEETCTL_SUDO", sudo). - // Error("Fleetctl command failed") - // } os.Setenv(FLEETCTL_ENDPOINT, "") os.Setenv(FLEETCTL_SSH_USERNAME, "") From f4c88bcca3f51493999f811b3ab961dc02bdd588 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Mon, 2 Nov 2015 18:04:40 +0100 Subject: [PATCH 003/163] create units directory if not exists --- utils/files.go | 2 +- work/env/service-generate-units.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/files.go b/utils/files.go index eb37a58..0718a4a 100644 --- a/utils/files.go +++ b/utils/files.go @@ -2,7 +2,7 @@ package utils import "os" -func exists(path string) (bool, error) { +func Exists(path string) (bool, error) { _, err := os.Stat(path) if err == nil { return true, nil diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index 75eb208..7f2fe2f 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -10,6 +10,7 @@ import ( "github.com/blablacar/green-garden/utils" "io/ioutil" "net/http" + "os" "strings" ) @@ -77,6 +78,10 @@ func (s Service) writeUnit(i int, node map[string]interface{}, tmpl *Templating, if err != nil { s.log.Error("Failed to run templating for unit "+unitName, err) } + ok, err := utils.Exists(s.path + "/units") + if !ok || err != nil { + os.Mkdir(s.path+"/units", 0755) + } err = ioutil.WriteFile(s.path+"/units"+"/"+unitName, b.Bytes(), 0644) if err != nil { s.log.WithError(err).WithField("path", s.path+"/units"+"/"+unitName).Error("Cannot writer unit") From c84fe2ce6fe8059dd7ad4a5ff107c104701e0dbe Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Tue, 3 Nov 2015 14:17:46 +0100 Subject: [PATCH 004/163] do not put node info attributes --- commands/compare.go | 2 +- work/env.go | 46 +++++++++++++++++++++--------- work/env/service-generate-units.go | 17 ++++++----- 3 files changed, 43 insertions(+), 22 deletions(-) diff --git a/commands/compare.go b/commands/compare.go index 92403d1..ed87af0 100644 --- a/commands/compare.go +++ b/commands/compare.go @@ -11,7 +11,7 @@ func compareEnv(cmd *cobra.Command, args []string, work *work.Work, envString st logEnv := logrus.WithField("env", envString) logEnv.Info("Running command") - env := work.LoadEnv(cmd.Use) + env := work.LoadEnv(envString) units, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") if err != nil { diff --git a/work/env.go b/work/env.go index aeb5254..6559bf2 100644 --- a/work/env.go +++ b/work/env.go @@ -10,6 +10,7 @@ import ( "github.com/blablacar/green-garden/utils" "github.com/blablacar/green-garden/work/env" "github.com/juju/errors" + "gopkg.in/yaml.v2" "io/ioutil" "os" "strings" @@ -17,11 +18,21 @@ import ( const PATH_SERVICES = "/services" +type Config struct { + Fleet struct { + Endpoint string `yaml:"endpoint,omitempty"` + Username string `yaml:"username,omitempty"` + Strict_host_key_checking bool `yaml:"strict_host_key_checking,omitempty"` + Sudo bool `yaml:"sudo,omitempty"` + } `yaml:"fleet,omitempty"` +} + type Env struct { path string name string log logrus.Entry attributes map[string]interface{} + config Config } func NewEnvironment(root string, name string) *Env { @@ -33,11 +44,13 @@ func NewEnvironment(root string, name string) *Env { } env := &Env{ - path: path, - name: name, - log: log, + path: path, + name: name, + log: log, + config: Config{}, } env.loadAttributes() + env.loadConfig() return env } @@ -61,6 +74,15 @@ func (e Env) attributesDir() string { return e.path + spec.PATH_ATTRIBUTES } +func (e *Env) loadConfig() { + if source, err := ioutil.ReadFile(e.path + "/config.yml"); err == nil { + err = yaml.Unmarshal([]byte(source), &e.config) + if err != nil { + panic(err) + } + } +} + func (e *Env) loadAttributes() { files, err := utils.AttributeFiles(e.path + spec.PATH_ATTRIBUTES) if err != nil { @@ -123,20 +145,16 @@ func (e Env) RunFleetCmdGetOutput(args ...string) (string, error) { } func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) { - if e.attributes["fleet"] == nil || e.attributes["fleet"].(map[string]interface{})["endpoint"] == nil { - return "", errors.New("Cannot find ['fleet']['endpoint'] env attribute to call fleetctl") + if e.config.Fleet.Endpoint == "" { + return "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") } - endpoint := "http://" + e.attributes["fleet"].(map[string]interface{})["endpoint"].(string) + endpoint := "http://" + e.config.Fleet.Endpoint os.Setenv(FLEETCTL_ENDPOINT, endpoint) - if e.attributes["fleet"].(map[string]interface{})["username"] != nil { - os.Setenv(FLEETCTL_SSH_USERNAME, e.attributes["fleet"].(map[string]interface{})["username"].(string)) - } - if e.attributes["fleet"].(map[string]interface{})["strict_host_key_checking"] != nil { - os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, fmt.Sprintf("%t", e.attributes["fleet"].(map[string]interface{})["strict_host_key_checking"].(bool))) - } - if e.attributes["fleet"].(map[string]interface{})["sudo"] != nil { - os.Setenv(FLEETCTL_SUDO, fmt.Sprintf("%t", e.attributes["fleet"].(map[string]interface{})["sudo"].(bool))) + if e.config.Fleet.Username != "" { + os.Setenv(FLEETCTL_SSH_USERNAME, e.config.Fleet.Username) } + os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, fmt.Sprintf("%t", e.config.Fleet.Strict_host_key_checking)) + os.Setenv(FLEETCTL_SUDO, fmt.Sprintf("%t", e.config.Fleet.Sudo)) var out string var err error diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index 7f2fe2f..e1780ff 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -66,15 +66,18 @@ func (s Service) writeUnit(i int, node map[string]interface{}, tmpl *Templating, unitName := s.env.GetName() + "_" + s.name + "_" + node[spec.NODE_HOSTNAME].(string) + ".service" s.log.Debug("Unit name is :" + unitName) - attributes := utils.CopyMap(s.attributes) - - attributes["node"] = node //TODO this should be merged - attributes["node"].(map[string]interface{})["acis"] = acis - out, err := json.Marshal(attributes) - attributes["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + data := make(map[string]interface{}) + data["attribute"] = utils.CopyMap(s.attributes) + out, err := json.Marshal(data["attribute"]) + if err != nil { + s.log.WithError(err).Panic("Cannot marshall attributes") + } + data["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + data["node"] = node + data["node"].(map[string]interface{})["acis"] = acis var b bytes.Buffer - err = tmpl.Execute(&b, attributes) + err = tmpl.Execute(&b, data) if err != nil { s.log.Error("Failed to run templating for unit "+unitName, err) } From 1d210a09ae083fadea0db3b6a81494c4221a7cc7 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Tue, 3 Nov 2015 14:20:35 +0100 Subject: [PATCH 005/163] fmt --- work/env/service-generate-units.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index e1780ff..4473320 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -66,7 +66,7 @@ func (s Service) writeUnit(i int, node map[string]interface{}, tmpl *Templating, unitName := s.env.GetName() + "_" + s.name + "_" + node[spec.NODE_HOSTNAME].(string) + ".service" s.log.Debug("Unit name is :" + unitName) - data := make(map[string]interface{}) + data := make(map[string]interface{}) data["attribute"] = utils.CopyMap(s.attributes) out, err := json.Marshal(data["attribute"]) if err != nil { From ee321bcbf3adc96c9c75986e053e8d26ec927698 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Tue, 3 Nov 2015 17:28:30 +0100 Subject: [PATCH 006/163] merge node attributes with env attributes --- commands/compare.go | 5 +-- commands/env.go | 4 +-- commands/{run.go => fleetctl.go} | 2 +- spec/env.go | 1 + utils/copymap.go | 14 ++++++++ work/env/service-generate-units.go | 19 +++++++--- work/env/service.go | 57 ++++++++++++++++++++++++++---- 7 files changed, 86 insertions(+), 16 deletions(-) rename commands/{run.go => fleetctl.go} (72%) diff --git a/commands/compare.go b/commands/compare.go index ed87af0..c7e5f6d 100644 --- a/commands/compare.go +++ b/commands/compare.go @@ -44,6 +44,7 @@ func compareEnv(cmd *cobra.Command, args []string, work *work.Work, envString st } } -func compareService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - logrus.Fatal("Not implemented") +func compareService(cmd *cobra.Command, args []string, work *work.Work, env string, serviceName string) { + service := work.LoadEnv(env).LoadService(serviceName) + service.Compare() } diff --git a/commands/env.go b/commands/env.go index 8bae900..463d26c 100644 --- a/commands/env.go +++ b/commands/env.go @@ -27,10 +27,10 @@ func loadEnvCommands(rootCmd *cobra.Command) { } var runCmd = &cobra.Command{ - Use: "run", + Use: "fleetctl", Short: "Run fleetctl command on " + env, Run: func(cmd *cobra.Command, args []string) { - run(cmd, args, work, env) + fleetctl(cmd, args, work, env) }, } envCmd.AddCommand(runCmd, compare) diff --git a/commands/run.go b/commands/fleetctl.go similarity index 72% rename from commands/run.go rename to commands/fleetctl.go index f592ab7..f5707c6 100644 --- a/commands/run.go +++ b/commands/fleetctl.go @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" ) -func run(cmd *cobra.Command, args []string, work *work.Work, env string) { +func fleetctl(cmd *cobra.Command, args []string, work *work.Work, env string) { logrus.WithField("env", env).Debug("Running command") work.LoadEnv(env).Run(args) } diff --git a/spec/env.go b/spec/env.go index f66d106..4d3defa 100644 --- a/spec/env.go +++ b/spec/env.go @@ -9,4 +9,5 @@ type Env interface { GetLog() logrus.Entry GetAttributes() map[string]interface{} ListMachineNames() []string + RunFleetCmdGetOutput(args ...string) (string, error) } diff --git a/utils/copymap.go b/utils/copymap.go index 24d1786..4defcff 100644 --- a/utils/copymap.go +++ b/utils/copymap.go @@ -7,3 +7,17 @@ func CopyMap(from map[string]interface{}) map[string]interface{} { } return node } + +func CopyMapInterface(from interface{}) interface{} { + switch x := from.(type) { + case map[interface{}]interface{}: + node := make(map[string]interface{}) + for k, v := range from.(map[interface{}]interface{}) { + node[k.(string)] = CopyMapInterface(v) + } + return node + default: + _ = x + return from + } +} diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index 4473320..be21c28 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -8,6 +8,7 @@ import ( cntspec "github.com/blablacar/cnt/spec" "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" + "github.com/peterbourgon/mergemap" "io/ioutil" "net/http" "os" @@ -57,24 +58,34 @@ func (s Service) GenerateUnits() { } } +func (s Service) UnitName(hostname string) string { + return s.env.GetName() + "_" + s.name + "_" + hostname + ".service" +} + func (s Service) writeUnit(i int, node map[string]interface{}, tmpl *Templating, acis string) { if node[spec.NODE_HOSTNAME].(string) == "" { s.log.WithField("index", i).Error("hostname is mandatory in node informations") } s.log.Debug("Processing node :" + node[spec.NODE_HOSTNAME].(string)) - unitName := s.env.GetName() + "_" + s.name + "_" + node[spec.NODE_HOSTNAME].(string) + ".service" - s.log.Debug("Unit name is :" + unitName) + unitName := s.UnitName(node[spec.NODE_HOSTNAME].(string)) data := make(map[string]interface{}) + + data["node"] = node + data["node"].(map[string]interface{})["acis"] = acis + data["attribute"] = utils.CopyMap(s.attributes) + if data["node"].(map[string]interface{})["attributes"] != nil { + source := utils.CopyMapInterface(data["node"].(map[string]interface{})["attributes"].(map[interface{}]interface{})) + data["attribute"] = mergemap.Merge(data["attribute"].(map[string]interface{}), source.(map[string]interface{})) + } + out, err := json.Marshal(data["attribute"]) if err != nil { s.log.WithError(err).Panic("Cannot marshall attributes") } data["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) - data["node"] = node - data["node"].(map[string]interface{})["acis"] = acis var b bytes.Buffer err = tmpl.Execute(&b, data) diff --git a/work/env/service.go b/work/env/service.go index 170c4f7..30a05e7 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -33,6 +33,56 @@ func NewService(path string, name string, env spec.Env) *Service { return service } +func (s *Service) LoadUnit(name string) *service.Unit { + unit := service.NewUnit(s.path+"/units", name, s) + return unit +} + +func (s *Service) ListUnits() []string { + res := []string{} + if s.manifest.Nodes[0][spec.NODE_HOSTNAME].(string) == "*" { + machines := s.env.ListMachineNames() + for _, node := range machines { + res = append(res, s.UnitName(node)) + } + } else { + for _, node := range s.manifest.Nodes { + res = append(res, s.UnitName(node[spec.NODE_HOSTNAME].(string))) + } + } + return res +} + +func (s *Service) Compare() { + unitNames := s.ListUnits() + for _, unit := range unitNames { + logUnit := s.log.WithField("unit", unit) + localContent, err := s.LoadUnit(unit).GetUnitContentAsFleeted() + if err != nil { + logUnit.WithError(err).Error("Cannot read unit file") + continue + } + remoteContent, err := s.GetFleetUnitContent(unit) + if err != nil { + logUnit.WithError(err).Error("Cannot read unit file") + continue + } + + if localContent != remoteContent { + logUnit.Error("Unit is not up to date") + logUnit.WithField("source", "fleet").Debug(remoteContent) + logUnit.WithField("source", "file").Debug(localContent) + } + } + +} + +func (s *Service) GetFleetUnitContent(unit string) (string, error) { + return s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) +} + +///////////////////////////////////////////////// + func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) @@ -44,13 +94,6 @@ func (s *Service) loadAttributes() { s.log.WithField("attributes", s.attributes).Debug("Attributes loaded") } -///////////////////////////////////////////////// - -func (s *Service) LoadUnit(name string) *service.Unit { - unit := service.NewUnit(s.path+"/units", name, s) - return unit -} - func (s *Service) loadUnitTemplate() (*Templating, error) { path := s.path + spec.PATH_UNIT_TEMPLATE source, err := ioutil.ReadFile(path) From ed499dd8b7d17a5d82ca331773d41c9e210070ca Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Tue, 3 Nov 2015 17:42:12 +0100 Subject: [PATCH 007/163] update readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 81dc9d6..24da08f 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,15 @@ containers: nodes: # list of nodes for this service - hostname: cass1 # hostname of the service ip: 10.2.135.136 # any other property used in the template + attributes: # per node attributes configuration + node-id: 1 fleet: - MachineMetadata="rack=113" "pos=4" - hostname: cass2 ip: 10.2.143.136 + attributes: + node-id: 2 fleet: - MachineMetadata="rack=213" "pos=4" ``` From b339101be3062774459fcc5e262f7621afa01923 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Wed, 4 Nov 2015 13:39:04 +0100 Subject: [PATCH 008/163] exit 1 if command parser say that it failed --- commands/gg.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/gg.go b/commands/gg.go index d9172e7..486dc33 100644 --- a/commands/gg.go +++ b/commands/gg.go @@ -38,7 +38,10 @@ func Execute() { loadEnvCommands(rootCmd) - rootCmd.Execute() + err := rootCmd.Execute() + if err != nil { + os.Exit(1) + } log.Info("Victory !") } From 46c1ac854d6e371b6e93aeeec4a8909e61f957b2 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 5 Nov 2015 13:23:28 +0100 Subject: [PATCH 009/163] allow resolv acis from list of local manifest --- Godeps/Godeps.json | 12 +- .../blablacar/cnt/spec/ac-fullname.go | 5 + .../blablacar/cnt/spec/pod-manifest.go | 6 +- commands/env.go | 3 +- commands/generate.go | 2 +- work/env-generate.go | 2 +- work/env/service-generate-units.go | 178 +++++++++++++----- 7 files changed, 145 insertions(+), 63 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index baab03b..3062176 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,18 +24,18 @@ }, { "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "40-3-g1f0726a", - "Rev": "1f0726a76fd50d4b31edde64c28fd29b1df1c4d4" + "Comment": "40-7-g3f8eed9", + "Rev": "3f8eed9f960dddccfe4c89be8ac964295a8b0f32" }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "40-3-g1f0726a", - "Rev": "1f0726a76fd50d4b31edde64c28fd29b1df1c4d4" + "Comment": "40-7-g3f8eed9", + "Rev": "3f8eed9f960dddccfe4c89be8ac964295a8b0f32" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "40-3-g1f0726a", - "Rev": "1f0726a76fd50d4b31edde64c28fd29b1df1c4d4" + "Comment": "40-7-g3f8eed9", + "Rev": "3f8eed9f960dddccfe4c89be8ac964295a8b0f32" }, { "ImportPath": "github.com/coreos/go-semver/semver", diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go index 7f2dd2a..a3629d9 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go @@ -94,6 +94,11 @@ func (n ACFullname) ShortName() string { return strings.Split(n.Name(), "/")[1] } +/* example.com */ +func (n ACFullname) DomainName() string { + return strings.Split(n.Name(), "/")[0] +} + /* example.com/yopla */ func (n ACFullname) Name() string { return strings.Split(string(n), ":")[0] diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go index f725605..ece7895 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go @@ -6,10 +6,8 @@ import ( ) type PodManifest struct { - Name ACFullname `json:"name"` - Pod *PodDefinition `json:"pod"` - Envs []Env `json:"envs"` - PrivateNet string `json:"privateNet"` + Name ACFullname `json:"name"` + Pod *PodDefinition `json:"pod"` } type PodDefinition struct { diff --git a/commands/env.go b/commands/env.go index 463d26c..cd94c87 100644 --- a/commands/env.go +++ b/commands/env.go @@ -62,8 +62,9 @@ func loadEnvCommands(rootCmd *cobra.Command) { } var generateCmd = &cobra.Command{ - Use: "generate", + Use: "generate [manifest...]", Short: "generate units for " + service + " on env :" + env, + Long: `generate units using remote resolved or local pod/aci manifests`, Run: func(cmd *cobra.Command, args []string) { generateService(cmd, args, work, env, service) }, diff --git a/commands/generate.go b/commands/generate.go index 0cfa689..774146c 100644 --- a/commands/generate.go +++ b/commands/generate.go @@ -20,7 +20,7 @@ var generateCmd = &cobra.Command{ } func generateService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).GenerateUnits() + work.LoadEnv(env).LoadService(service).GenerateUnits(args) } func generateEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { diff --git a/work/env-generate.go b/work/env-generate.go index e236d86..c40c826 100644 --- a/work/env-generate.go +++ b/work/env-generate.go @@ -5,6 +5,6 @@ func (e Env) Generate() { for _, service := range services { service := e.LoadService(service) - service.GenerateUnits() + service.GenerateUnits(nil) } } diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index be21c28..c2b747d 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -15,7 +15,7 @@ import ( "strings" ) -func (s Service) GenerateUnits() { +func (s Service) GenerateUnits(sources []string) { s.log.Debug("Generating units") tmpl, err := s.loadUnitTemplate() @@ -47,7 +47,7 @@ func (s Service) GenerateUnits() { nodes = newNodes } - acis, err := s.prepareAciList() + acis, err := s.prepareAciList(sources) if err != nil { s.log.WithError(err).Error("Cannot prepare aci list") return @@ -102,67 +102,145 @@ func (s Service) writeUnit(i int, node map[string]interface{}, tmpl *Templating, } } -func (s Service) prepareAciList() (string, error) { +func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, contents []byte) error { + pod := schema.BlankPodManifest() + err := pod.UnmarshalJSON(contents) + if err != nil { + return err + } + + var podname string + var acis []cntspec.ACFullname + for i, podAci := range pod.Apps { + version, _ := podAci.Image.Labels.Get("version") + fullname := cntspec.NewACFullName(podAci.Image.Name.String() + ":" + version) + if i == 0 { + nameSplit := strings.SplitN(fullname.ShortName(), "_", 2) + podname = fullname.DomainName() + "/" + nameSplit[0] + } + + // resolved, err := fullname.FullyResolved() // TODO should not be resolved for local test ?? + // if err != nil { + // logrus.WithError(err).Fatal("Cannot fully resolve ACI") + // } + acis = append(acis, *fullname) + } + + result[podname] = acis + return nil +} + +func (s Service) aciManifestToMap(result map[string][]cntspec.ACFullname, contents []byte) error { + aci := schema.BlankImageManifest() + err := aci.UnmarshalJSON(contents) + if err != nil { + return err + } + + version, _ := aci.Labels.Get("version") + fullname := cntspec.NewACFullName(aci.Name.String() + ":" + version) + result[fullname.Name()] = []cntspec.ACFullname{*fullname} + return nil +} + +func (s Service) sources(sources []string) map[string][]cntspec.ACFullname { + res := make(map[string][]cntspec.ACFullname) + for _, source := range sources { + content, err := ioutil.ReadFile(source) + if err != nil { + s.log.WithError(err).Warn("Cannot read source file") + continue + } + if err := s.aciManifestToMap(res, content); err != nil { + if err2 := s.podManifestToMap(res, content); err2 != nil { + s.log.WithError(err).WithField("error2", err2).Error("Cannot read manifest file as aci nor pod") + } + } + } + return res +} + +func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { + logAci := s.log.WithField("pod", name) + + app, err := discovery.NewAppFromString(name.String()) + if app.Labels["os"] == "" { + app.Labels["os"] = "linux" + } + if app.Labels["arch"] == "" { + app.Labels["arch"] = "amd64" + } + + endpoint, _, err := discovery.DiscoverEndpoints(*app, false) + if err != nil { + logAci.WithError(err).Fatal("pod discovery failed") + } + + url := endpoint.ACIEndpoints[0].ACI + url = strings.Replace(url, "=aci", "=pod", 1) // TODO this is nexus specific + + logUrl := logAci.WithField("url", url) + response, err := http.Get(url) + if err != nil { + logUrl.WithError(err).Fatal("Cannot get pod manifest content") + return nil + } else { + defer response.Body.Close() + content, err := ioutil.ReadAll(response.Body) + if err != nil { + logUrl.WithError(err).Fatal("Cannot read pod manifest content") + } + tmpMap := make(map[string][]cntspec.ACFullname, 1) + if err := s.podManifestToMap(tmpMap, content); err != nil { + logUrl.WithError(err).Fatal("Cannot read pod content") + } + acis := tmpMap[name.ShortName()] + if acis == nil { + logUrl.Fatal("Discovered pod name does not match requested") + } + return acis + } +} + +func (s Service) prepareAciList(sources []string) (string, error) { if len(s.manifest.Containers) == 0 { return "", nil } + override := s.sources(sources) + s.log.WithField("data", override).Debug("Local resolved sources") + var acis string for _, aci := range s.manifest.Containers { + containerLog := s.log.WithField("container", aci.String()) + containerLog.Debug("Processing container") if strings.HasPrefix(aci.ShortName(), "pod-") { - logAci := s.log.WithField("aci", aci) - - app, err := discovery.NewAppFromString(aci.String()) - if app.Labels["os"] == "" { - app.Labels["os"] = "linux" - } - if app.Labels["arch"] == "" { - app.Labels["arch"] = "amd64" + var podAcis []cntspec.ACFullname + if override[aci.Name()] != nil { + containerLog.Debug("Using local source to resolve") + podAcis = override[aci.Name()] + } else { + containerLog.Debug("Using remote source to resolve") + podAcis = s.discoverPod(aci) } - - endpoint, _, err := discovery.DiscoverEndpoints(*app, false) - if err != nil { - logAci.WithError(err).Fatal("pod discovery failed") + for _, aci := range podAcis { + acis += aci.String() + " " } - - url := endpoint.ACIEndpoints[0].ACI - url = strings.Replace(url, "=aci", "=pod", 1) // TODO this is nexus specific - - logUrl := logAci.WithField("url", url) - response, err := http.Get(url) - if err != nil { - logUrl.WithError(err).Fatal("Cannot get pod manifest content") + } else { + var taci cntspec.ACFullname + if override[aci.Name()] != nil { + containerLog.Debug("Using local source to resolve") + taci = override[aci.Name()][0] } else { - defer response.Body.Close() - contents, err := ioutil.ReadAll(response.Body) + containerLog.Debug("Using remote source to resolve") + aciTmp, err := aci.FullyResolved() + taci = *aciTmp if err != nil { - logUrl.WithError(err).Fatal("Cannot read pod manifest content") - } - pod := schema.BlankPodManifest() - pod.UnmarshalJSON(contents) - - for _, podAci := range pod.Apps { - version, ok := podAci.Image.Labels.Get("version") - if !ok { - version = "latest" - } - fullname := cntspec.NewACFullName(podAci.Image.Name.String() + ":" + version) - - resolved, err := fullname.FullyResolved() - if err != nil { - logAci.WithError(err).Fatal("Cannot fully resolve ACI") - } - acis += resolved.String() + " " + containerLog.Fatal("Cannot resolve aci") + return "", err } } - - } else { - aci, err := aci.FullyResolved() - if err != nil { - s.log.WithError(err).WithField("aci", aci).Error("Cannot resolve aci") - return "", err - } - acis += aci.String() + " " + acis += taci.String() + " " } } if acis == "" { From 89909314217d9654982e10cff17860a0d307bd20 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 5 Nov 2015 15:05:49 +0100 Subject: [PATCH 010/163] fix unknown log level message --- commands/gg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/gg.go b/commands/gg.go index 486dc33..09b895b 100644 --- a/commands/gg.go +++ b/commands/gg.go @@ -27,7 +27,7 @@ func Execute() { PersistentPreRun: func(cmd *cobra.Command, args []string) { level, err := log.ParseLevel(logLevel) if err != nil { - fmt.Printf("Unknown log level : %s", logLevel) + fmt.Printf("Unknown log level : %s\n", logLevel) os.Exit(1) } log.SetLevel(level) From 9ccb349828646990a6fd1dfe5350bc7d13c2350e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 5 Nov 2015 15:15:00 +0100 Subject: [PATCH 011/163] fix discovered pod name check --- work/env/service-generate-units.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index c2b747d..9ad6145 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -194,7 +194,7 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { if err := s.podManifestToMap(tmpMap, content); err != nil { logUrl.WithError(err).Fatal("Cannot read pod content") } - acis := tmpMap[name.ShortName()] + acis := tmpMap[name.Name()] if acis == nil { logUrl.Fatal("Discovered pod name does not match requested") } From dfd1c725ed5fdb8ce95527f90f554906ce69cd55 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 5 Nov 2015 15:18:12 +0100 Subject: [PATCH 012/163] check discovery http status --- work/env/service-generate-units.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/work/env/service-generate-units.go b/work/env/service-generate-units.go index 9ad6145..d03d545 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate-units.go @@ -185,6 +185,10 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { logUrl.WithError(err).Fatal("Cannot get pod manifest content") return nil } else { + if response.StatusCode != 200 { + logUrl.WithField("status_code", response.StatusCode).WithField("status_message", response.Status). + Fatal("Receive response error for discovery") + } defer response.Body.Close() content, err := ioutil.ReadAll(response.Body) if err != nil { From 58b8cfb93e525da26bce714343470e59fe36f771 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Fri, 6 Nov 2015 14:38:26 +0100 Subject: [PATCH 013/163] rename compare command to check --- commands/{compare.go => check.go} | 6 +++--- commands/env.go | 20 ++++++++++---------- commands/restart.go | 23 +++++++++++++++++++++++ work/env/service.go | 2 +- 4 files changed, 37 insertions(+), 14 deletions(-) rename commands/{compare.go => check.go} (85%) create mode 100644 commands/restart.go diff --git a/commands/compare.go b/commands/check.go similarity index 85% rename from commands/compare.go rename to commands/check.go index c7e5f6d..9bb5102 100644 --- a/commands/compare.go +++ b/commands/check.go @@ -7,7 +7,7 @@ import ( "strings" ) -func compareEnv(cmd *cobra.Command, args []string, work *work.Work, envString string) { +func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString string) { logEnv := logrus.WithField("env", envString) logEnv.Info("Running command") @@ -44,7 +44,7 @@ func compareEnv(cmd *cobra.Command, args []string, work *work.Work, envString st } } -func compareService(cmd *cobra.Command, args []string, work *work.Work, env string, serviceName string) { +func checkService(cmd *cobra.Command, args []string, work *work.Work, env string, serviceName string) { service := work.LoadEnv(env).LoadService(serviceName) - service.Compare() + service.Check() } diff --git a/commands/env.go b/commands/env.go index cd94c87..0b4874c 100644 --- a/commands/env.go +++ b/commands/env.go @@ -18,11 +18,11 @@ func loadEnvCommands(rootCmd *cobra.Command) { Short: "Run command for " + env, } - var compare = &cobra.Command{ - Use: "compare", - Short: "Compare local units with what is running on fleet on " + env, + var check = &cobra.Command{ + Use: "check", + Short: "Check local units with what is running on fleet on " + env, Run: func(cmd *cobra.Command, args []string) { - compareEnv(cmd, args, work, env) + checkEnv(cmd, args, work, env) }, } @@ -33,7 +33,7 @@ func loadEnvCommands(rootCmd *cobra.Command) { fleetctl(cmd, args, work, env) }, } - envCmd.AddCommand(runCmd, compare) + envCmd.AddCommand(runCmd, check) var generateCmd = &cobra.Command{ Use: "generate", @@ -53,11 +53,11 @@ func loadEnvCommands(rootCmd *cobra.Command) { Short: "run command for " + service + " on env " + env, } - var compareCmd = &cobra.Command{ - Use: "compare", - Short: "Compare local units with what is running on fleet on " + env + "for " + service, + var checkCmd = &cobra.Command{ + Use: "check", + Short: "Check local units matches what is running on " + env + " for " + service, Run: func(cmd *cobra.Command, args []string) { - compareService(cmd, args, work, env, service) + checkService(cmd, args, work, env, service) }, } @@ -70,7 +70,7 @@ func loadEnvCommands(rootCmd *cobra.Command) { }, } - serviceCmd.AddCommand(generateCmd, compareCmd) + serviceCmd.AddCommand(generateCmd, checkCmd) envCmd.AddCommand(serviceCmd) } diff --git a/commands/restart.go b/commands/restart.go new file mode 100644 index 0000000..58521d5 --- /dev/null +++ b/commands/restart.go @@ -0,0 +1,23 @@ +package commands + + +// check running tmux +// running as root ?? + +// lock +// notify slack + +// store old version + +// tell LB to stop stop sending requests +// wait +// tell service X to stop +// wait +// start new version of X +// check that service is running well + +// go to next server + +// notify slack end +// release lock + diff --git a/work/env/service.go b/work/env/service.go index 30a05e7..ed19a6f 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -53,7 +53,7 @@ func (s *Service) ListUnits() []string { return res } -func (s *Service) Compare() { +func (s *Service) Check() { unitNames := s.ListUnits() for _, unit := range unitNames { logUnit := s.log.WithField("unit", unit) From 44d1fae099bff961c74660c9465f39f0da524eb1 Mon Sep 17 00:00:00 2001 From: Puckel_ Date: Mon, 9 Nov 2015 15:40:22 +0100 Subject: [PATCH 014/163] Correct ggn version cmd output --- commands/version.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/version.go b/commands/version.go index cd447d7..bbdf51e 100644 --- a/commands/version.go +++ b/commands/version.go @@ -9,10 +9,10 @@ import ( var versionCmd = &cobra.Command{ Use: "version", - Short: "Version of gg", + Short: "Version of ggn", Long: `Print the version number of cnt`, Run: func(cmd *cobra.Command, args []string) { - fmt.Print("gg\n\n") + fmt.Print("ggn\n\n") fmt.Printf("version : %s\n", application.Version) if application.BuildDate != "" { fmt.Printf("build date : %s\n", application.BuildDate) From a4803bce771aa9e82f4b59d88607af23035a2f71 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Mon, 9 Nov 2015 16:46:14 +0100 Subject: [PATCH 015/163] add lock commands on service --- commands/env.go | 22 ++++++++++++++++++++-- commands/lock.go | 27 +++++++++++++++++++++++++++ commands/restart.go | 22 ---------------------- commands/update.go | 21 +++++++++++++++++++++ spec/env.go | 6 +++++- work/env.go | 19 +++++++++++++++++++ work/env/service.go | 35 +++++++++++++++++++++++++++++++---- 7 files changed, 123 insertions(+), 29 deletions(-) create mode 100644 commands/lock.go create mode 100644 commands/update.go diff --git a/commands/env.go b/commands/env.go index 0b4874c..0ea7e5e 100644 --- a/commands/env.go +++ b/commands/env.go @@ -63,14 +63,32 @@ func loadEnvCommands(rootCmd *cobra.Command) { var generateCmd = &cobra.Command{ Use: "generate [manifest...]", - Short: "generate units for " + service + " on env :" + env, + Short: "generate units for " + service + " on env " + env, Long: `generate units using remote resolved or local pod/aci manifests`, Run: func(cmd *cobra.Command, args []string) { generateService(cmd, args, work, env, service) }, } - serviceCmd.AddCommand(generateCmd, checkCmd) + var ttl string + var lockCmd = &cobra.Command{ + Use: "lock [message...]", + Short: "lock " + service + " on env " + env, + Run: func(cmd *cobra.Command, args []string) { + lock(cmd, args, work, env, service, ttl) + }, + } + lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") + + var unlockCmd = &cobra.Command{ + Use: "unlock", + Short: "unlock " + service + " on env " + env, + Run: func(cmd *cobra.Command, args []string) { + unLock(cmd, args, work, env, service) + }, + } + + serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd) envCmd.AddCommand(serviceCmd) } diff --git a/commands/lock.go b/commands/lock.go new file mode 100644 index 0000000..19c6ec5 --- /dev/null +++ b/commands/lock.go @@ -0,0 +1,27 @@ +package commands + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/work" + "github.com/spf13/cobra" + "strings" + "time" +) + +func unLock(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { + work.LoadEnv(env).LoadService(service).LockRelease() +} + +func lock(cmd *cobra.Command, args []string, work *work.Work, env string, service string, duration string) { + if len(args) == 0 { + logrus.Fatal("Please add a message to describe lock") + } + + message := strings.Join(args, " ") + ttl, err := time.ParseDuration(duration) + if err != nil { + logrus.WithError(err).Fatal("Wrong value for ttl") + } + + work.LoadEnv(env).LoadService(service).LockService(ttl, message) +} diff --git a/commands/restart.go b/commands/restart.go index 58521d5..cdff10d 100644 --- a/commands/restart.go +++ b/commands/restart.go @@ -1,23 +1 @@ package commands - - -// check running tmux -// running as root ?? - -// lock -// notify slack - -// store old version - -// tell LB to stop stop sending requests -// wait -// tell service X to stop -// wait -// start new version of X -// check that service is running well - -// go to next server - -// notify slack end -// release lock - diff --git a/commands/update.go b/commands/update.go new file mode 100644 index 0000000..bf72ad3 --- /dev/null +++ b/commands/update.go @@ -0,0 +1,21 @@ +package commands + +// check running tmux +// running as root ?? + +// lock +// notify slack + +// store old version + +// tell LB to stop stop sending requests +// wait +// tell service X to stop +// wait +// start new version of X +// check that service is running well + +// go to next server + +// notify slack end +// release lock diff --git a/spec/env.go b/spec/env.go index 4d3defa..50296e3 100644 --- a/spec/env.go +++ b/spec/env.go @@ -1,6 +1,9 @@ package spec -import "github.com/Sirupsen/logrus" +import ( + "github.com/Sirupsen/logrus" + "github.com/coreos/etcd/client" +) const PATH_ATTRIBUTES = "/attributes" @@ -10,4 +13,5 @@ type Env interface { GetAttributes() map[string]interface{} ListMachineNames() []string RunFleetCmdGetOutput(args ...string) (string, error) + EtcdClient() client.KeysAPI } diff --git a/work/env.go b/work/env.go index 6559bf2..9270bd0 100644 --- a/work/env.go +++ b/work/env.go @@ -9,11 +9,13 @@ import ( "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" "github.com/blablacar/green-garden/work/env" + "github.com/coreos/etcd/client" "github.com/juju/errors" "gopkg.in/yaml.v2" "io/ioutil" "os" "strings" + "time" ) const PATH_SERVICES = "/services" @@ -22,6 +24,7 @@ type Config struct { Fleet struct { Endpoint string `yaml:"endpoint,omitempty"` Username string `yaml:"username,omitempty"` + Password string `yaml:"password,omitempty"` Strict_host_key_checking bool `yaml:"strict_host_key_checking,omitempty"` Sudo bool `yaml:"sudo,omitempty"` } `yaml:"fleet,omitempty"` @@ -144,6 +147,22 @@ func (e Env) RunFleetCmdGetOutput(args ...string) (string, error) { return e.runFleetCmdInternal(true, args...) } +func (e Env) EtcdClient() client.KeysAPI { + cfg := client.Config{ + Endpoints: []string{"http://" + e.config.Fleet.Endpoint}, + Username: e.config.Fleet.Username, + Password: e.config.Fleet.Password, + Transport: client.DefaultTransport, + HeaderTimeoutPerRequest: time.Second, + } + c, err := client.New(cfg) + if err != nil { + e.log.WithError(err).Fatal("Failed to create etcd client") + } + kapi := client.NewKeysAPI(c) + return kapi +} + func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) { if e.config.Fleet.Endpoint == "" { return "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") diff --git a/work/env/service.go b/work/env/service.go index ed19a6f..61845a3 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -6,9 +6,12 @@ import ( "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" "github.com/blablacar/green-garden/work/env/service" + "github.com/coreos/etcd/client" "github.com/juju/errors" + "golang.org/x/net/context" "gopkg.in/yaml.v2" "io/ioutil" + "time" ) type Service struct { @@ -17,16 +20,18 @@ type Service struct { name string manifest spec.ServiceManifest log log.Entry + lockPath string attributes map[string]interface{} } func NewService(path string, name string, env spec.Env) *Service { l := env.GetLog() service := &Service{ - log: *l.WithField("service", name), - path: path + "/" + name, - name: name, - env: env, + log: *l.WithField("service", name), + path: path + "/" + name, + name: name, + env: env, + lockPath: "/ggn-lock/" + name + "/lock", } service.loadManifest() service.loadAttributes() @@ -83,6 +88,28 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { ///////////////////////////////////////////////// +func (s *Service) LockRelease() { + kapi := s.env.EtcdClient() + kapi.Delete(context.Background(), s.lockPath, nil) +} + +func (s *Service) LockService(ttlSecond time.Duration, message string) { + kapi := s.env.EtcdClient() + resp, err := kapi.Get(context.Background(), s.lockPath, nil) + if cerr, ok := err.(*client.ClusterError); ok { + s.log.WithError(cerr).Fatal("Server error reading on fleet") + } else if err != nil { + _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttlSecond}) + if err != nil { + s.log.WithError(err).Fatal("Cannot write lock") + } + } else { + s.log.WithField("message", resp.Node.Value). + WithField("ttl", resp.Node.TTLDuration().String()). + Fatal("Service is already locked") + } +} + func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) From cd63e778794303f5e0a671db78ffb8e3f0185d3f Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Mon, 9 Nov 2015 18:13:10 +0100 Subject: [PATCH 016/163] add travis script --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..181b7b8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: go + +go: + - 1.5 + +script: + - ./build.sh \ No newline at end of file From 736af4652942b49943291dcae8c77d1d75994a11 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Mon, 9 Nov 2015 18:13:32 +0100 Subject: [PATCH 017/163] add basic update command --- commands/env.go | 10 +++++++- commands/lock.go | 4 +-- commands/update.go | 27 ++++++-------------- spec/service.go | 9 +++++-- work/env/service.go | 47 +++++++++++++++++++++++++++++++--- work/env/service/unit.go | 55 ++++++++++++++++++++++++++++++++++------ 6 files changed, 116 insertions(+), 36 deletions(-) diff --git a/commands/env.go b/commands/env.go index 0ea7e5e..d52e7f4 100644 --- a/commands/env.go +++ b/commands/env.go @@ -88,7 +88,15 @@ func loadEnvCommands(rootCmd *cobra.Command) { }, } - serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd) + var updateCmd = &cobra.Command{ + Use: "update", + Short: "update " + service + " on env " + env, + Run: func(cmd *cobra.Command, args []string) { + update(cmd, args, work, env, service) + }, + } + + serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd) envCmd.AddCommand(serviceCmd) } diff --git a/commands/lock.go b/commands/lock.go index 19c6ec5..c30f052 100644 --- a/commands/lock.go +++ b/commands/lock.go @@ -9,7 +9,7 @@ import ( ) func unLock(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).LockRelease() + work.LoadEnv(env).LoadService(service).Unlock() } func lock(cmd *cobra.Command, args []string, work *work.Work, env string, service string, duration string) { @@ -23,5 +23,5 @@ func lock(cmd *cobra.Command, args []string, work *work.Work, env string, servic logrus.WithError(err).Fatal("Wrong value for ttl") } - work.LoadEnv(env).LoadService(service).LockService(ttl, message) + work.LoadEnv(env).LoadService(service).Lock(ttl, message) } diff --git a/commands/update.go b/commands/update.go index bf72ad3..e9f80fe 100644 --- a/commands/update.go +++ b/commands/update.go @@ -1,21 +1,10 @@ package commands -// check running tmux -// running as root ?? - -// lock -// notify slack - -// store old version - -// tell LB to stop stop sending requests -// wait -// tell service X to stop -// wait -// start new version of X -// check that service is running well - -// go to next server - -// notify slack end -// release lock +import ( + "github.com/blablacar/green-garden/work" + "github.com/spf13/cobra" +) + +func update(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { + work.LoadEnv(env).LoadService(service).Update() +} diff --git a/spec/service.go b/spec/service.go index e3f5b82..f7317a1 100644 --- a/spec/service.go +++ b/spec/service.go @@ -1,6 +1,9 @@ package spec -import "github.com/blablacar/cnt/spec" +import ( + "github.com/Sirupsen/logrus" + cntspec "github.com/blablacar/cnt/spec" +) const PATH_SERVICE_MANIFEST = "/service-manifest.yml" @@ -13,11 +16,13 @@ const PATH_SERVICE_MANIFEST = "/service-manifest.yml" const NODE_HOSTNAME = "hostname" type ServiceManifest struct { - Containers []spec.ACFullname `yaml:"containers"` + Containers []cntspec.ACFullname `yaml:"containers"` ExecStartPre []string `yaml:"execStartPre"` ExecStart []string `yaml:"execStart"` Nodes []map[string]interface{} `yaml:"nodes"` } type Service interface { + GetEnv() Env + GetLog() logrus.Entry } diff --git a/work/env/service.go b/work/env/service.go index 61845a3..6c1dbe5 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -1,6 +1,7 @@ package env import ( + "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/green-garden/spec" @@ -11,6 +12,7 @@ import ( "golang.org/x/net/context" "gopkg.in/yaml.v2" "io/ioutil" + "os" "time" ) @@ -38,6 +40,14 @@ func NewService(path string, name string, env spec.Env) *Service { return service } +func (s *Service) GetEnv() spec.Env { + return s.env +} + +func (s *Service) GetLog() logrus.Entry { + return s.log +} + func (s *Service) LoadUnit(name string) *service.Unit { unit := service.NewUnit(s.path+"/units", name, s) return unit @@ -86,20 +96,22 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { return s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) } -///////////////////////////////////////////////// +func (s *Service) Unlock() { + s.log.Info("Unlock") -func (s *Service) LockRelease() { kapi := s.env.EtcdClient() kapi.Delete(context.Background(), s.lockPath, nil) } -func (s *Service) LockService(ttlSecond time.Duration, message string) { +func (s *Service) Lock(ttl time.Duration, message string) { + s.log.WithField("ttl", ttl).WithField("message", message).Info("lock") + kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) if cerr, ok := err.(*client.ClusterError); ok { s.log.WithError(cerr).Fatal("Server error reading on fleet") } else if err != nil { - _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttlSecond}) + _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttl}) if err != nil { s.log.WithError(err).Fatal("Cannot write lock") } @@ -110,6 +122,33 @@ func (s *Service) LockService(ttlSecond time.Duration, message string) { } } +func (s *Service) Update() { + s.log.Info("Updating service") + s.GenerateUnits(nil) + + hostname, _ := os.Hostname() + s.Lock(time.Hour*1, "["+os.Getenv("USER")+"@"+hostname+"] Updating") + for _, unit := range s.ListUnits() { + s.LoadUnit(unit).Destroy() + time.Sleep(time.Second * 2) + err := s.LoadUnit(unit).Start() + if err != nil { + log.WithError(err).Fatal("Failed to start service. Keeping lock") + } + } + s.Unlock() + + // TODO + // check running tmux + // running as root ?? + // notify slack + // store old version + // !!!!! check that service is running well before going to next server !!! + +} + +///////////////////////////////////////////////// + func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 473a8e9..a474e4b 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -2,35 +2,74 @@ package service import ( "bufio" + "github.com/Sirupsen/logrus" "github.com/blablacar/green-garden/spec" "io/ioutil" "strings" ) type Unit struct { - path string - name string - service spec.Service + log logrus.Entry + path string + name string + unitPath string + service spec.Service } func NewUnit(path string, name string, service spec.Service) *Unit { + l := service.GetLog() unit := &Unit{ - path: path, - name: name, - service: service, + log: *l.WithField("unit", name), + service: service, + path: path, + name: name, + unitPath: path + "/" + name, } return unit } func (u Unit) GetUnitContentAsFleeted() (string, error) { - unitPath := u.path + "/" + u.name - unitFileContent, err := ioutil.ReadFile(unitPath) + unitFileContent, err := ioutil.ReadFile(u.unitPath) if err != nil { return "", err } return convertMultilineUnitToString(unitFileContent), nil } +func (u Unit) Start() error { + u.log.Info("Starting") + _, err := u.service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) + if err != nil { + logrus.WithError(err).Error("Cannot start unit") + return err + } + return nil +} + +func (u Unit) Destroy() error { + u.log.Info("Destroying") // todo check that service exists before destroy + _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.name) + if err != nil { + logrus.WithError(err).Warn("Cannot destroy unit") + return err + } + return nil +} + +//func (u Unit) Stop() { +// u.service.GetEnv().RunFleetCmdGetOutput("stop", u.name) +//} +// +//func (u Unit) Status() { +// u.service.GetEnv().RunFleetCmdGetOutput("status ", u.name) +//} +// +//func (u Unit) Cat() { +// u.service.GetEnv().RunFleetCmdGetOutput("cat ", u.name) +//} + +/////////////////////////////////////////// + func convertMultilineUnitToString(content []byte) string { var lines []string var currentLine string From 16a4f265f3105647acea9037bea2bc2909646da8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Mon, 9 Nov 2015 18:16:02 +0100 Subject: [PATCH 018/163] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 24da08f..c0327fe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # green-garden +[![GoDoc](https://godoc.org/blablacar/green-garden?status.png)](https://godoc.org/blablacar/green-garden) [![Build Status](https://travis-ci.org/blablacar/green-garden.svg?branch=master)](https://travis-ci.org/blablacar/green-garden) + # commands From 9e6f2daf16ef0f1d99035294167310058ecc4924 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 12 Nov 2015 14:07:52 +0100 Subject: [PATCH 019/163] add update command to service --- Godeps/Godeps.json | 64 +- .../github.com/blablacar/cnt/log/formatter.go | 27 +- .../blablacar/cnt/log/formatter_test.go | 13 + .../blablacar/cnt/spec/ac-fullname.go | 2 +- .../github.com/coreos/etcd/client/README.md | 110 + .../coreos/etcd/client/auth_role.go | 235 + .../coreos/etcd/client/auth_user.go | 297 + .../coreos/etcd/client/cancelreq.go | 20 + .../coreos/etcd/client/cancelreq_go14.go | 17 + .../github.com/coreos/etcd/client/client.go | 514 + .../coreos/etcd/client/client_test.go | 896 + .../coreos/etcd/client/cluster_error.go | 33 + .../src/github.com/coreos/etcd/client/curl.go | 70 + .../github.com/coreos/etcd/client/discover.go | 21 + .../src/github.com/coreos/etcd/client/doc.go | 71 + .../etcd/client/fake_transport_go14_test.go | 41 + .../coreos/etcd/client/fake_transport_test.go | 42 + .../coreos/etcd/client/keys.generated.go | 1000 + .../src/github.com/coreos/etcd/client/keys.go | 651 + .../coreos/etcd/client/keys_bench_test.go | 87 + .../coreos/etcd/client/keys_test.go | 1407 + .../github.com/coreos/etcd/client/members.go | 272 + .../coreos/etcd/client/members_test.go | 522 + .../src/github.com/coreos/etcd/client/srv.go | 65 + .../github.com/coreos/etcd/client/srv_test.go | 102 + .../coreos/etcd/pkg/pathutil/path.go | 29 + .../coreos/etcd/pkg/pathutil/path_test.go | 38 + .../github.com/coreos/etcd/pkg/types/id.go | 41 + .../coreos/etcd/pkg/types/id_test.go | 95 + .../github.com/coreos/etcd/pkg/types/set.go | 178 + .../coreos/etcd/pkg/types/set_test.go | 186 + .../github.com/coreos/etcd/pkg/types/slice.go | 22 + .../coreos/etcd/pkg/types/slice_test.go | 30 + .../github.com/coreos/etcd/pkg/types/urls.go | 74 + .../coreos/etcd/pkg/types/urls_test.go | 169 + .../coreos/etcd/pkg/types/urlsmap.go | 91 + .../etcd/pkg/types/urlsmap_go15_test.go | 40 + .../coreos/etcd/pkg/types/urlsmap_test.go | 99 + .../src/github.com/coreos/fleet/log/log.go | 103 + .../src/github.com/coreos/fleet/pkg/args.go | 27 + .../github.com/coreos/fleet/pkg/args_test.go | 44 + .../github.com/coreos/fleet/pkg/backoff.go | 27 + .../coreos/fleet/pkg/backoff_test.go | 40 + .../github.com/coreos/fleet/pkg/filepath.go | 56 + .../coreos/fleet/pkg/filepath_test.go | 57 + .../github.com/coreos/fleet/pkg/filesystem.go | 42 + .../coreos/fleet/pkg/filesystem_test.go | 53 + .../src/github.com/coreos/fleet/pkg/flag.go | 47 + .../github.com/coreos/fleet/pkg/flag_test.go | 39 + .../src/github.com/coreos/fleet/pkg/http.go | 34 + .../github.com/coreos/fleet/pkg/lease/etcd.go | 205 + .../coreos/fleet/pkg/lease/etcd_test.go | 131 + .../coreos/fleet/pkg/lease/interface.go | 72 + .../github.com/coreos/fleet/pkg/reconcile.go | 93 + .../coreos/fleet/pkg/reconcile_test.go | 138 + .../src/github.com/coreos/fleet/pkg/set.go | 168 + .../github.com/coreos/fleet/pkg/set_test.go | 164 + .../src/github.com/coreos/fleet/pkg/tls.go | 96 + .../github.com/coreos/fleet/pkg/tls_test.go | 210 + .../src/github.com/coreos/fleet/unit/fake.go | 95 + .../github.com/coreos/fleet/unit/fake_test.go | 114 + .../github.com/coreos/fleet/unit/generator.go | 127 + .../coreos/fleet/unit/generator_test.go | 79 + .../github.com/coreos/fleet/unit/manager.go | 32 + .../src/github.com/coreos/fleet/unit/unit.go | 257 + .../github.com/coreos/fleet/unit/unit_test.go | 400 + .../coreos/go-systemd/unit/deserialize.go | 276 + .../go-systemd/unit/deserialize_test.go | 381 + .../coreos/go-systemd/unit/end_to_end_test.go | 88 + .../coreos/go-systemd/unit/escape.go | 116 + .../coreos/go-systemd/unit/escape_test.go | 211 + .../coreos/go-systemd/unit/option.go | 54 + .../coreos/go-systemd/unit/option_test.go | 214 + .../coreos/go-systemd/unit/serialize.go | 75 + .../coreos/go-systemd/unit/serialize_test.go | 170 + .../cadvisor/utils/cloudinfo/cloudinfo.go | 87 + .../google/cadvisor/utils/cloudinfo/gce.go | 36 + .../google/cadvisor/utils/cpuload/cpuload.go | 45 + .../cadvisor/utils/cpuload/netlink/conn.go | 95 + .../cadvisor/utils/cpuload/netlink/defs.go | 26 + .../utils/cpuload/netlink/example/example.go | 40 + .../cadvisor/utils/cpuload/netlink/netlink.go | 241 + .../cadvisor/utils/cpuload/netlink/reader.go | 78 + .../github.com/google/cadvisor/utils/fs/fs.go | 44 + .../cadvisor/utils/fs/mockfs/fakefile.go | 35 + .../google/cadvisor/utils/fs/mockfs/mockfs.go | 55 + .../google/cadvisor/utils/machine/machine.go | 297 + .../cadvisor/utils/machine/testdata/cpuinfo | 251 + .../cadvisor/utils/machine/topology_test.go | 117 + .../oomparser/containerOomExampleLog.txt | 44 + .../utils/oomparser/oomexample/main.go | 41 + .../cadvisor/utils/oomparser/oomparser.go | 220 + .../utils/oomparser/oomparser_test.go | 166 + .../utils/oomparser/systemOomExampleLog.txt | 362 + .../github.com/google/cadvisor/utils/path.go | 24 + .../google/cadvisor/utils/procfs/doc.go | 17 + .../google/cadvisor/utils/procfs/jiffy.go | 33 + .../cadvisor/utils/sysfs/fakesysfs/fake.go | 114 + .../google/cadvisor/utils/sysfs/sysfs.go | 249 + .../google/cadvisor/utils/sysinfo/sysinfo.go | 210 + .../cadvisor/utils/sysinfo/sysinfo_test.go | 132 + .../google/cadvisor/utils/timed_store.go | 161 + .../google/cadvisor/utils/timed_store_test.go | 221 + .../github.com/google/cadvisor/utils/utils.go | 29 + .../github.com/jonboulle/clockwork/.gitignore | 25 + .../jonboulle/clockwork/.travis.yml | 5 + .../github.com/jonboulle/clockwork/LICENSE | 201 + .../github.com/jonboulle/clockwork/README.md | 61 + .../jonboulle/clockwork/clockwork.go | 169 + .../jonboulle/clockwork/clockwork_test.go | 129 + .../jonboulle/clockwork/example_test.go | 49 + .../src/github.com/ugorji/go/codec/0doc.go | 150 + .../src/github.com/ugorji/go/codec/README.md | 148 + .../src/github.com/ugorji/go/codec/binc.go | 909 + .../src/github.com/ugorji/go/codec/cbor.go | 566 + .../github.com/ugorji/go/codec/cbor_test.go | 205 + .../github.com/ugorji/go/codec/codec_test.go | 1175 + .../ugorji/go/codec/codecgen/README.md | 36 + .../ugorji/go/codec/codecgen/gen.go | 281 + .../github.com/ugorji/go/codec/codecgen/z.go | 3 + .../ugorji/go/codec/codecgen_test.go | 22 + .../src/github.com/ugorji/go/codec/decode.go | 1544 + .../src/github.com/ugorji/go/codec/encode.go | 1190 + .../ugorji/go/codec/fast-path.generated.go | 24254 ++++++++++++++++ .../ugorji/go/codec/fast-path.go.tmpl | 409 + .../ugorji/go/codec/gen-dec-array.go.tmpl | 77 + .../ugorji/go/codec/gen-dec-map.go.tmpl | 42 + .../ugorji/go/codec/gen-helper.generated.go | 215 + .../ugorji/go/codec/gen-helper.go.tmpl | 349 + .../ugorji/go/codec/gen.generated.go | 132 + .../src/github.com/ugorji/go/codec/gen.go | 1805 ++ .../src/github.com/ugorji/go/codec/helper.go | 894 + .../ugorji/go/codec/helper_internal.go | 151 + .../ugorji/go/codec/helper_not_unsafe.go | 20 + .../github.com/ugorji/go/codec/helper_test.go | 155 + .../ugorji/go/codec/helper_unsafe.go | 39 + .../src/github.com/ugorji/go/codec/json.go | 1090 + .../src/github.com/ugorji/go/codec/msgpack.go | 839 + .../src/github.com/ugorji/go/codec/noop.go | 163 + .../github.com/ugorji/go/codec/prebuild.go | 3 + .../github.com/ugorji/go/codec/prebuild.sh | 193 + .../src/github.com/ugorji/go/codec/py_test.go | 30 + .../src/github.com/ugorji/go/codec/rpc.go | 180 + .../src/github.com/ugorji/go/codec/simple.go | 505 + .../ugorji/go/codec/test-cbor-goldens.json | 639 + .../src/github.com/ugorji/go/codec/test.py | 120 + .../src/github.com/ugorji/go/codec/tests.sh | 55 + .../src/github.com/ugorji/go/codec/time.go | 193 + .../github.com/ugorji/go/codec/values_test.go | 203 + .../src/golang.org/x/net/context/context.go | 447 + .../golang.org/x/net/context/context_test.go | 575 + .../x/net/context/ctxhttp/cancelreq.go | 18 + .../x/net/context/ctxhttp/cancelreq_go14.go | 23 + .../x/net/context/ctxhttp/ctxhttp.go | 79 + .../x/net/context/ctxhttp/ctxhttp_test.go | 72 + .../x/net/context/withtimeout_test.go | 26 + commands/update.go | 6 +- spec/service.go | 1 + ...-generate-units.go => service-generate.go} | 3 + work/env/service.go | 120 +- work/env/service/unit.go | 82 +- 161 files changed, 56715 insertions(+), 36 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/README.md create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/client.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/members.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/log/log.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/args.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/http.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/generator.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/manager.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/path.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/utils.go create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go create mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/README.md create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/json.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/py_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/rpc.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/test.py create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/time.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/context.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/context_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go rename work/env/{service-generate-units.go => service-generate.go} (98%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3062176..34a4dcb 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,27 +24,71 @@ }, { "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "40-7-g3f8eed9", - "Rev": "3f8eed9f960dddccfe4c89be8ac964295a8b0f32" + "Comment": "44-3-g34eae88", + "Rev": "34eae883aa77ba620a9d9f9ec7e93f1077afbd28" }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "40-7-g3f8eed9", - "Rev": "3f8eed9f960dddccfe4c89be8ac964295a8b0f32" + "Comment": "44-3-g34eae88", + "Rev": "34eae883aa77ba620a9d9f9ec7e93f1077afbd28" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "40-7-g3f8eed9", - "Rev": "3f8eed9f960dddccfe4c89be8ac964295a8b0f32" + "Comment": "44-3-g34eae88", + "Rev": "34eae883aa77ba620a9d9f9ec7e93f1077afbd28" + }, + { + "ImportPath": "github.com/coreos/etcd/client", + "Comment": "v2.3.0-alpha.0-7-gdcf0b45", + "Rev": "dcf0b454838a1b554bd276d4a341ae08f6e2f660" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/pathutil", + "Comment": "v2.3.0-alpha.0-7-gdcf0b45", + "Rev": "dcf0b454838a1b554bd276d4a341ae08f6e2f660" + }, + { + "ImportPath": "github.com/coreos/etcd/pkg/types", + "Comment": "v2.3.0-alpha.0-7-gdcf0b45", + "Rev": "dcf0b454838a1b554bd276d4a341ae08f6e2f660" + }, + { + "ImportPath": "github.com/coreos/fleet/log", + "Comment": "v0.10.1-116-g2d02451", + "Rev": "2d024517a2c9f1e7492ef00f9ac26500b27556b2" + }, + { + "ImportPath": "github.com/coreos/fleet/pkg", + "Comment": "v0.10.1-116-g2d02451", + "Rev": "2d024517a2c9f1e7492ef00f9ac26500b27556b2" + }, + { + "ImportPath": "github.com/coreos/fleet/unit", + "Comment": "v0.10.1-116-g2d02451", + "Rev": "2d024517a2c9f1e7492ef00f9ac26500b27556b2" }, { "ImportPath": "github.com/coreos/go-semver/semver", "Rev": "d043ae190b3202550d026daf009359bb5d761672" }, + { + "ImportPath": "github.com/coreos/go-systemd/unit", + "Comment": "v4", + "Rev": "b4a58d95188dd092ae20072bac14cece0e67c388" + }, + { + "ImportPath": "github.com/google/cadvisor/utils", + "Comment": "v0.19.3-16-g587c022", + "Rev": "587c02275537c2d32e62963d61c191715bdb16de" + }, { "ImportPath": "github.com/inconshreveable/mousetrap", "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" }, + { + "ImportPath": "github.com/jonboulle/clockwork", + "Rev": "fad208dd89dbc316a149043e332a192477f0e2a2" + }, { "ImportPath": "github.com/juju/errors", "Rev": "1b5e39b83d1835fa480e0c2ddefb040ee82d58b3" @@ -73,6 +117,14 @@ "ImportPath": "github.com/spf13/pflag", "Rev": "67cbc198fd11dab704b214c1e629a97af392c085" }, + { + "ImportPath": "github.com/ugorji/go/codec", + "Rev": "1d5269ed4e89d423d40362a0914e1c99adb13cc8" + }, + { + "ImportPath": "golang.org/x/net/context", + "Rev": "ea47fc708ee3e20177f3ca3716217c4ab75942cb" + }, { "ImportPath": "golang.org/x/net/html", "Rev": "ea47fc708ee3e20177f3ca3716217c4ab75942cb" diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go b/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go index b186c5b..ae99572 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go @@ -53,13 +53,13 @@ func (f *BlaFormatter) Format(entry *log.Entry) ([]byte, error) { paths := strings.SplitN(file, "/", pathSkip+1) b := &bytes.Buffer{} - fmt.Fprintf(b, "%s %s%-5s%s %s%40s:%-3d%s %s%-44s%s", + fmt.Fprintf(b, "%s %s%-5s%s %s%30s:%-3d%s %s%-44s%s", f.timeColor(entry.Level)(time), f.levelColor(entry.Level), level, reset, f.fileColor(entry.Level), - paths[pathSkip], + f.reduceFilePath(paths[pathSkip], 30), line, reset, f.textColor(entry.Level), @@ -73,6 +73,29 @@ func (f *BlaFormatter) Format(entry *log.Entry) ([]byte, error) { return b.Bytes(), nil } +func (f *BlaFormatter) reduceFilePath(path string, max int) string { + if len(path) <= max { + return path + } + + split := strings.Split(path, "/") + splitlen := len(split) + reducedSize := len(path) + var buffer bytes.Buffer + for i, e := range split { + if reducedSize > max && i+1 < splitlen { + buffer.WriteByte(e[0]) + reducedSize -= len(e) - 1 + } else { + buffer.WriteString(e) + } + if i+1 < splitlen { + buffer.WriteByte('/') + } + } + return buffer.String() +} + func (f *BlaFormatter) findFileAndLine() (string, int) { var file string var line int diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go b/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go index 2f55a4e..a903480 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go @@ -26,5 +26,18 @@ func TestLog(t *testing.T) { logrus.WithField("yopla", "boom").Warn("salut") logrus.WithField("yopla", "boom").Error("salut") logrus.WithField("yopla", "boom").Panic("salut") +} + +func TestReduce(t *testing.T) { + RegisterTestingT(t) + + format := BlaFormatter{} + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 50)).To(Equal("com/blablacar/cnt/test.go")) + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 25)).To(Equal("com/blablacar/cnt/test.go")) + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 24)).To(Equal("c/blablacar/cnt/test.go")) + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 23)).To(Equal("c/blablacar/cnt/test.go")) + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 22)).To(Equal("c/b/cnt/test.go")) + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 12)).To(Equal("c/b/c/test.go")) + Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 10)).To(Equal("c/b/c/test.go")) } diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go index a3629d9..457ed7a 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go @@ -36,7 +36,7 @@ func (n ACFullname) LatestVersion() (string, error) { return "", errors.Annotate(err, "Latest discovery fail") } - r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)$`) + r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)(\-[\dA-Za-z]+){0,1}$`) url := getRedirectForLatest(endpoint.ACIEndpoints[0].ACI) log.Debug("latest version url is ", url) diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/README.md b/Godeps/_workspace/src/github.com/coreos/etcd/client/README.md new file mode 100644 index 0000000..bb51bfe --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/README.md @@ -0,0 +1,110 @@ +# etcd/client + +etcd/client is the Go client library for etcd. + +[![GoDoc](https://godoc.org/github.com/coreos/etcd/client?status.png)](https://godoc.org/github.com/coreos/etcd/client) + +## Install + +```bash +go get github.com/coreos/etcd/client +``` + +## Usage + +```go +package main + +import ( + "log" + "time" + + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" + "github.com/coreos/etcd/client" +) + +func main() { + cfg := client.Config{ + Endpoints: []string{"http://127.0.0.1:2379"}, + Transport: client.DefaultTransport, + // set timeout per request to fail fast when the target endpoint is unavailable + HeaderTimeoutPerRequest: time.Second, + } + c, err := client.New(cfg) + if err != nil { + log.Fatal(err) + } + kapi := client.NewKeysAPI(c) + // set "/foo" key with "bar" value + log.Print("Setting '/foo' key with 'bar' value") + resp, err := kapi.Set(context.Background(), "/foo", "bar", nil) + if err != nil { + log.Fatal(err) + } else { + // print common key info + log.Printf("Set is done. Metadata is %q\n", resp) + } + // get "/foo" key's value + log.Print("Getting '/foo' key value") + resp, err = kapi.Get(context.Background(), "/foo", nil) + if err != nil { + log.Fatal(err) + } else { + // print common key info + log.Printf("Get is done. Metadata is %q\n", resp) + // print value + log.Printf("%q key has %q value\n", resp.Node.Key, resp.Node.Value) + } +} +``` + +## Error Handling + +etcd client might return three types of errors. + +- context error + +Each API call has its first parameter as `context`. A context can be canceled or have an attached deadline. If the context is canceled or reaches its deadline, the responding context error will be returned no matter what internal errors the API call has already encountered. + +- cluster error + +Each API call tries to send request to the cluster endpoints one by one until it successfully gets a response. If a requests to an endpoint fails, due to exceeding per request timeout or connection issues, the error will be added into a list of errors. If all possible endpoints fail, a cluster error that includes all encountered errors will be returned. + +- response error + +If the response gets from the cluster is invalid, a plain string error will be returned. For example, it might be a invalid JSON error. + +Here is the example code to handle client errors: + +```go +cfg := client.Config{Endpoints: []string{"http://etcd1:2379,http://etcd2:2379,http://etcd3:2379"}} +c, err := client.New(cfg) +if err != nil { + log.Fatal(err) +} + +kapi := client.NewKeysAPI(c) +resp, err := kapi.Set(ctx, "test", "bar", nil) +if err != nil { + if err == context.Canceled { + // ctx is canceled by another routine + } else if err == context.DeadlineExceeded { + // ctx is attached with a deadline and it exceeded + } else if cerr, ok := err.(*client.ClusterError); ok { + // process (cerr.Errors) + } else { + // bad cluster endpoints, which are not etcd servers + } +} +``` + + +## Caveat + +1. etcd/client prefers to use the same endpoint as long as the endpoint continues to work well. This saves socket resources, and improves efficiency for both client and server side. This preference doesn't remove consistency from the data consumed by the client because data replicated to each etcd member has already passed through the consensus process. + +2. etcd/client does round-robin rotation on other available endpoints if the preferred endpoint isn't functioning properly. For example, if the member that etcd/client connects to is hard killed, etcd/client will fail on the first attempt with the killed member, and succeed on the second attempt with another member. If it fails to talk to all available endpoints, it will return all errors happened. + +3. Default etcd/client cannot handle the case that the remote server is SIGSTOPed now. TCP keepalive mechanism doesn't help in this scenario because operating system may still send TCP keep-alive packets. Over time we'd like to improve this functionality, but solving this issue isn't high priority because a real-life case in which a server is stopped, but the connection is kept alive, hasn't been brought to our attention. + +4. etcd/client cannot detect whether the member in use is healthy when doing read requests. If the member is isolated from the cluster, etcd/client may retrieve outdated data. As a workaround, users could monitor experimental /health endpoint for member healthy information. We are improving it at [#3265](https://github.com/coreos/etcd/issues/3265). diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go new file mode 100644 index 0000000..8de58af --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go @@ -0,0 +1,235 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "bytes" + "encoding/json" + "net/http" + "net/url" + + "golang.org/x/net/context" +) + +type Role struct { + Role string `json:"role"` + Permissions Permissions `json:"permissions"` + Grant *Permissions `json:"grant,omitempty"` + Revoke *Permissions `json:"revoke,omitempty"` +} + +type Permissions struct { + KV rwPermission `json:"kv"` +} + +type rwPermission struct { + Read []string `json:"read"` + Write []string `json:"write"` +} + +type PermissionType int + +const ( + ReadPermission PermissionType = iota + WritePermission + ReadWritePermission +) + +// NewAuthRoleAPI constructs a new AuthRoleAPI that uses HTTP to +// interact with etcd's role creation and modification features. +func NewAuthRoleAPI(c Client) AuthRoleAPI { + return &httpAuthRoleAPI{ + client: c, + } +} + +type AuthRoleAPI interface { + // Add a role. + AddRole(ctx context.Context, role string) error + + // Remove a role. + RemoveRole(ctx context.Context, role string) error + + // Get role details. + GetRole(ctx context.Context, role string) (*Role, error) + + // Grant a role some permission prefixes for the KV store. + GrantRoleKV(ctx context.Context, role string, prefixes []string, permType PermissionType) (*Role, error) + + // Revoke some some permission prefixes for a role on the KV store. + RevokeRoleKV(ctx context.Context, role string, prefixes []string, permType PermissionType) (*Role, error) + + // List roles. + ListRoles(ctx context.Context) ([]string, error) +} + +type httpAuthRoleAPI struct { + client httpClient +} + +type authRoleAPIAction struct { + verb string + name string + role *Role +} + +type authRoleAPIList struct{} + +func (list *authRoleAPIList) HTTPRequest(ep url.URL) *http.Request { + u := v2AuthURL(ep, "roles", "") + req, _ := http.NewRequest("GET", u.String(), nil) + req.Header.Set("Content-Type", "application/json") + return req +} + +func (l *authRoleAPIAction) HTTPRequest(ep url.URL) *http.Request { + u := v2AuthURL(ep, "roles", l.name) + if l.role == nil { + req, _ := http.NewRequest(l.verb, u.String(), nil) + return req + } + b, err := json.Marshal(l.role) + if err != nil { + panic(err) + } + body := bytes.NewReader(b) + req, _ := http.NewRequest(l.verb, u.String(), body) + req.Header.Set("Content-Type", "application/json") + return req +} + +func (r *httpAuthRoleAPI) ListRoles(ctx context.Context) ([]string, error) { + resp, body, err := r.client.Do(ctx, &authRoleAPIList{}) + if err != nil { + return nil, err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil { + return nil, err + } + var userList struct { + Roles []string `json:"roles"` + } + err = json.Unmarshal(body, &userList) + if err != nil { + return nil, err + } + return userList.Roles, nil +} + +func (r *httpAuthRoleAPI) AddRole(ctx context.Context, rolename string) error { + role := &Role{ + Role: rolename, + } + return r.addRemoveRole(ctx, &authRoleAPIAction{ + verb: "PUT", + name: rolename, + role: role, + }) +} + +func (r *httpAuthRoleAPI) RemoveRole(ctx context.Context, rolename string) error { + return r.addRemoveRole(ctx, &authRoleAPIAction{ + verb: "DELETE", + name: rolename, + }) +} + +func (r *httpAuthRoleAPI) addRemoveRole(ctx context.Context, req *authRoleAPIAction) error { + resp, body, err := r.client.Do(ctx, req) + if err != nil { + return err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK, http.StatusCreated); err != nil { + var sec authError + err := json.Unmarshal(body, &sec) + if err != nil { + return err + } + return sec + } + return nil +} + +func (r *httpAuthRoleAPI) GetRole(ctx context.Context, rolename string) (*Role, error) { + return r.modRole(ctx, &authRoleAPIAction{ + verb: "GET", + name: rolename, + }) +} + +func buildRWPermission(prefixes []string, permType PermissionType) rwPermission { + var out rwPermission + switch permType { + case ReadPermission: + out.Read = prefixes + case WritePermission: + out.Write = prefixes + case ReadWritePermission: + out.Read = prefixes + out.Write = prefixes + } + return out +} + +func (r *httpAuthRoleAPI) GrantRoleKV(ctx context.Context, rolename string, prefixes []string, permType PermissionType) (*Role, error) { + rwp := buildRWPermission(prefixes, permType) + role := &Role{ + Role: rolename, + Grant: &Permissions{ + KV: rwp, + }, + } + return r.modRole(ctx, &authRoleAPIAction{ + verb: "PUT", + name: rolename, + role: role, + }) +} + +func (r *httpAuthRoleAPI) RevokeRoleKV(ctx context.Context, rolename string, prefixes []string, permType PermissionType) (*Role, error) { + rwp := buildRWPermission(prefixes, permType) + role := &Role{ + Role: rolename, + Revoke: &Permissions{ + KV: rwp, + }, + } + return r.modRole(ctx, &authRoleAPIAction{ + verb: "PUT", + name: rolename, + role: role, + }) +} + +func (r *httpAuthRoleAPI) modRole(ctx context.Context, req *authRoleAPIAction) (*Role, error) { + resp, body, err := r.client.Do(ctx, req) + if err != nil { + return nil, err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil { + var sec authError + err := json.Unmarshal(body, &sec) + if err != nil { + return nil, err + } + return nil, sec + } + var role Role + err = json.Unmarshal(body, &role) + if err != nil { + return nil, err + } + return &role, nil +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go new file mode 100644 index 0000000..6e0e4c5 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go @@ -0,0 +1,297 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "bytes" + "encoding/json" + "net/http" + "net/url" + "path" + + "golang.org/x/net/context" +) + +var ( + defaultV2AuthPrefix = "/v2/auth" +) + +type User struct { + User string `json:"user"` + Password string `json:"password,omitempty"` + Roles []string `json:"roles"` + Grant []string `json:"grant,omitempty"` + Revoke []string `json:"revoke,omitempty"` +} + +func v2AuthURL(ep url.URL, action string, name string) *url.URL { + if name != "" { + ep.Path = path.Join(ep.Path, defaultV2AuthPrefix, action, name) + return &ep + } + ep.Path = path.Join(ep.Path, defaultV2AuthPrefix, action) + return &ep +} + +// NewAuthAPI constructs a new AuthAPI that uses HTTP to +// interact with etcd's general auth features. +func NewAuthAPI(c Client) AuthAPI { + return &httpAuthAPI{ + client: c, + } +} + +type AuthAPI interface { + // Enable auth. + Enable(ctx context.Context) error + + // Disable auth. + Disable(ctx context.Context) error +} + +type httpAuthAPI struct { + client httpClient +} + +func (s *httpAuthAPI) Enable(ctx context.Context) error { + return s.enableDisable(ctx, &authAPIAction{"PUT"}) +} + +func (s *httpAuthAPI) Disable(ctx context.Context) error { + return s.enableDisable(ctx, &authAPIAction{"DELETE"}) +} + +func (s *httpAuthAPI) enableDisable(ctx context.Context, req httpAction) error { + resp, body, err := s.client.Do(ctx, req) + if err != nil { + return err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK, http.StatusCreated); err != nil { + var sec authError + err := json.Unmarshal(body, &sec) + if err != nil { + return err + } + return sec + } + return nil +} + +type authAPIAction struct { + verb string +} + +func (l *authAPIAction) HTTPRequest(ep url.URL) *http.Request { + u := v2AuthURL(ep, "enable", "") + req, _ := http.NewRequest(l.verb, u.String(), nil) + return req +} + +type authError struct { + Message string `json:"message"` + Code int `json:"-"` +} + +func (e authError) Error() string { + return e.Message +} + +// NewAuthUserAPI constructs a new AuthUserAPI that uses HTTP to +// interact with etcd's user creation and modification features. +func NewAuthUserAPI(c Client) AuthUserAPI { + return &httpAuthUserAPI{ + client: c, + } +} + +type AuthUserAPI interface { + // Add a user. + AddUser(ctx context.Context, username string, password string) error + + // Remove a user. + RemoveUser(ctx context.Context, username string) error + + // Get user details. + GetUser(ctx context.Context, username string) (*User, error) + + // Grant a user some permission roles. + GrantUser(ctx context.Context, username string, roles []string) (*User, error) + + // Revoke some permission roles from a user. + RevokeUser(ctx context.Context, username string, roles []string) (*User, error) + + // Change the user's password. + ChangePassword(ctx context.Context, username string, password string) (*User, error) + + // List users. + ListUsers(ctx context.Context) ([]string, error) +} + +type httpAuthUserAPI struct { + client httpClient +} + +type authUserAPIAction struct { + verb string + username string + user *User +} + +type authUserAPIList struct{} + +func (list *authUserAPIList) HTTPRequest(ep url.URL) *http.Request { + u := v2AuthURL(ep, "users", "") + req, _ := http.NewRequest("GET", u.String(), nil) + req.Header.Set("Content-Type", "application/json") + return req +} + +func (l *authUserAPIAction) HTTPRequest(ep url.URL) *http.Request { + u := v2AuthURL(ep, "users", l.username) + if l.user == nil { + req, _ := http.NewRequest(l.verb, u.String(), nil) + return req + } + b, err := json.Marshal(l.user) + if err != nil { + panic(err) + } + body := bytes.NewReader(b) + req, _ := http.NewRequest(l.verb, u.String(), body) + req.Header.Set("Content-Type", "application/json") + return req +} + +func (u *httpAuthUserAPI) ListUsers(ctx context.Context) ([]string, error) { + resp, body, err := u.client.Do(ctx, &authUserAPIList{}) + if err != nil { + return nil, err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil { + var sec authError + err := json.Unmarshal(body, &sec) + if err != nil { + return nil, err + } + return nil, sec + } + var userList struct { + Users []string `json:"users"` + } + err = json.Unmarshal(body, &userList) + if err != nil { + return nil, err + } + return userList.Users, nil +} + +func (u *httpAuthUserAPI) AddUser(ctx context.Context, username string, password string) error { + user := &User{ + User: username, + Password: password, + } + return u.addRemoveUser(ctx, &authUserAPIAction{ + verb: "PUT", + username: username, + user: user, + }) +} + +func (u *httpAuthUserAPI) RemoveUser(ctx context.Context, username string) error { + return u.addRemoveUser(ctx, &authUserAPIAction{ + verb: "DELETE", + username: username, + }) +} + +func (u *httpAuthUserAPI) addRemoveUser(ctx context.Context, req *authUserAPIAction) error { + resp, body, err := u.client.Do(ctx, req) + if err != nil { + return err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK, http.StatusCreated); err != nil { + var sec authError + err := json.Unmarshal(body, &sec) + if err != nil { + return err + } + return sec + } + return nil +} + +func (u *httpAuthUserAPI) GetUser(ctx context.Context, username string) (*User, error) { + return u.modUser(ctx, &authUserAPIAction{ + verb: "GET", + username: username, + }) +} + +func (u *httpAuthUserAPI) GrantUser(ctx context.Context, username string, roles []string) (*User, error) { + user := &User{ + User: username, + Grant: roles, + } + return u.modUser(ctx, &authUserAPIAction{ + verb: "PUT", + username: username, + user: user, + }) +} + +func (u *httpAuthUserAPI) RevokeUser(ctx context.Context, username string, roles []string) (*User, error) { + user := &User{ + User: username, + Revoke: roles, + } + return u.modUser(ctx, &authUserAPIAction{ + verb: "PUT", + username: username, + user: user, + }) +} + +func (u *httpAuthUserAPI) ChangePassword(ctx context.Context, username string, password string) (*User, error) { + user := &User{ + User: username, + Password: password, + } + return u.modUser(ctx, &authUserAPIAction{ + verb: "PUT", + username: username, + user: user, + }) +} + +func (u *httpAuthUserAPI) modUser(ctx context.Context, req *authUserAPIAction) (*User, error) { + resp, body, err := u.client.Do(ctx, req) + if err != nil { + return nil, err + } + if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil { + var sec authError + err := json.Unmarshal(body, &sec) + if err != nil { + return nil, err + } + return nil, sec + } + var user User + err = json.Unmarshal(body, &user) + if err != nil { + return nil, err + } + return &user, nil +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go new file mode 100644 index 0000000..fefdb40 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go @@ -0,0 +1,20 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// borrowed from golang/net/context/ctxhttp/cancelreq.go + +// +build go1.5 + +package client + +import "net/http" + +func requestCanceler(tr CancelableTransport, req *http.Request) func() { + ch := make(chan struct{}) + req.Cancel = ch + + return func() { + close(ch) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go new file mode 100644 index 0000000..2bed38a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go @@ -0,0 +1,17 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// borrowed from golang/net/context/ctxhttp/cancelreq_go14.go + +// +build !go1.5 + +package client + +import "net/http" + +func requestCanceler(tr CancelableTransport, req *http.Request) func() { + return func() { + tr.CancelRequest(req) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go new file mode 100644 index 0000000..34adb82 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go @@ -0,0 +1,514 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "errors" + "fmt" + "io/ioutil" + "math/rand" + "net" + "net/http" + "net/url" + "reflect" + "sort" + "sync" + "time" + + "golang.org/x/net/context" +) + +var ( + ErrNoEndpoints = errors.New("client: no endpoints available") + ErrTooManyRedirects = errors.New("client: too many redirects") + ErrClusterUnavailable = errors.New("client: etcd cluster is unavailable or misconfigured") + errTooManyRedirectChecks = errors.New("client: too many redirect checks") +) + +var DefaultRequestTimeout = 5 * time.Second + +var DefaultTransport CancelableTransport = &http.Transport{ + Proxy: http.ProxyFromEnvironment, + Dial: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + }).Dial, + TLSHandshakeTimeout: 10 * time.Second, +} + +type Config struct { + // Endpoints defines a set of URLs (schemes, hosts and ports only) + // that can be used to communicate with a logical etcd cluster. For + // example, a three-node cluster could be provided like so: + // + // Endpoints: []string{ + // "http://node1.example.com:2379", + // "http://node2.example.com:2379", + // "http://node3.example.com:2379", + // } + // + // If multiple endpoints are provided, the Client will attempt to + // use them all in the event that one or more of them are unusable. + // + // If Client.Sync is ever called, the Client may cache an alternate + // set of endpoints to continue operation. + Endpoints []string + + // Transport is used by the Client to drive HTTP requests. If not + // provided, DefaultTransport will be used. + Transport CancelableTransport + + // CheckRedirect specifies the policy for handling HTTP redirects. + // If CheckRedirect is not nil, the Client calls it before + // following an HTTP redirect. The sole argument is the number of + // requests that have alrady been made. If CheckRedirect returns + // an error, Client.Do will not make any further requests and return + // the error back it to the caller. + // + // If CheckRedirect is nil, the Client uses its default policy, + // which is to stop after 10 consecutive requests. + CheckRedirect CheckRedirectFunc + + // Username specifies the user credential to add as an authorization header + Username string + + // Password is the password for the specified user to add as an authorization header + // to the request. + Password string + + // HeaderTimeoutPerRequest specifies the time limit to wait for response + // header in a single request made by the Client. The timeout includes + // connection time, any redirects, and header wait time. + // + // For non-watch GET request, server returns the response body immediately. + // For PUT/POST/DELETE request, server will attempt to commit request + // before responding, which is expected to take `100ms + 2 * RTT`. + // For watch request, server returns the header immediately to notify Client + // watch start. But if server is behind some kind of proxy, the response + // header may be cached at proxy, and Client cannot rely on this behavior. + // + // One API call may send multiple requests to different etcd servers until it + // succeeds. Use context of the API to specify the overall timeout. + // + // A HeaderTimeoutPerRequest of zero means no timeout. + HeaderTimeoutPerRequest time.Duration +} + +func (cfg *Config) transport() CancelableTransport { + if cfg.Transport == nil { + return DefaultTransport + } + return cfg.Transport +} + +func (cfg *Config) checkRedirect() CheckRedirectFunc { + if cfg.CheckRedirect == nil { + return DefaultCheckRedirect + } + return cfg.CheckRedirect +} + +// CancelableTransport mimics net/http.Transport, but requires that +// the object also support request cancellation. +type CancelableTransport interface { + http.RoundTripper + CancelRequest(req *http.Request) +} + +type CheckRedirectFunc func(via int) error + +// DefaultCheckRedirect follows up to 10 redirects, but no more. +var DefaultCheckRedirect CheckRedirectFunc = func(via int) error { + if via > 10 { + return ErrTooManyRedirects + } + return nil +} + +type Client interface { + // Sync updates the internal cache of the etcd cluster's membership. + Sync(context.Context) error + + // AutoSync periodically calls Sync() every given interval. + // The recommended sync interval is 10 seconds to 1 minute, which does + // not bring too much overhead to server and makes client catch up the + // cluster change in time. + // + // The example to use it: + // + // for { + // err := client.AutoSync(ctx, 10*time.Second) + // if err == context.DeadlineExceeded || err == context.Canceled { + // break + // } + // log.Print(err) + // } + AutoSync(context.Context, time.Duration) error + + // Endpoints returns a copy of the current set of API endpoints used + // by Client to resolve HTTP requests. If Sync has ever been called, + // this may differ from the initial Endpoints provided in the Config. + Endpoints() []string + + httpClient +} + +func New(cfg Config) (Client, error) { + c := &httpClusterClient{ + clientFactory: newHTTPClientFactory(cfg.transport(), cfg.checkRedirect(), cfg.HeaderTimeoutPerRequest), + rand: rand.New(rand.NewSource(int64(time.Now().Nanosecond()))), + } + if cfg.Username != "" { + c.credentials = &credentials{ + username: cfg.Username, + password: cfg.Password, + } + } + if err := c.reset(cfg.Endpoints); err != nil { + return nil, err + } + return c, nil +} + +type httpClient interface { + Do(context.Context, httpAction) (*http.Response, []byte, error) +} + +func newHTTPClientFactory(tr CancelableTransport, cr CheckRedirectFunc, headerTimeout time.Duration) httpClientFactory { + return func(ep url.URL) httpClient { + return &redirectFollowingHTTPClient{ + checkRedirect: cr, + client: &simpleHTTPClient{ + transport: tr, + endpoint: ep, + headerTimeout: headerTimeout, + }, + } + } +} + +type credentials struct { + username string + password string +} + +type httpClientFactory func(url.URL) httpClient + +type httpAction interface { + HTTPRequest(url.URL) *http.Request +} + +type httpClusterClient struct { + clientFactory httpClientFactory + endpoints []url.URL + pinned int + credentials *credentials + sync.RWMutex + rand *rand.Rand +} + +func (c *httpClusterClient) reset(eps []string) error { + if len(eps) == 0 { + return ErrNoEndpoints + } + + neps := make([]url.URL, len(eps)) + for i, ep := range eps { + u, err := url.Parse(ep) + if err != nil { + return err + } + neps[i] = *u + } + + c.endpoints = shuffleEndpoints(c.rand, neps) + // TODO: pin old endpoint if possible, and rebalance when new endpoint appears + c.pinned = 0 + + return nil +} + +func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) { + action := act + c.RLock() + leps := len(c.endpoints) + eps := make([]url.URL, leps) + n := copy(eps, c.endpoints) + pinned := c.pinned + + if c.credentials != nil { + action = &authedAction{ + act: act, + credentials: *c.credentials, + } + } + c.RUnlock() + + if leps == 0 { + return nil, nil, ErrNoEndpoints + } + + if leps != n { + return nil, nil, errors.New("unable to pick endpoint: copy failed") + } + + var resp *http.Response + var body []byte + var err error + cerr := &ClusterError{} + + for i := pinned; i < leps+pinned; i++ { + k := i % leps + hc := c.clientFactory(eps[k]) + resp, body, err = hc.Do(ctx, action) + if err != nil { + cerr.Errors = append(cerr.Errors, err) + // mask previous errors with context error, which is controlled by user + if err == context.Canceled || err == context.DeadlineExceeded { + return nil, nil, err + } + continue + } + if resp.StatusCode/100 == 5 { + switch resp.StatusCode { + case http.StatusInternalServerError, http.StatusServiceUnavailable: + // TODO: make sure this is a no leader response + cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s has no leader", eps[k].String())) + default: + cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s returns server error [%s]", eps[k].String(), http.StatusText(resp.StatusCode))) + } + continue + } + if k != pinned { + c.Lock() + c.pinned = k + c.Unlock() + } + return resp, body, nil + } + + return nil, nil, cerr +} + +func (c *httpClusterClient) Endpoints() []string { + c.RLock() + defer c.RUnlock() + + eps := make([]string, len(c.endpoints)) + for i, ep := range c.endpoints { + eps[i] = ep.String() + } + + return eps +} + +func (c *httpClusterClient) Sync(ctx context.Context) error { + mAPI := NewMembersAPI(c) + ms, err := mAPI.List(ctx) + if err != nil { + return err + } + + c.Lock() + defer c.Unlock() + + eps := make([]string, 0) + for _, m := range ms { + eps = append(eps, m.ClientURLs...) + } + sort.Sort(sort.StringSlice(eps)) + + ceps := make([]string, len(c.endpoints)) + for i, cep := range c.endpoints { + ceps[i] = cep.String() + } + sort.Sort(sort.StringSlice(ceps)) + // fast path if no change happens + // this helps client to pin the endpoint when no cluster change + if reflect.DeepEqual(eps, ceps) { + return nil + } + + return c.reset(eps) +} + +func (c *httpClusterClient) AutoSync(ctx context.Context, interval time.Duration) error { + ticker := time.NewTicker(interval) + defer ticker.Stop() + for { + err := c.Sync(ctx) + if err != nil { + return err + } + select { + case <-ctx.Done(): + return ctx.Err() + case <-ticker.C: + } + } +} + +type roundTripResponse struct { + resp *http.Response + err error +} + +type simpleHTTPClient struct { + transport CancelableTransport + endpoint url.URL + headerTimeout time.Duration +} + +func (c *simpleHTTPClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) { + req := act.HTTPRequest(c.endpoint) + + if err := printcURL(req); err != nil { + return nil, nil, err + } + + hctx, hcancel := context.WithCancel(ctx) + if c.headerTimeout > 0 { + hctx, hcancel = context.WithTimeout(ctx, c.headerTimeout) + } + defer hcancel() + + reqcancel := requestCanceler(c.transport, req) + + rtchan := make(chan roundTripResponse, 1) + go func() { + resp, err := c.transport.RoundTrip(req) + rtchan <- roundTripResponse{resp: resp, err: err} + close(rtchan) + }() + + var resp *http.Response + var err error + + select { + case rtresp := <-rtchan: + resp, err = rtresp.resp, rtresp.err + case <-hctx.Done(): + // cancel and wait for request to actually exit before continuing + reqcancel() + rtresp := <-rtchan + resp = rtresp.resp + switch { + case ctx.Err() != nil: + err = ctx.Err() + case hctx.Err() != nil: + err = fmt.Errorf("client: endpoint %s exceeded header timeout", c.endpoint.String()) + default: + panic("failed to get error from context") + } + } + + // always check for resp nil-ness to deal with possible + // race conditions between channels above + defer func() { + if resp != nil { + resp.Body.Close() + } + }() + + if err != nil { + return nil, nil, err + } + + var body []byte + done := make(chan struct{}) + go func() { + body, err = ioutil.ReadAll(resp.Body) + done <- struct{}{} + }() + + select { + case <-ctx.Done(): + resp.Body.Close() + <-done + return nil, nil, ctx.Err() + case <-done: + } + + return resp, body, err +} + +type authedAction struct { + act httpAction + credentials credentials +} + +func (a *authedAction) HTTPRequest(url url.URL) *http.Request { + r := a.act.HTTPRequest(url) + r.SetBasicAuth(a.credentials.username, a.credentials.password) + return r +} + +type redirectFollowingHTTPClient struct { + client httpClient + checkRedirect CheckRedirectFunc +} + +func (r *redirectFollowingHTTPClient) Do(ctx context.Context, act httpAction) (*http.Response, []byte, error) { + next := act + for i := 0; i < 100; i++ { + if i > 0 { + if err := r.checkRedirect(i); err != nil { + return nil, nil, err + } + } + resp, body, err := r.client.Do(ctx, next) + if err != nil { + return nil, nil, err + } + if resp.StatusCode/100 == 3 { + hdr := resp.Header.Get("Location") + if hdr == "" { + return nil, nil, fmt.Errorf("Location header not set") + } + loc, err := url.Parse(hdr) + if err != nil { + return nil, nil, fmt.Errorf("Location header not valid URL: %s", hdr) + } + next = &redirectedHTTPAction{ + action: act, + location: *loc, + } + continue + } + return resp, body, nil + } + + return nil, nil, errTooManyRedirectChecks +} + +type redirectedHTTPAction struct { + action httpAction + location url.URL +} + +func (r *redirectedHTTPAction) HTTPRequest(ep url.URL) *http.Request { + orig := r.action.HTTPRequest(ep) + orig.URL = &r.location + return orig +} + +func shuffleEndpoints(r *rand.Rand, eps []url.URL) []url.URL { + p := r.Perm(len(eps)) + neps := make([]url.URL, len(eps)) + for i, k := range p { + neps[i] = eps[k] + } + return neps +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go new file mode 100644 index 0000000..b2b46d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go @@ -0,0 +1,896 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "errors" + "io" + "io/ioutil" + "math/rand" + "net/http" + "net/url" + "reflect" + "sort" + "strings" + "testing" + "time" + + "github.com/coreos/etcd/pkg/testutil" + "golang.org/x/net/context" +) + +type actionAssertingHTTPClient struct { + t *testing.T + num int + act httpAction + + resp http.Response + body []byte + err error +} + +func (a *actionAssertingHTTPClient) Do(_ context.Context, act httpAction) (*http.Response, []byte, error) { + if !reflect.DeepEqual(a.act, act) { + a.t.Errorf("#%d: unexpected httpAction: want=%#v got=%#v", a.num, a.act, act) + } + + return &a.resp, a.body, a.err +} + +type staticHTTPClient struct { + resp http.Response + body []byte + err error +} + +func (s *staticHTTPClient) Do(context.Context, httpAction) (*http.Response, []byte, error) { + return &s.resp, s.body, s.err +} + +type staticHTTPAction struct { + request http.Request +} + +func (s *staticHTTPAction) HTTPRequest(url.URL) *http.Request { + return &s.request +} + +type staticHTTPResponse struct { + resp http.Response + body []byte + err error +} + +type multiStaticHTTPClient struct { + responses []staticHTTPResponse + cur int +} + +func (s *multiStaticHTTPClient) Do(context.Context, httpAction) (*http.Response, []byte, error) { + r := s.responses[s.cur] + s.cur++ + return &r.resp, r.body, r.err +} + +func newStaticHTTPClientFactory(responses []staticHTTPResponse) httpClientFactory { + var cur int + return func(url.URL) httpClient { + r := responses[cur] + cur++ + return &staticHTTPClient{resp: r.resp, body: r.body, err: r.err} + } +} + +type fakeTransport struct { + respchan chan *http.Response + errchan chan error + startCancel chan struct{} + finishCancel chan struct{} +} + +func newFakeTransport() *fakeTransport { + return &fakeTransport{ + respchan: make(chan *http.Response, 1), + errchan: make(chan error, 1), + startCancel: make(chan struct{}, 1), + finishCancel: make(chan struct{}, 1), + } +} + +func (t *fakeTransport) CancelRequest(*http.Request) { + t.startCancel <- struct{}{} +} + +type fakeAction struct{} + +func (a *fakeAction) HTTPRequest(url.URL) *http.Request { + return &http.Request{} +} + +func TestSimpleHTTPClientDoSuccess(t *testing.T) { + tr := newFakeTransport() + c := &simpleHTTPClient{transport: tr} + + tr.respchan <- &http.Response{ + StatusCode: http.StatusTeapot, + Body: ioutil.NopCloser(strings.NewReader("foo")), + } + + resp, body, err := c.Do(context.Background(), &fakeAction{}) + if err != nil { + t.Fatalf("incorrect error value: want=nil got=%v", err) + } + + wantCode := http.StatusTeapot + if wantCode != resp.StatusCode { + t.Fatalf("invalid response code: want=%d got=%d", wantCode, resp.StatusCode) + } + + wantBody := []byte("foo") + if !reflect.DeepEqual(wantBody, body) { + t.Fatalf("invalid response body: want=%q got=%q", wantBody, body) + } +} + +func TestSimpleHTTPClientDoError(t *testing.T) { + tr := newFakeTransport() + c := &simpleHTTPClient{transport: tr} + + tr.errchan <- errors.New("fixture") + + _, _, err := c.Do(context.Background(), &fakeAction{}) + if err == nil { + t.Fatalf("expected non-nil error, got nil") + } +} + +func TestSimpleHTTPClientDoCancelContext(t *testing.T) { + tr := newFakeTransport() + c := &simpleHTTPClient{transport: tr} + + tr.startCancel <- struct{}{} + tr.finishCancel <- struct{}{} + + _, _, err := c.Do(context.Background(), &fakeAction{}) + if err == nil { + t.Fatalf("expected non-nil error, got nil") + } +} + +type checkableReadCloser struct { + io.ReadCloser + closed bool +} + +func (c *checkableReadCloser) Close() error { + if !c.closed { + c.closed = true + return c.ReadCloser.Close() + } + return nil +} + +func TestSimpleHTTPClientDoCancelContextResponseBodyClosed(t *testing.T) { + tr := newFakeTransport() + c := &simpleHTTPClient{transport: tr} + + // create an already-cancelled context + ctx, cancel := context.WithCancel(context.Background()) + cancel() + + body := &checkableReadCloser{ReadCloser: ioutil.NopCloser(strings.NewReader("foo"))} + go func() { + // wait that simpleHTTPClient knows the context is already timed out, + // and calls CancelRequest + testutil.WaitSchedule() + + // response is returned before cancel effects + tr.respchan <- &http.Response{Body: body} + }() + + _, _, err := c.Do(ctx, &fakeAction{}) + if err == nil { + t.Fatalf("expected non-nil error, got nil") + } + + if !body.closed { + t.Fatalf("expected closed body") + } +} + +type blockingBody struct { + c chan struct{} +} + +func (bb *blockingBody) Read(p []byte) (n int, err error) { + <-bb.c + return 0, errors.New("closed") +} + +func (bb *blockingBody) Close() error { + close(bb.c) + return nil +} + +func TestSimpleHTTPClientDoCancelContextResponseBodyClosedWithBlockingBody(t *testing.T) { + tr := newFakeTransport() + c := &simpleHTTPClient{transport: tr} + + ctx, cancel := context.WithCancel(context.Background()) + body := &checkableReadCloser{ReadCloser: &blockingBody{c: make(chan struct{})}} + go func() { + tr.respchan <- &http.Response{Body: body} + time.Sleep(2 * time.Millisecond) + // cancel after the body is received + cancel() + }() + + _, _, err := c.Do(ctx, &fakeAction{}) + if err != context.Canceled { + t.Fatalf("expected %+v, got %+v", context.Canceled, err) + } + + if !body.closed { + t.Fatalf("expected closed body") + } +} + +func TestSimpleHTTPClientDoCancelContextWaitForRoundTrip(t *testing.T) { + tr := newFakeTransport() + c := &simpleHTTPClient{transport: tr} + + donechan := make(chan struct{}) + ctx, cancel := context.WithCancel(context.Background()) + go func() { + c.Do(ctx, &fakeAction{}) + close(donechan) + }() + + // This should call CancelRequest and begin the cancellation process + cancel() + + select { + case <-donechan: + t.Fatalf("simpleHTTPClient.Do should not have exited yet") + default: + } + + tr.finishCancel <- struct{}{} + + select { + case <-donechan: + //expected behavior + return + case <-time.After(time.Second): + t.Fatalf("simpleHTTPClient.Do did not exit within 1s") + } +} + +func TestSimpleHTTPClientDoHeaderTimeout(t *testing.T) { + tr := newFakeTransport() + tr.finishCancel <- struct{}{} + c := &simpleHTTPClient{transport: tr, headerTimeout: time.Millisecond} + + errc := make(chan error) + go func() { + _, _, err := c.Do(context.Background(), &fakeAction{}) + errc <- err + }() + + select { + case err := <-errc: + if err == nil { + t.Fatalf("expected non-nil error, got nil") + } + case <-time.After(time.Second): + t.Fatalf("unexpected timeout when waitting for the test to finish") + } +} + +func TestHTTPClusterClientDo(t *testing.T) { + fakeErr := errors.New("fake!") + fakeURL := url.URL{} + tests := []struct { + client *httpClusterClient + wantCode int + wantErr error + wantPinned int + }{ + // first good response short-circuits Do + { + client: &httpClusterClient{ + endpoints: []url.URL{fakeURL, fakeURL}, + clientFactory: newStaticHTTPClientFactory( + []staticHTTPResponse{ + {resp: http.Response{StatusCode: http.StatusTeapot}}, + {err: fakeErr}, + }, + ), + rand: rand.New(rand.NewSource(0)), + }, + wantCode: http.StatusTeapot, + }, + + // fall through to good endpoint if err is arbitrary + { + client: &httpClusterClient{ + endpoints: []url.URL{fakeURL, fakeURL}, + clientFactory: newStaticHTTPClientFactory( + []staticHTTPResponse{ + {err: fakeErr}, + {resp: http.Response{StatusCode: http.StatusTeapot}}, + }, + ), + rand: rand.New(rand.NewSource(0)), + }, + wantCode: http.StatusTeapot, + wantPinned: 1, + }, + + // context.Canceled short-circuits Do + { + client: &httpClusterClient{ + endpoints: []url.URL{fakeURL, fakeURL}, + clientFactory: newStaticHTTPClientFactory( + []staticHTTPResponse{ + {err: context.Canceled}, + {resp: http.Response{StatusCode: http.StatusTeapot}}, + }, + ), + rand: rand.New(rand.NewSource(0)), + }, + wantErr: context.Canceled, + }, + + // return err if there are no endpoints + { + client: &httpClusterClient{ + endpoints: []url.URL{}, + clientFactory: newHTTPClientFactory(nil, nil, 0), + rand: rand.New(rand.NewSource(0)), + }, + wantErr: ErrNoEndpoints, + }, + + // return err if all endpoints return arbitrary errors + { + client: &httpClusterClient{ + endpoints: []url.URL{fakeURL, fakeURL}, + clientFactory: newStaticHTTPClientFactory( + []staticHTTPResponse{ + {err: fakeErr}, + {err: fakeErr}, + }, + ), + rand: rand.New(rand.NewSource(0)), + }, + wantErr: &ClusterError{Errors: []error{fakeErr, fakeErr}}, + }, + + // 500-level errors cause Do to fallthrough to next endpoint + { + client: &httpClusterClient{ + endpoints: []url.URL{fakeURL, fakeURL}, + clientFactory: newStaticHTTPClientFactory( + []staticHTTPResponse{ + {resp: http.Response{StatusCode: http.StatusBadGateway}}, + {resp: http.Response{StatusCode: http.StatusTeapot}}, + }, + ), + rand: rand.New(rand.NewSource(0)), + }, + wantCode: http.StatusTeapot, + wantPinned: 1, + }, + } + + for i, tt := range tests { + resp, _, err := tt.client.Do(context.Background(), nil) + if !reflect.DeepEqual(tt.wantErr, err) { + t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr) + continue + } + + if resp == nil { + if tt.wantCode != 0 { + t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode) + } + continue + } + + if resp.StatusCode != tt.wantCode { + t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode) + continue + } + + if tt.client.pinned != tt.wantPinned { + t.Errorf("#%d: pinned=%d, want=%d", i, tt.client.pinned, tt.wantPinned) + } + } +} + +func TestHTTPClusterClientDoDeadlineExceedContext(t *testing.T) { + fakeURL := url.URL{} + tr := newFakeTransport() + tr.finishCancel <- struct{}{} + c := &httpClusterClient{ + clientFactory: newHTTPClientFactory(tr, DefaultCheckRedirect, 0), + endpoints: []url.URL{fakeURL}, + } + + errc := make(chan error) + go func() { + ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) + defer cancel() + _, _, err := c.Do(ctx, &fakeAction{}) + errc <- err + }() + + select { + case err := <-errc: + if err != context.DeadlineExceeded { + t.Errorf("err = %+v, want %+v", err, context.DeadlineExceeded) + } + case <-time.After(time.Second): + t.Fatalf("unexpected timeout when waitting for request to deadline exceed") + } +} + +func TestRedirectedHTTPAction(t *testing.T) { + act := &redirectedHTTPAction{ + action: &staticHTTPAction{ + request: http.Request{ + Method: "DELETE", + URL: &url.URL{ + Scheme: "https", + Host: "foo.example.com", + Path: "/ping", + }, + }, + }, + location: url.URL{ + Scheme: "https", + Host: "bar.example.com", + Path: "/pong", + }, + } + + want := &http.Request{ + Method: "DELETE", + URL: &url.URL{ + Scheme: "https", + Host: "bar.example.com", + Path: "/pong", + }, + } + got := act.HTTPRequest(url.URL{Scheme: "http", Host: "baz.example.com", Path: "/pang"}) + + if !reflect.DeepEqual(want, got) { + t.Fatalf("HTTPRequest is %#v, want %#v", want, got) + } +} + +func TestRedirectFollowingHTTPClient(t *testing.T) { + tests := []struct { + checkRedirect CheckRedirectFunc + client httpClient + wantCode int + wantErr error + }{ + // errors bubbled up + { + checkRedirect: func(int) error { return ErrTooManyRedirects }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + err: errors.New("fail!"), + }, + }, + }, + wantErr: errors.New("fail!"), + }, + + // no need to follow redirect if none given + { + checkRedirect: func(int) error { return ErrTooManyRedirects }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + }, + }, + wantCode: http.StatusTeapot, + }, + + // redirects if less than max + { + checkRedirect: func(via int) error { + if via >= 2 { + return ErrTooManyRedirects + } + return nil + }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{"http://example.com"}}, + }, + }, + { + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + }, + }, + wantCode: http.StatusTeapot, + }, + + // succeed after reaching max redirects + { + checkRedirect: func(via int) error { + if via >= 3 { + return ErrTooManyRedirects + } + return nil + }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{"http://example.com"}}, + }, + }, + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{"http://example.com"}}, + }, + }, + { + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + }, + }, + wantCode: http.StatusTeapot, + }, + + // fail if too many redirects + { + checkRedirect: func(via int) error { + if via >= 2 { + return ErrTooManyRedirects + } + return nil + }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{"http://example.com"}}, + }, + }, + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{"http://example.com"}}, + }, + }, + { + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + }, + }, + wantErr: ErrTooManyRedirects, + }, + + // fail if Location header not set + { + checkRedirect: func(int) error { return ErrTooManyRedirects }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + }, + }, + }, + }, + wantErr: errors.New("Location header not set"), + }, + + // fail if Location header is invalid + { + checkRedirect: func(int) error { return ErrTooManyRedirects }, + client: &multiStaticHTTPClient{ + responses: []staticHTTPResponse{ + { + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{":"}}, + }, + }, + }, + }, + wantErr: errors.New("Location header not valid URL: :"), + }, + + // fail if redirects checked way too many times + { + checkRedirect: func(int) error { return nil }, + client: &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusTemporaryRedirect, + Header: http.Header{"Location": []string{"http://example.com"}}, + }, + }, + wantErr: errTooManyRedirectChecks, + }, + } + + for i, tt := range tests { + client := &redirectFollowingHTTPClient{client: tt.client, checkRedirect: tt.checkRedirect} + resp, _, err := client.Do(context.Background(), nil) + if !reflect.DeepEqual(tt.wantErr, err) { + t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr) + continue + } + + if resp == nil { + if tt.wantCode != 0 { + t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode) + } + continue + } + + if resp.StatusCode != tt.wantCode { + t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode) + continue + } + } +} + +func TestDefaultCheckRedirect(t *testing.T) { + tests := []struct { + num int + err error + }{ + {0, nil}, + {5, nil}, + {10, nil}, + {11, ErrTooManyRedirects}, + {29, ErrTooManyRedirects}, + } + + for i, tt := range tests { + err := DefaultCheckRedirect(tt.num) + if !reflect.DeepEqual(tt.err, err) { + t.Errorf("#%d: want=%#v got=%#v", i, tt.err, err) + } + } +} + +func TestHTTPClusterClientSync(t *testing.T) { + cf := newStaticHTTPClientFactory([]staticHTTPResponse{ + { + resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, + body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), + }, + }) + + hc := &httpClusterClient{ + clientFactory: cf, + rand: rand.New(rand.NewSource(0)), + } + err := hc.reset([]string{"http://127.0.0.1:2379"}) + if err != nil { + t.Fatalf("unexpected error during setup: %#v", err) + } + + want := []string{"http://127.0.0.1:2379"} + got := hc.Endpoints() + if !reflect.DeepEqual(want, got) { + t.Fatalf("incorrect endpoints: want=%#v got=%#v", want, got) + } + + err = hc.Sync(context.Background()) + if err != nil { + t.Fatalf("unexpected error during Sync: %#v", err) + } + + want = []string{"http://127.0.0.1:2379", "http://127.0.0.1:4001", "http://127.0.0.1:4002", "http://127.0.0.1:4003"} + got = hc.Endpoints() + sort.Sort(sort.StringSlice(got)) + if !reflect.DeepEqual(want, got) { + t.Fatalf("incorrect endpoints post-Sync: want=%#v got=%#v", want, got) + } + + err = hc.reset([]string{"http://127.0.0.1:4009"}) + if err != nil { + t.Fatalf("unexpected error during reset: %#v", err) + } + + want = []string{"http://127.0.0.1:4009"} + got = hc.Endpoints() + if !reflect.DeepEqual(want, got) { + t.Fatalf("incorrect endpoints post-reset: want=%#v got=%#v", want, got) + } +} + +func TestHTTPClusterClientSyncFail(t *testing.T) { + cf := newStaticHTTPClientFactory([]staticHTTPResponse{ + {err: errors.New("fail!")}, + }) + + hc := &httpClusterClient{ + clientFactory: cf, + rand: rand.New(rand.NewSource(0)), + } + err := hc.reset([]string{"http://127.0.0.1:2379"}) + if err != nil { + t.Fatalf("unexpected error during setup: %#v", err) + } + + want := []string{"http://127.0.0.1:2379"} + got := hc.Endpoints() + if !reflect.DeepEqual(want, got) { + t.Fatalf("incorrect endpoints: want=%#v got=%#v", want, got) + } + + err = hc.Sync(context.Background()) + if err == nil { + t.Fatalf("got nil error during Sync") + } + + got = hc.Endpoints() + if !reflect.DeepEqual(want, got) { + t.Fatalf("incorrect endpoints after failed Sync: want=%#v got=%#v", want, got) + } +} + +func TestHTTPClusterClientAutoSyncCancelContext(t *testing.T) { + cf := newStaticHTTPClientFactory([]staticHTTPResponse{ + { + resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, + body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), + }, + }) + + hc := &httpClusterClient{ + clientFactory: cf, + rand: rand.New(rand.NewSource(0)), + } + err := hc.reset([]string{"http://127.0.0.1:2379"}) + if err != nil { + t.Fatalf("unexpected error during setup: %#v", err) + } + ctx, cancel := context.WithCancel(context.Background()) + cancel() + + err = hc.AutoSync(ctx, time.Hour) + if err != context.Canceled { + t.Fatalf("incorrect error value: want=%v got=%v", context.Canceled, err) + } +} + +func TestHTTPClusterClientAutoSyncFail(t *testing.T) { + cf := newStaticHTTPClientFactory([]staticHTTPResponse{ + {err: errors.New("fail!")}, + }) + + hc := &httpClusterClient{ + clientFactory: cf, + rand: rand.New(rand.NewSource(0)), + } + err := hc.reset([]string{"http://127.0.0.1:2379"}) + if err != nil { + t.Fatalf("unexpected error during setup: %#v", err) + } + + err = hc.AutoSync(context.Background(), time.Hour) + if err.Error() != ErrClusterUnavailable.Error() { + t.Fatalf("incorrect error value: want=%v got=%v", ErrClusterUnavailable, err) + } +} + +// TestHTTPClusterClientSyncPinEndpoint tests that Sync() pins the endpoint when +// it gets the exactly same member list as before. +func TestHTTPClusterClientSyncPinEndpoint(t *testing.T) { + cf := newStaticHTTPClientFactory([]staticHTTPResponse{ + { + resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, + body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), + }, + { + resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, + body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), + }, + { + resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, + body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), + }, + }) + + hc := &httpClusterClient{ + clientFactory: cf, + rand: rand.New(rand.NewSource(0)), + } + err := hc.reset([]string{"http://127.0.0.1:4003", "http://127.0.0.1:2379", "http://127.0.0.1:4001", "http://127.0.0.1:4002"}) + if err != nil { + t.Fatalf("unexpected error during setup: %#v", err) + } + pinnedEndpoint := hc.endpoints[hc.pinned] + + for i := 0; i < 3; i++ { + err = hc.Sync(context.Background()) + if err != nil { + t.Fatalf("#%d: unexpected error during Sync: %#v", i, err) + } + + if g := hc.endpoints[hc.pinned]; g != pinnedEndpoint { + t.Errorf("#%d: pinned endpoint = %s, want %s", i, g, pinnedEndpoint) + } + } +} + +func TestHTTPClusterClientResetFail(t *testing.T) { + tests := [][]string{ + // need at least one endpoint + {}, + + // urls must be valid + {":"}, + } + + for i, tt := range tests { + hc := &httpClusterClient{rand: rand.New(rand.NewSource(0))} + err := hc.reset(tt) + if err == nil { + t.Errorf("#%d: expected non-nil error", i) + } + } +} + +func TestHTTPClusterClientResetPinRandom(t *testing.T) { + round := 2000 + pinNum := 0 + for i := 0; i < round; i++ { + hc := &httpClusterClient{rand: rand.New(rand.NewSource(int64(i)))} + err := hc.reset([]string{"http://127.0.0.1:4001", "http://127.0.0.1:4002", "http://127.0.0.1:4003"}) + if err != nil { + t.Fatalf("#%d: reset error (%v)", i, err) + } + if hc.endpoints[hc.pinned].String() == "http://127.0.0.1:4001" { + pinNum++ + } + } + + min := 1.0/3.0 - 0.05 + max := 1.0/3.0 + 0.05 + if ratio := float64(pinNum) / float64(round); ratio > max || ratio < min { + t.Errorf("pinned ratio = %v, want [%v, %v]", ratio, min, max) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go new file mode 100644 index 0000000..957ed46 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go @@ -0,0 +1,33 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import "fmt" + +type ClusterError struct { + Errors []error +} + +func (ce *ClusterError) Error() string { + return ErrClusterUnavailable.Error() +} + +func (ce *ClusterError) Detail() string { + s := "" + for i, e := range ce.Errors { + s += fmt.Sprintf("error #%d: %s\n", i, e) + } + return s +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go new file mode 100644 index 0000000..5a5a69a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go @@ -0,0 +1,70 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "bytes" + "fmt" + "io/ioutil" + "net/http" + "os" +) + +var ( + cURLDebug = false +) + +func EnablecURLDebug() { + cURLDebug = true +} + +func DisablecURLDebug() { + cURLDebug = false +} + +// printcURL prints the cURL equivalent request to stderr. +// It returns an error if the body of the request cannot +// be read. +// The caller MUST cancel the request if there is an error. +func printcURL(req *http.Request) error { + if !cURLDebug { + return nil + } + var ( + command string + b []byte + err error + ) + + if req.URL != nil { + command = fmt.Sprintf("curl -X %s %s", req.Method, req.URL.String()) + } + + if req.Body != nil { + b, err = ioutil.ReadAll(req.Body) + if err != nil { + return err + } + command += fmt.Sprintf(" -d %q", string(b)) + } + + fmt.Fprintf(os.Stderr, "cURL Command: %s\n", command) + + // reset body + body := bytes.NewBuffer(b) + req.Body = ioutil.NopCloser(body) + + return nil +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go new file mode 100644 index 0000000..ae88659 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go @@ -0,0 +1,21 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +// Discoverer is an interface that wraps the Discover method. +type Discoverer interface { + // Discover looks up the etcd servers for the domain. + Discover(domain string) ([]string, error) +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go new file mode 100644 index 0000000..70111ca --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go @@ -0,0 +1,71 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/* +Package client provides bindings for the etcd APIs. + +Create a Config and exchange it for a Client: + + import ( + "net/http" + + "github.com/coreos/etcd/client" + "golang.org/x/net/context" + ) + + cfg := client.Config{ + Endpoints: []string{"http://127.0.0.1:2379"}, + Transport: DefaultTransport, + } + + c, err := client.New(cfg) + if err != nil { + // handle error + } + +Create a KeysAPI using the Client, then use it to interact with etcd: + + kAPI := client.NewKeysAPI(c) + + // create a new key /foo with the value "bar" + _, err = kAPI.Create(context.Background(), "/foo", "bar") + if err != nil { + // handle error + } + + // delete the newly created key only if the value is still "bar" + _, err = kAPI.Delete(context.Background(), "/foo", &DeleteOptions{PrevValue: "bar"}) + if err != nil { + // handle error + } + +Use a custom context to set timeouts on your operations: + + import "time" + + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + + // set a new key, ignoring it's previous state + _, err := kAPI.Set(ctx, "/ping", "pong", nil) + if err != nil { + if err == context.DeadlineExceeded { + // request took longer than 5s + } else { + // handle error + } + } + +*/ +package client diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go new file mode 100644 index 0000000..4a99a7d --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go @@ -0,0 +1,41 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build !go1.5 + +package client + +import ( + "errors" + "net/http" +) + +func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) { + select { + case resp := <-t.respchan: + return resp, nil + case err := <-t.errchan: + return nil, err + case <-t.startCancel: + select { + // this simulates that the request is finished before cancel effects + case resp := <-t.respchan: + return resp, nil + // wait on finishCancel to simulate taking some amount of + // time while calling CancelRequest + case <-t.finishCancel: + return nil, errors.New("cancelled") + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go new file mode 100644 index 0000000..06761e2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go @@ -0,0 +1,42 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build go1.5 + +package client + +import ( + "errors" + "net/http" +) + +func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) { + select { + case resp := <-t.respchan: + return resp, nil + case err := <-t.errchan: + return nil, err + case <-t.startCancel: + case <-req.Cancel: + } + select { + // this simulates that the request is finished before cancel effects + case resp := <-t.respchan: + return resp, nil + // wait on finishCancel to simulate taking some amount of + // time while calling CancelRequest + case <-t.finishCancel: + return nil, errors.New("cancelled") + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go new file mode 100644 index 0000000..748283a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go @@ -0,0 +1,1000 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package client + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81819 = 1 + codecSelferC_RAW1819 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1819 = 10 + codecSelferValueTypeMap1819 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1819 = 2 + codecSelfer_containerMapValue1819 = 3 + codecSelfer_containerMapEnd1819 = 4 + codecSelfer_containerArrayElem1819 = 6 + codecSelfer_containerArrayEnd1819 = 7 +) + +var ( + codecSelferBitsize1819 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1819 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1819 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 time.Time + _ = v0 + } +} + +func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep2 := !z.EncBinary() + yy2arr2 := z.EncBasicHandle().StructToArray + var yyq2 [3]bool + _, _, _ = yysep2, yyq2, yy2arr2 + const yyr2 bool = false + var yynn2 int + if yyr2 || yy2arr2 { + r.EncodeArrayStart(3) + } else { + yynn2 = 3 + for _, b := range yyq2 { + if b { + yynn2++ + } + } + r.EncodeMapStart(yynn2) + yynn2 = 0 + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + yym4 := z.EncBinary() + _ = yym4 + if false { + } else { + r.EncodeString(codecSelferC_UTF81819, string(x.Action)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("action")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym5 := z.EncBinary() + _ = yym5 + if false { + } else { + r.EncodeString(codecSelferC_UTF81819, string(x.Action)) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if x.Node == nil { + r.EncodeNil() + } else { + x.Node.CodecEncodeSelf(e) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("node")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + if x.Node == nil { + r.EncodeNil() + } else { + x.Node.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if x.PrevNode == nil { + r.EncodeNil() + } else { + x.PrevNode.CodecEncodeSelf(e) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("prevNode")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + if x.PrevNode == nil { + r.EncodeNil() + } else { + x.PrevNode.CodecEncodeSelf(e) + } + } + if yyr2 || yy2arr2 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1819) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1819) + } + } + } +} + +func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym8 := z.DecBinary() + _ = yym8 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct9 := r.ContainerType() + if yyct9 == codecSelferValueTypeMap1819 { + yyl9 := r.ReadMapStart() + if yyl9 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1819) + } else { + x.codecDecodeSelfFromMap(yyl9, d) + } + } else if yyct9 == codecSelferValueTypeArray1819 { + yyl9 := r.ReadArrayStart() + if yyl9 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + } else { + x.codecDecodeSelfFromArray(yyl9, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819) + } + } +} + +func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys10Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys10Slc + var yyhl10 bool = l >= 0 + for yyj10 := 0; ; yyj10++ { + if yyhl10 { + if yyj10 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1819) + yys10Slc = r.DecodeBytes(yys10Slc, true, true) + yys10 := string(yys10Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1819) + switch yys10 { + case "action": + if r.TryDecodeAsNil() { + x.Action = "" + } else { + x.Action = string(r.DecodeString()) + } + case "node": + if r.TryDecodeAsNil() { + if x.Node != nil { + x.Node = nil + } + } else { + if x.Node == nil { + x.Node = new(Node) + } + x.Node.CodecDecodeSelf(d) + } + case "prevNode": + if r.TryDecodeAsNil() { + if x.PrevNode != nil { + x.PrevNode = nil + } + } else { + if x.PrevNode == nil { + x.PrevNode = new(Node) + } + x.PrevNode.CodecDecodeSelf(d) + } + default: + z.DecStructFieldNotFound(-1, yys10) + } // end switch yys10 + } // end for yyj10 + z.DecSendContainerState(codecSelfer_containerMapEnd1819) +} + +func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj14 int + var yyb14 bool + var yyhl14 bool = l >= 0 + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.Action = "" + } else { + x.Action = string(r.DecodeString()) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + if x.Node != nil { + x.Node = nil + } + } else { + if x.Node == nil { + x.Node = new(Node) + } + x.Node.CodecDecodeSelf(d) + } + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + if x.PrevNode != nil { + x.PrevNode = nil + } + } else { + if x.PrevNode == nil { + x.PrevNode = new(Node) + } + x.PrevNode.CodecDecodeSelf(d) + } + for { + yyj14++ + if yyhl14 { + yyb14 = yyj14 > l + } else { + yyb14 = r.CheckBreak() + } + if yyb14 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + z.DecStructFieldNotFound(yyj14-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) +} + +func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym18 := z.EncBinary() + _ = yym18 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep19 := !z.EncBinary() + yy2arr19 := z.EncBasicHandle().StructToArray + var yyq19 [8]bool + _, _, _ = yysep19, yyq19, yy2arr19 + const yyr19 bool = false + yyq19[1] = x.Dir != false + yyq19[6] = x.Expiration != nil + yyq19[7] = x.TTL != 0 + var yynn19 int + if yyr19 || yy2arr19 { + r.EncodeArrayStart(8) + } else { + yynn19 = 5 + for _, b := range yyq19 { + if b { + yynn19++ + } + } + r.EncodeMapStart(yynn19) + yynn19 = 0 + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + yym21 := z.EncBinary() + _ = yym21 + if false { + } else { + r.EncodeString(codecSelferC_UTF81819, string(x.Key)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("key")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym22 := z.EncBinary() + _ = yym22 + if false { + } else { + r.EncodeString(codecSelferC_UTF81819, string(x.Key)) + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if yyq19[1] { + yym24 := z.EncBinary() + _ = yym24 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq19[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("dir")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym25 := z.EncBinary() + _ = yym25 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + yym27 := z.EncBinary() + _ = yym27 + if false { + } else { + r.EncodeString(codecSelferC_UTF81819, string(x.Value)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("value")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym28 := z.EncBinary() + _ = yym28 + if false { + } else { + r.EncodeString(codecSelferC_UTF81819, string(x.Value)) + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if x.Nodes == nil { + r.EncodeNil() + } else { + x.Nodes.CodecEncodeSelf(e) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("nodes")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + if x.Nodes == nil { + r.EncodeNil() + } else { + x.Nodes.CodecEncodeSelf(e) + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeUint(uint64(x.CreatedIndex)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("createdIndex")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeUint(uint64(x.CreatedIndex)) + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + yym34 := z.EncBinary() + _ = yym34 + if false { + } else { + r.EncodeUint(uint64(x.ModifiedIndex)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("modifiedIndex")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym35 := z.EncBinary() + _ = yym35 + if false { + } else { + r.EncodeUint(uint64(x.ModifiedIndex)) + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if yyq19[6] { + if x.Expiration == nil { + r.EncodeNil() + } else { + yym37 := z.EncBinary() + _ = yym37 + if false { + } else if yym38 := z.TimeRtidIfBinc(); yym38 != 0 { + r.EncodeBuiltin(yym38, x.Expiration) + } else if z.HasExtensions() && z.EncExt(x.Expiration) { + } else if yym37 { + z.EncBinaryMarshal(x.Expiration) + } else if !yym37 && z.IsJSONHandle() { + z.EncJSONMarshal(x.Expiration) + } else { + z.EncFallback(x.Expiration) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq19[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("expiration")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + if x.Expiration == nil { + r.EncodeNil() + } else { + yym39 := z.EncBinary() + _ = yym39 + if false { + } else if yym40 := z.TimeRtidIfBinc(); yym40 != 0 { + r.EncodeBuiltin(yym40, x.Expiration) + } else if z.HasExtensions() && z.EncExt(x.Expiration) { + } else if yym39 { + z.EncBinaryMarshal(x.Expiration) + } else if !yym39 && z.IsJSONHandle() { + z.EncJSONMarshal(x.Expiration) + } else { + z.EncFallback(x.Expiration) + } + } + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if yyq19[7] { + yym42 := z.EncBinary() + _ = yym42 + if false { + } else { + r.EncodeInt(int64(x.TTL)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq19[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1819) + r.EncodeString(codecSelferC_UTF81819, string("ttl")) + z.EncSendContainerState(codecSelfer_containerMapValue1819) + yym43 := z.EncBinary() + _ = yym43 + if false { + } else { + r.EncodeInt(int64(x.TTL)) + } + } + } + if yyr19 || yy2arr19 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1819) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1819) + } + } + } +} + +func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym44 := z.DecBinary() + _ = yym44 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct45 := r.ContainerType() + if yyct45 == codecSelferValueTypeMap1819 { + yyl45 := r.ReadMapStart() + if yyl45 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1819) + } else { + x.codecDecodeSelfFromMap(yyl45, d) + } + } else if yyct45 == codecSelferValueTypeArray1819 { + yyl45 := r.ReadArrayStart() + if yyl45 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + } else { + x.codecDecodeSelfFromArray(yyl45, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819) + } + } +} + +func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys46Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys46Slc + var yyhl46 bool = l >= 0 + for yyj46 := 0; ; yyj46++ { + if yyhl46 { + if yyj46 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1819) + yys46Slc = r.DecodeBytes(yys46Slc, true, true) + yys46 := string(yys46Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1819) + switch yys46 { + case "key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + case "dir": + if r.TryDecodeAsNil() { + x.Dir = false + } else { + x.Dir = bool(r.DecodeBool()) + } + case "value": + if r.TryDecodeAsNil() { + x.Value = "" + } else { + x.Value = string(r.DecodeString()) + } + case "nodes": + if r.TryDecodeAsNil() { + x.Nodes = nil + } else { + yyv50 := &x.Nodes + yyv50.CodecDecodeSelf(d) + } + case "createdIndex": + if r.TryDecodeAsNil() { + x.CreatedIndex = 0 + } else { + x.CreatedIndex = uint64(r.DecodeUint(64)) + } + case "modifiedIndex": + if r.TryDecodeAsNil() { + x.ModifiedIndex = 0 + } else { + x.ModifiedIndex = uint64(r.DecodeUint(64)) + } + case "expiration": + if r.TryDecodeAsNil() { + if x.Expiration != nil { + x.Expiration = nil + } + } else { + if x.Expiration == nil { + x.Expiration = new(time.Time) + } + yym54 := z.DecBinary() + _ = yym54 + if false { + } else if yym55 := z.TimeRtidIfBinc(); yym55 != 0 { + r.DecodeBuiltin(yym55, x.Expiration) + } else if z.HasExtensions() && z.DecExt(x.Expiration) { + } else if yym54 { + z.DecBinaryUnmarshal(x.Expiration) + } else if !yym54 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.Expiration) + } else { + z.DecFallback(x.Expiration, false) + } + } + case "ttl": + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + x.TTL = int64(r.DecodeInt(64)) + } + default: + z.DecStructFieldNotFound(-1, yys46) + } // end switch yys46 + } // end for yyj46 + z.DecSendContainerState(codecSelfer_containerMapEnd1819) +} + +func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj57 int + var yyb57 bool + var yyhl57 bool = l >= 0 + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.Dir = false + } else { + x.Dir = bool(r.DecodeBool()) + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.Value = "" + } else { + x.Value = string(r.DecodeString()) + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.Nodes = nil + } else { + yyv61 := &x.Nodes + yyv61.CodecDecodeSelf(d) + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.CreatedIndex = 0 + } else { + x.CreatedIndex = uint64(r.DecodeUint(64)) + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.ModifiedIndex = 0 + } else { + x.ModifiedIndex = uint64(r.DecodeUint(64)) + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + if x.Expiration != nil { + x.Expiration = nil + } + } else { + if x.Expiration == nil { + x.Expiration = new(time.Time) + } + yym65 := z.DecBinary() + _ = yym65 + if false { + } else if yym66 := z.TimeRtidIfBinc(); yym66 != 0 { + r.DecodeBuiltin(yym66, x.Expiration) + } else if z.HasExtensions() && z.DecExt(x.Expiration) { + } else if yym65 { + z.DecBinaryUnmarshal(x.Expiration) + } else if !yym65 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.Expiration) + } else { + z.DecFallback(x.Expiration, false) + } + } + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + x.TTL = int64(r.DecodeInt(64)) + } + for { + yyj57++ + if yyhl57 { + yyb57 = yyj57 > l + } else { + yyb57 = r.CheckBreak() + } + if yyb57 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1819) + z.DecStructFieldNotFound(yyj57-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1819) +} + +func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym68 := z.EncBinary() + _ = yym68 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + h.encNodes((Nodes)(x), e) + } + } +} + +func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym69 := z.DecBinary() + _ = yym69 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + h.decNodes((*Nodes)(x), d) + } +} + +func (x codecSelfer1819) encNodes(v Nodes, e *codec1978.Encoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv70 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1819) + if yyv70 == nil { + r.EncodeNil() + } else { + yyv70.CodecEncodeSelf(e) + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1819) +} + +func (x codecSelfer1819) decNodes(v *Nodes, d *codec1978.Decoder) { + var h codecSelfer1819 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv71 := *v + yyh71, yyl71 := z.DecSliceHelperStart() + var yyc71 bool + if yyl71 == 0 { + if yyv71 == nil { + yyv71 = []*Node{} + yyc71 = true + } else if len(yyv71) != 0 { + yyv71 = yyv71[:0] + yyc71 = true + } + } else if yyl71 > 0 { + var yyrr71, yyrl71 int + var yyrt71 bool + if yyl71 > cap(yyv71) { + + yyrg71 := len(yyv71) > 0 + yyv271 := yyv71 + yyrl71, yyrt71 = z.DecInferLen(yyl71, z.DecBasicHandle().MaxInitLen, 8) + if yyrt71 { + if yyrl71 <= cap(yyv71) { + yyv71 = yyv71[:yyrl71] + } else { + yyv71 = make([]*Node, yyrl71) + } + } else { + yyv71 = make([]*Node, yyrl71) + } + yyc71 = true + yyrr71 = len(yyv71) + if yyrg71 { + copy(yyv71, yyv271) + } + } else if yyl71 != len(yyv71) { + yyv71 = yyv71[:yyl71] + yyc71 = true + } + yyj71 := 0 + for ; yyj71 < yyrr71; yyj71++ { + yyh71.ElemContainerState(yyj71) + if r.TryDecodeAsNil() { + if yyv71[yyj71] != nil { + *yyv71[yyj71] = Node{} + } + } else { + if yyv71[yyj71] == nil { + yyv71[yyj71] = new(Node) + } + yyw72 := yyv71[yyj71] + yyw72.CodecDecodeSelf(d) + } + + } + if yyrt71 { + for ; yyj71 < yyl71; yyj71++ { + yyv71 = append(yyv71, nil) + yyh71.ElemContainerState(yyj71) + if r.TryDecodeAsNil() { + if yyv71[yyj71] != nil { + *yyv71[yyj71] = Node{} + } + } else { + if yyv71[yyj71] == nil { + yyv71[yyj71] = new(Node) + } + yyw73 := yyv71[yyj71] + yyw73.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj71 := 0 + for ; !r.CheckBreak(); yyj71++ { + + if yyj71 >= len(yyv71) { + yyv71 = append(yyv71, nil) // var yyz71 *Node + yyc71 = true + } + yyh71.ElemContainerState(yyj71) + if yyj71 < len(yyv71) { + if r.TryDecodeAsNil() { + if yyv71[yyj71] != nil { + *yyv71[yyj71] = Node{} + } + } else { + if yyv71[yyj71] == nil { + yyv71[yyj71] = new(Node) + } + yyw74 := yyv71[yyj71] + yyw74.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj71 < len(yyv71) { + yyv71 = yyv71[:yyj71] + yyc71 = true + } else if yyj71 == 0 && yyv71 == nil { + yyv71 = []*Node{} + yyc71 = true + } + } + yyh71.End() + if yyc71 { + *v = yyv71 + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go new file mode 100644 index 0000000..9dca46b --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go @@ -0,0 +1,651 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +//go:generate codecgen -d 1819 -r "Node|Response|Nodes" -o keys.generated.go keys.go + +import ( + "encoding/json" + "errors" + "fmt" + "net/http" + "net/url" + "strconv" + "strings" + "time" + + "github.com/coreos/etcd/pkg/pathutil" + "github.com/ugorji/go/codec" + "golang.org/x/net/context" +) + +const ( + ErrorCodeKeyNotFound = 100 + ErrorCodeTestFailed = 101 + ErrorCodeNotFile = 102 + ErrorCodeNotDir = 104 + ErrorCodeNodeExist = 105 + ErrorCodeRootROnly = 107 + ErrorCodeDirNotEmpty = 108 + ErrorCodeUnauthorized = 110 + + ErrorCodePrevValueRequired = 201 + ErrorCodeTTLNaN = 202 + ErrorCodeIndexNaN = 203 + ErrorCodeInvalidField = 209 + ErrorCodeInvalidForm = 210 + + ErrorCodeRaftInternal = 300 + ErrorCodeLeaderElect = 301 + + ErrorCodeWatcherCleared = 400 + ErrorCodeEventIndexCleared = 401 +) + +type Error struct { + Code int `json:"errorCode"` + Message string `json:"message"` + Cause string `json:"cause"` + Index uint64 `json:"index"` +} + +func (e Error) Error() string { + return fmt.Sprintf("%v: %v (%v) [%v]", e.Code, e.Message, e.Cause, e.Index) +} + +var ( + ErrInvalidJSON = errors.New("client: response is invalid json. The endpoint is probably not valid etcd cluster endpoint.") + ErrEmptyBody = errors.New("client: response body is empty") +) + +// PrevExistType is used to define an existence condition when setting +// or deleting Nodes. +type PrevExistType string + +const ( + PrevIgnore = PrevExistType("") + PrevExist = PrevExistType("true") + PrevNoExist = PrevExistType("false") +) + +var ( + defaultV2KeysPrefix = "/v2/keys" +) + +// NewKeysAPI builds a KeysAPI that interacts with etcd's key-value +// API over HTTP. +func NewKeysAPI(c Client) KeysAPI { + return NewKeysAPIWithPrefix(c, defaultV2KeysPrefix) +} + +// NewKeysAPIWithPrefix acts like NewKeysAPI, but allows the caller +// to provide a custom base URL path. This should only be used in +// very rare cases. +func NewKeysAPIWithPrefix(c Client, p string) KeysAPI { + return &httpKeysAPI{ + client: c, + prefix: p, + } +} + +type KeysAPI interface { + // Get retrieves a set of Nodes from etcd + Get(ctx context.Context, key string, opts *GetOptions) (*Response, error) + + // Set assigns a new value to a Node identified by a given key. The caller + // may define a set of conditions in the SetOptions. If SetOptions.Dir=true + // than value is ignored. + Set(ctx context.Context, key, value string, opts *SetOptions) (*Response, error) + + // Delete removes a Node identified by the given key, optionally destroying + // all of its children as well. The caller may define a set of required + // conditions in an DeleteOptions object. + Delete(ctx context.Context, key string, opts *DeleteOptions) (*Response, error) + + // Create is an alias for Set w/ PrevExist=false + Create(ctx context.Context, key, value string) (*Response, error) + + // CreateInOrder is used to atomically create in-order keys within the given directory. + CreateInOrder(ctx context.Context, dir, value string, opts *CreateInOrderOptions) (*Response, error) + + // Update is an alias for Set w/ PrevExist=true + Update(ctx context.Context, key, value string) (*Response, error) + + // Watcher builds a new Watcher targeted at a specific Node identified + // by the given key. The Watcher may be configured at creation time + // through a WatcherOptions object. The returned Watcher is designed + // to emit events that happen to a Node, and optionally to its children. + Watcher(key string, opts *WatcherOptions) Watcher +} + +type WatcherOptions struct { + // AfterIndex defines the index after-which the Watcher should + // start emitting events. For example, if a value of 5 is + // provided, the first event will have an index >= 6. + // + // Setting AfterIndex to 0 (default) means that the Watcher + // should start watching for events starting at the current + // index, whatever that may be. + AfterIndex uint64 + + // Recursive specifies whether or not the Watcher should emit + // events that occur in children of the given keyspace. If set + // to false (default), events will be limited to those that + // occur for the exact key. + Recursive bool +} + +type CreateInOrderOptions struct { + // TTL defines a period of time after-which the Node should + // expire and no longer exist. Values <= 0 are ignored. Given + // that the zero-value is ignored, TTL cannot be used to set + // a TTL of 0. + TTL time.Duration +} + +type SetOptions struct { + // PrevValue specifies what the current value of the Node must + // be in order for the Set operation to succeed. + // + // Leaving this field empty means that the caller wishes to + // ignore the current value of the Node. This cannot be used + // to compare the Node's current value to an empty string. + // + // PrevValue is ignored if Dir=true + PrevValue string + + // PrevIndex indicates what the current ModifiedIndex of the + // Node must be in order for the Set operation to succeed. + // + // If PrevIndex is set to 0 (default), no comparison is made. + PrevIndex uint64 + + // PrevExist specifies whether the Node must currently exist + // (PrevExist) or not (PrevNoExist). If the caller does not + // care about existence, set PrevExist to PrevIgnore, or simply + // leave it unset. + PrevExist PrevExistType + + // TTL defines a period of time after-which the Node should + // expire and no longer exist. Values <= 0 are ignored. Given + // that the zero-value is ignored, TTL cannot be used to set + // a TTL of 0. + TTL time.Duration + + // Dir specifies whether or not this Node should be created as a directory. + Dir bool +} + +type GetOptions struct { + // Recursive defines whether or not all children of the Node + // should be returned. + Recursive bool + + // Sort instructs the server whether or not to sort the Nodes. + // If true, the Nodes are sorted alphabetically by key in + // ascending order (A to z). If false (default), the Nodes will + // not be sorted and the ordering used should not be considered + // predictable. + Sort bool + + // Quorum specifies whether it gets the latest committed value that + // has been applied in quorum of members, which ensures external + // consistency (or linearizability). + Quorum bool +} + +type DeleteOptions struct { + // PrevValue specifies what the current value of the Node must + // be in order for the Delete operation to succeed. + // + // Leaving this field empty means that the caller wishes to + // ignore the current value of the Node. This cannot be used + // to compare the Node's current value to an empty string. + PrevValue string + + // PrevIndex indicates what the current ModifiedIndex of the + // Node must be in order for the Delete operation to succeed. + // + // If PrevIndex is set to 0 (default), no comparison is made. + PrevIndex uint64 + + // Recursive defines whether or not all children of the Node + // should be deleted. If set to true, all children of the Node + // identified by the given key will be deleted. If left unset + // or explicitly set to false, only a single Node will be + // deleted. + Recursive bool + + // Dir specifies whether or not this Node should be removed as a directory. + Dir bool +} + +type Watcher interface { + // Next blocks until an etcd event occurs, then returns a Response + // represeting that event. The behavior of Next depends on the + // WatcherOptions used to construct the Watcher. Next is designed to + // be called repeatedly, each time blocking until a subsequent event + // is available. + // + // If the provided context is cancelled, Next will return a non-nil + // error. Any other failures encountered while waiting for the next + // event (connection issues, deserialization failures, etc) will + // also result in a non-nil error. + Next(context.Context) (*Response, error) +} + +type Response struct { + // Action is the name of the operation that occurred. Possible values + // include get, set, delete, update, create, compareAndSwap, + // compareAndDelete and expire. + Action string `json:"action"` + + // Node represents the state of the relevant etcd Node. + Node *Node `json:"node"` + + // PrevNode represents the previous state of the Node. PrevNode is non-nil + // only if the Node existed before the action occurred and the action + // caused a change to the Node. + PrevNode *Node `json:"prevNode"` + + // Index holds the cluster-level index at the time the Response was generated. + // This index is not tied to the Node(s) contained in this Response. + Index uint64 `json:"-"` +} + +type Node struct { + // Key represents the unique location of this Node (e.g. "/foo/bar"). + Key string `json:"key"` + + // Dir reports whether node describes a directory. + Dir bool `json:"dir,omitempty"` + + // Value is the current data stored on this Node. If this Node + // is a directory, Value will be empty. + Value string `json:"value"` + + // Nodes holds the children of this Node, only if this Node is a directory. + // This slice of will be arbitrarily deep (children, grandchildren, great- + // grandchildren, etc.) if a recursive Get or Watch request were made. + Nodes Nodes `json:"nodes"` + + // CreatedIndex is the etcd index at-which this Node was created. + CreatedIndex uint64 `json:"createdIndex"` + + // ModifiedIndex is the etcd index at-which this Node was last modified. + ModifiedIndex uint64 `json:"modifiedIndex"` + + // Expiration is the server side expiration time of the key. + Expiration *time.Time `json:"expiration,omitempty"` + + // TTL is the time to live of the key in second. + TTL int64 `json:"ttl,omitempty"` +} + +func (n *Node) String() string { + return fmt.Sprintf("{Key: %s, CreatedIndex: %d, ModifiedIndex: %d, TTL: %d}", n.Key, n.CreatedIndex, n.ModifiedIndex, n.TTL) +} + +// TTLDuration returns the Node's TTL as a time.Duration object +func (n *Node) TTLDuration() time.Duration { + return time.Duration(n.TTL) * time.Second +} + +type Nodes []*Node + +// interfaces for sorting +func (ns Nodes) Len() int { return len(ns) } +func (ns Nodes) Less(i, j int) bool { return ns[i].Key < ns[j].Key } +func (ns Nodes) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] } + +type httpKeysAPI struct { + client httpClient + prefix string +} + +func (k *httpKeysAPI) Set(ctx context.Context, key, val string, opts *SetOptions) (*Response, error) { + act := &setAction{ + Prefix: k.prefix, + Key: key, + Value: val, + } + + if opts != nil { + act.PrevValue = opts.PrevValue + act.PrevIndex = opts.PrevIndex + act.PrevExist = opts.PrevExist + act.TTL = opts.TTL + act.Dir = opts.Dir + } + + resp, body, err := k.client.Do(ctx, act) + if err != nil { + return nil, err + } + + return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body) +} + +func (k *httpKeysAPI) Create(ctx context.Context, key, val string) (*Response, error) { + return k.Set(ctx, key, val, &SetOptions{PrevExist: PrevNoExist}) +} + +func (k *httpKeysAPI) CreateInOrder(ctx context.Context, dir, val string, opts *CreateInOrderOptions) (*Response, error) { + act := &createInOrderAction{ + Prefix: k.prefix, + Dir: dir, + Value: val, + } + + if opts != nil { + act.TTL = opts.TTL + } + + resp, body, err := k.client.Do(ctx, act) + if err != nil { + return nil, err + } + + return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body) +} + +func (k *httpKeysAPI) Update(ctx context.Context, key, val string) (*Response, error) { + return k.Set(ctx, key, val, &SetOptions{PrevExist: PrevExist}) +} + +func (k *httpKeysAPI) Delete(ctx context.Context, key string, opts *DeleteOptions) (*Response, error) { + act := &deleteAction{ + Prefix: k.prefix, + Key: key, + } + + if opts != nil { + act.PrevValue = opts.PrevValue + act.PrevIndex = opts.PrevIndex + act.Dir = opts.Dir + act.Recursive = opts.Recursive + } + + resp, body, err := k.client.Do(ctx, act) + if err != nil { + return nil, err + } + + return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body) +} + +func (k *httpKeysAPI) Get(ctx context.Context, key string, opts *GetOptions) (*Response, error) { + act := &getAction{ + Prefix: k.prefix, + Key: key, + } + + if opts != nil { + act.Recursive = opts.Recursive + act.Sorted = opts.Sort + act.Quorum = opts.Quorum + } + + resp, body, err := k.client.Do(ctx, act) + if err != nil { + return nil, err + } + + return unmarshalHTTPResponse(resp.StatusCode, resp.Header, body) +} + +func (k *httpKeysAPI) Watcher(key string, opts *WatcherOptions) Watcher { + act := waitAction{ + Prefix: k.prefix, + Key: key, + } + + if opts != nil { + act.Recursive = opts.Recursive + if opts.AfterIndex > 0 { + act.WaitIndex = opts.AfterIndex + 1 + } + } + + return &httpWatcher{ + client: k.client, + nextWait: act, + } +} + +type httpWatcher struct { + client httpClient + nextWait waitAction +} + +func (hw *httpWatcher) Next(ctx context.Context) (*Response, error) { + for { + httpresp, body, err := hw.client.Do(ctx, &hw.nextWait) + if err != nil { + return nil, err + } + + resp, err := unmarshalHTTPResponse(httpresp.StatusCode, httpresp.Header, body) + if err != nil { + if err == ErrEmptyBody { + continue + } + return nil, err + } + + hw.nextWait.WaitIndex = resp.Node.ModifiedIndex + 1 + return resp, nil + } +} + +// v2KeysURL forms a URL representing the location of a key. +// The endpoint argument represents the base URL of an etcd +// server. The prefix is the path needed to route from the +// provided endpoint's path to the root of the keys API +// (typically "/v2/keys"). +func v2KeysURL(ep url.URL, prefix, key string) *url.URL { + // We concatenate all parts together manually. We cannot use + // path.Join because it does not reserve trailing slash. + // We call CanonicalURLPath to further cleanup the path. + if prefix != "" && prefix[0] != '/' { + prefix = "/" + prefix + } + if key != "" && key[0] != '/' { + key = "/" + key + } + ep.Path = pathutil.CanonicalURLPath(ep.Path + prefix + key) + return &ep +} + +type getAction struct { + Prefix string + Key string + Recursive bool + Sorted bool + Quorum bool +} + +func (g *getAction) HTTPRequest(ep url.URL) *http.Request { + u := v2KeysURL(ep, g.Prefix, g.Key) + + params := u.Query() + params.Set("recursive", strconv.FormatBool(g.Recursive)) + params.Set("sorted", strconv.FormatBool(g.Sorted)) + params.Set("quorum", strconv.FormatBool(g.Quorum)) + u.RawQuery = params.Encode() + + req, _ := http.NewRequest("GET", u.String(), nil) + return req +} + +type waitAction struct { + Prefix string + Key string + WaitIndex uint64 + Recursive bool +} + +func (w *waitAction) HTTPRequest(ep url.URL) *http.Request { + u := v2KeysURL(ep, w.Prefix, w.Key) + + params := u.Query() + params.Set("wait", "true") + params.Set("waitIndex", strconv.FormatUint(w.WaitIndex, 10)) + params.Set("recursive", strconv.FormatBool(w.Recursive)) + u.RawQuery = params.Encode() + + req, _ := http.NewRequest("GET", u.String(), nil) + return req +} + +type setAction struct { + Prefix string + Key string + Value string + PrevValue string + PrevIndex uint64 + PrevExist PrevExistType + TTL time.Duration + Dir bool +} + +func (a *setAction) HTTPRequest(ep url.URL) *http.Request { + u := v2KeysURL(ep, a.Prefix, a.Key) + + params := u.Query() + form := url.Values{} + + // we're either creating a directory or setting a key + if a.Dir { + params.Set("dir", strconv.FormatBool(a.Dir)) + } else { + // These options are only valid for setting a key + if a.PrevValue != "" { + params.Set("prevValue", a.PrevValue) + } + form.Add("value", a.Value) + } + + // Options which apply to both setting a key and creating a dir + if a.PrevIndex != 0 { + params.Set("prevIndex", strconv.FormatUint(a.PrevIndex, 10)) + } + if a.PrevExist != PrevIgnore { + params.Set("prevExist", string(a.PrevExist)) + } + if a.TTL > 0 { + form.Add("ttl", strconv.FormatUint(uint64(a.TTL.Seconds()), 10)) + } + + u.RawQuery = params.Encode() + body := strings.NewReader(form.Encode()) + + req, _ := http.NewRequest("PUT", u.String(), body) + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + + return req +} + +type deleteAction struct { + Prefix string + Key string + PrevValue string + PrevIndex uint64 + Dir bool + Recursive bool +} + +func (a *deleteAction) HTTPRequest(ep url.URL) *http.Request { + u := v2KeysURL(ep, a.Prefix, a.Key) + + params := u.Query() + if a.PrevValue != "" { + params.Set("prevValue", a.PrevValue) + } + if a.PrevIndex != 0 { + params.Set("prevIndex", strconv.FormatUint(a.PrevIndex, 10)) + } + if a.Dir { + params.Set("dir", "true") + } + if a.Recursive { + params.Set("recursive", "true") + } + u.RawQuery = params.Encode() + + req, _ := http.NewRequest("DELETE", u.String(), nil) + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + + return req +} + +type createInOrderAction struct { + Prefix string + Dir string + Value string + TTL time.Duration +} + +func (a *createInOrderAction) HTTPRequest(ep url.URL) *http.Request { + u := v2KeysURL(ep, a.Prefix, a.Dir) + + form := url.Values{} + form.Add("value", a.Value) + if a.TTL > 0 { + form.Add("ttl", strconv.FormatUint(uint64(a.TTL.Seconds()), 10)) + } + body := strings.NewReader(form.Encode()) + + req, _ := http.NewRequest("POST", u.String(), body) + req.Header.Set("Content-Type", "application/x-www-form-urlencoded") + return req +} + +func unmarshalHTTPResponse(code int, header http.Header, body []byte) (res *Response, err error) { + switch code { + case http.StatusOK, http.StatusCreated: + if len(body) == 0 { + return nil, ErrEmptyBody + } + res, err = unmarshalSuccessfulKeysResponse(header, body) + default: + err = unmarshalFailedKeysResponse(body) + } + + return +} + +func unmarshalSuccessfulKeysResponse(header http.Header, body []byte) (*Response, error) { + var res Response + err := codec.NewDecoderBytes(body, new(codec.JsonHandle)).Decode(&res) + if err != nil { + return nil, ErrInvalidJSON + } + if header.Get("X-Etcd-Index") != "" { + res.Index, err = strconv.ParseUint(header.Get("X-Etcd-Index"), 10, 64) + if err != nil { + return nil, err + } + } + return &res, nil +} + +func unmarshalFailedKeysResponse(body []byte) error { + var etcdErr Error + if err := json.Unmarshal(body, &etcdErr); err != nil { + return ErrInvalidJSON + } + return etcdErr +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go new file mode 100644 index 0000000..5b65415 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go @@ -0,0 +1,87 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "encoding/json" + "net/http" + "reflect" + "strings" + "testing" +) + +func createTestNode(size int) *Node { + return &Node{ + Key: strings.Repeat("a", 30), + Value: strings.Repeat("a", size), + CreatedIndex: 123456, + ModifiedIndex: 123456, + TTL: 123456789, + } +} + +func createTestNodeWithChildren(children, size int) *Node { + node := createTestNode(size) + for i := 0; i < children; i++ { + node.Nodes = append(node.Nodes, createTestNode(size)) + } + return node +} + +func createTestResponse(children, size int) *Response { + return &Response{ + Action: "aaaaa", + Node: createTestNodeWithChildren(children, size), + PrevNode: nil, + } +} + +func benchmarkResponseUnmarshalling(b *testing.B, children, size int) { + header := http.Header{} + header.Add("X-Etcd-Index", "123456") + response := createTestResponse(children, size) + body, err := json.Marshal(response) + if err != nil { + b.Fatal(err) + } + + b.ResetTimer() + newResponse := new(Response) + for i := 0; i < b.N; i++ { + if newResponse, err = unmarshalSuccessfulKeysResponse(header, body); err != nil { + b.Errorf("error unmarshaling response (%v)", err) + } + + } + if !reflect.DeepEqual(response.Node, newResponse.Node) { + b.Errorf("Unexpected difference in a parsed response: \n%+v\n%+v", response, newResponse) + } +} + +func BenchmarkSmallResponseUnmarshal(b *testing.B) { + benchmarkResponseUnmarshalling(b, 30, 20) +} + +func BenchmarkManySmallResponseUnmarshal(b *testing.B) { + benchmarkResponseUnmarshalling(b, 3000, 20) +} + +func BenchmarkMediumResponseUnmarshal(b *testing.B) { + benchmarkResponseUnmarshalling(b, 300, 200) +} + +func BenchmarkLargeResponseUnmarshal(b *testing.B) { + benchmarkResponseUnmarshalling(b, 3000, 2000) +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go new file mode 100644 index 0000000..80d7a55 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go @@ -0,0 +1,1407 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "errors" + "fmt" + "io/ioutil" + "net/http" + "net/url" + "reflect" + "testing" + "time" + + "golang.org/x/net/context" +) + +func TestV2KeysURLHelper(t *testing.T) { + tests := []struct { + endpoint url.URL + prefix string + key string + want url.URL + }{ + // key is empty, no problem + { + endpoint: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}, + prefix: "", + key: "", + want: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}, + }, + + // key is joined to path + { + endpoint: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}, + prefix: "", + key: "/foo/bar", + want: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys/foo/bar"}, + }, + + // key is joined to path when path is empty + { + endpoint: url.URL{Scheme: "http", Host: "example.com", Path: ""}, + prefix: "", + key: "/foo/bar", + want: url.URL{Scheme: "http", Host: "example.com", Path: "/foo/bar"}, + }, + + // Host field carries through with port + { + endpoint: url.URL{Scheme: "http", Host: "example.com:8080", Path: "/v2/keys"}, + prefix: "", + key: "", + want: url.URL{Scheme: "http", Host: "example.com:8080", Path: "/v2/keys"}, + }, + + // Scheme carries through + { + endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/v2/keys"}, + prefix: "", + key: "", + want: url.URL{Scheme: "https", Host: "example.com", Path: "/v2/keys"}, + }, + // Prefix is applied + { + endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"}, + prefix: "/bar", + key: "/baz", + want: url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar/baz"}, + }, + // Prefix is joined to path + { + endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"}, + prefix: "/bar", + key: "", + want: url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar"}, + }, + // Keep trailing slash + { + endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"}, + prefix: "/bar", + key: "/baz/", + want: url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar/baz/"}, + }, + } + + for i, tt := range tests { + got := v2KeysURL(tt.endpoint, tt.prefix, tt.key) + if tt.want != *got { + t.Errorf("#%d: want=%#v, got=%#v", i, tt.want, *got) + } + } +} + +func TestGetAction(t *testing.T) { + ep := url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"} + baseWantURL := &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/v2/keys/foo/bar", + } + wantHeader := http.Header{} + + tests := []struct { + recursive bool + sorted bool + quorum bool + wantQuery string + }{ + { + recursive: false, + sorted: false, + quorum: false, + wantQuery: "quorum=false&recursive=false&sorted=false", + }, + { + recursive: true, + sorted: false, + quorum: false, + wantQuery: "quorum=false&recursive=true&sorted=false", + }, + { + recursive: false, + sorted: true, + quorum: false, + wantQuery: "quorum=false&recursive=false&sorted=true", + }, + { + recursive: true, + sorted: true, + quorum: false, + wantQuery: "quorum=false&recursive=true&sorted=true", + }, + { + recursive: false, + sorted: false, + quorum: true, + wantQuery: "quorum=true&recursive=false&sorted=false", + }, + } + + for i, tt := range tests { + f := getAction{ + Key: "/foo/bar", + Recursive: tt.recursive, + Sorted: tt.sorted, + Quorum: tt.quorum, + } + got := *f.HTTPRequest(ep) + + wantURL := baseWantURL + wantURL.RawQuery = tt.wantQuery + + err := assertRequest(got, "GET", wantURL, wantHeader, nil) + if err != nil { + t.Errorf("#%d: %v", i, err) + } + } +} + +func TestWaitAction(t *testing.T) { + ep := url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"} + baseWantURL := &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/v2/keys/foo/bar", + } + wantHeader := http.Header{} + + tests := []struct { + waitIndex uint64 + recursive bool + wantQuery string + }{ + { + recursive: false, + waitIndex: uint64(0), + wantQuery: "recursive=false&wait=true&waitIndex=0", + }, + { + recursive: false, + waitIndex: uint64(12), + wantQuery: "recursive=false&wait=true&waitIndex=12", + }, + { + recursive: true, + waitIndex: uint64(12), + wantQuery: "recursive=true&wait=true&waitIndex=12", + }, + } + + for i, tt := range tests { + f := waitAction{ + Key: "/foo/bar", + WaitIndex: tt.waitIndex, + Recursive: tt.recursive, + } + got := *f.HTTPRequest(ep) + + wantURL := baseWantURL + wantURL.RawQuery = tt.wantQuery + + err := assertRequest(got, "GET", wantURL, wantHeader, nil) + if err != nil { + t.Errorf("#%d: unexpected error: %#v", i, err) + } + } +} + +func TestSetAction(t *testing.T) { + wantHeader := http.Header(map[string][]string{ + "Content-Type": {"application/x-www-form-urlencoded"}, + }) + + tests := []struct { + act setAction + wantURL string + wantBody string + }{ + // default prefix + { + act: setAction{ + Prefix: defaultV2KeysPrefix, + Key: "foo", + }, + wantURL: "http://example.com/v2/keys/foo", + wantBody: "value=", + }, + + // non-default prefix + { + act: setAction{ + Prefix: "/pfx", + Key: "foo", + }, + wantURL: "http://example.com/pfx/foo", + wantBody: "value=", + }, + + // no prefix + { + act: setAction{ + Key: "foo", + }, + wantURL: "http://example.com/foo", + wantBody: "value=", + }, + + // Key with path separators + { + act: setAction{ + Prefix: defaultV2KeysPrefix, + Key: "foo/bar/baz", + }, + wantURL: "http://example.com/v2/keys/foo/bar/baz", + wantBody: "value=", + }, + + // Key with leading slash, Prefix with trailing slash + { + act: setAction{ + Prefix: "/foo/", + Key: "/bar", + }, + wantURL: "http://example.com/foo/bar", + wantBody: "value=", + }, + + // Key with trailing slash + { + act: setAction{ + Key: "/foo/", + }, + wantURL: "http://example.com/foo/", + wantBody: "value=", + }, + + // Value is set + { + act: setAction{ + Key: "foo", + Value: "baz", + }, + wantURL: "http://example.com/foo", + wantBody: "value=baz", + }, + + // PrevExist set, but still ignored + { + act: setAction{ + Key: "foo", + PrevExist: PrevIgnore, + }, + wantURL: "http://example.com/foo", + wantBody: "value=", + }, + + // PrevExist set to true + { + act: setAction{ + Key: "foo", + PrevExist: PrevExist, + }, + wantURL: "http://example.com/foo?prevExist=true", + wantBody: "value=", + }, + + // PrevExist set to false + { + act: setAction{ + Key: "foo", + PrevExist: PrevNoExist, + }, + wantURL: "http://example.com/foo?prevExist=false", + wantBody: "value=", + }, + + // PrevValue is urlencoded + { + act: setAction{ + Key: "foo", + PrevValue: "bar baz", + }, + wantURL: "http://example.com/foo?prevValue=bar+baz", + wantBody: "value=", + }, + + // PrevIndex is set + { + act: setAction{ + Key: "foo", + PrevIndex: uint64(12), + }, + wantURL: "http://example.com/foo?prevIndex=12", + wantBody: "value=", + }, + + // TTL is set + { + act: setAction{ + Key: "foo", + TTL: 3 * time.Minute, + }, + wantURL: "http://example.com/foo", + wantBody: "ttl=180&value=", + }, + // Dir is set + { + act: setAction{ + Key: "foo", + Dir: true, + }, + wantURL: "http://example.com/foo?dir=true", + wantBody: "", + }, + // Dir is set with a value + { + act: setAction{ + Key: "foo", + Value: "bar", + Dir: true, + }, + wantURL: "http://example.com/foo?dir=true", + wantBody: "", + }, + // Dir is set with PrevExist set to true + { + act: setAction{ + Key: "foo", + PrevExist: PrevExist, + Dir: true, + }, + wantURL: "http://example.com/foo?dir=true&prevExist=true", + wantBody: "", + }, + // Dir is set with PrevValue + { + act: setAction{ + Key: "foo", + PrevValue: "bar", + Dir: true, + }, + wantURL: "http://example.com/foo?dir=true", + wantBody: "", + }, + } + + for i, tt := range tests { + u, err := url.Parse(tt.wantURL) + if err != nil { + t.Errorf("#%d: unable to use wantURL fixture: %v", i, err) + } + + got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"}) + if err := assertRequest(*got, "PUT", u, wantHeader, []byte(tt.wantBody)); err != nil { + t.Errorf("#%d: %v", i, err) + } + } +} + +func TestCreateInOrderAction(t *testing.T) { + wantHeader := http.Header(map[string][]string{ + "Content-Type": {"application/x-www-form-urlencoded"}, + }) + + tests := []struct { + act createInOrderAction + wantURL string + wantBody string + }{ + // default prefix + { + act: createInOrderAction{ + Prefix: defaultV2KeysPrefix, + Dir: "foo", + }, + wantURL: "http://example.com/v2/keys/foo", + wantBody: "value=", + }, + + // non-default prefix + { + act: createInOrderAction{ + Prefix: "/pfx", + Dir: "foo", + }, + wantURL: "http://example.com/pfx/foo", + wantBody: "value=", + }, + + // no prefix + { + act: createInOrderAction{ + Dir: "foo", + }, + wantURL: "http://example.com/foo", + wantBody: "value=", + }, + + // Key with path separators + { + act: createInOrderAction{ + Prefix: defaultV2KeysPrefix, + Dir: "foo/bar/baz", + }, + wantURL: "http://example.com/v2/keys/foo/bar/baz", + wantBody: "value=", + }, + + // Key with leading slash, Prefix with trailing slash + { + act: createInOrderAction{ + Prefix: "/foo/", + Dir: "/bar", + }, + wantURL: "http://example.com/foo/bar", + wantBody: "value=", + }, + + // Key with trailing slash + { + act: createInOrderAction{ + Dir: "/foo/", + }, + wantURL: "http://example.com/foo/", + wantBody: "value=", + }, + + // Value is set + { + act: createInOrderAction{ + Dir: "foo", + Value: "baz", + }, + wantURL: "http://example.com/foo", + wantBody: "value=baz", + }, + // TTL is set + { + act: createInOrderAction{ + Dir: "foo", + TTL: 3 * time.Minute, + }, + wantURL: "http://example.com/foo", + wantBody: "ttl=180&value=", + }, + } + + for i, tt := range tests { + u, err := url.Parse(tt.wantURL) + if err != nil { + t.Errorf("#%d: unable to use wantURL fixture: %v", i, err) + } + + got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"}) + if err := assertRequest(*got, "POST", u, wantHeader, []byte(tt.wantBody)); err != nil { + t.Errorf("#%d: %v", i, err) + } + } +} + +func TestDeleteAction(t *testing.T) { + wantHeader := http.Header(map[string][]string{ + "Content-Type": {"application/x-www-form-urlencoded"}, + }) + + tests := []struct { + act deleteAction + wantURL string + }{ + // default prefix + { + act: deleteAction{ + Prefix: defaultV2KeysPrefix, + Key: "foo", + }, + wantURL: "http://example.com/v2/keys/foo", + }, + + // non-default prefix + { + act: deleteAction{ + Prefix: "/pfx", + Key: "foo", + }, + wantURL: "http://example.com/pfx/foo", + }, + + // no prefix + { + act: deleteAction{ + Key: "foo", + }, + wantURL: "http://example.com/foo", + }, + + // Key with path separators + { + act: deleteAction{ + Prefix: defaultV2KeysPrefix, + Key: "foo/bar/baz", + }, + wantURL: "http://example.com/v2/keys/foo/bar/baz", + }, + + // Key with leading slash, Prefix with trailing slash + { + act: deleteAction{ + Prefix: "/foo/", + Key: "/bar", + }, + wantURL: "http://example.com/foo/bar", + }, + + // Key with trailing slash + { + act: deleteAction{ + Key: "/foo/", + }, + wantURL: "http://example.com/foo/", + }, + + // Recursive set to true + { + act: deleteAction{ + Key: "foo", + Recursive: true, + }, + wantURL: "http://example.com/foo?recursive=true", + }, + + // PrevValue is urlencoded + { + act: deleteAction{ + Key: "foo", + PrevValue: "bar baz", + }, + wantURL: "http://example.com/foo?prevValue=bar+baz", + }, + + // PrevIndex is set + { + act: deleteAction{ + Key: "foo", + PrevIndex: uint64(12), + }, + wantURL: "http://example.com/foo?prevIndex=12", + }, + } + + for i, tt := range tests { + u, err := url.Parse(tt.wantURL) + if err != nil { + t.Errorf("#%d: unable to use wantURL fixture: %v", i, err) + } + + got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"}) + if err := assertRequest(*got, "DELETE", u, wantHeader, nil); err != nil { + t.Errorf("#%d: %v", i, err) + } + } +} + +func assertRequest(got http.Request, wantMethod string, wantURL *url.URL, wantHeader http.Header, wantBody []byte) error { + if wantMethod != got.Method { + return fmt.Errorf("want.Method=%#v got.Method=%#v", wantMethod, got.Method) + } + + if !reflect.DeepEqual(wantURL, got.URL) { + return fmt.Errorf("want.URL=%#v got.URL=%#v", wantURL, got.URL) + } + + if !reflect.DeepEqual(wantHeader, got.Header) { + return fmt.Errorf("want.Header=%#v got.Header=%#v", wantHeader, got.Header) + } + + if got.Body == nil { + if wantBody != nil { + return fmt.Errorf("want.Body=%v got.Body=%v", wantBody, got.Body) + } + } else { + if wantBody == nil { + return fmt.Errorf("want.Body=%v got.Body=%s", wantBody, got.Body) + } else { + gotBytes, err := ioutil.ReadAll(got.Body) + if err != nil { + return err + } + + if !reflect.DeepEqual(wantBody, gotBytes) { + return fmt.Errorf("want.Body=%s got.Body=%s", wantBody, gotBytes) + } + } + } + + return nil +} + +func TestUnmarshalSuccessfulResponse(t *testing.T) { + var expiration time.Time + expiration.UnmarshalText([]byte("2015-04-07T04:40:23.044979686Z")) + + tests := []struct { + hdr string + body string + wantRes *Response + wantErr bool + }{ + // Neither PrevNode or Node + { + hdr: "1", + body: `{"action":"delete"}`, + wantRes: &Response{Action: "delete", Index: 1}, + wantErr: false, + }, + + // PrevNode + { + hdr: "15", + body: `{"action":"delete", "prevNode": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10}}`, + wantRes: &Response{ + Action: "delete", + Index: 15, + Node: nil, + PrevNode: &Node{ + Key: "/foo", + Value: "bar", + ModifiedIndex: 12, + CreatedIndex: 10, + }, + }, + wantErr: false, + }, + + // Node + { + hdr: "15", + body: `{"action":"get", "node": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10, "ttl": 10, "expiration": "2015-04-07T04:40:23.044979686Z"}}`, + wantRes: &Response{ + Action: "get", + Index: 15, + Node: &Node{ + Key: "/foo", + Value: "bar", + ModifiedIndex: 12, + CreatedIndex: 10, + TTL: 10, + Expiration: &expiration, + }, + PrevNode: nil, + }, + wantErr: false, + }, + + // Node Dir + { + hdr: "15", + body: `{"action":"get", "node": {"key": "/foo", "dir": true, "modifiedIndex": 12, "createdIndex": 10}}`, + wantRes: &Response{ + Action: "get", + Index: 15, + Node: &Node{ + Key: "/foo", + Dir: true, + ModifiedIndex: 12, + CreatedIndex: 10, + }, + PrevNode: nil, + }, + wantErr: false, + }, + + // PrevNode and Node + { + hdr: "15", + body: `{"action":"update", "prevNode": {"key": "/foo", "value": "baz", "modifiedIndex": 10, "createdIndex": 10}, "node": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10}}`, + wantRes: &Response{ + Action: "update", + Index: 15, + PrevNode: &Node{ + Key: "/foo", + Value: "baz", + ModifiedIndex: 10, + CreatedIndex: 10, + }, + Node: &Node{ + Key: "/foo", + Value: "bar", + ModifiedIndex: 12, + CreatedIndex: 10, + }, + }, + wantErr: false, + }, + + // Garbage in body + { + hdr: "", + body: `garbage`, + wantRes: nil, + wantErr: true, + }, + + // non-integer index + { + hdr: "poo", + body: `{}`, + wantRes: nil, + wantErr: true, + }, + } + + for i, tt := range tests { + h := make(http.Header) + h.Add("X-Etcd-Index", tt.hdr) + res, err := unmarshalSuccessfulKeysResponse(h, []byte(tt.body)) + if tt.wantErr != (err != nil) { + t.Errorf("#%d: wantErr=%t, err=%v", i, tt.wantErr, err) + } + + if (res == nil) != (tt.wantRes == nil) { + t.Errorf("#%d: received res=%#v, but expected res=%#v", i, res, tt.wantRes) + continue + } else if tt.wantRes == nil { + // expected and successfully got nil response + continue + } + + if res.Action != tt.wantRes.Action { + t.Errorf("#%d: Action=%s, expected %s", i, res.Action, tt.wantRes.Action) + } + if res.Index != tt.wantRes.Index { + t.Errorf("#%d: Index=%d, expected %d", i, res.Index, tt.wantRes.Index) + } + if !reflect.DeepEqual(res.Node, tt.wantRes.Node) { + t.Errorf("#%d: Node=%v, expected %v", i, res.Node, tt.wantRes.Node) + } + } +} + +func TestUnmarshalFailedKeysResponse(t *testing.T) { + body := []byte(`{"errorCode":100,"message":"Key not found","cause":"/foo","index":18}`) + + wantErr := Error{ + Code: 100, + Message: "Key not found", + Cause: "/foo", + Index: uint64(18), + } + + gotErr := unmarshalFailedKeysResponse(body) + if !reflect.DeepEqual(wantErr, gotErr) { + t.Errorf("unexpected error: want=%#v got=%#v", wantErr, gotErr) + } +} + +func TestUnmarshalFailedKeysResponseBadJSON(t *testing.T) { + err := unmarshalFailedKeysResponse([]byte(`{"er`)) + if err == nil { + t.Errorf("got nil error") + } else if _, ok := err.(Error); ok { + t.Errorf("error is of incorrect type *Error: %#v", err) + } +} + +func TestHTTPWatcherNextWaitAction(t *testing.T) { + initAction := waitAction{ + Prefix: "/pants", + Key: "/foo/bar", + Recursive: true, + WaitIndex: 19, + } + + client := &actionAssertingHTTPClient{ + t: t, + act: &initAction, + resp: http.Response{ + StatusCode: http.StatusOK, + Header: http.Header{"X-Etcd-Index": []string{"42"}}, + }, + body: []byte(`{"action":"update","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":21,"createdIndex":19},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`), + } + + wantResponse := &Response{ + Action: "update", + Node: &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(19), ModifiedIndex: uint64(21)}, + PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)}, + Index: uint64(42), + } + + wantNextWait := waitAction{ + Prefix: "/pants", + Key: "/foo/bar", + Recursive: true, + WaitIndex: 22, + } + + watcher := &httpWatcher{ + client: client, + nextWait: initAction, + } + + resp, err := watcher.Next(context.Background()) + if err != nil { + t.Errorf("non-nil error: %#v", err) + } + + if !reflect.DeepEqual(wantResponse, resp) { + t.Errorf("received incorrect Response: want=%#v got=%#v", wantResponse, resp) + } + + if !reflect.DeepEqual(wantNextWait, watcher.nextWait) { + t.Errorf("nextWait incorrect: want=%#v got=%#v", wantNextWait, watcher.nextWait) + } +} + +func TestHTTPWatcherNextFail(t *testing.T) { + tests := []httpClient{ + // generic HTTP client failure + &staticHTTPClient{ + err: errors.New("fail!"), + }, + + // unusable status code + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + + // etcd Error response + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusNotFound, + }, + body: []byte(`{"errorCode":100,"message":"Key not found","cause":"/foo","index":18}`), + }, + } + + for i, tt := range tests { + act := waitAction{ + Prefix: "/pants", + Key: "/foo/bar", + Recursive: true, + WaitIndex: 19, + } + + watcher := &httpWatcher{ + client: tt, + nextWait: act, + } + + resp, err := watcher.Next(context.Background()) + if err == nil { + t.Errorf("#%d: expected non-nil error", i) + } + if resp != nil { + t.Errorf("#%d: expected nil Response, got %#v", i, resp) + } + if !reflect.DeepEqual(act, watcher.nextWait) { + t.Errorf("#%d: nextWait changed: want=%#v got=%#v", i, act, watcher.nextWait) + } + } +} + +func TestHTTPKeysAPIWatcherAction(t *testing.T) { + tests := []struct { + key string + opts *WatcherOptions + want waitAction + }{ + { + key: "/foo", + opts: nil, + want: waitAction{ + Key: "/foo", + Recursive: false, + WaitIndex: 0, + }, + }, + + { + key: "/foo", + opts: &WatcherOptions{ + Recursive: false, + AfterIndex: 0, + }, + want: waitAction{ + Key: "/foo", + Recursive: false, + WaitIndex: 0, + }, + }, + + { + key: "/foo", + opts: &WatcherOptions{ + Recursive: true, + AfterIndex: 0, + }, + want: waitAction{ + Key: "/foo", + Recursive: true, + WaitIndex: 0, + }, + }, + + { + key: "/foo", + opts: &WatcherOptions{ + Recursive: false, + AfterIndex: 19, + }, + want: waitAction{ + Key: "/foo", + Recursive: false, + WaitIndex: 20, + }, + }, + } + + for i, tt := range tests { + kAPI := &httpKeysAPI{ + client: &staticHTTPClient{err: errors.New("fail!")}, + } + + want := &httpWatcher{ + client: &staticHTTPClient{err: errors.New("fail!")}, + nextWait: tt.want, + } + + got := kAPI.Watcher(tt.key, tt.opts) + if !reflect.DeepEqual(want, got) { + t.Errorf("#%d: incorrect watcher: want=%#v got=%#v", i, want, got) + } + } +} + +func TestHTTPKeysAPISetAction(t *testing.T) { + tests := []struct { + key string + value string + opts *SetOptions + wantAction httpAction + }{ + // nil SetOptions + { + key: "/foo", + value: "bar", + opts: nil, + wantAction: &setAction{ + Key: "/foo", + Value: "bar", + PrevValue: "", + PrevIndex: 0, + PrevExist: PrevIgnore, + TTL: 0, + }, + }, + // empty SetOptions + { + key: "/foo", + value: "bar", + opts: &SetOptions{}, + wantAction: &setAction{ + Key: "/foo", + Value: "bar", + PrevValue: "", + PrevIndex: 0, + PrevExist: PrevIgnore, + TTL: 0, + }, + }, + // populated SetOptions + { + key: "/foo", + value: "bar", + opts: &SetOptions{ + PrevValue: "baz", + PrevIndex: 13, + PrevExist: PrevExist, + TTL: time.Minute, + Dir: true, + }, + wantAction: &setAction{ + Key: "/foo", + Value: "bar", + PrevValue: "baz", + PrevIndex: 13, + PrevExist: PrevExist, + TTL: time.Minute, + Dir: true, + }, + }, + } + + for i, tt := range tests { + client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction} + kAPI := httpKeysAPI{client: client} + kAPI.Set(context.Background(), tt.key, tt.value, tt.opts) + } +} + +func TestHTTPKeysAPISetError(t *testing.T) { + tests := []httpClient{ + // generic HTTP client failure + &staticHTTPClient{ + err: errors.New("fail!"), + }, + + // unusable status code + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + + // etcd Error response + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusInternalServerError, + }, + body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`), + }, + } + + for i, tt := range tests { + kAPI := httpKeysAPI{client: tt} + resp, err := kAPI.Set(context.Background(), "/foo", "bar", nil) + if err == nil { + t.Errorf("#%d: received nil error", i) + } + if resp != nil { + t.Errorf("#%d: received non-nil Response: %#v", i, resp) + } + } +} + +func TestHTTPKeysAPISetResponse(t *testing.T) { + client := &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusOK, + Header: http.Header{"X-Etcd-Index": []string{"21"}}, + }, + body: []byte(`{"action":"set","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":21,"createdIndex":21},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`), + } + + wantResponse := &Response{ + Action: "set", + Node: &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(21), ModifiedIndex: uint64(21)}, + PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)}, + Index: uint64(21), + } + + kAPI := &httpKeysAPI{client: client, prefix: "/pants"} + resp, err := kAPI.Set(context.Background(), "/foo/bar/baz", "snarf", nil) + if err != nil { + t.Errorf("non-nil error: %#v", err) + } + if !reflect.DeepEqual(wantResponse, resp) { + t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp) + } +} + +func TestHTTPKeysAPIGetAction(t *testing.T) { + tests := []struct { + key string + opts *GetOptions + wantAction httpAction + }{ + // nil GetOptions + { + key: "/foo", + opts: nil, + wantAction: &getAction{ + Key: "/foo", + Sorted: false, + Recursive: false, + }, + }, + // empty GetOptions + { + key: "/foo", + opts: &GetOptions{}, + wantAction: &getAction{ + Key: "/foo", + Sorted: false, + Recursive: false, + }, + }, + // populated GetOptions + { + key: "/foo", + opts: &GetOptions{ + Sort: true, + Recursive: true, + Quorum: true, + }, + wantAction: &getAction{ + Key: "/foo", + Sorted: true, + Recursive: true, + Quorum: true, + }, + }, + } + + for i, tt := range tests { + client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction} + kAPI := httpKeysAPI{client: client} + kAPI.Get(context.Background(), tt.key, tt.opts) + } +} + +func TestHTTPKeysAPIGetError(t *testing.T) { + tests := []httpClient{ + // generic HTTP client failure + &staticHTTPClient{ + err: errors.New("fail!"), + }, + + // unusable status code + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + + // etcd Error response + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusInternalServerError, + }, + body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`), + }, + } + + for i, tt := range tests { + kAPI := httpKeysAPI{client: tt} + resp, err := kAPI.Get(context.Background(), "/foo", nil) + if err == nil { + t.Errorf("#%d: received nil error", i) + } + if resp != nil { + t.Errorf("#%d: received non-nil Response: %#v", i, resp) + } + } +} + +func TestHTTPKeysAPIGetResponse(t *testing.T) { + client := &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusOK, + Header: http.Header{"X-Etcd-Index": []string{"42"}}, + }, + body: []byte(`{"action":"get","node":{"key":"/pants/foo/bar","modifiedIndex":25,"createdIndex":19,"nodes":[{"key":"/pants/foo/bar/baz","value":"snarf","createdIndex":21,"modifiedIndex":25}]}}`), + } + + wantResponse := &Response{ + Action: "get", + Node: &Node{ + Key: "/pants/foo/bar", + Nodes: []*Node{ + {Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: 21, ModifiedIndex: 25}, + }, + CreatedIndex: uint64(19), + ModifiedIndex: uint64(25), + }, + Index: uint64(42), + } + + kAPI := &httpKeysAPI{client: client, prefix: "/pants"} + resp, err := kAPI.Get(context.Background(), "/foo/bar", &GetOptions{Recursive: true}) + if err != nil { + t.Errorf("non-nil error: %#v", err) + } + if !reflect.DeepEqual(wantResponse, resp) { + t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp) + } +} + +func TestHTTPKeysAPIDeleteAction(t *testing.T) { + tests := []struct { + key string + value string + opts *DeleteOptions + wantAction httpAction + }{ + // nil DeleteOptions + { + key: "/foo", + opts: nil, + wantAction: &deleteAction{ + Key: "/foo", + PrevValue: "", + PrevIndex: 0, + Recursive: false, + }, + }, + // empty DeleteOptions + { + key: "/foo", + opts: &DeleteOptions{}, + wantAction: &deleteAction{ + Key: "/foo", + PrevValue: "", + PrevIndex: 0, + Recursive: false, + }, + }, + // populated DeleteOptions + { + key: "/foo", + opts: &DeleteOptions{ + PrevValue: "baz", + PrevIndex: 13, + Recursive: true, + }, + wantAction: &deleteAction{ + Key: "/foo", + PrevValue: "baz", + PrevIndex: 13, + Recursive: true, + }, + }, + } + + for i, tt := range tests { + client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction} + kAPI := httpKeysAPI{client: client} + kAPI.Delete(context.Background(), tt.key, tt.opts) + } +} + +func TestHTTPKeysAPIDeleteError(t *testing.T) { + tests := []httpClient{ + // generic HTTP client failure + &staticHTTPClient{ + err: errors.New("fail!"), + }, + + // unusable status code + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusTeapot, + }, + }, + + // etcd Error response + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusInternalServerError, + }, + body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`), + }, + } + + for i, tt := range tests { + kAPI := httpKeysAPI{client: tt} + resp, err := kAPI.Delete(context.Background(), "/foo", nil) + if err == nil { + t.Errorf("#%d: received nil error", i) + } + if resp != nil { + t.Errorf("#%d: received non-nil Response: %#v", i, resp) + } + } +} + +func TestHTTPKeysAPIDeleteResponse(t *testing.T) { + client := &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusOK, + Header: http.Header{"X-Etcd-Index": []string{"22"}}, + }, + body: []byte(`{"action":"delete","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":22,"createdIndex":19},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`), + } + + wantResponse := &Response{ + Action: "delete", + Node: &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(19), ModifiedIndex: uint64(22)}, + PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)}, + Index: uint64(22), + } + + kAPI := &httpKeysAPI{client: client, prefix: "/pants"} + resp, err := kAPI.Delete(context.Background(), "/foo/bar/baz", nil) + if err != nil { + t.Errorf("non-nil error: %#v", err) + } + if !reflect.DeepEqual(wantResponse, resp) { + t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp) + } +} + +func TestHTTPKeysAPICreateAction(t *testing.T) { + act := &setAction{ + Key: "/foo", + Value: "bar", + PrevExist: PrevNoExist, + PrevIndex: 0, + PrevValue: "", + TTL: 0, + } + + kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}} + kAPI.Create(context.Background(), "/foo", "bar") +} + +func TestHTTPKeysAPICreateInOrderAction(t *testing.T) { + act := &createInOrderAction{ + Dir: "/foo", + Value: "bar", + TTL: 0, + } + kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}} + kAPI.CreateInOrder(context.Background(), "/foo", "bar", nil) +} + +func TestHTTPKeysAPIUpdateAction(t *testing.T) { + act := &setAction{ + Key: "/foo", + Value: "bar", + PrevExist: PrevExist, + PrevIndex: 0, + PrevValue: "", + TTL: 0, + } + + kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}} + kAPI.Update(context.Background(), "/foo", "bar") +} + +func TestNodeTTLDuration(t *testing.T) { + tests := []struct { + node *Node + want time.Duration + }{ + { + node: &Node{TTL: 0}, + want: 0, + }, + { + node: &Node{TTL: 97}, + want: 97 * time.Second, + }, + } + + for i, tt := range tests { + got := tt.node.TTLDuration() + if tt.want != got { + t.Errorf("#%d: incorrect duration: want=%v got=%v", i, tt.want, got) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go new file mode 100644 index 0000000..c1c7840 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go @@ -0,0 +1,272 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/url" + "path" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/pkg/types" +) + +var ( + defaultV2MembersPrefix = "/v2/members" +) + +type Member struct { + // ID is the unique identifier of this Member. + ID string `json:"id"` + + // Name is a human-readable, non-unique identifier of this Member. + Name string `json:"name"` + + // PeerURLs represents the HTTP(S) endpoints this Member uses to + // participate in etcd's consensus protocol. + PeerURLs []string `json:"peerURLs"` + + // ClientURLs represents the HTTP(S) endpoints on which this Member + // serves it's client-facing APIs. + ClientURLs []string `json:"clientURLs"` +} + +type memberCollection []Member + +func (c *memberCollection) UnmarshalJSON(data []byte) error { + d := struct { + Members []Member + }{} + + if err := json.Unmarshal(data, &d); err != nil { + return err + } + + if d.Members == nil { + *c = make([]Member, 0) + return nil + } + + *c = d.Members + return nil +} + +type memberCreateOrUpdateRequest struct { + PeerURLs types.URLs +} + +func (m *memberCreateOrUpdateRequest) MarshalJSON() ([]byte, error) { + s := struct { + PeerURLs []string `json:"peerURLs"` + }{ + PeerURLs: make([]string, len(m.PeerURLs)), + } + + for i, u := range m.PeerURLs { + s.PeerURLs[i] = u.String() + } + + return json.Marshal(&s) +} + +// NewMembersAPI constructs a new MembersAPI that uses HTTP to +// interact with etcd's membership API. +func NewMembersAPI(c Client) MembersAPI { + return &httpMembersAPI{ + client: c, + } +} + +type MembersAPI interface { + // List enumerates the current cluster membership. + List(ctx context.Context) ([]Member, error) + + // Add instructs etcd to accept a new Member into the cluster. + Add(ctx context.Context, peerURL string) (*Member, error) + + // Remove demotes an existing Member out of the cluster. + Remove(ctx context.Context, mID string) error + + // Update instructs etcd to update an existing Member in the cluster. + Update(ctx context.Context, mID string, peerURLs []string) error +} + +type httpMembersAPI struct { + client httpClient +} + +func (m *httpMembersAPI) List(ctx context.Context) ([]Member, error) { + req := &membersAPIActionList{} + resp, body, err := m.client.Do(ctx, req) + if err != nil { + return nil, err + } + + if err := assertStatusCode(resp.StatusCode, http.StatusOK); err != nil { + return nil, err + } + + var mCollection memberCollection + if err := json.Unmarshal(body, &mCollection); err != nil { + return nil, err + } + + return []Member(mCollection), nil +} + +func (m *httpMembersAPI) Add(ctx context.Context, peerURL string) (*Member, error) { + urls, err := types.NewURLs([]string{peerURL}) + if err != nil { + return nil, err + } + + req := &membersAPIActionAdd{peerURLs: urls} + resp, body, err := m.client.Do(ctx, req) + if err != nil { + return nil, err + } + + if err := assertStatusCode(resp.StatusCode, http.StatusCreated, http.StatusConflict); err != nil { + return nil, err + } + + if resp.StatusCode != http.StatusCreated { + var merr membersError + if err := json.Unmarshal(body, &merr); err != nil { + return nil, err + } + return nil, merr + } + + var memb Member + if err := json.Unmarshal(body, &memb); err != nil { + return nil, err + } + + return &memb, nil +} + +func (m *httpMembersAPI) Update(ctx context.Context, memberID string, peerURLs []string) error { + urls, err := types.NewURLs(peerURLs) + if err != nil { + return err + } + + req := &membersAPIActionUpdate{peerURLs: urls, memberID: memberID} + resp, body, err := m.client.Do(ctx, req) + if err != nil { + return err + } + + if err := assertStatusCode(resp.StatusCode, http.StatusNoContent, http.StatusNotFound, http.StatusConflict); err != nil { + return err + } + + if resp.StatusCode != http.StatusNoContent { + var merr membersError + if err := json.Unmarshal(body, &merr); err != nil { + return err + } + return merr + } + + return nil +} + +func (m *httpMembersAPI) Remove(ctx context.Context, memberID string) error { + req := &membersAPIActionRemove{memberID: memberID} + resp, _, err := m.client.Do(ctx, req) + if err != nil { + return err + } + + return assertStatusCode(resp.StatusCode, http.StatusNoContent, http.StatusGone) +} + +type membersAPIActionList struct{} + +func (l *membersAPIActionList) HTTPRequest(ep url.URL) *http.Request { + u := v2MembersURL(ep) + req, _ := http.NewRequest("GET", u.String(), nil) + return req +} + +type membersAPIActionRemove struct { + memberID string +} + +func (d *membersAPIActionRemove) HTTPRequest(ep url.URL) *http.Request { + u := v2MembersURL(ep) + u.Path = path.Join(u.Path, d.memberID) + req, _ := http.NewRequest("DELETE", u.String(), nil) + return req +} + +type membersAPIActionAdd struct { + peerURLs types.URLs +} + +func (a *membersAPIActionAdd) HTTPRequest(ep url.URL) *http.Request { + u := v2MembersURL(ep) + m := memberCreateOrUpdateRequest{PeerURLs: a.peerURLs} + b, _ := json.Marshal(&m) + req, _ := http.NewRequest("POST", u.String(), bytes.NewReader(b)) + req.Header.Set("Content-Type", "application/json") + return req +} + +type membersAPIActionUpdate struct { + memberID string + peerURLs types.URLs +} + +func (a *membersAPIActionUpdate) HTTPRequest(ep url.URL) *http.Request { + u := v2MembersURL(ep) + m := memberCreateOrUpdateRequest{PeerURLs: a.peerURLs} + u.Path = path.Join(u.Path, a.memberID) + b, _ := json.Marshal(&m) + req, _ := http.NewRequest("PUT", u.String(), bytes.NewReader(b)) + req.Header.Set("Content-Type", "application/json") + return req +} + +func assertStatusCode(got int, want ...int) (err error) { + for _, w := range want { + if w == got { + return nil + } + } + return fmt.Errorf("unexpected status code %d", got) +} + +// v2MembersURL add the necessary path to the provided endpoint +// to route requests to the default v2 members API. +func v2MembersURL(ep url.URL) *url.URL { + ep.Path = path.Join(ep.Path, defaultV2MembersPrefix) + return &ep +} + +type membersError struct { + Message string `json:"message"` + Code int `json:"-"` +} + +func (e membersError) Error() string { + return e.Message +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go new file mode 100644 index 0000000..e892b76 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go @@ -0,0 +1,522 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "encoding/json" + "errors" + "net/http" + "net/url" + "reflect" + "testing" + + "golang.org/x/net/context" + + "github.com/coreos/etcd/pkg/types" +) + +func TestMembersAPIActionList(t *testing.T) { + ep := url.URL{Scheme: "http", Host: "example.com"} + act := &membersAPIActionList{} + + wantURL := &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/v2/members", + } + + got := *act.HTTPRequest(ep) + err := assertRequest(got, "GET", wantURL, http.Header{}, nil) + if err != nil { + t.Error(err.Error()) + } +} + +func TestMembersAPIActionAdd(t *testing.T) { + ep := url.URL{Scheme: "http", Host: "example.com"} + act := &membersAPIActionAdd{ + peerURLs: types.URLs([]url.URL{ + {Scheme: "https", Host: "127.0.0.1:8081"}, + {Scheme: "http", Host: "127.0.0.1:8080"}, + }), + } + + wantURL := &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/v2/members", + } + wantHeader := http.Header{ + "Content-Type": []string{"application/json"}, + } + wantBody := []byte(`{"peerURLs":["https://127.0.0.1:8081","http://127.0.0.1:8080"]}`) + + got := *act.HTTPRequest(ep) + err := assertRequest(got, "POST", wantURL, wantHeader, wantBody) + if err != nil { + t.Error(err.Error()) + } +} + +func TestMembersAPIActionUpdate(t *testing.T) { + ep := url.URL{Scheme: "http", Host: "example.com"} + act := &membersAPIActionUpdate{ + memberID: "0xabcd", + peerURLs: types.URLs([]url.URL{ + {Scheme: "https", Host: "127.0.0.1:8081"}, + {Scheme: "http", Host: "127.0.0.1:8080"}, + }), + } + + wantURL := &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/v2/members/0xabcd", + } + wantHeader := http.Header{ + "Content-Type": []string{"application/json"}, + } + wantBody := []byte(`{"peerURLs":["https://127.0.0.1:8081","http://127.0.0.1:8080"]}`) + + got := *act.HTTPRequest(ep) + err := assertRequest(got, "PUT", wantURL, wantHeader, wantBody) + if err != nil { + t.Error(err.Error()) + } +} + +func TestMembersAPIActionRemove(t *testing.T) { + ep := url.URL{Scheme: "http", Host: "example.com"} + act := &membersAPIActionRemove{memberID: "XXX"} + + wantURL := &url.URL{ + Scheme: "http", + Host: "example.com", + Path: "/v2/members/XXX", + } + + got := *act.HTTPRequest(ep) + err := assertRequest(got, "DELETE", wantURL, http.Header{}, nil) + if err != nil { + t.Error(err.Error()) + } +} + +func TestAssertStatusCode(t *testing.T) { + if err := assertStatusCode(404, 400); err == nil { + t.Errorf("assertStatusCode failed to detect conflict in 400 vs 404") + } + + if err := assertStatusCode(404, 400, 404); err != nil { + t.Errorf("assertStatusCode found conflict in (404,400) vs 400: %v", err) + } +} + +func TestV2MembersURL(t *testing.T) { + got := v2MembersURL(url.URL{ + Scheme: "http", + Host: "foo.example.com:4002", + Path: "/pants", + }) + want := &url.URL{ + Scheme: "http", + Host: "foo.example.com:4002", + Path: "/pants/v2/members", + } + + if !reflect.DeepEqual(want, got) { + t.Fatalf("v2MembersURL got %#v, want %#v", got, want) + } +} + +func TestMemberUnmarshal(t *testing.T) { + tests := []struct { + body []byte + wantMember Member + wantError bool + }{ + // no URLs, just check ID & Name + { + body: []byte(`{"id": "c", "name": "dungarees"}`), + wantMember: Member{ID: "c", Name: "dungarees", PeerURLs: nil, ClientURLs: nil}, + }, + + // both client and peer URLs + { + body: []byte(`{"peerURLs": ["http://127.0.0.1:2379"], "clientURLs": ["http://127.0.0.1:2379"]}`), + wantMember: Member{ + PeerURLs: []string{ + "http://127.0.0.1:2379", + }, + ClientURLs: []string{ + "http://127.0.0.1:2379", + }, + }, + }, + + // multiple peer URLs + { + body: []byte(`{"peerURLs": ["http://127.0.0.1:2379", "https://example.com"]}`), + wantMember: Member{ + PeerURLs: []string{ + "http://127.0.0.1:2379", + "https://example.com", + }, + ClientURLs: nil, + }, + }, + + // multiple client URLs + { + body: []byte(`{"clientURLs": ["http://127.0.0.1:2379", "https://example.com"]}`), + wantMember: Member{ + PeerURLs: nil, + ClientURLs: []string{ + "http://127.0.0.1:2379", + "https://example.com", + }, + }, + }, + + // invalid JSON + { + body: []byte(`{"peerU`), + wantError: true, + }, + } + + for i, tt := range tests { + got := Member{} + err := json.Unmarshal(tt.body, &got) + if tt.wantError != (err != nil) { + t.Errorf("#%d: want error %t, got %v", i, tt.wantError, err) + continue + } + + if !reflect.DeepEqual(tt.wantMember, got) { + t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.wantMember, got) + } + } +} + +func TestMemberCollectionUnmarshalFail(t *testing.T) { + mc := &memberCollection{} + if err := mc.UnmarshalJSON([]byte(`{`)); err == nil { + t.Errorf("got nil error") + } +} + +func TestMemberCollectionUnmarshal(t *testing.T) { + tests := []struct { + body []byte + want memberCollection + }{ + { + body: []byte(`{}`), + want: memberCollection([]Member{}), + }, + { + body: []byte(`{"members":[]}`), + want: memberCollection([]Member{}), + }, + { + body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), + want: memberCollection( + []Member{ + { + ID: "2745e2525fce8fe", + Name: "node3", + PeerURLs: []string{ + "http://127.0.0.1:7003", + }, + ClientURLs: []string{ + "http://127.0.0.1:4003", + }, + }, + { + ID: "42134f434382925", + Name: "node1", + PeerURLs: []string{ + "http://127.0.0.1:2380", + "http://127.0.0.1:7001", + }, + ClientURLs: []string{ + "http://127.0.0.1:2379", + "http://127.0.0.1:4001", + }, + }, + { + ID: "94088180e21eb87b", + Name: "node2", + PeerURLs: []string{ + "http://127.0.0.1:7002", + }, + ClientURLs: []string{ + "http://127.0.0.1:4002", + }, + }, + }, + ), + }, + } + + for i, tt := range tests { + var got memberCollection + err := json.Unmarshal(tt.body, &got) + if err != nil { + t.Errorf("#%d: unexpected error: %v", i, err) + continue + } + + if !reflect.DeepEqual(tt.want, got) { + t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.want, got) + } + } +} + +func TestMemberCreateRequestMarshal(t *testing.T) { + req := memberCreateOrUpdateRequest{ + PeerURLs: types.URLs([]url.URL{ + {Scheme: "http", Host: "127.0.0.1:8081"}, + {Scheme: "https", Host: "127.0.0.1:8080"}, + }), + } + want := []byte(`{"peerURLs":["http://127.0.0.1:8081","https://127.0.0.1:8080"]}`) + + got, err := json.Marshal(&req) + if err != nil { + t.Fatalf("Marshal returned unexpected err=%v", err) + } + + if !reflect.DeepEqual(want, got) { + t.Fatalf("Failed to marshal memberCreateRequest: want=%s, got=%s", want, got) + } +} + +func TestHTTPMembersAPIAddSuccess(t *testing.T) { + wantAction := &membersAPIActionAdd{ + peerURLs: types.URLs([]url.URL{ + {Scheme: "http", Host: "127.0.0.1:7002"}, + }), + } + + mAPI := &httpMembersAPI{ + client: &actionAssertingHTTPClient{ + t: t, + act: wantAction, + resp: http.Response{ + StatusCode: http.StatusCreated, + }, + body: []byte(`{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"]}`), + }, + } + + wantResponseMember := &Member{ + ID: "94088180e21eb87b", + PeerURLs: []string{"http://127.0.0.1:7002"}, + } + + m, err := mAPI.Add(context.Background(), "http://127.0.0.1:7002") + if err != nil { + t.Errorf("got non-nil err: %#v", err) + } + if !reflect.DeepEqual(wantResponseMember, m) { + t.Errorf("incorrect Member: want=%#v got=%#v", wantResponseMember, m) + } +} + +func TestHTTPMembersAPIAddError(t *testing.T) { + okPeer := "http://example.com:2379" + tests := []struct { + peerURL string + client httpClient + + // if wantErr == nil, assert that the returned error is non-nil + // if wantErr != nil, assert that the returned error matches + wantErr error + }{ + // malformed peer URL + { + peerURL: ":", + }, + + // generic httpClient failure + { + peerURL: okPeer, + client: &staticHTTPClient{err: errors.New("fail!")}, + }, + + // unrecognized HTTP status code + { + peerURL: okPeer, + client: &staticHTTPClient{ + resp: http.Response{StatusCode: http.StatusTeapot}, + }, + }, + + // unmarshal body into membersError on StatusConflict + { + peerURL: okPeer, + client: &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusConflict, + }, + body: []byte(`{"message":"fail!"}`), + }, + wantErr: membersError{Message: "fail!"}, + }, + + // fail to unmarshal body on StatusConflict + { + peerURL: okPeer, + client: &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusConflict, + }, + body: []byte(`{"`), + }, + }, + + // fail to unmarshal body on StatusCreated + { + peerURL: okPeer, + client: &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusCreated, + }, + body: []byte(`{"id":"XX`), + }, + }, + } + + for i, tt := range tests { + mAPI := &httpMembersAPI{client: tt.client} + m, err := mAPI.Add(context.Background(), tt.peerURL) + if err == nil { + t.Errorf("#%d: got nil err", i) + } + if tt.wantErr != nil && !reflect.DeepEqual(tt.wantErr, err) { + t.Errorf("#%d: incorrect error: want=%#v got=%#v", i, tt.wantErr, err) + } + if m != nil { + t.Errorf("#%d: got non-nil Member", i) + } + } +} + +func TestHTTPMembersAPIRemoveSuccess(t *testing.T) { + wantAction := &membersAPIActionRemove{ + memberID: "94088180e21eb87b", + } + + mAPI := &httpMembersAPI{ + client: &actionAssertingHTTPClient{ + t: t, + act: wantAction, + resp: http.Response{ + StatusCode: http.StatusNoContent, + }, + }, + } + + if err := mAPI.Remove(context.Background(), "94088180e21eb87b"); err != nil { + t.Errorf("got non-nil err: %#v", err) + } +} + +func TestHTTPMembersAPIRemoveFail(t *testing.T) { + tests := []httpClient{ + // generic error + &staticHTTPClient{ + err: errors.New("fail!"), + }, + + // unexpected HTTP status code + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusInternalServerError, + }, + }, + } + + for i, tt := range tests { + mAPI := &httpMembersAPI{client: tt} + if err := mAPI.Remove(context.Background(), "94088180e21eb87b"); err == nil { + t.Errorf("#%d: got nil err", i) + } + } +} + +func TestHTTPMembersAPIListSuccess(t *testing.T) { + wantAction := &membersAPIActionList{} + mAPI := &httpMembersAPI{ + client: &actionAssertingHTTPClient{ + t: t, + act: wantAction, + resp: http.Response{ + StatusCode: http.StatusOK, + }, + body: []byte(`{"members":[{"id":"94088180e21eb87b","name":"node2","peerURLs":["http://127.0.0.1:7002"],"clientURLs":["http://127.0.0.1:4002"]}]}`), + }, + } + + wantResponseMembers := []Member{ + { + ID: "94088180e21eb87b", + Name: "node2", + PeerURLs: []string{"http://127.0.0.1:7002"}, + ClientURLs: []string{"http://127.0.0.1:4002"}, + }, + } + + m, err := mAPI.List(context.Background()) + if err != nil { + t.Errorf("got non-nil err: %#v", err) + } + if !reflect.DeepEqual(wantResponseMembers, m) { + t.Errorf("incorrect Members: want=%#v got=%#v", wantResponseMembers, m) + } +} + +func TestHTTPMembersAPIListError(t *testing.T) { + tests := []httpClient{ + // generic httpClient failure + &staticHTTPClient{err: errors.New("fail!")}, + + // unrecognized HTTP status code + &staticHTTPClient{ + resp: http.Response{StatusCode: http.StatusTeapot}, + }, + + // fail to unmarshal body on StatusOK + &staticHTTPClient{ + resp: http.Response{ + StatusCode: http.StatusOK, + }, + body: []byte(`[{"id":"XX`), + }, + } + + for i, tt := range tests { + mAPI := &httpMembersAPI{client: tt} + ms, err := mAPI.List(context.Background()) + if err == nil { + t.Errorf("#%d: got nil err", i) + } + if ms != nil { + t.Errorf("#%d: got non-nil Member slice", i) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go new file mode 100644 index 0000000..f74c122 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go @@ -0,0 +1,65 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "fmt" + "net" + "net/url" +) + +var ( + // indirection for testing + lookupSRV = net.LookupSRV +) + +type srvDiscover struct{} + +// NewSRVDiscover constructs a new Dicoverer that uses the stdlib to lookup SRV records. +func NewSRVDiscover() Discoverer { + return &srvDiscover{} +} + +// Discover looks up the etcd servers for the domain. +func (d *srvDiscover) Discover(domain string) ([]string, error) { + var urls []*url.URL + + updateURLs := func(service, scheme string) error { + _, addrs, err := lookupSRV(service, "tcp", domain) + if err != nil { + return err + } + for _, srv := range addrs { + urls = append(urls, &url.URL{ + Scheme: scheme, + Host: net.JoinHostPort(srv.Target, fmt.Sprintf("%d", srv.Port)), + }) + } + return nil + } + + errHTTPS := updateURLs("etcd-server-ssl", "https") + errHTTP := updateURLs("etcd-server", "http") + + if errHTTPS != nil && errHTTP != nil { + return nil, fmt.Errorf("dns lookup errors: %s and %s", errHTTPS, errHTTP) + } + + endpoints := make([]string, len(urls)) + for i := range urls { + endpoints[i] = urls[i].String() + } + return endpoints, nil +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go new file mode 100644 index 0000000..7121f45 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go @@ -0,0 +1,102 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "errors" + "net" + "reflect" + "testing" +) + +func TestSRVDiscover(t *testing.T) { + defer func() { lookupSRV = net.LookupSRV }() + + tests := []struct { + withSSL []*net.SRV + withoutSSL []*net.SRV + expected []string + }{ + { + []*net.SRV{}, + []*net.SRV{}, + []string{}, + }, + { + []*net.SRV{ + {Target: "10.0.0.1", Port: 2480}, + {Target: "10.0.0.2", Port: 2480}, + {Target: "10.0.0.3", Port: 2480}, + }, + []*net.SRV{}, + []string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480"}, + }, + { + []*net.SRV{ + {Target: "10.0.0.1", Port: 2480}, + {Target: "10.0.0.2", Port: 2480}, + {Target: "10.0.0.3", Port: 2480}, + }, + []*net.SRV{ + {Target: "10.0.0.1", Port: 7001}, + }, + []string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480", "http://10.0.0.1:7001"}, + }, + { + []*net.SRV{ + {Target: "10.0.0.1", Port: 2480}, + {Target: "10.0.0.2", Port: 2480}, + {Target: "10.0.0.3", Port: 2480}, + }, + []*net.SRV{ + {Target: "10.0.0.1", Port: 7001}, + }, + []string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480", "http://10.0.0.1:7001"}, + }, + { + []*net.SRV{ + {Target: "a.example.com", Port: 2480}, + {Target: "b.example.com", Port: 2480}, + {Target: "c.example.com", Port: 2480}, + }, + []*net.SRV{}, + []string{"https://a.example.com:2480", "https://b.example.com:2480", "https://c.example.com:2480"}, + }, + } + + for i, tt := range tests { + lookupSRV = func(service string, proto string, domain string) (string, []*net.SRV, error) { + if service == "etcd-server-ssl" { + return "", tt.withSSL, nil + } + if service == "etcd-server" { + return "", tt.withoutSSL, nil + } + return "", nil, errors.New("Unknown service in mock") + } + + d := NewSRVDiscover() + + endpoints, err := d.Discover("example.com") + if err != nil { + t.Fatalf("%d: err: %#v", i, err) + } + + if !reflect.DeepEqual(endpoints, tt.expected) { + t.Errorf("#%d: endpoints = %v, want %v", i, endpoints, tt.expected) + } + + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go new file mode 100644 index 0000000..82fd1db --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pathutil + +import "path" + +// CanonicalURLPath returns the canonical url path for p, which follows the rules: +// 1. the path always starts with "/" +// 2. replace multiple slashes with a single slash +// 3. replace each '.' '..' path name element with equivalent one +// 4. keep the trailing slash +// The function is borrowed from stdlib http.cleanPath in server.go. +func CanonicalURLPath(p string) string { + if p == "" { + return "/" + } + if p[0] != '/' { + p = "/" + p + } + np := path.Clean(p) + // path.Clean removes trailing slash except for root, + // put the trailing slash back if necessary. + if p[len(p)-1] == '/' && np != "/" { + np += "/" + } + return np +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go new file mode 100644 index 0000000..6d3d803 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go @@ -0,0 +1,38 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pathutil + +import "testing" + +func TestCanonicalURLPath(t *testing.T) { + tests := []struct { + p string + wp string + }{ + {"/a", "/a"}, + {"", "/"}, + {"a", "/a"}, + {"//a", "/a"}, + {"/a/.", "/a"}, + {"/a/..", "/"}, + {"/a/", "/a/"}, + {"/a//", "/a/"}, + } + for i, tt := range tests { + if g := CanonicalURLPath(tt.p); g != tt.wp { + t.Errorf("#%d: canonical path = %s, want %s", i, g, tt.wp) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go new file mode 100644 index 0000000..88cb9e6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go @@ -0,0 +1,41 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "strconv" +) + +// ID represents a generic identifier which is canonically +// stored as a uint64 but is typically represented as a +// base-16 string for input/output +type ID uint64 + +func (i ID) String() string { + return strconv.FormatUint(uint64(i), 16) +} + +// IDFromString attempts to create an ID from a base-16 string. +func IDFromString(s string) (ID, error) { + i, err := strconv.ParseUint(s, 16, 64) + return ID(i), err +} + +// IDSlice implements the sort interface +type IDSlice []ID + +func (p IDSlice) Len() int { return len(p) } +func (p IDSlice) Less(i, j int) bool { return uint64(p[i]) < uint64(p[j]) } +func (p IDSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go new file mode 100644 index 0000000..97d168f --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go @@ -0,0 +1,95 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "reflect" + "sort" + "testing" +) + +func TestIDString(t *testing.T) { + tests := []struct { + input ID + want string + }{ + { + input: 12, + want: "c", + }, + { + input: 4918257920282737594, + want: "444129853c343bba", + }, + } + + for i, tt := range tests { + got := tt.input.String() + if tt.want != got { + t.Errorf("#%d: ID.String failure: want=%v, got=%v", i, tt.want, got) + } + } +} + +func TestIDFromString(t *testing.T) { + tests := []struct { + input string + want ID + }{ + { + input: "17", + want: 23, + }, + { + input: "612840dae127353", + want: 437557308098245459, + }, + } + + for i, tt := range tests { + got, err := IDFromString(tt.input) + if err != nil { + t.Errorf("#%d: IDFromString failure: err=%v", i, err) + continue + } + if tt.want != got { + t.Errorf("#%d: IDFromString failure: want=%v, got=%v", i, tt.want, got) + } + } +} + +func TestIDFromStringFail(t *testing.T) { + tests := []string{ + "", + "XXX", + "612840dae127353612840dae127353", + } + + for i, tt := range tests { + _, err := IDFromString(tt) + if err == nil { + t.Fatalf("#%d: IDFromString expected error, but err=nil", i) + } + } +} + +func TestIDSlice(t *testing.T) { + g := []ID{10, 500, 5, 1, 100, 25} + w := []ID{1, 5, 10, 25, 100, 500} + sort.Sort(IDSlice(g)) + if !reflect.DeepEqual(g, w) { + t.Errorf("slice after sort = %#v, want %#v", g, w) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go new file mode 100644 index 0000000..bb99717 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go @@ -0,0 +1,178 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "reflect" + "sort" + "sync" +) + +type Set interface { + Add(string) + Remove(string) + Contains(string) bool + Equals(Set) bool + Length() int + Values() []string + Copy() Set + Sub(Set) Set +} + +func NewUnsafeSet(values ...string) *unsafeSet { + set := &unsafeSet{make(map[string]struct{})} + for _, v := range values { + set.Add(v) + } + return set +} + +func NewThreadsafeSet(values ...string) *tsafeSet { + us := NewUnsafeSet(values...) + return &tsafeSet{us, sync.RWMutex{}} +} + +type unsafeSet struct { + d map[string]struct{} +} + +// Add adds a new value to the set (no-op if the value is already present) +func (us *unsafeSet) Add(value string) { + us.d[value] = struct{}{} +} + +// Remove removes the given value from the set +func (us *unsafeSet) Remove(value string) { + delete(us.d, value) +} + +// Contains returns whether the set contains the given value +func (us *unsafeSet) Contains(value string) (exists bool) { + _, exists = us.d[value] + return +} + +// ContainsAll returns whether the set contains all given values +func (us *unsafeSet) ContainsAll(values []string) bool { + for _, s := range values { + if !us.Contains(s) { + return false + } + } + return true +} + +// Equals returns whether the contents of two sets are identical +func (us *unsafeSet) Equals(other Set) bool { + v1 := sort.StringSlice(us.Values()) + v2 := sort.StringSlice(other.Values()) + v1.Sort() + v2.Sort() + return reflect.DeepEqual(v1, v2) +} + +// Length returns the number of elements in the set +func (us *unsafeSet) Length() int { + return len(us.d) +} + +// Values returns the values of the Set in an unspecified order. +func (us *unsafeSet) Values() (values []string) { + values = make([]string, 0) + for val := range us.d { + values = append(values, val) + } + return +} + +// Copy creates a new Set containing the values of the first +func (us *unsafeSet) Copy() Set { + cp := NewUnsafeSet() + for val := range us.d { + cp.Add(val) + } + + return cp +} + +// Sub removes all elements in other from the set +func (us *unsafeSet) Sub(other Set) Set { + oValues := other.Values() + result := us.Copy().(*unsafeSet) + + for _, val := range oValues { + if _, ok := result.d[val]; !ok { + continue + } + delete(result.d, val) + } + + return result +} + +type tsafeSet struct { + us *unsafeSet + m sync.RWMutex +} + +func (ts *tsafeSet) Add(value string) { + ts.m.Lock() + defer ts.m.Unlock() + ts.us.Add(value) +} + +func (ts *tsafeSet) Remove(value string) { + ts.m.Lock() + defer ts.m.Unlock() + ts.us.Remove(value) +} + +func (ts *tsafeSet) Contains(value string) (exists bool) { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Contains(value) +} + +func (ts *tsafeSet) Equals(other Set) bool { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Equals(other) +} + +func (ts *tsafeSet) Length() int { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Length() +} + +func (ts *tsafeSet) Values() (values []string) { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Values() +} + +func (ts *tsafeSet) Copy() Set { + ts.m.RLock() + defer ts.m.RUnlock() + usResult := ts.us.Copy().(*unsafeSet) + return &tsafeSet{usResult, sync.RWMutex{}} +} + +func (ts *tsafeSet) Sub(other Set) Set { + ts.m.RLock() + defer ts.m.RUnlock() + usResult := ts.us.Sub(other).(*unsafeSet) + return &tsafeSet{usResult, sync.RWMutex{}} +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go new file mode 100644 index 0000000..ff1ecc6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go @@ -0,0 +1,186 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "reflect" + "sort" + "testing" +) + +func TestUnsafeSet(t *testing.T) { + driveSetTests(t, NewUnsafeSet()) +} + +func TestThreadsafeSet(t *testing.T) { + driveSetTests(t, NewThreadsafeSet()) +} + +// Check that two slices contents are equal; order is irrelevant +func equal(a, b []string) bool { + as := sort.StringSlice(a) + bs := sort.StringSlice(b) + as.Sort() + bs.Sort() + return reflect.DeepEqual(as, bs) +} + +func driveSetTests(t *testing.T, s Set) { + // Verify operations on an empty set + eValues := []string{} + values := s.Values() + if !reflect.DeepEqual(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + if l := s.Length(); l != 0 { + t.Fatalf("Expected length=0, got %d", l) + } + for _, v := range []string{"foo", "bar", "baz"} { + if s.Contains(v) { + t.Fatalf("Expect s.Contains(%q) to be fale, got true", v) + } + } + + // Add three items, ensure they show up + s.Add("foo") + s.Add("bar") + s.Add("baz") + + eValues = []string{"foo", "bar", "baz"} + values = s.Values() + if !equal(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + + for _, v := range eValues { + if !s.Contains(v) { + t.Fatalf("Expect s.Contains(%q) to be true, got false", v) + } + } + + if l := s.Length(); l != 3 { + t.Fatalf("Expected length=3, got %d", l) + } + + // Add the same item a second time, ensuring it is not duplicated + s.Add("foo") + + values = s.Values() + if !equal(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + if l := s.Length(); l != 3 { + t.Fatalf("Expected length=3, got %d", l) + } + + // Remove all items, ensure they are gone + s.Remove("foo") + s.Remove("bar") + s.Remove("baz") + + eValues = []string{} + values = s.Values() + if !equal(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + + if l := s.Length(); l != 0 { + t.Fatalf("Expected length=0, got %d", l) + } + + // Create new copies of the set, and ensure they are unlinked to the + // original Set by making modifications + s.Add("foo") + s.Add("bar") + cp1 := s.Copy() + cp2 := s.Copy() + s.Remove("foo") + cp3 := s.Copy() + cp1.Add("baz") + + for i, tt := range []struct { + want []string + got []string + }{ + {[]string{"bar"}, s.Values()}, + {[]string{"foo", "bar", "baz"}, cp1.Values()}, + {[]string{"foo", "bar"}, cp2.Values()}, + {[]string{"bar"}, cp3.Values()}, + } { + if !equal(tt.want, tt.got) { + t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) + } + } + + for i, tt := range []struct { + want bool + got bool + }{ + {true, s.Equals(cp3)}, + {true, cp3.Equals(s)}, + {false, s.Equals(cp2)}, + {false, s.Equals(cp1)}, + {false, cp1.Equals(s)}, + {false, cp2.Equals(s)}, + {false, cp2.Equals(cp1)}, + } { + if tt.got != tt.want { + t.Fatalf("case %d: want %t, got %t", i, tt.want, tt.got) + + } + } + + // Subtract values from a Set, ensuring a new Set is created and + // the original Sets are unmodified + sub1 := cp1.Sub(s) + sub2 := cp2.Sub(cp1) + + for i, tt := range []struct { + want []string + got []string + }{ + {[]string{"foo", "bar", "baz"}, cp1.Values()}, + {[]string{"foo", "bar"}, cp2.Values()}, + {[]string{"bar"}, s.Values()}, + {[]string{"foo", "baz"}, sub1.Values()}, + {[]string{}, sub2.Values()}, + } { + if !equal(tt.want, tt.got) { + t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) + } + } +} + +func TestUnsafeSetContainsAll(t *testing.T) { + vals := []string{"foo", "bar", "baz"} + s := NewUnsafeSet(vals...) + + tests := []struct { + strs []string + wcontain bool + }{ + {[]string{}, true}, + {vals[:1], true}, + {vals[:2], true}, + {vals, true}, + {[]string{"cuz"}, false}, + {[]string{vals[0], "cuz"}, false}, + } + for i, tt := range tests { + if g := s.ContainsAll(tt.strs); g != tt.wcontain { + t.Errorf("#%d: ok = %v, want %v", i, g, tt.wcontain) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go new file mode 100644 index 0000000..0327950 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go @@ -0,0 +1,22 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Uint64Slice implements sort interface +type Uint64Slice []uint64 + +func (p Uint64Slice) Len() int { return len(p) } +func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] } +func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go new file mode 100644 index 0000000..95e37e0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go @@ -0,0 +1,30 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "reflect" + "sort" + "testing" +) + +func TestUint64Slice(t *testing.T) { + g := Uint64Slice{10, 500, 5, 1, 100, 25} + w := Uint64Slice{1, 5, 10, 25, 100, 500} + sort.Sort(g) + if !reflect.DeepEqual(g, w) { + t.Errorf("slice after sort = %#v, want %#v", g, w) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go new file mode 100644 index 0000000..ce2483f --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go @@ -0,0 +1,74 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + "fmt" + "net" + "net/url" + "sort" + "strings" +) + +type URLs []url.URL + +func NewURLs(strs []string) (URLs, error) { + all := make([]url.URL, len(strs)) + if len(all) == 0 { + return nil, errors.New("no valid URLs given") + } + for i, in := range strs { + in = strings.TrimSpace(in) + u, err := url.Parse(in) + if err != nil { + return nil, err + } + if u.Scheme != "http" && u.Scheme != "https" { + return nil, fmt.Errorf("URL scheme must be http or https: %s", in) + } + if _, _, err := net.SplitHostPort(u.Host); err != nil { + return nil, fmt.Errorf(`URL address does not have the form "host:port": %s`, in) + } + if u.Path != "" { + return nil, fmt.Errorf("URL must not contain a path: %s", in) + } + all[i] = *u + } + us := URLs(all) + us.Sort() + + return us, nil +} + +func (us URLs) String() string { + return strings.Join(us.StringSlice(), ",") +} + +func (us *URLs) Sort() { + sort.Sort(us) +} +func (us URLs) Len() int { return len(us) } +func (us URLs) Less(i, j int) bool { return us[i].String() < us[j].String() } +func (us URLs) Swap(i, j int) { us[i], us[j] = us[j], us[i] } + +func (us URLs) StringSlice() []string { + out := make([]string, len(us)) + for i := range us { + out[i] = us[i].String() + } + + return out +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go new file mode 100644 index 0000000..ffa2cf0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go @@ -0,0 +1,169 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "reflect" + "testing" + + "github.com/coreos/etcd/pkg/testutil" +) + +func TestNewURLs(t *testing.T) { + tests := []struct { + strs []string + wurls URLs + }{ + { + []string{"http://127.0.0.1:2379"}, + testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), + }, + // it can trim space + { + []string{" http://127.0.0.1:2379 "}, + testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), + }, + // it does sort + { + []string{ + "http://127.0.0.2:2379", + "http://127.0.0.1:2379", + }, + testutil.MustNewURLs(t, []string{ + "http://127.0.0.1:2379", + "http://127.0.0.2:2379", + }), + }, + } + for i, tt := range tests { + urls, _ := NewURLs(tt.strs) + if !reflect.DeepEqual(urls, tt.wurls) { + t.Errorf("#%d: urls = %+v, want %+v", i, urls, tt.wurls) + } + } +} + +func TestURLsString(t *testing.T) { + tests := []struct { + us URLs + wstr string + }{ + { + URLs{}, + "", + }, + { + testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), + "http://127.0.0.1:2379", + }, + { + testutil.MustNewURLs(t, []string{ + "http://127.0.0.1:2379", + "http://127.0.0.2:2379", + }), + "http://127.0.0.1:2379,http://127.0.0.2:2379", + }, + { + testutil.MustNewURLs(t, []string{ + "http://127.0.0.2:2379", + "http://127.0.0.1:2379", + }), + "http://127.0.0.2:2379,http://127.0.0.1:2379", + }, + } + for i, tt := range tests { + g := tt.us.String() + if g != tt.wstr { + t.Errorf("#%d: string = %s, want %s", i, g, tt.wstr) + } + } +} + +func TestURLsSort(t *testing.T) { + g := testutil.MustNewURLs(t, []string{ + "http://127.0.0.4:2379", + "http://127.0.0.2:2379", + "http://127.0.0.1:2379", + "http://127.0.0.3:2379", + }) + w := testutil.MustNewURLs(t, []string{ + "http://127.0.0.1:2379", + "http://127.0.0.2:2379", + "http://127.0.0.3:2379", + "http://127.0.0.4:2379", + }) + gurls := URLs(g) + gurls.Sort() + if !reflect.DeepEqual(g, w) { + t.Errorf("URLs after sort = %#v, want %#v", g, w) + } +} + +func TestURLsStringSlice(t *testing.T) { + tests := []struct { + us URLs + wstr []string + }{ + { + URLs{}, + []string{}, + }, + { + testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), + []string{"http://127.0.0.1:2379"}, + }, + { + testutil.MustNewURLs(t, []string{ + "http://127.0.0.1:2379", + "http://127.0.0.2:2379", + }), + []string{"http://127.0.0.1:2379", "http://127.0.0.2:2379"}, + }, + { + testutil.MustNewURLs(t, []string{ + "http://127.0.0.2:2379", + "http://127.0.0.1:2379", + }), + []string{"http://127.0.0.2:2379", "http://127.0.0.1:2379"}, + }, + } + for i, tt := range tests { + g := tt.us.StringSlice() + if !reflect.DeepEqual(g, tt.wstr) { + t.Errorf("#%d: string slice = %+v, want %+v", i, g, tt.wstr) + } + } +} + +func TestNewURLsFail(t *testing.T) { + tests := [][]string{ + // no urls given + {}, + // missing protocol scheme + {"://127.0.0.1:2379"}, + // unsupported scheme + {"mailto://127.0.0.1:2379"}, + // not conform to host:port + {"http://127.0.0.1"}, + // contain a path + {"http://127.0.0.1:2379/path"}, + } + for i, tt := range tests { + _, err := NewURLs(tt) + if err == nil { + t.Errorf("#%d: err = nil, but error", i) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go new file mode 100644 index 0000000..f7d5c1c --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go @@ -0,0 +1,91 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "sort" + "strings" +) + +type URLsMap map[string]URLs + +// NewURLsMap returns a URLsMap instantiated from the given string, +// which consists of discovery-formatted names-to-URLs, like: +// mach0=http://1.1.1.1:2380,mach0=http://2.2.2.2::2380,mach1=http://3.3.3.3:2380,mach2=http://4.4.4.4:2380 +func NewURLsMap(s string) (URLsMap, error) { + m := parse(s) + + cl := URLsMap{} + for name, urls := range m { + us, err := NewURLs(urls) + if err != nil { + return nil, err + } + cl[name] = us + } + return cl, nil +} + +// String returns NameURLPairs into discovery-formatted name-to-URLs sorted by name. +func (c URLsMap) String() string { + pairs := make([]string, 0) + for name, urls := range c { + for _, url := range urls { + pairs = append(pairs, fmt.Sprintf("%s=%s", name, url.String())) + } + } + sort.Strings(pairs) + return strings.Join(pairs, ",") +} + +// URLs returns a list of all URLs. +// The returned list is sorted in ascending lexicographical order. +func (c URLsMap) URLs() []string { + urls := make([]string, 0) + for _, us := range c { + for _, u := range us { + urls = append(urls, u.String()) + } + } + sort.Strings(urls) + return urls +} + +func (c URLsMap) Len() int { + return len(c) +} + +// parse parses the given string and returns a map listing the values specified for each key. +func parse(s string) map[string][]string { + m := make(map[string][]string) + for s != "" { + key := s + if i := strings.IndexAny(key, ","); i >= 0 { + key, s = key[:i], key[i+1:] + } else { + s = "" + } + if key == "" { + continue + } + value := "" + if i := strings.Index(key, "="); i >= 0 { + key, value = key[:i], key[i+1:] + } + m[key] = append(m[key], value) + } + return m +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go new file mode 100644 index 0000000..1955bb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go @@ -0,0 +1,40 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build go1.5 + +package types + +import ( + "reflect" + "testing" + + "github.com/coreos/etcd/pkg/testutil" +) + +// This is only tested in Go1.5+ because Go1.4 doesn't support literal IPv6 address with zone in +// URI (https://github.com/golang/go/issues/6530). +func TestNewURLsMapIPV6(t *testing.T) { + c, err := NewURLsMap("mem1=http://[2001:db8::1]:2380,mem1=http://[fe80::6e40:8ff:feb1:58e4%25en0]:2380,mem2=http://[fe80::92e2:baff:fe7c:3224%25ext0]:2380") + if err != nil { + t.Fatalf("unexpected parse error: %v", err) + } + wc := URLsMap(map[string]URLs{ + "mem1": testutil.MustNewURLs(t, []string{"http://[2001:db8::1]:2380", "http://[fe80::6e40:8ff:feb1:58e4%25en0]:2380"}), + "mem2": testutil.MustNewURLs(t, []string{"http://[fe80::92e2:baff:fe7c:3224%25ext0]:2380"}), + }) + if !reflect.DeepEqual(c, wc) { + t.Errorf("cluster = %#v, want %#v", c, wc) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go new file mode 100644 index 0000000..a01b5ef --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go @@ -0,0 +1,99 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "reflect" + "testing" + + "github.com/coreos/etcd/pkg/testutil" +) + +func TestParseInitialCluster(t *testing.T) { + c, err := NewURLsMap("mem1=http://10.0.0.1:2379,mem1=http://128.193.4.20:2379,mem2=http://10.0.0.2:2379,default=http://127.0.0.1:2379") + if err != nil { + t.Fatalf("unexpected parse error: %v", err) + } + wc := URLsMap(map[string]URLs{ + "mem1": testutil.MustNewURLs(t, []string{"http://10.0.0.1:2379", "http://128.193.4.20:2379"}), + "mem2": testutil.MustNewURLs(t, []string{"http://10.0.0.2:2379"}), + "default": testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), + }) + if !reflect.DeepEqual(c, wc) { + t.Errorf("cluster = %+v, want %+v", c, wc) + } +} + +func TestParseInitialClusterBad(t *testing.T) { + tests := []string{ + // invalid URL + "%^", + // no URL defined for member + "mem1=,mem2=http://128.193.4.20:2379,mem3=http://10.0.0.2:2379", + "mem1,mem2=http://128.193.4.20:2379,mem3=http://10.0.0.2:2379", + // bad URL for member + "default=http://localhost/", + } + for i, tt := range tests { + if _, err := NewURLsMap(tt); err == nil { + t.Errorf("#%d: unexpected successful parse, want err", i) + } + } +} + +func TestNameURLPairsString(t *testing.T) { + cls := URLsMap(map[string]URLs{ + "abc": testutil.MustNewURLs(t, []string{"http://1.1.1.1:1111", "http://0.0.0.0:0000"}), + "def": testutil.MustNewURLs(t, []string{"http://2.2.2.2:2222"}), + "ghi": testutil.MustNewURLs(t, []string{"http://3.3.3.3:1234", "http://127.0.0.1:2380"}), + // no PeerURLs = not included + "four": testutil.MustNewURLs(t, []string{}), + "five": testutil.MustNewURLs(t, nil), + }) + w := "abc=http://0.0.0.0:0000,abc=http://1.1.1.1:1111,def=http://2.2.2.2:2222,ghi=http://127.0.0.1:2380,ghi=http://3.3.3.3:1234" + if g := cls.String(); g != w { + t.Fatalf("NameURLPairs.String():\ngot %#v\nwant %#v", g, w) + } +} + +func TestParse(t *testing.T) { + tests := []struct { + s string + wm map[string][]string + }{ + { + "", + map[string][]string{}, + }, + { + "a=b", + map[string][]string{"a": {"b"}}, + }, + { + "a=b,a=c", + map[string][]string{"a": {"b", "c"}}, + }, + { + "a=b,a1=c", + map[string][]string{"a": {"b"}, "a1": {"c"}}, + }, + } + for i, tt := range tests { + m := parse(tt.s) + if !reflect.DeepEqual(m, tt.wm) { + t.Errorf("#%d: m = %+v, want %+v", i, m, tt.wm) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/log/log.go b/Godeps/_workspace/src/github.com/coreos/fleet/log/log.go new file mode 100644 index 0000000..811ca9c --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/log/log.go @@ -0,0 +1,103 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package log + +import ( + "fmt" + "log" + "os" + "path/filepath" + "runtime" +) + +const ( + calldepth = 2 +) + +var ( + logger = log.New(os.Stderr, "", 0) + debug = false +) + +func EnableTimestamps() { + logger.SetFlags(logger.Flags() | log.Ldate | log.Ltime) +} + +func EnableDebug() { + debug = true +} + +func Debug(v ...interface{}) { + if debug { + logger.Output(calldepth, header("DEBUG", fmt.Sprint(v...))) + } +} + +func Debugf(format string, v ...interface{}) { + if debug { + logger.Output(calldepth, header("DEBUG", fmt.Sprintf(format, v...))) + } +} + +func Info(v ...interface{}) { + logger.Output(calldepth, header("INFO", fmt.Sprint(v...))) +} + +func Infof(format string, v ...interface{}) { + logger.Output(calldepth, header("INFO", fmt.Sprintf(format, v...))) +} + +func Error(v ...interface{}) { + logger.Output(calldepth, header("ERROR", fmt.Sprint(v...))) +} + +func Errorf(format string, v ...interface{}) { + logger.Output(calldepth, header("ERROR", fmt.Sprintf(format, v...))) +} + +func Warning(v ...interface{}) { + logger.Output(calldepth, header("WARN", fmt.Sprint(v...))) +} + +func Warningf(format string, v ...interface{}) { + logger.Output(calldepth, header("WARN", fmt.Sprintf(format, v...))) +} + +func Fatal(v ...interface{}) { + logger.Output(calldepth, header("FATAL", fmt.Sprint(v...))) + os.Exit(1) +} + +func Fatalf(format string, v ...interface{}) { + logger.Output(calldepth, header("FATAL", fmt.Sprintf(format, v...))) + os.Exit(1) +} + +func header(lvl, msg string) string { + _, file, line, ok := runtime.Caller(calldepth) + if ok { + file = filepath.Base(file) + } + + if len(file) == 0 { + file = "???" + } + + if line < 0 { + line = 0 + } + + return fmt.Sprintf("%s %s:%d: %s", lvl, file, line, msg) +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args.go new file mode 100644 index 0000000..8e6196d --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args.go @@ -0,0 +1,27 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +// TrimToDashes takes a slice of strings (e.g. a +// command line) and returns everything after the first +// double dash (--), if any are present +func TrimToDashes(args []string) []string { + for i, arg := range args { + if arg == "--" { + return args[i+1:] + } + } + return args +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go new file mode 100644 index 0000000..bde2af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go @@ -0,0 +1,44 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import "testing" + +func TestTrimToDashes(t *testing.T) { + var argtests = []struct { + input []string + output []string + }{ + {[]string{"foo", "bar", "baz"}, []string{"foo", "bar", "baz"}}, + {[]string{"abc", "def", "--", "ghi"}, []string{"ghi"}}, + {[]string{"abc", "def", "--"}, []string{}}, + {[]string{"--"}, []string{}}, + {[]string{"--", "abc", "def", "ghi"}, []string{"abc", "def", "ghi"}}, + {[]string{"--", "bar", "--", "baz"}, []string{"bar", "--", "baz"}}, + {[]string{"--flagname", "--", "ghi"}, []string{"ghi"}}, + {[]string{"--", "--flagname", "ghi"}, []string{"--flagname", "ghi"}}, + } + for _, test := range argtests { + args := TrimToDashes(test.input) + if len(test.output) != len(args) { + t.Fatalf("error trimming dashes: expected %s, got %s", test.output, args) + } + for i, v := range args { + if v != test.output[i] { + t.Fatalf("error trimming dashes: expected %s, got %s", test.output, args) + } + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff.go new file mode 100644 index 0000000..bdbb56b --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff.go @@ -0,0 +1,27 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "time" +) + +func ExpBackoff(last time.Duration, max time.Duration) (next time.Duration) { + next = last * 2 + if next > max { + next = max + } + return +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go new file mode 100644 index 0000000..0322fed --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go @@ -0,0 +1,40 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "testing" + "time" +) + +func TestExpBackoff(t *testing.T) { + tests := []struct { + last time.Duration + max time.Duration + next time.Duration + }{ + {1 * time.Second, 10 * time.Second, 2 * time.Second}, + {8 * time.Second, 10 * time.Second, 10 * time.Second}, + {10 * time.Second, 10 * time.Second, 10 * time.Second}, + {20 * time.Second, 10 * time.Second, 10 * time.Second}, + } + + for i, tt := range tests { + next := ExpBackoff(tt.last, tt.max) + if next != tt.next { + t.Errorf("case %d: last=%v, max=%v, next=%v; got next=%v", i, tt.last, tt.max, tt.next, next) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath.go new file mode 100644 index 0000000..9d7d08c --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath.go @@ -0,0 +1,56 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "os" + "os/user" + "path/filepath" + "strings" + + "github.com/coreos/fleet/log" +) + +// ParseFilepath expands ~ and ~user constructions. +// If user or $HOME is unknown, do nothing. +func ParseFilepath(path string) string { + if !strings.HasPrefix(path, "~") { + return path + } + i := strings.Index(path, "/") + if i < 0 { + i = len(path) + } + var home string + if i == 1 { + if home = os.Getenv("HOME"); home == "" { + usr, err := user.Current() + if err != nil { + log.Debugf("Failed to get current home directory: %v", err) + return path + } + home = usr.HomeDir + } + } else { + usr, err := user.Lookup(path[1:i]) + if err != nil { + log.Debugf("Failed to get %v's home directory: %v", path[1:i], err) + return path + } + home = usr.HomeDir + } + path = filepath.Join(home, path[i:]) + return path +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go new file mode 100644 index 0000000..449730d --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go @@ -0,0 +1,57 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "os" + "strings" + "testing" +) + +var pathtests = []struct { + in string + home string + prefix string + suffix string + full string +}{ + {"~/a", "", "/", "/a", ""}, + {"~", "", "/", "", ""}, + {"~~", "", "", "", "~~"}, + {"~/a", "/home/foo", "", "", "/home/foo/a"}, +} + +// TestParseFilepath tests parsing filepath +func TestParseFilepath(t *testing.T) { + for _, test := range pathtests { + oldHome := os.Getenv("HOME") + if err := os.Setenv("HOME", test.home); err != nil { + t.Fatalf("Failed setting $HOME") + } + path := ParseFilepath(test.in) + if !strings.HasPrefix(path, test.prefix) { + t.Errorf("Failed parsing out prefix %v for %v", test.prefix, test.in) + } + if !strings.HasSuffix(path, test.suffix) { + t.Errorf("Failed parsing out suffix %v for %v", test.suffix, test.in) + } + if test.full != "" && path != test.full { + t.Errorf("Failed parsing out %v for %v", test.full, test.in) + } + if err := os.Setenv("HOME", oldHome); err != nil { + t.Fatalf("Failed recovering $HOME") + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem.go new file mode 100644 index 0000000..2b8297a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem.go @@ -0,0 +1,42 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "io/ioutil" +) + +// ListDirectory generates a slice of all the file names that both exist in +// the provided directory and pass the filter. +// The returned file names are relative to the directory argument. +// filterFunc is called once for each file found in the directory. If +// filterFunc returns true, the given file will ignored. +func ListDirectory(dir string, filterFunc func(string) bool) ([]string, error) { + fis, err := ioutil.ReadDir(dir) + if err != nil { + return nil, err + } + + units := make([]string, 0) + for _, fi := range fis { + name := fi.Name() + if filterFunc(name) { + continue + } + units = append(units, name) + } + + return units, nil +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go new file mode 100644 index 0000000..58fdc43 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go @@ -0,0 +1,53 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "io/ioutil" + "os" + "path" + "reflect" + "testing" +) + +func TestListDirectory(t *testing.T) { + dir, err := ioutil.TempDir("", "fleet-testing-") + if err != nil { + t.Fatal(err.Error()) + } + + defer os.RemoveAll(dir) + + for _, name := range []string{"ping", "pong", "foo", "bar", "baz"} { + err := ioutil.WriteFile(path.Join(dir, name), []byte{}, 0400) + if err != nil { + t.Fatal(err.Error()) + } + } + + filterFunc := func(name string) bool { + return name == "foo" || name == "bar" + } + + got, err := ListDirectory(dir, filterFunc) + if err != nil { + t.Fatal(err.Error()) + } + + want := []string{"baz", "ping", "pong"} + if !reflect.DeepEqual(want, got) { + t.Fatalf("ListDirectory output incorrect: want=%v, got=%v", want, got) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag.go new file mode 100644 index 0000000..3ce0b65 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag.go @@ -0,0 +1,47 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "fmt" + "strings" +) + +type StringSlice []string + +func (f *StringSlice) Set(value string) error { + var s StringSlice + for _, item := range strings.Split(value, ",") { + item = strings.TrimLeft(item, " [\"") + item = strings.TrimRight(item, " \"]") + s = append(s, item) + } + + *f = s + + return nil +} + +func (f *StringSlice) String() string { + return fmt.Sprintf("%v", *f) +} + +func (f *StringSlice) Value() []string { + return *f +} + +func (f *StringSlice) Get() interface{} { + return *f +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go new file mode 100644 index 0000000..60c8547 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go @@ -0,0 +1,39 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "reflect" + "testing" +) + +func TestStringSlice(t *testing.T) { + tests := []struct { + input string + output []string + }{ + {`["a"]`, []string{"a"}}, + {`["a","b"]`, []string{"a", "b"}}, + } + + for _, tt := range tests { + var ss StringSlice + ss.Set(tt.input) + r := ss.Value() + if !reflect.DeepEqual(r, tt.output) { + t.Errorf("error setting StringSlice: expected %+v, got %+v", tt.output, r) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/http.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/http.go new file mode 100644 index 0000000..4e8b02a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/http.go @@ -0,0 +1,34 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "net/http" + + "github.com/coreos/fleet/log" +) + +type LoggingHTTPTransport struct { + http.Transport +} + +func (lt *LoggingHTTPTransport) RoundTrip(req *http.Request) (resp *http.Response, err error) { + log.Debugf("HTTP %s %s", req.Method, req.URL.String()) + resp, err = lt.Transport.RoundTrip(req) + if err == nil { + log.Debugf("HTTP %s %s %s", req.Method, req.URL.String(), resp.Status) + } + return +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go new file mode 100644 index 0000000..15671d4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go @@ -0,0 +1,205 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lease + +import ( + "encoding/json" + "path" + "time" + + etcd "github.com/coreos/etcd/client" + "golang.org/x/net/context" +) + +const ( + leasePrefix = "lease" +) + +type etcdLeaseMetadata struct { + MachineID string + Version int +} + +// etcdLease implements the Lease interface +type etcdLease struct { + mgr *etcdLeaseManager + key string + meta etcdLeaseMetadata + idx uint64 + ttl time.Duration +} + +func (l *etcdLease) Release() error { + opts := &etcd.DeleteOptions{ + PrevIndex: l.idx, + } + _, err := l.mgr.kAPI.Delete(l.mgr.ctx(), l.key, opts) + return err +} + +func (l *etcdLease) Renew(period time.Duration) error { + val, err := serializeLeaseMetadata(l.meta.MachineID, l.meta.Version) + opts := &etcd.SetOptions{ + PrevIndex: l.idx, + TTL: period, + } + resp, err := l.mgr.kAPI.Set(l.mgr.ctx(), l.key, val, opts) + if err != nil { + return err + } + + renewed := l.mgr.leaseFromResponse(resp) + *l = *renewed + + return nil +} + +func (l *etcdLease) MachineID() string { + return l.meta.MachineID +} + +func (l *etcdLease) Version() int { + return l.meta.Version +} + +func (l *etcdLease) Index() uint64 { + return l.idx +} + +func (l *etcdLease) TimeRemaining() time.Duration { + return l.ttl +} + +func serializeLeaseMetadata(machID string, ver int) (string, error) { + meta := etcdLeaseMetadata{ + MachineID: machID, + Version: ver, + } + + b, err := json.Marshal(meta) + if err != nil { + return "", err + } + + return string(b), nil +} + +type etcdLeaseManager struct { + kAPI etcd.KeysAPI + keyPrefix string + reqTimeout time.Duration +} + +func NewEtcdLeaseManager(kAPI etcd.KeysAPI, keyPrefix string, reqTimeout time.Duration) *etcdLeaseManager { + return &etcdLeaseManager{kAPI: kAPI, keyPrefix: keyPrefix, reqTimeout: reqTimeout} +} + +func (r *etcdLeaseManager) ctx() context.Context { + ctx, _ := context.WithTimeout(context.Background(), r.reqTimeout) + return ctx +} + +func (r *etcdLeaseManager) leasePath(name string) string { + return path.Join(r.keyPrefix, leasePrefix, name) +} + +func (r *etcdLeaseManager) GetLease(name string) (Lease, error) { + key := r.leasePath(name) + resp, err := r.kAPI.Get(r.ctx(), key, nil) + if err != nil { + if isEtcdError(err, etcd.ErrorCodeKeyNotFound) { + err = nil + } + return nil, err + } + + l := r.leaseFromResponse(resp) + return l, nil +} + +func (r *etcdLeaseManager) StealLease(name, machID string, ver int, period time.Duration, idx uint64) (Lease, error) { + val, err := serializeLeaseMetadata(machID, ver) + if err != nil { + return nil, err + } + + key := r.leasePath(name) + opts := &etcd.SetOptions{ + PrevIndex: idx, + TTL: period, + } + resp, err := r.kAPI.Set(r.ctx(), key, val, opts) + if err != nil { + if isEtcdError(err, etcd.ErrorCodeNodeExist) { + err = nil + } + return nil, err + } + + l := r.leaseFromResponse(resp) + return l, nil +} + +func (r *etcdLeaseManager) AcquireLease(name string, machID string, ver int, period time.Duration) (Lease, error) { + val, err := serializeLeaseMetadata(machID, ver) + if err != nil { + return nil, err + } + + key := r.leasePath(name) + opts := &etcd.SetOptions{ + TTL: period, + PrevExist: etcd.PrevNoExist, + } + + resp, err := r.kAPI.Set(r.ctx(), key, val, opts) + if err != nil { + if isEtcdError(err, etcd.ErrorCodeNodeExist) { + err = nil + } + return nil, err + } + + l := r.leaseFromResponse(resp) + return l, nil +} + +func (r *etcdLeaseManager) leaseFromResponse(res *etcd.Response) *etcdLease { + l := &etcdLease{ + mgr: r, + key: res.Node.Key, + idx: res.Node.ModifiedIndex, + ttl: res.Node.TTLDuration(), + } + + err := json.Unmarshal([]byte(res.Node.Value), &l.meta) + + // fall back to using the entire value as the MachineID for + // backwards-compatibility with engines that are not aware + // of this versioning mechanism + if err != nil { + l.meta = etcdLeaseMetadata{ + MachineID: res.Node.Value, + Version: 0, + } + } + + return l +} + +func isEtcdError(err error, code int) bool { + eerr, ok := err.(etcd.Error) + return ok && eerr.Code == code +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go new file mode 100644 index 0000000..9ed5237 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go @@ -0,0 +1,131 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lease + +import ( + "reflect" + "testing" + "time" + + etcd "github.com/coreos/etcd/client" +) + +func TestSerializeLeaseMetadata(t *testing.T) { + tests := []struct { + machID string + ver int + want string + }{ + { + machID: "XXX", + ver: 9, + want: `{"MachineID":"XXX","Version":9}`, + }, + { + machID: "XXX", + ver: 0, + want: `{"MachineID":"XXX","Version":0}`, + }, + } + + for i, tt := range tests { + got, err := serializeLeaseMetadata(tt.machID, tt.ver) + if err != nil { + t.Errorf("case %d: unexpected err=%v", i, err) + continue + } + if tt.want != got { + t.Errorf("case %d: incorrect output from serializeLeaseMetadata\nwant=%s\ngot=%s", i, tt.want, got) + } + } +} + +func TestLeaseFromResponse(t *testing.T) { + tests := []struct { + res etcd.Response + want etcdLease + }{ + // typical case + { + res: etcd.Response{ + Node: &etcd.Node{ + Key: "/foo/bar", + ModifiedIndex: 12, + TTL: 9, + Value: `{"MachineID":"XXX","Version":19}`, + }, + }, + want: etcdLease{ + key: "/foo/bar", + idx: 12, + ttl: time.Second * 9, + meta: etcdLeaseMetadata{ + MachineID: "XXX", + Version: 19, + }, + }, + }, + + // backwards-compatibility with unversioned engines + { + res: etcd.Response{ + Node: &etcd.Node{ + Key: "/foo/bar", + ModifiedIndex: 12, + TTL: 9, + Value: "XXX", + }, + }, + want: etcdLease{ + key: "/foo/bar", + idx: 12, + ttl: time.Second * 9, + meta: etcdLeaseMetadata{ + MachineID: "XXX", + Version: 0, + }, + }, + }, + + // json decode failures are treated like a nonversioned lease + { + res: etcd.Response{ + Node: &etcd.Node{ + Key: "/foo/bar", + ModifiedIndex: 12, + TTL: 9, + Value: `{"MachineID":"XXX","Ver`, + }, + }, + want: etcdLease{ + key: "/foo/bar", + idx: 12, + ttl: time.Second * 9, + meta: etcdLeaseMetadata{ + MachineID: `{"MachineID":"XXX","Ver`, + Version: 0, + }, + }, + }, + } + + for i, tt := range tests { + var r *etcdLeaseManager + got := r.leaseFromResponse(&tt.res) + if !reflect.DeepEqual(tt.want, *got) { + t.Errorf("case %d: incorrect output from leaseFromResponse\nwant=%#v\ngot=%#vs", i, tt.want, *got) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go new file mode 100644 index 0000000..3b87ca0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go @@ -0,0 +1,72 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lease + +import "time" + +// Lease proxies to an auto-expiring lease stored in a LeaseRegistry. +// The creator of a Lease must repeatedly call Renew to keep their lease +// from expiring. +type Lease interface { + // Renew attempts to extend the Lease TTL to the provided duration. + // The operation will succeed only if the Lease has not changed in + // the LeaseRegistry since it was last renewed or first acquired. + // An error is returned if the Lease has already expired, or if the + // operation fails for any other reason. + Renew(time.Duration) error + + // Release relinquishes the ownership of a Lease back to the Registry. + // After calling Release, the Lease object should be discarded. An + // error is returned if the Lease has already expired, or if the + // operation fails for any other reason. + Release() error + + // MachineID returns the ID of the Machine that holds this Lease. This + // value must be considered a cached value as it is not guaranteed to + // be correct. + MachineID() string + + // Version returns the current version at which the lessee is operating. + // This value has the same correctness guarantees as MachineID. + // It is up to the caller to determine what this Version means. + Version() int + + // Index exposes the relative time at which the Lease was created or + // renewed. For example, this could be implemented as the ModifiedIndex + // field of a node in etcd. + Index() uint64 + + // TimeRemaining represents the amount of time left on the Lease when + // it was fetched from the LeaseRegistry. + TimeRemaining() time.Duration +} + +type Manager interface { + // GetLease fetches a Lease only if it exists. If it does not + // exist, a nil Lease will be returned. Any other failures + // result in non-nil error and nil Lease objects. + GetLease(name string) (Lease, error) + + // AcquireLease acquires a named lease only if the lease is not + // currently held. If a Lease cannot be acquired, a nil Lease + // object is returned. An error is returned only if there is a + // failure communicating with the Registry. + AcquireLease(name, machID string, ver int, period time.Duration) (Lease, error) + + // StealLease attempts to replace the lessee of the Lease identified + // by the provided name and index with a new lessee. This function + // will fail if the named Lease has progressed past the given index. + StealLease(name, machID string, ver int, period time.Duration, idx uint64) (Lease, error) +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go new file mode 100644 index 0000000..022031d --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go @@ -0,0 +1,93 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "time" + + "github.com/jonboulle/clockwork" + + "github.com/coreos/fleet/log" +) + +type Event string + +// EventStream generates a channel which will emit an event as soon as one of +// interest occurs. Any background operation associated with the channel +// should be terminated when stop is closed. +type EventStream interface { + Next(stop chan struct{}) chan Event +} + +type PeriodicReconciler interface { + Run(stop chan bool) +} + +// NewPeriodicReconciler creates a PeriodicReconciler that will run recFunc at least every +// ival, or in response to anything emitted from EventStream.Next() +func NewPeriodicReconciler(interval time.Duration, recFunc func(), eStream EventStream) PeriodicReconciler { + return &reconciler{ + ival: interval, + rFunc: recFunc, + eStream: eStream, + clock: clockwork.NewRealClock(), + } +} + +type reconciler struct { + ival time.Duration + rFunc func() + eStream EventStream + clock clockwork.Clock +} + +func (r *reconciler) Run(stop chan bool) { + trigger := make(chan struct{}) + go func() { + abort := make(chan struct{}) + for { + select { + case <-stop: + close(abort) + return + case <-r.eStream.Next(abort): + trigger <- struct{}{} + } + } + }() + + ticker := r.clock.After(r.ival) + + // When starting up, reconcile once immediately + log.Debug("Initial reconciliation commencing") + r.rFunc() + + for { + select { + case <-stop: + log.Debug("Reconciler exiting due to stop signal") + return + case <-ticker: + ticker = r.clock.After(r.ival) + log.Debug("Reconciler tick") + r.rFunc() + case <-trigger: + ticker = r.clock.After(r.ival) + log.Debug("Reconciler triggered") + r.rFunc() + } + } + +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go new file mode 100644 index 0000000..a86eb6a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go @@ -0,0 +1,138 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "testing" + "time" + + "github.com/jonboulle/clockwork" +) + +type fakeEventStream struct { + ret chan Event +} + +func (f *fakeEventStream) Next(chan struct{}) chan Event { + return f.ret +} + +func (f *fakeEventStream) trigger() { + go func() { + f.ret <- Event("asdf") + }() +} + +// TestPeriodicReconcilerRun attempts to validate the behaviour of the central Run +// loop of the PeriodicReconciler +func TestPeriodicReconcilerRun(t *testing.T) { + ival := 5 * time.Hour + fclock := clockwork.NewFakeClock() + fes := &fakeEventStream{make(chan Event)} + called := make(chan struct{}) + rec := func() { + go func() { + called <- struct{}{} + }() + } + pr := &reconciler{ + ival: ival, + rFunc: rec, + eStream: fes, + clock: fclock, + } + // launch the PeriodicReconciler in the background + prDone := make(chan bool) + stop := make(chan bool) + go func() { + pr.Run(stop) + prDone <- true + }() + // reconcile should have occurred once at start-up + select { + case <-called: + case <-time.After(time.Second): + t.Fatalf("rFunc() not called at start-up as expected!") + } + // no further reconciles yet expected + select { + case <-called: + t.Fatalf("rFunc() called unexpectedly!") + default: + } + // now, send an event on the EventStream and ensure rFunc occurs + fes.trigger() + select { + case <-called: + case <-time.After(time.Second): + t.Fatalf("rFunc() not called after trigger!") + } + // assert rFunc was only called once + select { + case <-called: + t.Fatalf("rFunc() called unexpectedly!") + default: + } + // another event should work OK + fes.trigger() + select { + case <-called: + case <-time.After(time.Second): + t.Fatalf("rFunc() not called after trigger!") + } + // again, assert rFunc was only called once + select { + case <-called: + t.Fatalf("rFunc() called unexpectedly!") + default: + } + // now check that time changes have the expected effect + fclock.Advance(2 * time.Hour) + select { + case <-called: + t.Fatalf("rFunc() called unexpectedly!") + default: + } + fclock.Advance(3 * time.Hour) + select { + case <-called: + case <-time.After(time.Second): + t.Fatalf("rFunc() not called after time event!") + } + + // stop the PeriodicReconciler + close(stop) + + // now, sending an event should do nothing + fes.trigger() + select { + case <-called: + t.Fatalf("rFunc() called unexpectedly!") + default: + } + // and nor should changes in time + fclock.Advance(10 * time.Hour) + select { + case <-called: + t.Fatalf("rFunc() called unexpectedly!") + default: + } + // and the PeriodicReconciler should have shut down + select { + case <-prDone: + case <-time.After(time.Second): + t.Fatalf("PeriodicReconciler.Run did not return after stop signal!") + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go new file mode 100644 index 0000000..f05cdee --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go @@ -0,0 +1,168 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "reflect" + "sort" + "sync" +) + +type Set interface { + Add(string) + Remove(string) + Contains(string) bool + Equals(Set) bool + Length() int + Values() []string + Copy() Set + Sub(Set) Set +} + +func NewUnsafeSet(values ...string) *unsafeSet { + set := &unsafeSet{make(map[string]struct{})} + for _, v := range values { + set.Add(v) + } + return set +} + +func NewThreadsafeSet(values ...string) *tsafeSet { + us := NewUnsafeSet(values...) + return &tsafeSet{us, sync.RWMutex{}} +} + +type unsafeSet struct { + d map[string]struct{} +} + +// Add adds a new value to the set (no-op if the value is already present) +func (us *unsafeSet) Add(value string) { + us.d[value] = struct{}{} +} + +// Remove removes the given value from the set +func (us *unsafeSet) Remove(value string) { + delete(us.d, value) +} + +// Contains returns whether the set contains the given value +func (us *unsafeSet) Contains(value string) (exists bool) { + _, exists = us.d[value] + return +} + +// Equals returns whether the contents of two sets are identical +func (us *unsafeSet) Equals(other Set) bool { + v1 := sort.StringSlice(us.Values()) + v2 := sort.StringSlice(other.Values()) + v1.Sort() + v2.Sort() + return reflect.DeepEqual(v1, v2) +} + +// Length returns the number of elements in the set +func (us *unsafeSet) Length() int { + return len(us.d) +} + +// Values returns the values of the Set in an unspecified order. +func (us *unsafeSet) Values() (values []string) { + values = make([]string, 0) + for val, _ := range us.d { + values = append(values, val) + } + return +} + +// Copy creates a new Set containing the values of the first +func (us *unsafeSet) Copy() Set { + cp := NewUnsafeSet() + for val, _ := range us.d { + cp.Add(val) + } + + return cp +} + +// Sub removes all elements in other from the set +func (us *unsafeSet) Sub(other Set) Set { + oValues := other.Values() + result := us.Copy().(*unsafeSet) + + for _, val := range oValues { + if _, ok := result.d[val]; !ok { + continue + } + delete(result.d, val) + } + + return result +} + +type tsafeSet struct { + us *unsafeSet + m sync.RWMutex +} + +func (ts *tsafeSet) Add(value string) { + ts.m.Lock() + defer ts.m.Unlock() + ts.us.Add(value) +} + +func (ts *tsafeSet) Remove(value string) { + ts.m.Lock() + defer ts.m.Unlock() + ts.us.Remove(value) +} + +func (ts *tsafeSet) Contains(value string) (exists bool) { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Contains(value) +} + +func (ts *tsafeSet) Equals(other Set) bool { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Equals(other) +} + +func (ts *tsafeSet) Length() int { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Length() +} + +func (ts *tsafeSet) Values() (values []string) { + ts.m.RLock() + defer ts.m.RUnlock() + return ts.us.Values() +} + +func (ts *tsafeSet) Copy() Set { + ts.m.RLock() + defer ts.m.RUnlock() + usResult := ts.us.Copy().(*unsafeSet) + return &tsafeSet{usResult, sync.RWMutex{}} +} + +func (ts *tsafeSet) Sub(other Set) Set { + ts.m.RLock() + defer ts.m.RUnlock() + usResult := ts.us.Sub(other).(*unsafeSet) + return &tsafeSet{usResult, sync.RWMutex{}} +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go new file mode 100644 index 0000000..dbf2082 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go @@ -0,0 +1,164 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "reflect" + "sort" + "testing" +) + +func TestUnsafeSet(t *testing.T) { + driveSetTests(t, NewUnsafeSet()) +} + +func TestThreadsafeSet(t *testing.T) { + driveSetTests(t, NewThreadsafeSet()) +} + +// Check that two slices contents are equal; order is irrelevant +func equal(a, b []string) bool { + as := sort.StringSlice(a) + bs := sort.StringSlice(b) + as.Sort() + bs.Sort() + return reflect.DeepEqual(as, bs) +} + +func driveSetTests(t *testing.T, s Set) { + // Verify operations on an empty set + eValues := []string{} + values := s.Values() + if !reflect.DeepEqual(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + if l := s.Length(); l != 0 { + t.Fatalf("Expected length=0, got %d", l) + } + for _, v := range []string{"foo", "bar", "baz"} { + if s.Contains(v) { + t.Fatalf("Expect s.Contains(%q) to be fale, got true", v) + } + } + + // Add three items, ensure they show up + s.Add("foo") + s.Add("bar") + s.Add("baz") + + eValues = []string{"foo", "bar", "baz"} + values = s.Values() + if !equal(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + + for _, v := range eValues { + if !s.Contains(v) { + t.Fatalf("Expect s.Contains(%q) to be true, got false", v) + } + } + + if l := s.Length(); l != 3 { + t.Fatalf("Expected length=3, got %d", l) + } + + // Add the same item a second time, ensuring it is not duplicated + s.Add("foo") + + values = s.Values() + if !equal(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + if l := s.Length(); l != 3 { + t.Fatalf("Expected length=3, got %d", l) + } + + // Remove all items, ensure they are gone + s.Remove("foo") + s.Remove("bar") + s.Remove("baz") + + eValues = []string{} + values = s.Values() + if !equal(values, eValues) { + t.Fatalf("Expect values=%v got %v", eValues, values) + } + + if l := s.Length(); l != 0 { + t.Fatalf("Expected length=0, got %d", l) + } + + // Create new copies of the set, and ensure they are unlinked to the + // original Set by making modifications + s.Add("foo") + s.Add("bar") + cp1 := s.Copy() + cp2 := s.Copy() + s.Remove("foo") + cp3 := s.Copy() + cp1.Add("baz") + + for i, tt := range []struct { + want []string + got []string + }{ + {[]string{"bar"}, s.Values()}, + {[]string{"foo", "bar", "baz"}, cp1.Values()}, + {[]string{"foo", "bar"}, cp2.Values()}, + {[]string{"bar"}, cp3.Values()}, + } { + if !equal(tt.want, tt.got) { + t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) + } + } + + for i, tt := range []struct { + want bool + got bool + }{ + {true, s.Equals(cp3)}, + {true, cp3.Equals(s)}, + {false, s.Equals(cp2)}, + {false, s.Equals(cp1)}, + {false, cp1.Equals(s)}, + {false, cp2.Equals(s)}, + {false, cp2.Equals(cp1)}, + } { + if tt.got != tt.want { + t.Fatalf("case %d: want %t, got %t", i, tt.want, tt.got) + + } + } + + // Subtract values from a Set, ensuring a new Set is created and + // the original Sets are unmodified + sub1 := cp1.Sub(s) + sub2 := cp2.Sub(cp1) + + for i, tt := range []struct { + want []string + got []string + }{ + {[]string{"foo", "bar", "baz"}, cp1.Values()}, + {[]string{"foo", "bar"}, cp2.Values()}, + {[]string{"bar"}, s.Values()}, + {[]string{"foo", "baz"}, sub1.Values()}, + {[]string{}, sub2.Values()}, + } { + if !equal(tt.want, tt.got) { + t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls.go new file mode 100644 index 0000000..bb2db94 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls.go @@ -0,0 +1,96 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "crypto/tls" + "crypto/x509" + "encoding/pem" + "io/ioutil" +) + +type keypairFunc func(certPEMBlock, keyPEMBlock []byte) (cert tls.Certificate, err error) + +func buildTLSClientConfig(ca, cert, key []byte, parseKeyPair keypairFunc) (*tls.Config, error) { + if len(cert) == 0 && len(key) == 0 { + return &tls.Config{InsecureSkipVerify: true}, nil + } + + tlsCert, err := parseKeyPair(cert, key) + if err != nil { + return nil, err + } + + cfg := tls.Config{ + Certificates: []tls.Certificate{tlsCert}, + MinVersion: tls.VersionTLS10, + } + + if len(ca) != 0 { + cp, err := newCertPool(ca) + if err != nil { + return nil, err + } + cfg.RootCAs = cp + } + + return &cfg, nil +} + +func newCertPool(ca []byte) (*x509.CertPool, error) { + certPool := x509.NewCertPool() + for { + var block *pem.Block + block, ca = pem.Decode(ca) + if block == nil { + break + } + cert, err := x509.ParseCertificate(block.Bytes) + if err != nil { + return nil, err + } + certPool.AddCert(cert) + } + return certPool, nil +} + +func ReadTLSConfigFiles(cafile, certfile, keyfile string) (cfg *tls.Config, err error) { + var ca, cert, key []byte + + if certfile != "" { + cert, err = ioutil.ReadFile(certfile) + if err != nil { + return + } + } + + if keyfile != "" { + key, err = ioutil.ReadFile(keyfile) + if err != nil { + return + } + } + + if cafile != "" { + ca, err = ioutil.ReadFile(cafile) + if err != nil { + return + } + } + + cfg, err = buildTLSClientConfig(ca, cert, key, tls.X509KeyPair) + + return +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go new file mode 100644 index 0000000..1e84f74 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go @@ -0,0 +1,210 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package pkg + +import ( + "crypto/tls" + "errors" + "testing" +) + +var ( + validCA = []byte(`-----BEGIN CERTIFICATE----- +MIIFNDCCAx6gAwIBAgIBATALBgkqhkiG9w0BAQUwLTEMMAoGA1UEBhMDVVNBMRAw +DgYDVQQKEwdldGNkLWNhMQswCQYDVQQLEwJDQTAeFw0xNDAzMTMwMjA5MDlaFw0y +NDAzMTMwMjA5MDlaMC0xDDAKBgNVBAYTA1VTQTEQMA4GA1UEChMHZXRjZC1jYTEL +MAkGA1UECxMCQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDdlBlw +Jiakc4C1UpMUvQ+2fttyBMfMLivQgj51atpKd8qIBvpZwz1wtpzdRG0hSYMF0IUk +MfBqyg+T5tt2Lfs3Gx3cYKS7G0HTfmABC7GdG8gNvEVNl/efxqvhis7p7hur765e +J+N2GR4oOOP5Wa8O5flv10cp3ZJLhAguc2CONLzfh/iAYAItFgktGHXJ/AnUhhaj +KWdKlK9Cv71YsRPOiB1hCV+LKfNSqrXPMvQ4sarz3yECIBhpV/KfskJoDyeNMaJd +gabX/S7gUCd2FvuOpGWdSIsDwyJf0tnYmQX5XIQwBZJib/IFMmmoVNYc1bFtYvRH +j0g0Ax4tHeXU/0mglqEcaTuMejnx8jlxZAM8Z94wHLfKbtaP0zFwMXkaM4nmfZqh +vLZwowDGMv9M0VRFEhLGYIc3xQ8G2u8cFAGw1UqTxKhwAdRmrcFaQ38sk4kziy0u +AkpGavS7PKcFjjB/fdDFO/kwGQOthX/oTn9nP3BT+IK2h1A6ATMPI4lVnhb5/KBt +9M/fGgbiU+I9QT0Ilz/LlrcCuzyRXREvIZvoUL77Id+JT3qQxqPn/XMKLN4WEFII +112MFGqCD85JZzNoC4RkZd8kFlR4YJWsS4WqJlWprESr5cCDuLviK+31cnIRF4fJ +mz0gPsVgY7GFEan3JJnL8oRUVzdTPKfPt0atsQIDAQABo2MwYTAOBgNVHQ8BAf8E +BAMCAAQwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUnVlVvktY+zlLpG43nTpG +AWmUkrYwHwYDVR0jBBgwFoAUnVlVvktY+zlLpG43nTpGAWmUkrYwCwYJKoZIhvcN +AQEFA4ICAQAqIcPFux3V4h1N0aGM4fCS/iT50TzDnRb5hwILKbmyA6LFnH4YF7PZ +aA0utDNo1XSRDMpR38HWk0weh5Sfx6f2danaKZHAsea8oVEtdrz16ZMOvoh0CPIM +/hn0CGQOoXDADDNFASuExhhpoyYkDqTVTCQ/zbhZg1mjBljJ+BBzlSgeoE4rUDpn +nuDcmD9LtjpsVQL+J662rd51xV4Z6a7aZLvN9GfO8tYkfCGCD9+fGh1Cpz0IL7qw +VRie+p/XpjoHemswnRhYJ4wn10a1UkVSR++wld6Gvjb9ikyr9xVyU5yrRM55pP2J +VguhzjhTIDE1eDfIMMxv3Qj8+BdVQwtKFD+zQYQcbcjsvjTErlS7oCbM2DVlPnRT +QaCM0q0yorfzc4hmml5P95ngz2xlohavgNMhsYIlcWyq3NVbm7mIXz2pjqa16Iit +vL7WX6OVupv/EOMRx5cVcLqqEaYJmAlNd/CCD8ihDQCwoJ6DJhczPRexrVp+iZHK +SnIUONdXb/g8ungXUGL1jGNQrWuq49clpI5sLWNjMDMFAQo0qu5bLkOIMlK/evCt +gctOjXDvGXCk5h6Adf14q9zDGFdLoxw0/aciUSn9IekdzYPmkYUTifuzkVRsPKzS +nmI4dQvz0rHIh4FBUKWWrJhRWhrv9ty/YFuJXVUHeAwr5nz6RFZ4wQ== +-----END CERTIFICATE-----`) + validKey = []byte(`-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAyNxL6iay1rJz24wE/BDYjEcgSDYYWn7m4uTW/oJRM5GwtpL9 +s15FZKZAbmw0cMod3qJkm3cCmJN8s/iKKU++d7XibnkaTD6vQMq//j2ZeGNbRtOC +nI3zrzpbOsz7A3x85bkfExO9OSH+cMGbtwXcMc3bcfU9ETsyBIEbdAMbnHuapIPd +yFjcTqyK/uCwsWH06b6U1zttJc9CLkDZtTqaPT1aFp+z13Tprgs0htoVtQ3Cqksk +D+yJKZQSUtBIaKLyLF2r0pDyibLL0I+92RSAVYCoV7h5jzXa8qWkJArcbKm1XTjp +aIyLamE0wwImncEUFpGIAzkkAhiYj6mFScfqx+DJc8UOp/cdqiHJ3pXzK/lRQxHN +WLx7tVyzIOW9SJg+gobrWFtEYRSdwkFXUEdouJCfE9Q0iWCyEjDg2bsdXGWlKEi/ +xJKwuf/DzlmZj/JyVzugOMK2Qxxd9P6lqaPk+T77AOnAAX19Y5HE8TwVxitajmfK +06E8aayds3N87mTcUoDN9p843D1IJ+efTIHZdB0eHOCXk2RrHm1psTFppM//wVeH +lGhh6gqc0UB392CMcrLwwtl3+M9gJZPAJS0V6e/5LGrXcQLcnPsvPjFgnOjdGGyP +c47/nswgakfprtT+U29B3mzxc93TnSKYgt5FPEMjBGoMPLucZYmbOAMcHTcCAwEA +AQKCAgBS1vCESKOXgo/f61ae8v+skyUQQyc2I4Jr739wBiUhRKQCGIuDr4ylHyAR +qpTSM7mv+X/O0n2CmcljnEy3Dwl568zQTSf4bB3xde1LGPKzwR6DDnaexLjM+x9n +F+UqoewM/pV/U7PF3WxH6sGi8UrIS6OG02L1OVm+m9TLuwBnQF8eHLiaiXOLCwRk +bBzTe5f70zslrX+tiVY9J0fiw6GbQjNmg0UzxicePcbTGxy6yEsR2t2rp51GRahs ++TPz28hPXe6gcGFnQxNmF/JvllH7cY18aDvSQZ7kVkZlCwmv0ypWoUM6eESDgkW1 +a6yrgVccm7bhxW5BYw2AqqSrMkV0oMcCUjh2rYvex7w6dM374Ok3DD/dXjTHLNV5 ++0tHMxXUiCKwe7hVEg+iGD4E1jap5n5c4RzpEtAXsGEK5WUBksHi9qOBv+lubjZn +Kcfbos+BbnmUCU3MmU48EZwyFQIu9djkLXfJV2Cbbg9HmkrIOYgi4tFjoBKeQLE4 +6GCucMWnNfMO7Kq/z7c+7sfWOAA55pu0Ojel8VH6US+Y/1mEuSUhQudrJn8GxAmc +4t+C2Ie1Q1bK3iJbd0NUqtlwd9xI9wQgCbaxfQceUmBBjuTUu3YFctZ7Jia7h18I +gZ3wsKfySDhW29XTFvnT3FUpc+AN9Pv4sB7uobm6qOBV8/AdKQKCAQEA1zwIuJki +bSgXxsD4cfKgQsyIk0eMj8bDOlf/A8AFursXliH3rRASoixXNgzWrMhaEIE2BeeT +InE13YCUjNCKoz8oZJqKYpjh3o/diZf1vCo6m/YUSR+4amynWE4FEAa58Og2WCJ3 +Nx8/IMpmch2VZ+hSQuNr5uvpH84+eZADQ1GB6ypzqxb5HjIEeryLJecDQGe4ophd +JCo3loezq/K0XJQI8GTBe2GQPjXSmLMZKksyZoWEXAaC1Q+sdJWZvBpm3GfVQbXu +q7wyqTMknVIlEOy0sHxstsbayysSFFQ/fcgKjyQb8f4efOkyQg8mH5vQOZghbHJ+ +7I8wVSSBt+bE2wKCAQEA7udRoo2NIoIpJH+2+SPqJJVq1gw/FHMM4oXNZp+AAjR1 +hTWcIzIXleMyDATl5ZFzZIY1U2JMifS5u2R7fDZEu9vfZk4e6BJUJn+5/ahjYFU8 +m8WV4rFWR6XN0SZxPb43Mn6OO7EoMqr8InRufiN4LwIqnPqDm2D9Fdijb9QFJ2UG +QLKNnIkLTcUfx1RYP4T48CHkeZdxV8Cp49SzSSV8PbhIVBx32bm/yO6nLHoro7Wl +YqXGW0wItf2BUA5a5eYNO0ezVkOkTp2aj/p9i+0rqbsYa480hzlnOzYI5F72Z8V2 +iPltUAeQn53Vg1azySa1x8/0Xp5nVsgQSh18CH3p1QKCAQBxZv4pVPXgkXlFjTLZ +xr5Ns7pZ7x7OOiluuiJw9WGPazgYMDlxA8DtlXM11Tneu4lInOu73LGXOhLpa+/Y +6Z/CN2qu5wX2wRpwy1gsQNaGl7FdryAtDvt5h1n8ms7sDL83gQHxGee6MUpvmnSz +t4aawrtk5rJZbv7bdS1Rm2E8vNs47psXD/mdwTi++kxOYhNCgeO0N5cLkPrM4x71 +f+ErzguPrWaL/XGkdXNKZULjF8+sWLjOS9fvLlzs6E2h4D9F7addAeCIt5XxtDKc +eUVyT2U8f7I/8zIgTccu0tzJBvcZSCs5K20g3zVNvPGXQd9KGS+zFfht51vN4HhA +TuR1AoIBAGuQBKZeexP1bJa9VeF4dRxBldeHrgMEBeIbgi5ZU+YqPltaltEV5Z6b +q1XUArpIsZ6p+mpvkKxwXgtsI1j6ihnW1g+Wzr2IOxEWYuQ9I3klB2PPIzvswj8B +/NfVKhk1gl6esmVXzxR4/Yp5x6HNUHhBznPdKtITaf+jCXr5B9UD3DvW6IF5Bnje +bv9tD0qSEQ71A4xnTiXHXfZxNsOROA4F4bLVGnUR97J9GRGic/GCgFMY9mT2p9lg +qQ8lV3G5EW4GS01kqR6oQQXgLxSIFSeXUFhlIq5bfwoeuwQvaVuxgTwMqVXmAgyL +oK1ApTPE1QWAsLLFORvOed8UxVqBbn0CggEBALfr/wheXCKLdzFzm03sO1i9qVz2 +vnpxzexXW3V/TtM6Dff2ojgkDC+CVximtAiLA/Wj60hXnQxw53g5VVT5rESx0J3c +pq+azbi1eWzFeOrqJvKQhMfYc0nli7YuGnPkKzeepJJtWZHYkAjL4QZAn1jt0RqV +DQmlGPGiOuGP8uh59c23pbjgh4eSJnvhOT2BFKhKZpBdTBYeiQiZBqIyme8rNTFr +NmpBxtUr77tccVTrcWWhhViG36UNpetAP7b5QCHScIXZJXrEqyK5HaePqi5UMH8o +alSz6s2REG/xP7x54574TvRG/3cIamv1AfZAOjin7BwhlSLhPl2eeh4Cgas= +-----END RSA PRIVATE KEY-----`) + validCert = []byte(`-----BEGIN CERTIFICATE----- +MIIFWzCCA0WgAwIBAgIBAjALBgkqhkiG9w0BAQUwLTEMMAoGA1UEBhMDVVNBMRAw +DgYDVQQKEwdldGNkLWNhMQswCQYDVQQLEwJDQTAeFw0xNDAzMTMwMjA5MjJaFw0y +NDAzMTMwMjA5MjJaMEUxDDAKBgNVBAYTA1VTQTEQMA4GA1UEChMHZXRjZC1jYTEP +MA0GA1UECxMGc2VydmVyMRIwEAYDVQQDEwkxMjcuMC4wLjEwggIiMA0GCSqGSIb3 +DQEBAQUAA4ICDwAwggIKAoICAQDI3EvqJrLWsnPbjAT8ENiMRyBINhhafubi5Nb+ +glEzkbC2kv2zXkVkpkBubDRwyh3eomSbdwKYk3yz+IopT753teJueRpMPq9Ayr/+ +PZl4Y1tG04KcjfOvOls6zPsDfHzluR8TE705If5wwZu3Bdwxzdtx9T0ROzIEgRt0 +Axuce5qkg93IWNxOrIr+4LCxYfTpvpTXO20lz0IuQNm1Opo9PVoWn7PXdOmuCzSG +2hW1DcKqSyQP7IkplBJS0EhoovIsXavSkPKJssvQj73ZFIBVgKhXuHmPNdrypaQk +CtxsqbVdOOlojItqYTTDAiadwRQWkYgDOSQCGJiPqYVJx+rH4MlzxQ6n9x2qIcne +lfMr+VFDEc1YvHu1XLMg5b1ImD6ChutYW0RhFJ3CQVdQR2i4kJ8T1DSJYLISMODZ +ux1cZaUoSL/EkrC5/8POWZmP8nJXO6A4wrZDHF30/qWpo+T5PvsA6cABfX1jkcTx +PBXGK1qOZ8rToTxprJ2zc3zuZNxSgM32nzjcPUgn559Mgdl0HR4c4JeTZGsebWmx +MWmkz//BV4eUaGHqCpzRQHf3YIxysvDC2Xf4z2Alk8AlLRXp7/ksatdxAtyc+y8+ +MWCc6N0YbI9zjv+ezCBqR+mu1P5Tb0HebPFz3dOdIpiC3kU8QyMEagw8u5xliZs4 +AxwdNwIDAQABo3IwcDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHQYD +VR0OBBYEFD6UrVN8uolWz6et79jVeZetjd4XMB8GA1UdIwQYMBaAFJ1ZVb5LWPs5 +S6RuN506RgFplJK2MA8GA1UdEQQIMAaHBH8AAAEwCwYJKoZIhvcNAQEFA4ICAQCo +sKn1Rjx0tIVWAZAZB4lCWvkQDp/txnb5zzQUlKhIW2o98IklASmOYYyZbE2PXlda +/n8TwKIzWgIoNh5AcgLWhtASrnZdGFXY88n5jGk6CVZ1+Dl+IX99h+r+YHQzf1jU +BjGrZHGv3pPjwhFGDS99lM/TEBk/eLI2Kx5laL+nWMTwa8M1OwSIh6ZxYPVlWUqb +rurk5l/YqW+UkYIXIQhe6LwtB7tBjr6nDIWBfHQ7uN8IdB8VIAF6lejr22VmERTW +j+zJ5eTzuQN1f0s930mEm8pW7KgGxlEqrUlSJtxlMFCv6ZHZk1Y4yEiOCBKlPNme +X3B+lhj//PH3gLNm3+ZRr5ena3k+wL9Dd3d3GDCIx0ERQyrGS/rJpqNPI+8ZQlG0 +nrFlm7aP6UznESQnJoSFbydiD0EZ4hXSdmDdXQkTklRpeXfMcrYBGN7JrGZOZ2T2 +WtXBMx2bgPeEH50KRrwUMFe122bchh0Fr+hGvNK2Q9/gRyQPiYHq6vSF4GzorzLb +aDuWA9JRH8/c0z8tMvJ7KjmmmIxd39WWGZqiBrGQR7utOJjpQl+HCsDIQM6yZ/Bu +RpwKj2yBz0OQg4tWbtqUuFkRMTkCR6vo3PadgO1VWokM7UFUXlScnYswcM5EwnzJ +/IsYJ2s1V706QVUzAGIbi3+wYi3enk7JfYoGIqa2oA== +-----END CERTIFICATE-----`) + corruptedKey = []byte(`-----BEGIN RSA PRIVATE KEY----- + Corrupted +-----END RSA PRIVATE KEY-----`) + corruptedCert = []byte(`-----BEGIN CERTIFICATE----- + Corrupted +-----END CERTIFICATE-----`) +) + +func newDummyKeyParser(cert tls.Certificate, err error) keypairFunc { + return func(certPEMBlock, keyPEMBlock []byte) (tls.Certificate, error) { + return cert, err + } +} + +func TestBuildTLSClientConfigNoCertificate(t *testing.T) { + parser := newDummyKeyParser(tls.Certificate{}, nil) + config, err := buildTLSClientConfig([]byte{}, []byte{}, []byte{}, parser) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if !config.InsecureSkipVerify { + t.Errorf("insecureSkipVerify not set") + } + if len(config.Certificates) != 0 { + t.Errorf("unexpected certificates") + } + if config.RootCAs != nil { + t.Errorf("unexpected root CA") + } +} + +func TestBuildTLSClientConfigWithValidCertificateAndWithCA(t *testing.T) { + parser := newDummyKeyParser(tls.Certificate{}, nil) + config, err := buildTLSClientConfig(validCA, validCert, validKey, parser) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if config.InsecureSkipVerify { + t.Errorf("insecureSkipVerify should not be set") + } + if len(config.Certificates) == 0 { + t.Errorf("missing certificates") + } + if config.RootCAs == nil { + t.Errorf("missing root CA") + } +} + +func TestBuildTLSClientConfigWithValidCertificateAndWithoutCA(t *testing.T) { + parser := newDummyKeyParser(tls.Certificate{}, nil) + config, err := buildTLSClientConfig([]byte{}, validCert, validKey, parser) + if err != nil { + t.Errorf("unexpected error: %v", err) + } + if config.InsecureSkipVerify { + t.Errorf("insecureSkipVerify should not be set") + } + if len(config.Certificates) == 0 { + t.Errorf("missing certificates") + } + if config.RootCAs != nil { + t.Errorf("unexpected root CA") + } +} + +func TestBuildTLSClientConfigWithInvalidParameters(t *testing.T) { + parser := newDummyKeyParser(tls.Certificate{}, errors.New("err")) + config, err := buildTLSClientConfig([]byte{}, validCert, validKey, parser) + if err == nil { + t.Errorf("error expected") + } + if config != nil { + t.Errorf("config should be nil") + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go new file mode 100644 index 0000000..bc82352 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go @@ -0,0 +1,95 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "sync" + + "github.com/coreos/fleet/pkg" +) + +func NewFakeUnitManager() *FakeUnitManager { + return &FakeUnitManager{u: map[string]bool{}} +} + +type FakeUnitManager struct { + sync.RWMutex + u map[string]bool +} + +func (fum *FakeUnitManager) Load(name string, u UnitFile) error { + fum.Lock() + defer fum.Unlock() + + fum.u[name] = false + return nil +} + +func (fum *FakeUnitManager) ReloadUnitFiles() error { + return nil +} + +func (fum *FakeUnitManager) Unload(name string) { + fum.Lock() + defer fum.Unlock() + + delete(fum.u, name) +} + +func (fum *FakeUnitManager) TriggerStart(string) {} +func (fum *FakeUnitManager) TriggerStop(string) {} + +func (fum *FakeUnitManager) Units() ([]string, error) { + fum.RLock() + defer fum.RUnlock() + + lst := make([]string, 0, len(fum.u)) + for name, _ := range fum.u { + lst = append(lst, name) + } + return lst, nil +} + +func (fum *FakeUnitManager) GetUnitState(name string) (us *UnitState, err error) { + fum.RLock() + defer fum.RUnlock() + + if _, ok := fum.u[name]; ok { + us = &UnitState{ + LoadState: "loaded", + ActiveState: "active", + SubState: "running", + } + } + return +} + +func (fum *FakeUnitManager) GetUnitStates(filter pkg.Set) (map[string]*UnitState, error) { + fum.RLock() + defer fum.RUnlock() + + states := make(map[string]*UnitState) + for _, name := range filter.Values() { + if _, ok := fum.u[name]; ok { + states[name] = &UnitState{"loaded", "active", "running", "", "", name} + } + } + + return states, nil +} + +func (fum *FakeUnitManager) MarshalJSON() ([]byte, error) { + return nil, nil +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go new file mode 100644 index 0000000..3b616f2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go @@ -0,0 +1,114 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "reflect" + "testing" + + "github.com/coreos/fleet/pkg" +) + +func TestFakeUnitManagerEmpty(t *testing.T) { + fum := NewFakeUnitManager() + + units, err := fum.Units() + if err != nil { + t.Errorf("Expected no error from Units(), got %v", err) + } + + if !reflect.DeepEqual([]string{}, units) { + t.Errorf("Expected no units, found %v", units) + } +} + +func TestFakeUnitManagerLoadUnload(t *testing.T) { + fum := NewFakeUnitManager() + + err := fum.Load("hello.service", UnitFile{}) + if err != nil { + t.Fatalf("Expected no error from Load(), got %v", err) + } + + units, err := fum.Units() + if err != nil { + t.Fatalf("Expected no error from Units(), got %v", err) + } + eu := []string{"hello.service"} + if !reflect.DeepEqual(eu, units) { + t.Fatalf("Expected units %v, found %v", eu, units) + } + + us, err := fum.GetUnitState("hello.service") + if err != nil { + t.Errorf("Expected no error from GetUnitState, got %v", err) + } + + if us == nil { + t.Fatalf("Expected non-nil UnitState") + } + + eus := NewUnitState("loaded", "active", "running", "") + if !reflect.DeepEqual(*us, *eus) { + t.Fatalf("Expected UnitState %v, got %v", eus, *us) + } + + fum.Unload("hello.service") + + units, err = fum.Units() + if err != nil { + t.Errorf("Expected no error from Units(), got %v", err) + } + + if !reflect.DeepEqual([]string{}, units) { + t.Errorf("Expected no units, found %v", units) + } + + us, err = fum.GetUnitState("hello.service") + if err != nil { + t.Errorf("Expected no error from GetUnitState, got %v", err) + } + + if us != nil { + t.Fatalf("Expected nil UnitState") + } +} + +func TestFakeUnitManagerGetUnitStates(t *testing.T) { + fum := NewFakeUnitManager() + + err := fum.Load("hello.service", UnitFile{}) + if err != nil { + t.Fatalf("Expected no error from Load(), got %v", err) + } + + states, err := fum.GetUnitStates(pkg.NewUnsafeSet("hello.service", "goodbye.service")) + if err != nil { + t.Fatalf("Failed calling GetUnitStates: %v", err) + } + + expectStates := map[string]*UnitState{ + "hello.service": &UnitState{ + LoadState: "loaded", + ActiveState: "active", + SubState: "running", + UnitName: "hello.service", + }, + } + + if !reflect.DeepEqual(expectStates, states) { + t.Fatalf("Received unexpected collection of UnitStates: %#v\nExpected: %#v", states, expectStates) + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator.go new file mode 100644 index 0000000..a2d28e7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator.go @@ -0,0 +1,127 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "encoding/json" + "time" + + "github.com/coreos/fleet/log" + "github.com/coreos/fleet/pkg" +) + +type UnitStateHeartbeat struct { + Name string + State *UnitState +} + +func NewUnitStateGenerator(mgr UnitManager) *UnitStateGenerator { + return &UnitStateGenerator{ + mgr: mgr, + subscribed: pkg.NewThreadsafeSet(), + } +} + +type UnitStateGenerator struct { + mgr UnitManager + + subscribed pkg.Set + lastSubscribed pkg.Set +} + +func (g *UnitStateGenerator) MarshalJSON() ([]byte, error) { + data := struct { + Subscribed []string + }{ + Subscribed: g.subscribed.Values(), + } + + return json.Marshal(data) +} + +// Run periodically calls Generate and sends received *UnitStateHeartbeat +// objects to the provided channel. +func (g *UnitStateGenerator) Run(receiver chan<- *UnitStateHeartbeat, stop chan bool) { + tick := time.Tick(time.Second) + for { + select { + case <-stop: + return + case <-tick: + beatchan, err := g.Generate() + if err != nil { + log.Errorf("Failed fetching current unit states: %v", err) + continue + } + + for ush := range beatchan { + receiver <- ush + } + } + } +} + +// Generate returns and fills a channel with *UnitStateHeartbeat objects. Objects will +// only be returned for units to which this generator is currently subscribed. +func (g *UnitStateGenerator) Generate() (<-chan *UnitStateHeartbeat, error) { + var lastSubscribed pkg.Set + if g.lastSubscribed != nil { + lastSubscribed = g.lastSubscribed.Copy() + } + + subscribed := g.subscribed.Copy() + g.lastSubscribed = subscribed + + reportable, err := g.mgr.GetUnitStates(subscribed) + if err != nil { + return nil, err + } + + beatchan := make(chan *UnitStateHeartbeat) + go func() { + for name, us := range reportable { + us := us + beatchan <- &UnitStateHeartbeat{ + Name: name, + State: us, + } + } + + if lastSubscribed != nil { + // For all units that were part of the subscription list + // last time Generate ran, but are now not part of that + // list, send nil-State heartbeats to signal removal + for _, name := range lastSubscribed.Sub(subscribed).Values() { + beatchan <- &UnitStateHeartbeat{ + Name: name, + } + } + } + + close(beatchan) + }() + + return beatchan, nil +} + +// Subscribe adds a unit to the internal state filter +func (g *UnitStateGenerator) Subscribe(name string) { + g.subscribed.Add(name) +} + +// Unsubscribe removes a unit from the internal state filter +func (g *UnitStateGenerator) Unsubscribe(name string) { + g.subscribed.Remove(name) +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go new file mode 100644 index 0000000..bd3fe80 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go @@ -0,0 +1,79 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "reflect" + "testing" +) + +func assertGenerateUnitStateHeartbeats(t *testing.T, um UnitManager, gen *UnitStateGenerator, expect []UnitStateHeartbeat) { + beatchan, err := gen.Generate() + if err != nil { + t.Fatalf("Unexpected error from Generate(): %v", err) + } + + got := []UnitStateHeartbeat{} + for beat := range beatchan { + beat := beat + got = append(got, *beat) + } + + if !reflect.DeepEqual(got, expect) { + t.Fatalf("got %#v, expected %#v", got, expect) + } +} + +func TestUnitStateGeneratorSubscribeLifecycle(t *testing.T) { + um := NewFakeUnitManager() + um.Load("foo.service", UnitFile{}) + + gen := NewUnitStateGenerator(um) + + // not subscribed to anything yet, so no heartbeats + assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) + + gen.Subscribe("foo.service") + + // subscribed to foo.service so we should get a heartbeat + expect := []UnitStateHeartbeat{ + UnitStateHeartbeat{Name: "foo.service", State: &UnitState{"loaded", "active", "running", "", "", "foo.service"}}, + } + assertGenerateUnitStateHeartbeats(t, um, gen, expect) + + gen.Unsubscribe("foo.service") + + // heartbeat for foo.service should have nil State since we have not called Generate since Unsubscribe + expect = []UnitStateHeartbeat{ + UnitStateHeartbeat{Name: "foo.service", State: nil}, + } + assertGenerateUnitStateHeartbeats(t, um, gen, expect) + + // since the nil-State heartbeat for foo.service was sent for the last Generate, it can be forgotten + assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) +} + +func TestUnitStateGeneratorNoState(t *testing.T) { + um := NewFakeUnitManager() + gen := NewUnitStateGenerator(um) + + // not subscribed to anything yet, so no heartbeats + assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) + + gen.Subscribe("foo.service") + + // subscribed to foo.service but no underlying state so no heartbeat + assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/manager.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/manager.go new file mode 100644 index 0000000..a1ed386 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/manager.go @@ -0,0 +1,32 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "github.com/coreos/fleet/pkg" +) + +type UnitManager interface { + Load(string, UnitFile) error + Unload(string) + ReloadUnitFiles() error + + TriggerStart(string) + TriggerStop(string) + + Units() ([]string, error) + GetUnitStates(pkg.Set) (map[string]*UnitState, error) + GetUnitState(string) (*UnitState, error) +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go new file mode 100644 index 0000000..aa15dd4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go @@ -0,0 +1,257 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "bytes" + "crypto/sha1" + "encoding/hex" + "fmt" + "io/ioutil" + "strings" + + "github.com/coreos/go-systemd/unit" +) + +func NewUnitFile(raw string) (*UnitFile, error) { + reader := strings.NewReader(raw) + opts, err := unit.Deserialize(reader) + if err != nil { + return nil, err + } + + return NewUnitFromOptions(opts), nil +} + +func NewUnitFromOptions(opts []*unit.UnitOption) *UnitFile { + return &UnitFile{mapOptions(opts), opts} +} + +func mapOptions(opts []*unit.UnitOption) map[string]map[string][]string { + contents := make(map[string]map[string][]string) + for _, opt := range opts { + if _, ok := contents[opt.Section]; !ok { + contents[opt.Section] = make(map[string][]string) + } + + if _, ok := contents[opt.Section][opt.Name]; !ok { + contents[opt.Section][opt.Name] = make([]string, 0) + } + + var vals []string + if opt.Section == "X-Fleet" { + // The go-systemd parser does not know that our X-Fleet options support + // multivalue options, so we have to manually parse them here + vals = parseMultivalueLine(opt.Value) + } else { + vals = []string{opt.Value} + } + + contents[opt.Section][opt.Name] = append(contents[opt.Section][opt.Name], vals...) + } + + return contents +} + +// parseMultivalueLine parses a line that includes several quoted values separated by whitespaces. +// Example: MachineMetadata="foo=bar" "baz=qux" +// If the provided line is not a multivalue string, the line is returned as the sole value. +func parseMultivalueLine(line string) (values []string) { + if !strings.HasPrefix(line, `"`) || !strings.HasSuffix(line, `"`) { + return []string{line} + } + + var v bytes.Buffer + w := false // check whether we're within quotes or not + for _, e := range []byte(line) { + // ignore quotes + if e == '"' { + w = !w + continue + } + + if e == ' ' { + if !w { // between quoted values, keep the previous value and reset. + values = append(values, v.String()) + v.Reset() + continue + } + } + + v.WriteByte(e) + } + + values = append(values, v.String()) + + return +} + +// A UnitFile represents a systemd configuration which encodes information about any of the unit +// types that fleet supports (as defined in SupportedUnitTypes()). +// UnitFiles are linked to Units by the Hash of their contents. +// Similar to systemd, a UnitFile configuration has no inherent name, but is rather +// named through the reference to it; in the case of systemd, the reference is +// the filename, and in the case of fleet, the reference is the name of the Unit +// that references this UnitFile. +type UnitFile struct { + // Contents represents the parsed unit file. + // This field must be considered readonly. + Contents map[string]map[string][]string + + Options []*unit.UnitOption +} + +// Description returns the first Description option found in the [Unit] section. +// If the option is not defined, an empty string is returned. +func (u *UnitFile) Description() string { + if values := u.Contents["Unit"]["Description"]; len(values) > 0 { + return values[0] + } + return "" +} + +func (u *UnitFile) Bytes() []byte { + b, _ := ioutil.ReadAll(unit.Serialize(u.Options)) + return b +} + +func (u *UnitFile) String() string { + return string(u.Bytes()) +} + +// Hash returns the SHA1 hash of the raw contents of the Unit +func (u *UnitFile) Hash() Hash { + return Hash(sha1.Sum(u.Bytes())) +} + +// RecognizedUnitType determines whether or not the given unit name represents +// a recognized unit type. +func RecognizedUnitType(name string) bool { + types := []string{"service", "socket", "timer", "path", "device", "mount", "automount"} + for _, t := range types { + suffix := fmt.Sprintf(".%s", t) + if strings.HasSuffix(name, suffix) { + return true + } + } + return false +} + +// DefaultUnitType appends the default unit type to a given unit name, ignoring +// any file extensions that already exist. +func DefaultUnitType(name string) string { + return fmt.Sprintf("%s.service", name) +} + +// SHA1 sum +type Hash [sha1.Size]byte + +func (h Hash) String() string { + return fmt.Sprintf("%x", h[:]) +} + +func (h Hash) Short() string { + return fmt.Sprintf("%.7s", h) +} + +func (h *Hash) Empty() bool { + return *h == Hash{} +} + +func HashFromHexString(key string) (Hash, error) { + h := Hash{} + out, err := hex.DecodeString(key) + if err != nil { + return h, err + } + if len(out) != sha1.Size { + return h, fmt.Errorf("size of key %q (%d) differs from SHA1 size (%d)", out, len(out), sha1.Size) + } + copy(h[:], out[:sha1.Size]) + return h, nil +} + +// UnitState encodes the current state of a unit loaded into a fleet agent +type UnitState struct { + LoadState string + ActiveState string + SubState string + MachineID string + UnitHash string + UnitName string +} + +func NewUnitState(loadState, activeState, subState, mID string) *UnitState { + return &UnitState{ + LoadState: loadState, + ActiveState: activeState, + SubState: subState, + MachineID: mID, + } +} + +// UnitNameInfo exposes certain interesting items about a Unit based on its +// name. For example, a unit with the name "foo@.service" constitutes a +// template unit, and a unit named "foo@1.service" would represent an instance +// unit of that template. +type UnitNameInfo struct { + FullName string // Original complete name of the unit (e.g. foo.socket, foo@bar.service) + Name string // Name of the unit without suffix (e.g. foo, foo@bar) + Prefix string // Prefix of the template unit (e.g. foo) + + // If the unit represents an instance or a template, the following values are set + Template string // Name of the canonical template unit (e.g. foo@.service) + Instance string // Instance name (e.g. bar) +} + +// IsInstance returns a boolean indicating whether the UnitNameInfo appears to be +// an Instance of a Template unit +func (nu UnitNameInfo) IsInstance() bool { + return len(nu.Instance) > 0 +} + +// IsTemplate returns a boolean indicating whether the UnitNameInfo appears to be +// a Template unit +func (nu UnitNameInfo) IsTemplate() bool { + return len(nu.Template) > 0 && !nu.IsInstance() +} + +// NewUnitNameInfo generates a UnitNameInfo from the given name. If the given string +// is not a correct unit name, nil is returned. +func NewUnitNameInfo(un string) *UnitNameInfo { + + // Everything past the first @ and before the last . is the instance + s := strings.LastIndex(un, ".") + if s == -1 { + return nil + } + + nu := &UnitNameInfo{FullName: un} + name := un[:s] + suffix := un[s:] + nu.Name = name + + a := strings.Index(name, "@") + if a == -1 { + // This does not appear to be a template or instance unit. + nu.Prefix = name + return nu + } + + nu.Prefix = name[:a] + nu.Template = fmt.Sprintf("%s@%s", name[:a], suffix) + nu.Instance = name[a+1:] + return nu +} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go new file mode 100644 index 0000000..9590f4e --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go @@ -0,0 +1,400 @@ +// Copyright 2014 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "reflect" + "testing" +) + +func TestUnitHash(t *testing.T) { + u, err := NewUnitFile("[Service]\nExecStart=/bin/sleep 100\n") + if err != nil { + t.Fatalf("Unexpected error encountered creating unit: %v", err) + } + + gotHash := u.Hash() + gotHashString := gotHash.String() + expectHashString := "1c6fb6f3684bafb0c173d8b8b957ceff031180c1" + if gotHashString != expectHashString { + t.Fatalf("Unit Hash (%s) does not match expected (%s)", gotHashString, expectHashString) + } + + expectHashShort := "1c6fb6f" + gotHashShort := gotHash.Short() + if gotHashShort != expectHashShort { + t.Fatalf("Unit Hash short (%s) does not match expected (%s)", gotHashShort, expectHashShort) + } + + eh := &Hash{} + if !eh.Empty() { + t.Fatalf("Empty hash check failed: %v", eh.Empty()) + } +} + +func TestHashFromHexString(t *testing.T) { + u, err := NewUnitFile("[Service]\nExecStart=/bin/sleep 100\n") + if err != nil { + t.Fatalf("Unexpected error encountered creating unit: %v", err) + } + gotHash := u.Hash() + + expectHashString := "1c6fb6f3684bafb0c173d8b8b957ceff031180c1" + rehashed, err := HashFromHexString(expectHashString) + if err != nil { + t.Fatalf("HashFromHexString failed with: %v", err) + } + if rehashed != gotHash { + t.Fatalf("HashFromHexString not equal to original hash") + } +} + +func TestRecognizedUnitTypes(t *testing.T) { + tts := []struct { + name string + ok bool + }{ + {"foo.service", true}, + {"foo.socket", true}, + {"foo.path", true}, + {"foo.timer", true}, + {"foo.mount", true}, + {"foo.automount", true}, + {"foo.device", true}, + {"foo.swap", false}, + {"foo.target", false}, + {"foo.snapshot", false}, + {"foo.network", false}, + {"foo.netdev", false}, + {"foo.link", false}, + {"foo.unknown", false}, + } + + for _, tt := range tts { + ok := RecognizedUnitType(tt.name) + if ok != tt.ok { + t.Errorf("Case failed: name=%s expect=%t result=%t", tt.name, tt.ok, ok) + } + } +} + +func TestDefaultUnitType(t *testing.T) { + tts := []struct { + name string + out string + }{ + {"foo", "foo.service"}, + {"foo.service", "foo.service.service"}, + {"foo.link", "foo.link.service"}, + } + + for _, tt := range tts { + out := DefaultUnitType(tt.name) + if out != tt.out { + t.Errorf("Case failed: name=%s expect=%s result=%s", tt.name, tt.out, out) + } + } +} + +func TestNewUnitState(t *testing.T) { + want := &UnitState{ + LoadState: "ls", + ActiveState: "as", + SubState: "ss", + MachineID: "id", + } + + got := NewUnitState("ls", "as", "ss", "id") + if !reflect.DeepEqual(got, want) { + t.Fatalf("NewUnitState did not create a correct UnitState: got %s, want %s", got, want) + } + +} + +func TestNamedUnit(t *testing.T) { + tts := []struct { + fname string + name string + pref string + tmpl string + inst string + isinst bool + istmpl bool + }{ + {"foo.service", "foo", "foo", "", "", false, false}, + {"foo@.service", "foo@", "foo", "foo@.service", "", false, true}, + {"foo@bar.service", "foo@bar", "foo", "foo@.service", "bar", true, false}, + {"foo@bar@baz.service", "foo@bar@baz", "foo", "foo@.service", "bar@baz", true, false}, + {"foo.1@.service", "foo.1@", "foo.1", "foo.1@.service", "", false, true}, + {"foo.1@2.service", "foo.1@2", "foo.1", "foo.1@.service", "2", true, false}, + {"ssh@.socket", "ssh@", "ssh", "ssh@.socket", "", false, true}, + {"ssh@1.socket", "ssh@1", "ssh", "ssh@.socket", "1", true, false}, + } + for _, tt := range tts { + u := NewUnitNameInfo(tt.fname) + if u == nil { + t.Errorf("NewUnitNameInfo(%s) returned nil InstanceUnit!", tt.name) + continue + } + if u.FullName != tt.fname { + t.Errorf("NewUnitNameInfo(%s) returned bad fullname: got %s, want %s", tt.name, u.FullName, tt.fname) + } + if u.Name != tt.name { + t.Errorf("NewUnitNameInfo(%s) returned bad name: got %s, want %s", tt.name, u.Name, tt.name) + } + if u.Template != tt.tmpl { + t.Errorf("NewUnitNameInfo(%s) returned bad template name: got %s, want %s", tt.name, u.Template, tt.tmpl) + } + if u.Prefix != tt.pref { + t.Errorf("NewUnitNameInfo(%s) returned bad prefix name: got %s, want %s", tt.name, u.Prefix, tt.pref) + } + if u.Instance != tt.inst { + t.Errorf("NewUnitNameInfo(%s) returned bad instance name: got %s, want %s", tt.name, u.Instance, tt.inst) + } + i := u.IsInstance() + if i != tt.isinst { + t.Errorf("NewUnitNameInfo(%s).IsInstance returned %t, want %t", tt.name, i, tt.isinst) + } + i = u.IsTemplate() + if i != tt.istmpl { + t.Errorf("NewUnitNameInfo(%s).IsTemplate returned %t, want %t", tt.name, i, tt.istmpl) + } + } + + bad := []string{"foo", "bar@baz"} + for _, tt := range bad { + if NewUnitNameInfo(tt) != nil { + t.Errorf("NewUnitNameInfo returned non-nil InstanceUnit unexpectedly") + } + } + +} + +func TestDeserialize(t *testing.T) { + contents := ` +This=Ignored +[Unit] +;ignore this guy +Description = Foo + +[Service] +ExecStart=echo "ping"; +ExecStop=echo "pong" +# ignore me, too +ExecStop=echo post + +[X-Fleet] +MachineMetadata=foo=bar +MachineMetadata=baz=qux +` + + expected := map[string]map[string][]string{ + "Unit": { + "Description": {"Foo"}, + }, + "Service": { + "ExecStart": {`echo "ping";`}, + "ExecStop": {`echo "pong"`, "echo post"}, + }, + "X-Fleet": { + "MachineMetadata": {"foo=bar", "baz=qux"}, + }, + } + + unitFile, err := NewUnitFile(contents) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) + } + + if !reflect.DeepEqual(expected, unitFile.Contents) { + t.Fatalf("Map func did not produce expected output.\nActual=%v\nExpected=%v", unitFile.Contents, expected) + } +} + +func TestDeserializedUnitGarbage(t *testing.T) { + contents := ` +>>>>>>>>>>>>> +[Service] +ExecStart=jim +# As long as a line has an equals sign, systemd is happy, so we should pass it through +<<<<<<<<<<<=bar +` + expected := map[string]map[string][]string{ + "Service": { + "ExecStart": {"jim"}, + "<<<<<<<<<<<": {"bar"}, + }, + } + unitFile, err := NewUnitFile(contents) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) + } + + if !reflect.DeepEqual(expected, unitFile.Contents) { + t.Fatalf("Map func did not produce expected output.\nActual=%v\nExpected=%v", unitFile.Contents, expected) + } +} + +func TestDeserializeEscapedMultilines(t *testing.T) { + contents := ` +[Service] +ExecStart=echo \ + "pi\ + ng" +ExecStop=\ +echo "po\ +ng" +# comments within continuation should not be ignored +ExecStopPre=echo\ +#pang +ExecStopPost=echo\ +#peng\ +pung +` + expected := map[string]map[string][]string{ + "Service": { + "ExecStart": {`echo "pi ng"`}, + "ExecStop": {`echo "po ng"`}, + "ExecStopPre": {`echo #pang`}, + "ExecStopPost": {`echo #peng pung`}, + }, + } + unitFile, err := NewUnitFile(contents) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) + } + + if !reflect.DeepEqual(expected, unitFile.Contents) { + t.Fatalf("Map func did not produce expected output.\nActual=%v\nExpected=%v", unitFile.Contents, expected) + } +} + +func TestSerializeDeserialize(t *testing.T) { + contents := ` +[Unit] +Description = Foo +` + deserialized, err := NewUnitFile(contents) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) + } + section := deserialized.Contents["Unit"] + if val, ok := section["Description"]; !ok || val[0] != "Foo" { + t.Errorf("Failed to persist data through serialize/deserialize: %v", val) + } + + serialized := deserialized.String() + deserialized, err = NewUnitFile(serialized) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", serialized, err) + } + + section = deserialized.Contents["Unit"] + if val, ok := section["Description"]; !ok || val[0] != "Foo" { + t.Errorf("Failed to persist data through serialize/deserialize: %v", val) + } +} + +func TestDescription(t *testing.T) { + contents := ` +[Unit] +Description = Foo + +[Service] +ExecStart=echo "ping"; +ExecStop=echo "pong"; +` + + unitFile, err := NewUnitFile(contents) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) + } + if unitFile.Description() != "Foo" { + t.Fatalf("Unit.Description is incorrect") + } +} + +func TestDescriptionNotDefined(t *testing.T) { + contents := ` +[Unit] + +[Service] +ExecStart=echo "ping"; +ExecStop=echo "pong"; +` + + unitFile, err := NewUnitFile(contents) + if err != nil { + t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) + } + if unitFile.Description() != "" { + t.Fatalf("Unit.Description is incorrect") + } +} + +func TestBadUnitsFail(t *testing.T) { + bad := []string{ + ` +[Unit] + +[Service] +<<<<<<<<<<<<<<<< +`, + ` +[Unit] +nonsense upon stilts +`, + } + for _, tt := range bad { + if _, err := NewUnitFile(tt); err == nil { + t.Fatalf("Did not get expected error creating Unit from %q", tt) + } + } +} + +func TestParseMultivalueLine(t *testing.T) { + tests := []struct { + in string + out []string + }{ + {`"bar" "ping" "pong"`, []string{`bar`, `ping`, `pong`}}, + {`"bar"`, []string{`bar`}}, + {``, []string{""}}, + {`""`, []string{``}}, + {`"bar`, []string{`"bar`}}, + {`bar"`, []string{`bar"`}}, + {`foo\"bar`, []string{`foo\"bar`}}, + + { + `"bar" "`, + []string{`bar`, ``}, + //TODO(bcwaldon): should be something like this: + // []string{`bar`}, + }, + + { + `"foo\"bar"`, + []string{`foo\bar`}, + //TODO(bcwaldon): should be something like this: + // []string{`foo\"bar`}, + }, + } + for i, tt := range tests { + out := parseMultivalueLine(tt.in) + if !reflect.DeepEqual(tt.out, out) { + t.Errorf("case %d:, epected %v, got %v", i, tt.out, out) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go new file mode 100644 index 0000000..8a88162 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go @@ -0,0 +1,276 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io" + "strings" + "unicode" +) + +const ( + // SYSTEMD_LINE_MAX mimics the maximum line length that systemd can use. + // On typical systemd platforms (i.e. modern Linux), this will most + // commonly be 2048, so let's use that as a sanity check. + // Technically, we should probably pull this at runtime: + // SYSTEMD_LINE_MAX = int(C.sysconf(C.__SC_LINE_MAX)) + // but this would introduce an (unfortunate) dependency on cgo + SYSTEMD_LINE_MAX = 2048 + + // characters that systemd considers indicate a newline + SYSTEMD_NEWLINE = "\r\n" +) + +var ( + ErrLineTooLong = fmt.Errorf("line too long (max %d bytes)", SYSTEMD_LINE_MAX) +) + +// Deserialize parses a systemd unit file into a list of UnitOption objects. +func Deserialize(f io.Reader) (opts []*UnitOption, err error) { + lexer, optchan, errchan := newLexer(f) + go lexer.lex() + + for opt := range optchan { + opts = append(opts, &(*opt)) + } + + err = <-errchan + return opts, err +} + +func newLexer(f io.Reader) (*lexer, <-chan *UnitOption, <-chan error) { + optchan := make(chan *UnitOption) + errchan := make(chan error, 1) + buf := bufio.NewReader(f) + + return &lexer{buf, optchan, errchan, ""}, optchan, errchan +} + +type lexer struct { + buf *bufio.Reader + optchan chan *UnitOption + errchan chan error + section string +} + +func (l *lexer) lex() { + var err error + defer func() { + close(l.optchan) + close(l.errchan) + }() + next := l.lexNextSection + for next != nil { + if l.buf.Buffered() >= SYSTEMD_LINE_MAX { + // systemd truncates lines longer than LINE_MAX + // https://bugs.freedesktop.org/show_bug.cgi?id=85308 + // Rather than allowing this to pass silently, let's + // explicitly gate people from encountering this + line, err := l.buf.Peek(SYSTEMD_LINE_MAX) + if err != nil { + l.errchan <- err + return + } + if bytes.IndexAny(line, SYSTEMD_NEWLINE) == -1 { + l.errchan <- ErrLineTooLong + return + } + } + + next, err = next() + if err != nil { + l.errchan <- err + return + } + } +} + +type lexStep func() (lexStep, error) + +func (l *lexer) lexSectionName() (lexStep, error) { + sec, err := l.buf.ReadBytes(']') + if err != nil { + return nil, errors.New("unable to find end of section") + } + + return l.lexSectionSuffixFunc(string(sec[:len(sec)-1])), nil +} + +func (l *lexer) lexSectionSuffixFunc(section string) lexStep { + return func() (lexStep, error) { + garbage, _, err := l.toEOL() + if err != nil { + return nil, err + } + + garbage = bytes.TrimSpace(garbage) + if len(garbage) > 0 { + return nil, fmt.Errorf("found garbage after section name %s: %v", l.section, garbage) + } + + return l.lexNextSectionOrOptionFunc(section), nil + } +} + +func (l *lexer) ignoreLineFunc(next lexStep) lexStep { + return func() (lexStep, error) { + for { + line, _, err := l.toEOL() + if err != nil { + return nil, err + } + + line = bytes.TrimSuffix(line, []byte{' '}) + + // lack of continuation means this line has been exhausted + if !bytes.HasSuffix(line, []byte{'\\'}) { + break + } + } + + // reached end of buffer, safe to exit + return next, nil + } +} + +func (l *lexer) lexNextSection() (lexStep, error) { + r, _, err := l.buf.ReadRune() + if err != nil { + if err == io.EOF { + err = nil + } + return nil, err + } + + if r == '[' { + return l.lexSectionName, nil + } else if isComment(r) { + return l.ignoreLineFunc(l.lexNextSection), nil + } + + return l.lexNextSection, nil +} + +func (l *lexer) lexNextSectionOrOptionFunc(section string) lexStep { + return func() (lexStep, error) { + r, _, err := l.buf.ReadRune() + if err != nil { + if err == io.EOF { + err = nil + } + return nil, err + } + + if unicode.IsSpace(r) { + return l.lexNextSectionOrOptionFunc(section), nil + } else if r == '[' { + return l.lexSectionName, nil + } else if isComment(r) { + return l.ignoreLineFunc(l.lexNextSectionOrOptionFunc(section)), nil + } + + l.buf.UnreadRune() + return l.lexOptionNameFunc(section), nil + } +} + +func (l *lexer) lexOptionNameFunc(section string) lexStep { + return func() (lexStep, error) { + var partial bytes.Buffer + for { + r, _, err := l.buf.ReadRune() + if err != nil { + return nil, err + } + + if r == '\n' || r == '\r' { + return nil, errors.New("unexpected newline encountered while parsing option name") + } + + if r == '=' { + break + } + + partial.WriteRune(r) + } + + name := strings.TrimSpace(partial.String()) + return l.lexOptionValueFunc(section, name, bytes.Buffer{}), nil + } +} + +func (l *lexer) lexOptionValueFunc(section, name string, partial bytes.Buffer) lexStep { + return func() (lexStep, error) { + for { + line, eof, err := l.toEOL() + if err != nil { + return nil, err + } + + if len(bytes.TrimSpace(line)) == 0 { + break + } + + partial.Write(line) + + // lack of continuation means this value has been exhausted + idx := bytes.LastIndex(line, []byte{'\\'}) + if idx == -1 || idx != (len(line)-1) { + break + } + + if !eof { + partial.WriteRune('\n') + } + + return l.lexOptionValueFunc(section, name, partial), nil + } + + val := partial.String() + if strings.HasSuffix(val, "\n") { + // A newline was added to the end, so the file didn't end with a backslash. + // => Keep the newline + val = strings.TrimSpace(val) + "\n" + } else { + val = strings.TrimSpace(val) + } + l.optchan <- &UnitOption{Section: section, Name: name, Value: val} + + return l.lexNextSectionOrOptionFunc(section), nil + } +} + +// toEOL reads until the end-of-line or end-of-file. +// Returns (data, EOFfound, error) +func (l *lexer) toEOL() ([]byte, bool, error) { + line, err := l.buf.ReadBytes('\n') + // ignore EOF here since it's roughly equivalent to EOL + if err != nil && err != io.EOF { + return nil, false, err + } + + line = bytes.TrimSuffix(line, []byte{'\r'}) + line = bytes.TrimSuffix(line, []byte{'\n'}) + + return line, err == io.EOF, nil +} + +func isComment(r rune) bool { + return r == '#' || r == ';' +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go new file mode 100644 index 0000000..84b7169 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go @@ -0,0 +1,381 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "bytes" + "fmt" + "reflect" + "testing" +) + +func TestDeserialize(t *testing.T) { + tests := []struct { + input []byte + output []*UnitOption + }{ + // multiple options underneath a section + { + []byte(`[Unit] +Description=Foo +Description=Bar +Requires=baz.service +After=baz.service +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Unit", "Description", "Bar"}, + &UnitOption{"Unit", "Requires", "baz.service"}, + &UnitOption{"Unit", "After", "baz.service"}, + }, + }, + + // multiple sections + { + []byte(`[Unit] +Description=Foo + +[Service] +ExecStart=/usr/bin/sleep infinity + +[X-Third-Party] +Pants=on + +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, + &UnitOption{"X-Third-Party", "Pants", "on"}, + }, + }, + + // multiple sections with no options + { + []byte(`[Unit] +[Service] +[X-Third-Party] +`), + []*UnitOption{}, + }, + + // multiple values not special-cased + { + []byte(`[Service] +Environment= "FOO=BAR" "BAZ=QUX" +`), + []*UnitOption{ + &UnitOption{"Service", "Environment", "\"FOO=BAR\" \"BAZ=QUX\""}, + }, + }, + + // line continuations unmodified + { + []byte(`[Unit] +Description= Unnecessarily wrapped \ + words here +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", `Unnecessarily wrapped \ + words here`}, + }, + }, + + // comments ignored + { + []byte(`; comment alpha +# comment bravo +[Unit] +; comment charlie +# comment delta +#Description=Foo +Description=Bar +; comment echo +# comment foxtrot +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Bar"}, + }, + }, + + // apparent comment lines inside of line continuations not ignored + { + []byte(`[Unit] +Description=Bar\ +# comment alpha + +Description=Bar\ +# comment bravo \ +Baz +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Bar\\\n# comment alpha"}, + &UnitOption{"Unit", "Description", "Bar\\\n# comment bravo \\\nBaz"}, + }, + }, + + // options outside of sections are ignored + { + []byte(`Description=Foo +[Unit] +Description=Bar +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Bar"}, + }, + }, + + // garbage outside of sections are ignored + { + []byte(`<<<<<<<< +[Unit] +Description=Bar +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Bar"}, + }, + }, + + // garbage used as unit option + { + []byte(`[Unit] +<<<<<<<<=Bar +`), + []*UnitOption{ + &UnitOption{"Unit", "<<<<<<<<", "Bar"}, + }, + }, + + // option name with spaces are valid + { + []byte(`[Unit] +Some Thing = Bar +`), + []*UnitOption{ + &UnitOption{"Unit", "Some Thing", "Bar"}, + }, + }, + + // lack of trailing newline doesn't cause problem for non-continued file + { + []byte(`[Unit] +Description=Bar`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Bar"}, + }, + }, + + // unit file with continuation but no following line is ok, too + { + []byte(`[Unit] +Description=Bar \`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "Bar \\"}, + }, + }, + + // Assert utf8 characters are preserved + { + []byte(`[©] +µ☃=ÇôrèÕ$`), + []*UnitOption{ + &UnitOption{"©", "µ☃", "ÇôrèÕ$"}, + }, + }, + + // whitespace removed around option name + { + []byte(`[Unit] + Description =words here +`), + []*UnitOption{ + &UnitOption{"Unit", "Description", "words here"}, + }, + }, + + // whitespace around option value stripped + { + []byte(`[Unit] +Description= words here `), + []*UnitOption{ + &UnitOption{"Unit", "Description", "words here"}, + }, + }, + + // whitespace around option value stripped, regardless of continuation + { + []byte(`[Unit] +Description= words here \ + `), + []*UnitOption{ + &UnitOption{"Unit", "Description", "words here \\\n"}, + }, + }, + + // backslash not considered continuation if followed by text + { + []byte(`[Service] +ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" +`), + []*UnitOption{ + &UnitOption{"Service", "ExecStart", `/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"`}, + }, + }, + + // backslash not considered continuation if followed by whitespace, but still trimmed + { + []byte(`[Service] +ExecStart=/bin/bash echo poof \ `), + []*UnitOption{ + &UnitOption{"Service", "ExecStart", `/bin/bash echo poof \`}, + }, + }, + // a long unit file line that's just equal to the maximum permitted length + { + []byte(`[Service] +ExecStart=/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`), + []*UnitOption{ + &UnitOption{"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, + }, + }, + // the same, but with a trailing newline + { + []byte(`[Service] +ExecStart=/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................." +Option=value +`), + []*UnitOption{ + &UnitOption{"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, + &UnitOption{"Service", "Option", "value"}, + }, + }, + } + + assert := func(expect, output []*UnitOption) error { + if len(expect) != len(output) { + return fmt.Errorf("expected %d items, got %d", len(expect), len(output)) + } + + for i, _ := range expect { + if !reflect.DeepEqual(expect[i], output[i]) { + return fmt.Errorf("item %d: expected %v, got %v", i, expect[i], output[i]) + } + } + + return nil + } + + for i, tt := range tests { + output, err := Deserialize(bytes.NewReader(tt.input)) + if err != nil { + t.Errorf("case %d: unexpected error parsing unit: %v", i, err) + continue + } + + err = assert(tt.output, output) + if err != nil { + t.Errorf("case %d: %v", i, err) + t.Log("Expected options:") + logUnitOptionSlice(t, tt.output) + t.Log("Actual options:") + logUnitOptionSlice(t, output) + } + } +} + +func TestDeserializeFail(t *testing.T) { + tests := [][]byte{ + // malformed section header + []byte(`[Unit +Description=Foo +`), + + // garbage following section header + []byte(`[Unit] pants +Description=Foo +`), + + // option without value + []byte(`[Unit] +Description +`), + + // garbage inside of section + []byte(`[Unit] +<<<<<< +Description=Foo +`), + } + + for i, tt := range tests { + output, err := Deserialize(bytes.NewReader(tt)) + if err == nil { + t.Errorf("case %d: unexpected nil error", i) + t.Log("Output:") + logUnitOptionSlice(t, output) + } + } +} + +func logUnitOptionSlice(t *testing.T, opts []*UnitOption) { + for idx, opt := range opts { + t.Logf("%d: %v", idx, opt) + } +} + +func TestDeserializeLineTooLong(t *testing.T) { + tests := [][]byte{ + // section header that's far too long + []byte(`[Seeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeervice] +`), + // sane-looking unit file with a line just greater than the maximum allowed (currently, 2048) + []byte(`[Service] +ExecStart=/bin/bash -c "echo ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................." +`), + // sane-looking unit file with option value way too long + []byte(` +# test unit file + +[Service] +ExecStartPre=-/usr/bin/docker rm %p +ExecStartPre=-/usr/bin/docker pull busybox +ExecStart=/usr/bin/docker run --rm --name %p --net=host \ + -e "test=1123t" \ + -e "test=1123t" \ + -e "fiz=1123t" \ + -e "buz=1123t" \ + -e "FOO=BARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBABARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARRBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBAR"BARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBABARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARRBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBAR" \ + busybox sleep 10 +ExecStop=-/usr/bin/docker kill %p +SyslogIdentifier=busybox +Restart=always +RestartSec=10s +`), + // single arbitrary line that's way too long + []byte(`arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters`), + // sane-looking unit file with option name way too long + []byte(`[Service] +ExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStart=/bin/true +`), + } + + for i, tt := range tests { + output, err := Deserialize(bytes.NewReader(tt)) + if err != ErrLineTooLong { + t.Errorf("case %d: unexpected err: %v", i, err) + t.Log("Output:") + logUnitOptionSlice(t, output) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go new file mode 100644 index 0000000..7182327 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go @@ -0,0 +1,88 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "bytes" + "io/ioutil" + "testing" +) + +func TestDeserializeAndReserialize(t *testing.T) { + tests := []struct { + in string + wout string + }{ + { + `[Service] +ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" +`, + `[Service] +ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" +`}, + { + `[Unit] +Description= Unnecessarily wrapped \ + words here`, + `[Unit] +Description=Unnecessarily wrapped \ + words here +`, + }, + { + `[Unit] +Description=Demo \ + +Requires=docker.service +`, + `[Unit] +Description=Demo \ + +Requires=docker.service +`, + }, + { + `; comment alpha +# comment bravo +[Unit] +; comment charlie +# comment delta +#Description=Foo +Description=Bar +; comment echo +# comment foxtrot +`, + `[Unit] +Description=Bar +`}, + } + for i, tt := range tests { + ds, err := Deserialize(bytes.NewBufferString(tt.in)) + if err != nil { + t.Errorf("case %d: unexpected error parsing unit: %v", i, err) + continue + } + out, err := ioutil.ReadAll(Serialize(ds)) + if err != nil { + t.Errorf("case %d: unexpected error serializing unit: %v", i, err) + continue + } + if g := string(out); g != tt.wout { + t.Errorf("case %d: incorrect output", i) + t.Logf("Expected:\n%#v", tt.wout) + t.Logf("Actual:\n%#v", g) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go new file mode 100644 index 0000000..63b1172 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go @@ -0,0 +1,116 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Implements systemd-escape [--unescape] [--path] + +package unit + +import ( + "fmt" + "strconv" + "strings" +) + +const ( + allowed = `:_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789` +) + +// If isPath is true: +// We remove redundant '/'s, the leading '/', and trailing '/'. +// If the result is empty, a '/' is inserted. +// +// We always: +// Replace the following characters with `\x%x`: +// Leading `.` +// `-`, `\`, and anything not in this set: `:-_.\[0-9a-zA-Z]` +// Replace '/' with '-'. +func escape(unescaped string, isPath bool) string { + e := []byte{} + inSlashes := false + start := true + for i := 0; i < len(unescaped); i++ { + c := unescaped[i] + if isPath { + if c == '/' { + inSlashes = true + continue + } else if inSlashes { + inSlashes = false + if !start { + e = append(e, '-') + } + } + } + + if c == '/' { + e = append(e, '-') + } else if start && c == '.' || strings.IndexByte(allowed, c) == -1 { + e = append(e, []byte(fmt.Sprintf(`\x%x`, c))...) + } else { + e = append(e, c) + } + start = false + } + if isPath && len(e) == 0 { + e = append(e, '-') + } + return string(e) +} + +// If isPath is true: +// We always return a string beginning with '/'. +// +// We always: +// Replace '-' with '/'. +// Replace `\x%x` with the value represented in hex. +func unescape(escaped string, isPath bool) string { + u := []byte{} + for i := 0; i < len(escaped); i++ { + c := escaped[i] + if c == '-' { + c = '/' + } else if c == '\\' && len(escaped)-i >= 4 && escaped[i+1] == 'x' { + n, err := strconv.ParseInt(escaped[i+2:i+4], 16, 8) + if err == nil { + c = byte(n) + i += 3 + } + } + u = append(u, c) + } + if isPath && (len(u) == 0 || u[0] != '/') { + u = append([]byte("/"), u...) + } + return string(u) +} + +// UnitNameEscape escapes a string as `systemd-escape` would +func UnitNameEscape(unescaped string) string { + return escape(unescaped, false) +} + +// UnitNameUnescape unescapes a string as `systemd-escape --unescape` would +func UnitNameUnescape(escaped string) string { + return unescape(escaped, false) +} + +// UnitNamePathEscape escapes a string as `systemd-escape --path` would +func UnitNamePathEscape(unescaped string) string { + return escape(unescaped, true) +} + +// UnitNamePathUnescape unescapes a string as `systemd-escape --path --unescape` would +func UnitNamePathUnescape(escaped string) string { + return unescape(escaped, true) +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go new file mode 100644 index 0000000..36b1a7d --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go @@ -0,0 +1,211 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "testing" +) + +func TestUnitNameEscape(t *testing.T) { + tests := []struct { + in string + out string + isPath bool + }{ + // turn empty string path into escaped / + { + in: "", + out: "-", + isPath: true, + }, + // turn redundant ////s into single escaped / + { + in: "/////////", + out: "-", + isPath: true, + }, + // remove all redundant ////s + { + in: "///foo////bar/////tail//////", + out: "foo-bar-tail", + isPath: true, + }, + // leave empty string empty + { + in: "", + out: "", + isPath: false, + }, + // escape leading dot + { + in: ".", + out: `\x2e`, + isPath: true, + }, + // escape leading dot + { + in: "/.", + out: `\x2e`, + isPath: true, + }, + // escape leading dot + { + in: "/////////.", + out: `\x2e`, + isPath: true, + }, + // escape leading dot + { + in: "/////////.///////////////", + out: `\x2e`, + isPath: true, + }, + // escape leading dot + { + in: ".....", + out: `\x2e....`, + isPath: true, + }, + // escape leading dot + { + in: "/.foo/.bar", + out: `\x2efoo-.bar`, + isPath: true, + }, + // escape leading dot + { + in: ".foo/.bar", + out: `\x2efoo-.bar`, + isPath: true, + }, + // escape leading dot + { + in: ".foo/.bar", + out: `\x2efoo-.bar`, + isPath: false, + }, + // escape disallowed + { + in: `///..\-!#??///`, + out: `---..\x5c\x2d\x21\x23\x3f\x3f---`, + isPath: false, + }, + // escape disallowed + { + in: `///..\-!#??///`, + out: `\x2e.\x5c\x2d\x21\x23\x3f\x3f`, + isPath: true, + }, + // escape real-world example + { + in: `user-cloudinit@/var/lib/coreos/vagrant/vagrantfile-user-data.service`, + out: `user\x2dcloudinit\x40-var-lib-coreos-vagrant-vagrantfile\x2duser\x2ddata.service`, + isPath: false, + }, + } + + for i, tt := range tests { + var s string + if tt.isPath { + s = UnitNamePathEscape(tt.in) + } else { + s = UnitNameEscape(tt.in) + } + if s != tt.out { + t.Errorf("case %d: failed escaping %v isPath: %v - expected %v, got %v", i, tt.in, tt.isPath, tt.out, s) + } + } +} + +func TestUnitNameUnescape(t *testing.T) { + tests := []struct { + in string + out string + isPath bool + }{ + // turn empty string path into / + { + in: "", + out: "/", + isPath: true, + }, + // leave empty string empty + { + in: "", + out: "", + isPath: false, + }, + // turn ////s into + { + in: "---------", + out: "/////////", + isPath: true, + }, + // unescape hex + { + in: `---..\x5c\x2d\x21\x23\x3f\x3f---`, + out: `///..\-!#??///`, + isPath: false, + }, + // unescape hex + { + in: `\x2e.\x5c\x2d\x21\x23\x3f\x3f`, + out: `/..\-!#??`, + isPath: true, + }, + // unescape hex, retain invalids + { + in: `\x2e.\x5c\x2d\xaZ\x.o\x21\x23\x3f\x3f`, + out: `/..\-\xaZ\x.o!#??`, + isPath: true, + }, + // unescape hex, retain invalids, partial tail + { + in: `\x2e.\x5c\x\x2d\xaZ\x.o\x21\x23\x3f\x3f\x3`, + out: `/..\\x-\xaZ\x.o!#??\x3`, + isPath: true, + }, + // unescape hex, retain invalids, partial tail + { + in: `\x2e.\x5c\x\x2d\xaZ\x.o\x21\x23\x3f\x3f\x`, + out: `/..\\x-\xaZ\x.o!#??\x`, + isPath: true, + }, + // unescape hex, retain invalids, partial tail + { + in: `\x2e.\x5c\x\x2d\xaZ\x.o\x21\x23\x3f\x3f\`, + out: `/..\\x-\xaZ\x.o!#??\`, + isPath: true, + }, + // unescape real-world example + { + in: `user\x2dcloudinit\x40-var-lib-coreos-vagrant-vagrantfile\x2duser\x2ddata.service`, + out: `user-cloudinit@/var/lib/coreos/vagrant/vagrantfile-user-data.service`, + isPath: false, + }, + } + + for i, tt := range tests { + var s string + if tt.isPath { + s = UnitNamePathUnescape(tt.in) + } else { + s = UnitNameUnescape(tt.in) + } + if s != tt.out { + t.Errorf("case %d: failed unescaping %v isPath: %v - expected %v, got %v", i, tt.in, tt.isPath, tt.out, s) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go new file mode 100644 index 0000000..e5d21e1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go @@ -0,0 +1,54 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "fmt" +) + +type UnitOption struct { + Section string + Name string + Value string +} + +func NewUnitOption(section, name, value string) *UnitOption { + return &UnitOption{Section: section, Name: name, Value: value} +} + +func (uo *UnitOption) String() string { + return fmt.Sprintf("{Section: %q, Name: %q, Value: %q}", uo.Section, uo.Name, uo.Value) +} + +func (uo *UnitOption) Match(other *UnitOption) bool { + return uo.Section == other.Section && + uo.Name == other.Name && + uo.Value == other.Value +} + +func AllMatch(u1 []*UnitOption, u2 []*UnitOption) bool { + length := len(u1) + if length != len(u2) { + return false + } + + for i := 0; i < length; i++ { + if !u1[i].Match(u2[i]) { + return false + } + } + + return true +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go new file mode 100644 index 0000000..0765f03 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go @@ -0,0 +1,214 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "testing" +) + +func TestAllMatch(t *testing.T) { + tests := []struct { + u1 []*UnitOption + u2 []*UnitOption + match bool + }{ + // empty lists match + { + u1: []*UnitOption{}, + u2: []*UnitOption{}, + match: true, + }, + + // simple match of a single option + { + u1: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + }, + u2: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + }, + match: true, + }, + + // single option mismatched + { + u1: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + }, + u2: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "BAR"}, + }, + match: false, + }, + + // multiple options match + { + u1: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + }, + u2: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + }, + match: true, + }, + + // mismatch length + { + u1: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, + }, + u2: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + }, + match: false, + }, + + // multiple options misordered + { + u1: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + }, + u2: []*UnitOption{ + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + {Section: "Unit", Name: "Description", Value: "FOO"}, + }, + match: false, + }, + + // interleaved sections mismatch + { + u1: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + {Section: "Service", Name: "ExecStop", Value: "/bin/true"}, + }, + u2: []*UnitOption{ + {Section: "Unit", Name: "Description", Value: "FOO"}, + {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, + {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, + {Section: "Service", Name: "ExecStop", Value: "/bin/true"}, + }, + match: false, + }, + } + + for i, tt := range tests { + match := AllMatch(tt.u1, tt.u2) + if match != tt.match { + t.Errorf("case %d: failed comparing u1 to u2 - expected match=%t, got %t", i, tt.match, match) + } + + match = AllMatch(tt.u2, tt.u1) + if match != tt.match { + t.Errorf("case %d: failed comparing u2 to u1 - expected match=%t, got %t", i, tt.match, match) + } + } +} + +func TestMatch(t *testing.T) { + tests := []struct { + o1 *UnitOption + o2 *UnitOption + match bool + }{ + // empty options match + { + o1: &UnitOption{}, + o2: &UnitOption{}, + match: true, + }, + + // all fields match + { + o1: &UnitOption{ + Section: "Unit", + Name: "Description", + Value: "FOO", + }, + o2: &UnitOption{ + Section: "Unit", + Name: "Description", + Value: "FOO", + }, + match: true, + }, + + // Section mismatch + { + o1: &UnitOption{ + Section: "Unit", + Name: "Description", + Value: "FOO", + }, + o2: &UnitOption{ + Section: "X-Other", + Name: "Description", + Value: "FOO", + }, + match: false, + }, + + // Name mismatch + { + o1: &UnitOption{ + Section: "Unit", + Name: "Description", + Value: "FOO", + }, + o2: &UnitOption{ + Section: "Unit", + Name: "BindsTo", + Value: "FOO", + }, + match: false, + }, + + // Value mismatch + { + o1: &UnitOption{ + Section: "Unit", + Name: "Description", + Value: "FOO", + }, + o2: &UnitOption{ + Section: "Unit", + Name: "Description", + Value: "BAR", + }, + match: false, + }, + } + + for i, tt := range tests { + match := tt.o1.Match(tt.o2) + if match != tt.match { + t.Errorf("case %d: failed comparing o1 to o2 - expected match=%t, got %t", i, tt.match, match) + } + + match = tt.o2.Match(tt.o1) + if match != tt.match { + t.Errorf("case %d: failed comparing o2 to o1 - expected match=%t, got %t", i, tt.match, match) + } + } +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go new file mode 100644 index 0000000..e07799c --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go @@ -0,0 +1,75 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "bytes" + "io" +) + +// Serialize encodes all of the given UnitOption objects into a +// unit file. When serialized the options are sorted in their +// supplied order but grouped by section. +func Serialize(opts []*UnitOption) io.Reader { + var buf bytes.Buffer + + if len(opts) == 0 { + return &buf + } + + // Index of sections -> ordered options + idx := map[string][]*UnitOption{} + // Separately preserve order in which sections were seen + sections := []string{} + for _, opt := range opts { + sec := opt.Section + if _, ok := idx[sec]; !ok { + sections = append(sections, sec) + } + idx[sec] = append(idx[sec], opt) + } + + for i, sect := range sections { + writeSectionHeader(&buf, sect) + writeNewline(&buf) + + opts := idx[sect] + for _, opt := range opts { + writeOption(&buf, opt) + writeNewline(&buf) + } + if i < len(sections)-1 { + writeNewline(&buf) + } + } + + return &buf +} + +func writeNewline(buf *bytes.Buffer) { + buf.WriteRune('\n') +} + +func writeSectionHeader(buf *bytes.Buffer, section string) { + buf.WriteRune('[') + buf.WriteString(section) + buf.WriteRune(']') +} + +func writeOption(buf *bytes.Buffer, opt *UnitOption) { + buf.WriteString(opt.Name) + buf.WriteRune('=') + buf.WriteString(opt.Value) +} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go new file mode 100644 index 0000000..bd492b0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go @@ -0,0 +1,170 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package unit + +import ( + "io/ioutil" + "testing" +) + +func TestSerialize(t *testing.T) { + tests := []struct { + input []*UnitOption + output string + }{ + // no options results in empty file + { + []*UnitOption{}, + ``, + }, + + // options with same section share the header + { + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Unit", "BindsTo", "bar.service"}, + }, + `[Unit] +Description=Foo +BindsTo=bar.service +`, + }, + + // options with same name are not combined + { + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Unit", "Description", "Bar"}, + }, + `[Unit] +Description=Foo +Description=Bar +`, + }, + + // multiple options printed under different section headers + { + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, + }, + `[Unit] +Description=Foo + +[Service] +ExecStart=/usr/bin/sleep infinity +`, + }, + + // options are grouped into sections + { + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, + &UnitOption{"Unit", "BindsTo", "bar.service"}, + }, + `[Unit] +Description=Foo +BindsTo=bar.service + +[Service] +ExecStart=/usr/bin/sleep infinity +`, + }, + + // options are ordered within groups, and sections are ordered in the order in which they were first seen + { + []*UnitOption{ + &UnitOption{"Unit", "Description", "Foo"}, + &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, + &UnitOption{"Unit", "BindsTo", "bar.service"}, + &UnitOption{"X-Foo", "Bar", "baz"}, + &UnitOption{"Service", "ExecStop", "/usr/bin/sleep 1"}, + &UnitOption{"Unit", "Documentation", "https://foo.com"}, + }, + `[Unit] +Description=Foo +BindsTo=bar.service +Documentation=https://foo.com + +[Service] +ExecStart=/usr/bin/sleep infinity +ExecStop=/usr/bin/sleep 1 + +[X-Foo] +Bar=baz +`, + }, + + // utf8 characters are not a problem + { + []*UnitOption{ + &UnitOption{"©", "µ☃", "ÇôrèÕ$"}, + }, + `[©] +µ☃=ÇôrèÕ$ +`, + }, + + // no verification is done on section names + { + []*UnitOption{ + &UnitOption{"Un\nit", "Description", "Foo"}, + }, + `[Un +it] +Description=Foo +`, + }, + + // no verification is done on option names + { + []*UnitOption{ + &UnitOption{"Unit", "Desc\nription", "Foo"}, + }, + `[Unit] +Desc +ription=Foo +`, + }, + + // no verification is done on option values + { + []*UnitOption{ + &UnitOption{"Unit", "Description", "Fo\no"}, + }, + `[Unit] +Description=Fo +o +`, + }, + } + + for i, tt := range tests { + outReader := Serialize(tt.input) + outBytes, err := ioutil.ReadAll(outReader) + if err != nil { + t.Errorf("case %d: encountered error while reading output: %v", i, err) + continue + } + + output := string(outBytes) + if tt.output != output { + t.Errorf("case %d: incorrect output", i) + t.Logf("Expected:\n%s", tt.output) + t.Logf("Actual:\n%s", output) + } + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go new file mode 100644 index 0000000..e073fae --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go @@ -0,0 +1,87 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Get information about the cloud provider (if any) cAdvisor is running on. + +package cloudinfo + +import ( + info "github.com/google/cadvisor/info/v1" +) + +type CloudInfo interface { + GetCloudProvider() info.CloudProvider + GetInstanceType() info.InstanceType +} + +type realCloudInfo struct { + cloudProvider info.CloudProvider + instanceType info.InstanceType +} + +func NewRealCloudInfo() CloudInfo { + cloudProvider := detectCloudProvider() + instanceType := detectInstanceType(cloudProvider) + return &realCloudInfo{ + cloudProvider: cloudProvider, + instanceType: instanceType, + } +} + +func (self *realCloudInfo) GetCloudProvider() info.CloudProvider { + return self.cloudProvider +} + +func (self *realCloudInfo) GetInstanceType() info.InstanceType { + return self.instanceType +} + +func detectCloudProvider() info.CloudProvider { + switch { + case onGCE(): + return info.GCE + case onAWS(): + return info.AWS + case onBaremetal(): + return info.Baremetal + } + return info.UnkownProvider +} + +func detectInstanceType(cloudProvider info.CloudProvider) info.InstanceType { + switch cloudProvider { + case info.GCE: + return getGceInstanceType() + case info.AWS: + return getAwsInstanceType() + case info.Baremetal: + return info.NoInstance + } + return info.UnknownInstance +} + +//TODO: Implement method. +func onAWS() bool { + return false +} + +//TODO: Implement method. +func getAwsInstanceType() info.InstanceType { + return info.UnknownInstance +} + +//TODO: Implement method. +func onBaremetal() bool { + return false +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go new file mode 100644 index 0000000..496bbab --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go @@ -0,0 +1,36 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cloudinfo + +import ( + "strings" + + info "github.com/google/cadvisor/info/v1" + "google.golang.org/cloud/compute/metadata" +) + +func onGCE() bool { + return metadata.OnGCE() +} + +func getGceInstanceType() info.InstanceType { + machineType, err := metadata.Get("instance/machine-type") + if err != nil { + return info.UnknownInstance + } + + responseParts := strings.Split(machineType, "/") // Extract the instance name from the machine type. + return info.InstanceType(responseParts[len(responseParts)-1]) +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go new file mode 100644 index 0000000..2d0d37d --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go @@ -0,0 +1,45 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package cpuload + +import ( + "fmt" + + "github.com/golang/glog" + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/utils/cpuload/netlink" +) + +type CpuLoadReader interface { + // Start the reader. + Start() error + + // Stop the reader and clean up internal state. + Stop() + + // Retrieve Cpu load for a given group. + // name is the full hierarchical name of the container. + // Path is an absolute filesystem path for a container under CPU cgroup hierarchy. + GetCpuLoad(name string, path string) (info.LoadStats, error) +} + +func New() (CpuLoadReader, error) { + reader, err := netlink.New() + if err != nil { + return nil, fmt.Errorf("failed to create a netlink based cpuload reader: %v", err) + } + glog.Info("Using a netlink-based load reader") + return reader, nil +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go new file mode 100644 index 0000000..7eb2204 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go @@ -0,0 +1,95 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package netlink + +import ( + "bufio" + "bytes" + "encoding/binary" + "os" + "syscall" +) + +type Connection struct { + // netlink socket + fd int + // cache pid to use in every netlink request. + pid uint32 + // sequence number for netlink messages. + seq uint32 + addr syscall.SockaddrNetlink + rbuf *bufio.Reader +} + +// Create and bind a new netlink socket. +func newConnection() (*Connection, error) { + + fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_DGRAM, syscall.NETLINK_GENERIC) + if err != nil { + return nil, err + } + + conn := new(Connection) + conn.fd = fd + conn.seq = 0 + conn.pid = uint32(os.Getpid()) + conn.addr.Family = syscall.AF_NETLINK + conn.rbuf = bufio.NewReader(conn) + err = syscall.Bind(fd, &conn.addr) + if err != nil { + syscall.Close(fd) + return nil, err + } + return conn, err +} + +func (self *Connection) Read(b []byte) (n int, err error) { + n, _, err = syscall.Recvfrom(self.fd, b, 0) + return n, err +} + +func (self *Connection) Write(b []byte) (n int, err error) { + err = syscall.Sendto(self.fd, b, 0, &self.addr) + return len(b), err +} + +func (self *Connection) Close() error { + return syscall.Close(self.fd) +} + +func (self *Connection) WriteMessage(msg syscall.NetlinkMessage) error { + w := bytes.NewBuffer(nil) + msg.Header.Len = uint32(syscall.NLMSG_HDRLEN + len(msg.Data)) + msg.Header.Seq = self.seq + self.seq++ + msg.Header.Pid = self.pid + binary.Write(w, binary.LittleEndian, msg.Header) + _, err := w.Write(msg.Data) + if err != nil { + return err + } + _, err = self.Write(w.Bytes()) + return err +} + +func (self *Connection) ReadMessage() (msg syscall.NetlinkMessage, err error) { + err = binary.Read(self.rbuf, binary.LittleEndian, &msg.Header) + if err != nil { + return msg, err + } + msg.Data = make([]byte, msg.Header.Len-syscall.NLMSG_HDRLEN) + _, err = self.rbuf.Read(msg.Data) + return msg, err +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go new file mode 100644 index 0000000..a45d870 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go @@ -0,0 +1,26 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package netlink + +/* +#include +*/ +import "C" + +type TaskStats C.struct_taskstats + +const ( + __TASKSTATS_CMD_MAX = C.__TASKSTATS_CMD_MAX +) diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go new file mode 100644 index 0000000..42e6086 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go @@ -0,0 +1,40 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "log" + + "github.com/google/cadvisor/utils/cpuload/netlink" +) + +func main() { + n, err := netlink.New() + if err != nil { + log.Printf("Failed to create cpu load util: %s", err) + return + } + defer n.Stop() + + paths := []string{"/sys/fs/cgroup/cpu", "/sys/fs/cgroup/cpu/docker"} + names := []string{"/", "/docker"} + for i, path := range paths { + stats, err := n.GetCpuLoad(names[i], path) + if err != nil { + log.Printf("Error getting cpu load for %q: %s", path, err) + } + log.Printf("Task load for %s: %+v", path, stats) + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go new file mode 100644 index 0000000..7ca05f3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go @@ -0,0 +1,241 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package netlink + +import ( + "bytes" + "encoding/binary" + "fmt" + "syscall" + + info "github.com/google/cadvisor/info/v1" +) + +const ( + // Kernel constants for tasks stats. + genlIdCtrl = syscall.NLMSG_MIN_TYPE // GENL_ID_CTRL + taskstatsGenlName = "TASKSTATS" // TASKSTATS_GENL_NAME + cgroupStatsCmdAttrFd = 0x1 // CGROUPSTATS_CMD_ATTR_FD + ctrlAttrFamilyId = 0x1 // CTRL_ATTR_FAMILY_ID + ctrlAttrFamilyName = 0x2 // CTRL_ATTR_FAMILY_NAME + ctrlCmdGetFamily = 0x3 // CTRL_CMD_GETFAMILY +) + +var ( + // TODO(rjnagal): Verify and fix for other architectures. + Endian = binary.LittleEndian +) + +type genMsghdr struct { + Command uint8 + Version uint8 + Reserved uint16 +} + +type netlinkMessage struct { + Header syscall.NlMsghdr + GenHeader genMsghdr + Data []byte +} + +func (self netlinkMessage) toRawMsg() (rawmsg syscall.NetlinkMessage) { + rawmsg.Header = self.Header + w := bytes.NewBuffer([]byte{}) + binary.Write(w, Endian, self.GenHeader) + w.Write(self.Data) + rawmsg.Data = w.Bytes() + return rawmsg +} + +type loadStatsResp struct { + Header syscall.NlMsghdr + GenHeader genMsghdr + Stats info.LoadStats +} + +// Return required padding to align 'size' to 'alignment'. +func padding(size int, alignment int) int { + unalignedPart := size % alignment + return (alignment - unalignedPart) % alignment +} + +// Get family id for taskstats subsystem. +func getFamilyId(conn *Connection) (uint16, error) { + msg := prepareFamilyMessage() + conn.WriteMessage(msg.toRawMsg()) + + resp, err := conn.ReadMessage() + if err != nil { + return 0, err + } + id, err := parseFamilyResp(resp) + if err != nil { + return 0, err + } + return id, nil +} + +// Append an attribute to the message. +// Adds attribute info (length and type), followed by the data and necessary padding. +// Can be called multiple times to add attributes. Only fixed size and string type +// attributes are handled. We don't need nested attributes for task stats. +func addAttribute(buf *bytes.Buffer, attrType uint16, data interface{}, dataSize int) { + attr := syscall.RtAttr{ + Len: syscall.SizeofRtAttr, + Type: attrType, + } + attr.Len += uint16(dataSize) + binary.Write(buf, Endian, attr) + switch data := data.(type) { + case string: + binary.Write(buf, Endian, []byte(data)) + buf.WriteByte(0) // terminate + default: + binary.Write(buf, Endian, data) + } + for i := 0; i < padding(int(attr.Len), syscall.NLMSG_ALIGNTO); i++ { + buf.WriteByte(0) + } +} + +// Prepares the message and generic headers and appends attributes as data. +func prepareMessage(headerType uint16, cmd uint8, attributes []byte) (msg netlinkMessage) { + msg.Header.Type = headerType + msg.Header.Flags = syscall.NLM_F_REQUEST + msg.GenHeader.Command = cmd + msg.GenHeader.Version = 0x1 + msg.Data = attributes + return msg +} + +// Prepares message to query family id for task stats. +func prepareFamilyMessage() (msg netlinkMessage) { + buf := bytes.NewBuffer([]byte{}) + addAttribute(buf, ctrlAttrFamilyName, taskstatsGenlName, len(taskstatsGenlName)+1) + return prepareMessage(genlIdCtrl, ctrlCmdGetFamily, buf.Bytes()) +} + +// Prepares message to query task stats for a task group. +func prepareCmdMessage(id uint16, cfd uintptr) (msg netlinkMessage) { + buf := bytes.NewBuffer([]byte{}) + addAttribute(buf, cgroupStatsCmdAttrFd, uint32(cfd), 4) + return prepareMessage(id, __TASKSTATS_CMD_MAX+1, buf.Bytes()) +} + +// Extracts returned family id from the response. +func parseFamilyResp(msg syscall.NetlinkMessage) (uint16, error) { + m := new(netlinkMessage) + m.Header = msg.Header + err := verifyHeader(msg) + if err != nil { + return 0, err + } + buf := bytes.NewBuffer(msg.Data) + // extract generic header from data. + err = binary.Read(buf, Endian, &m.GenHeader) + if err != nil { + return 0, err + } + id := uint16(0) + // Extract attributes. kernel reports family name, id, version, etc. + // Scan till we find id. + for buf.Len() > syscall.SizeofRtAttr { + var attr syscall.RtAttr + err = binary.Read(buf, Endian, &attr) + if err != nil { + return 0, err + } + if attr.Type == ctrlAttrFamilyId { + err = binary.Read(buf, Endian, &id) + if err != nil { + return 0, err + } + return id, nil + } + payload := int(attr.Len) - syscall.SizeofRtAttr + skipLen := payload + padding(payload, syscall.SizeofRtAttr) + name := make([]byte, skipLen) + err = binary.Read(buf, Endian, name) + if err != nil { + return 0, err + } + } + return 0, fmt.Errorf("family id not found in the response.") +} + +// Extract task stats from response returned by kernel. +func parseLoadStatsResp(msg syscall.NetlinkMessage) (*loadStatsResp, error) { + m := new(loadStatsResp) + m.Header = msg.Header + err := verifyHeader(msg) + if err != nil { + return m, err + } + buf := bytes.NewBuffer(msg.Data) + // Scan the general header. + err = binary.Read(buf, Endian, &m.GenHeader) + if err != nil { + return m, err + } + // cgroup stats response should have just one attribute. + // Read it directly into the stats structure. + var attr syscall.RtAttr + err = binary.Read(buf, Endian, &attr) + if err != nil { + return m, err + } + err = binary.Read(buf, Endian, &m.Stats) + if err != nil { + return m, err + } + return m, err +} + +// Verify and return any error reported by kernel. +func verifyHeader(msg syscall.NetlinkMessage) error { + switch msg.Header.Type { + case syscall.NLMSG_DONE: + return fmt.Errorf("expected a response, got nil") + case syscall.NLMSG_ERROR: + buf := bytes.NewBuffer(msg.Data) + var errno int32 + binary.Read(buf, Endian, errno) + return fmt.Errorf("netlink request failed with error %s", syscall.Errno(-errno)) + } + return nil +} + +// Get load stats for a task group. +// id: family id for taskstats. +// fd: fd to path to the cgroup directory under cpu hierarchy. +// conn: open netlink connection used to communicate with kernel. +func getLoadStats(id uint16, fd uintptr, conn *Connection) (info.LoadStats, error) { + msg := prepareCmdMessage(id, fd) + err := conn.WriteMessage(msg.toRawMsg()) + if err != nil { + return info.LoadStats{}, err + } + + resp, err := conn.ReadMessage() + if err != nil { + return info.LoadStats{}, err + } + + parsedmsg, err := parseLoadStatsResp(resp) + if err != nil { + return info.LoadStats{}, err + } + return parsedmsg.Stats, nil +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go new file mode 100644 index 0000000..6833765 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go @@ -0,0 +1,78 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package netlink + +import ( + "fmt" + "os" + + "github.com/golang/glog" + info "github.com/google/cadvisor/info/v1" +) + +type NetlinkReader struct { + familyId uint16 + conn *Connection +} + +func New() (*NetlinkReader, error) { + conn, err := newConnection() + if err != nil { + return nil, fmt.Errorf("failed to create a new connection: %s", err) + } + + id, err := getFamilyId(conn) + if err != nil { + return nil, fmt.Errorf("failed to get netlink family id for task stats: %s", err) + } + glog.V(4).Infof("Family id for taskstats: %d", id) + return &NetlinkReader{ + familyId: id, + conn: conn, + }, nil +} + +func (self *NetlinkReader) Stop() { + if self.conn != nil { + self.conn.Close() + } +} + +func (self *NetlinkReader) Start() error { + // We do the start setup for netlink in New(). Nothing to do here. + return nil +} + +// Returns instantaneous number of running tasks in a group. +// Caller can use historical data to calculate cpu load. +// path is an absolute filesystem path for a container under the CPU cgroup hierarchy. +// NOTE: non-hierarchical load is returned. It does not include load for subcontainers. +func (self *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats, error) { + if len(path) == 0 { + return info.LoadStats{}, fmt.Errorf("cgroup path can not be empty!") + } + + cfd, err := os.Open(path) + if err != nil { + return info.LoadStats{}, fmt.Errorf("failed to open cgroup path %s: %q", path, err) + } + + stats, err := getLoadStats(self.familyId, cfd.Fd(), self.conn) + if err != nil { + return info.LoadStats{}, err + } + glog.V(4).Infof("Task stats for %q: %+v", path, stats) + return stats, nil +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go new file mode 100644 index 0000000..d5999a9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go @@ -0,0 +1,44 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package fs + +import ( + "io" + "os" +) + +type osFS struct{} + +func (osFS) Open(name string) (File, error) { return os.Open(name) } +func (osFS) Stat(name string) (os.FileInfo, error) { return os.Stat(name) } + +var fs FileSystem = osFS{} + +type FileSystem interface { + Open(name string) (File, error) +} + +type File interface { + io.ReadWriteCloser +} + +// Useful for tests. Not thread safe. +func ChangeFileSystem(filesystem FileSystem) { + fs = filesystem +} + +func Open(name string) (File, error) { + return fs.Open(name) +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go new file mode 100644 index 0000000..77a3f48 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go @@ -0,0 +1,35 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package mockfs + +import "bytes" + +type FakeFile struct { + bytes.Buffer + Name string +} + +func (self *FakeFile) Close() error { + return nil +} + +func AddTextFile(mockfs *MockFileSystem, name, content string) *FakeFile { + f := &FakeFile{ + Name: name, + Buffer: *bytes.NewBufferString(content), + } + mockfs.EXPECT().Open(name).Return(f, nil).AnyTimes() + return f +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go new file mode 100644 index 0000000..cc3d615 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go @@ -0,0 +1,55 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Automatically generated by MockGen. DO NOT EDIT! +// Source: github.com/google/cadvisor/utils/fs (interfaces: FileSystem) + +package mockfs + +import ( + gomock "github.com/golang/mock/gomock" + fs "github.com/google/cadvisor/utils/fs" +) + +// Mock of FileSystem interface +type MockFileSystem struct { + ctrl *gomock.Controller + recorder *_MockFileSystemRecorder +} + +// Recorder for MockFileSystem (not exported) +type _MockFileSystemRecorder struct { + mock *MockFileSystem +} + +func NewMockFileSystem(ctrl *gomock.Controller) *MockFileSystem { + mock := &MockFileSystem{ctrl: ctrl} + mock.recorder = &_MockFileSystemRecorder{mock} + return mock +} + +func (_m *MockFileSystem) EXPECT() *_MockFileSystemRecorder { + return _m.recorder +} + +func (_m *MockFileSystem) Open(_param0 string) (fs.File, error) { + ret := _m.ctrl.Call(_m, "Open", _param0) + ret0, _ := ret[0].(fs.File) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +func (_mr *_MockFileSystemRecorder) Open(arg0 interface{}) *gomock.Call { + return _mr.mock.ctrl.RecordCall(_mr.mock, "Open", arg0) +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go new file mode 100644 index 0000000..c483b05 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go @@ -0,0 +1,297 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package machine + +import ( + "fmt" + "io/ioutil" + "regexp" + "strconv" + "strings" + + // s390/s390x changes + "runtime" + "syscall" + + "github.com/golang/glog" + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/utils" + "github.com/google/cadvisor/utils/sysfs" + "github.com/google/cadvisor/utils/sysinfo" +) + +// The utils/machine package contains functions that extract machine-level specs. + +var cpuRegExp = regexp.MustCompile("processor\\t*: +([0-9]+)") +var coreRegExp = regexp.MustCompile("core id\\t*: +([0-9]+)") +var nodeRegExp = regexp.MustCompile("physical id\\t*: +([0-9]+)") +var CpuClockSpeedMHz = regexp.MustCompile("cpu MHz\\t*: +([0-9]+.[0-9]+)") +var memoryCapacityRegexp = regexp.MustCompile("MemTotal: *([0-9]+) kB") +var swapCapacityRegexp = regexp.MustCompile("SwapTotal: *([0-9]+) kB") + +// GetClockSpeed returns the CPU clock speed, given a []byte formatted as the /proc/cpuinfo file. +func GetClockSpeed(procInfo []byte) (uint64, error) { + // s390/s390x changes + if true == isSystemZ() { + return 0, nil + } + + // First look through sys to find a max supported cpu frequency. + const maxFreqFile = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" + if utils.FileExists(maxFreqFile) { + val, err := ioutil.ReadFile(maxFreqFile) + if err != nil { + return 0, err + } + var maxFreq uint64 + n, err := fmt.Sscanf(string(val), "%d", &maxFreq) + if err != nil || n != 1 { + return 0, fmt.Errorf("could not parse frequency %q", val) + } + return maxFreq, nil + } + // Fall back to /proc/cpuinfo + matches := CpuClockSpeedMHz.FindSubmatch(procInfo) + if len(matches) != 2 { + //Check if we are running on Power systems which have a different format + CpuClockSpeedMHz, _ = regexp.Compile("clock\\t*: +([0-9]+.[0-9]+)MHz") + matches = CpuClockSpeedMHz.FindSubmatch(procInfo) + if len(matches) != 2 { + return 0, fmt.Errorf("could not detect clock speed from output: %q", string(procInfo)) + } + } + speed, err := strconv.ParseFloat(string(matches[1]), 64) + if err != nil { + return 0, err + } + // Convert to kHz + return uint64(speed * 1000), nil +} + +// GetMachineMemoryCapacity returns the machine's total memory from /proc/meminfo. +// Returns the total memory capacity as an int64 (number of bytes). +func GetMachineMemoryCapacity() (int64, error) { + out, err := ioutil.ReadFile("/proc/meminfo") + if err != nil { + return 0, err + } + + memoryCapacity, err := parseCapacity(out, memoryCapacityRegexp) + if err != nil { + return 0, err + } + return memoryCapacity, err +} + +// GetMachineSwapCapacity returns the machine's total swap from /proc/meminfo. +// Returns the total swap capacity as an int64 (number of bytes). +func GetMachineSwapCapacity() (int64, error) { + out, err := ioutil.ReadFile("/proc/meminfo") + if err != nil { + return 0, err + } + + swapCapacity, err := parseCapacity(out, swapCapacityRegexp) + if err != nil { + return 0, err + } + return swapCapacity, err +} + +// parseCapacity matches a Regexp in a []byte, returning the resulting value in bytes. +// Assumes that the value matched by the Regexp is in KB. +func parseCapacity(b []byte, r *regexp.Regexp) (int64, error) { + matches := r.FindSubmatch(b) + if len(matches) != 2 { + return -1, fmt.Errorf("failed to match regexp in output: %q", string(b)) + } + m, err := strconv.ParseInt(string(matches[1]), 10, 64) + if err != nil { + return -1, err + } + + // Convert to bytes. + return m * 1024, err +} + +func GetTopology(sysFs sysfs.SysFs, cpuinfo string) ([]info.Node, int, error) { + nodes := []info.Node{} + + // s390/s390x changes + if true == isSystemZ() { + return nodes, getNumCores(), nil + } + + numCores := 0 + lastThread := -1 + lastCore := -1 + lastNode := -1 + for _, line := range strings.Split(cpuinfo, "\n") { + ok, val, err := extractValue(line, cpuRegExp) + if err != nil { + return nil, -1, fmt.Errorf("could not parse cpu info from %q: %v", line, err) + } + if ok { + thread := val + numCores++ + if lastThread != -1 { + // New cpu section. Save last one. + nodeIdx, err := addNode(&nodes, lastNode) + if err != nil { + return nil, -1, fmt.Errorf("failed to add node %d: %v", lastNode, err) + } + nodes[nodeIdx].AddThread(lastThread, lastCore) + lastCore = -1 + lastNode = -1 + } + lastThread = thread + } + ok, val, err = extractValue(line, coreRegExp) + if err != nil { + return nil, -1, fmt.Errorf("could not parse core info from %q: %v", line, err) + } + if ok { + lastCore = val + } + ok, val, err = extractValue(line, nodeRegExp) + if err != nil { + return nil, -1, fmt.Errorf("could not parse node info from %q: %v", line, err) + } + if ok { + lastNode = val + } + } + nodeIdx, err := addNode(&nodes, lastNode) + if err != nil { + return nil, -1, fmt.Errorf("failed to add node %d: %v", lastNode, err) + } + nodes[nodeIdx].AddThread(lastThread, lastCore) + if numCores < 1 { + return nil, numCores, fmt.Errorf("could not detect any cores") + } + for idx, node := range nodes { + caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Threads[0]) + if err != nil { + glog.Errorf("failed to get cache information for node %d: %v", node.Id, err) + continue + } + numThreadsPerCore := len(node.Cores[0].Threads) + numThreadsPerNode := len(node.Cores) * numThreadsPerCore + for _, cache := range caches { + c := info.Cache{ + Size: cache.Size, + Level: cache.Level, + Type: cache.Type, + } + if cache.Cpus == numThreadsPerNode && cache.Level > 2 { + // Add a node-level cache. + nodes[idx].AddNodeCache(c) + } else if cache.Cpus == numThreadsPerCore { + // Add to each core. + nodes[idx].AddPerCoreCache(c) + } + // Ignore unknown caches. + } + } + return nodes, numCores, nil +} + +func extractValue(s string, r *regexp.Regexp) (bool, int, error) { + matches := r.FindSubmatch([]byte(s)) + if len(matches) == 2 { + val, err := strconv.ParseInt(string(matches[1]), 10, 32) + if err != nil { + return true, -1, err + } + return true, int(val), nil + } + return false, -1, nil +} + +func findNode(nodes []info.Node, id int) (bool, int) { + for i, n := range nodes { + if n.Id == id { + return true, i + } + } + return false, -1 +} + +func addNode(nodes *[]info.Node, id int) (int, error) { + var idx int + if id == -1 { + // Some VMs don't fill topology data. Export single package. + id = 0 + } + + ok, idx := findNode(*nodes, id) + if !ok { + // New node + node := info.Node{Id: id} + // Add per-node memory information. + meminfo := fmt.Sprintf("/sys/devices/system/node/node%d/meminfo", id) + out, err := ioutil.ReadFile(meminfo) + // Ignore if per-node info is not available. + if err == nil { + m, err := parseCapacity(out, memoryCapacityRegexp) + if err != nil { + return -1, err + } + node.Memory = uint64(m) + } + *nodes = append(*nodes, node) + idx = len(*nodes) - 1 + } + return idx, nil +} + +// s390/s390x changes +func getMachineArch() (string, error) { + uname := syscall.Utsname{} + err := syscall.Uname(&uname) + if err != nil { + return "", err + } + + var arch string + for _, val := range uname.Machine { + arch += string(int(val)) + } + + return arch, nil +} + +// s390/s390x changes +func isSystemZ() bool { + arch, err := getMachineArch() + if err == nil { + if true == strings.Contains(arch, "390") { + return true + } + } + return false +} + +// s390/s390x changes +func getNumCores() int { + maxProcs := runtime.GOMAXPROCS(0) + numCPU := runtime.NumCPU() + + if maxProcs < numCPU { + return maxProcs + } + + return numCPU +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo new file mode 100644 index 0000000..ca2b722 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo @@ -0,0 +1,251 @@ +processor : 0 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 0 +siblings : 6 +core id : 0 +cpu cores : 6 +apicid : 0 +initial apicid : 0 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 1 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 0 +siblings : 6 +core id : 1 +cpu cores : 6 +apicid : 2 +initial apicid : 2 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 2 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 0 +siblings : 6 +core id : 2 +cpu cores : 6 +apicid : 4 +initial apicid : 4 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 3 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 1 +siblings : 6 +core id : 3 +cpu cores : 6 +apicid : 16 +initial apicid : 16 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 4 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 1 +siblings : 6 +core id : 4 +cpu cores : 6 +apicid : 18 +initial apicid : 18 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 5 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 1 +siblings : 6 +core id : 5 +cpu cores : 6 +apicid : 20 +initial apicid : 20 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 6 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 2661.000 +cache size : 12288 KB +physical id : 0 +siblings : 6 +core id : 0 +cpu cores : 6 +apicid : 1 +initial apicid : 1 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 7 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 2661.000 +cache size : 12288 KB +physical id : 0 +siblings : 6 +core id : 1 +cpu cores : 6 +apicid : 3 +initial apicid : 3 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 8 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 0 +siblings : 6 +core id : 2 +cpu cores : 6 +apicid : 5 +initial apicid : 5 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 9 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 2661.000 +cache size : 12288 KB +physical id : 1 +siblings : 6 +core id : 3 +cpu cores : 6 +apicid : 17 +initial apicid : 17 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + +processor : 10 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 1596.000 +cache size : 12288 KB +physical id : 1 +siblings : 6 +core id : 4 +cpu cores : 6 +apicid : 19 +initial apicid : 19 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual +processor : 11 +cpu family : 6 +stepping : 2 +microcode : 0x10 +cpu MHz : 2661.000 +cache size : 12288 KB +physical id : 1 +siblings : 6 +core id : 5 +cpu cores : 6 +apicid : 21 +initial apicid : 21 +fpu : yes +fpu_exception : yes +cpuid level : 11 +wp : yes +bogomips : 5333.60 +clflush size : 64 +cache_alignment : 64 +address sizes : 40 bits physical, 48 bits virtual + diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go new file mode 100644 index 0000000..0c3f158 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go @@ -0,0 +1,117 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package machine + +import ( + "io/ioutil" + "reflect" + "testing" + + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/utils/sysfs" + "github.com/google/cadvisor/utils/sysfs/fakesysfs" +) + +func TestTopology(t *testing.T) { + testfile := "./testdata/cpuinfo" + testcpuinfo, err := ioutil.ReadFile(testfile) + if err != nil { + t.Fatalf("unable to read input test file %s", testfile) + } + sysFs := &fakesysfs.FakeSysFs{} + c := sysfs.CacheInfo{ + Size: 32 * 1024, + Type: "unified", + Level: 1, + Cpus: 2, + } + sysFs.SetCacheInfo(c) + topology, numCores, err := GetTopology(sysFs, string(testcpuinfo)) + if err != nil { + t.Errorf("failed to get topology for sample cpuinfo %s", string(testcpuinfo)) + } + + if numCores != 12 { + t.Errorf("Expected 12 cores, found %d", numCores) + } + expected_topology := []info.Node{} + numNodes := 2 + numCoresPerNode := 3 + numThreads := 2 + cache := info.Cache{ + Size: 32 * 1024, + Type: "unified", + Level: 1, + } + for i := 0; i < numNodes; i++ { + node := info.Node{Id: i} + // Copy over Memory from result. TODO(rjnagal): Use memory from fake. + node.Memory = topology[i].Memory + for j := 0; j < numCoresPerNode; j++ { + core := info.Core{Id: i*numCoresPerNode + j} + core.Caches = append(core.Caches, cache) + for k := 0; k < numThreads; k++ { + core.Threads = append(core.Threads, k*numCoresPerNode*numNodes+core.Id) + } + node.Cores = append(node.Cores, core) + } + expected_topology = append(expected_topology, node) + } + + if !reflect.DeepEqual(topology, expected_topology) { + t.Errorf("Expected topology %+v, got %+v", expected_topology, topology) + } +} + +func TestTopologyWithSimpleCpuinfo(t *testing.T) { + sysFs := &fakesysfs.FakeSysFs{} + c := sysfs.CacheInfo{ + Size: 32 * 1024, + Type: "unified", + Level: 1, + Cpus: 1, + } + sysFs.SetCacheInfo(c) + topology, numCores, err := GetTopology(sysFs, "processor\t: 0\n") + if err != nil { + t.Errorf("Expected cpuinfo with no topology data to succeed.") + } + node := info.Node{Id: 0} + core := info.Core{Id: 0} + core.Threads = append(core.Threads, 0) + cache := info.Cache{ + Size: 32 * 1024, + Type: "unified", + Level: 1, + } + core.Caches = append(core.Caches, cache) + node.Cores = append(node.Cores, core) + // Copy over Memory from result. TODO(rjnagal): Use memory from fake. + node.Memory = topology[0].Memory + expected := []info.Node{node} + if !reflect.DeepEqual(topology, expected) { + t.Errorf("Expected topology %+v, got %+v", expected, topology) + } + if numCores != 1 { + t.Errorf("Expected 1 core, found %d", numCores) + } +} + +func TestTopologyEmptyCpuinfo(t *testing.T) { + _, _, err := GetTopology(&fakesysfs.FakeSysFs{}, "") + if err == nil { + t.Errorf("Expected empty cpuinfo to fail.") + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt new file mode 100644 index 0000000..be6632e --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt @@ -0,0 +1,44 @@ +Jan 5 15:19:01 CRON[14500]: (root) CMD (touch /var/run/crond.sittercheck) +Jan 5 15:19:04 cookie_monster[1249]: uid 0, pid 14504, "/var/lib/certs/machine_cert.crt" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" +Jan 5 15:19:04 cookie_monster[1249]: uid 0, pid 14504, "/var/lib/certs/machine_cert.key" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" +Jan 5 15:19:05 nsscacheclient[14504]: SUCCESS: Completed run (v29/c20 rtime:0.334299 utime:0.136923 stime:0.011736 maxrss:5260k dials:1 sent:1793 rcvd:5143). +Jan 5 15:19:27 kernel: [ 5864.708440] memorymonster invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0 +Jan 5 15:19:27 kernel: [ 5864.708443] memorymonster cpuset=/ mems_allowed=0 +Jan 5 15:19:27 kernel: [ 5864.708446] CPU: 5 PID: 13536 Comm: memorymonster Tainted: P OX 3.13.0-43-generic #72-Ubuntu +Jan 5 15:19:27 kernel: [ 5864.708447] Hardware name: Hewlett-Packard HP Z420 Workstation/1589, BIOS J61 v03.65 12/19/2013 +Jan 5 15:19:27 kernel: [ 5864.708448] ffff88072ae10800 ffff8807a4835c48 ffffffff81720bf6 ffff8807a8e86000 +Jan 5 15:19:27 kernel: [ 5864.708451] ffff8807a4835cd0 ffffffff8171b4b1 0000000000000246 ffff88072ae10800 +Jan 5 15:19:27 kernel: [ 5864.708453] ffff8807a4835c90 ffff8807a4835ca0 ffffffff811522a7 0000000000000001 +Jan 5 15:19:27 kernel: [ 5864.708455] Call Trace: +Jan 5 15:19:27 kernel: [ 5864.708460] [] dump_stack+0x45/0x56 +Jan 5 15:19:27 kernel: [ 5864.708463] [] dump_header+0x7f/0x1f1 +Jan 5 15:19:27 kernel: [ 5864.708465] [] ? find_lock_task_mm+0x27/0x70 +Jan 5 15:19:27 kernel: [ 5864.708467] [] oom_kill_process+0x1ce/0x330 +Jan 5 15:19:27 kernel: [ 5864.708470] [] ? security_capable_noaudit+0x15/0x20 +Jan 5 15:19:27 kernel: [ 5864.708474] [] mem_cgroup_oom_synchronize+0x51c/0x560 +Jan 5 15:19:27 kernel: [ 5864.708476] [] ? mem_cgroup_charge_common+0xa0/0xa0 +Jan 5 15:19:27 kernel: [ 5864.708478] [] pagefault_out_of_memory+0x14/0x80 +Jan 5 15:19:27 kernel: [ 5864.708480] [] mm_fault_error+0x8e/0x180 +Jan 5 15:19:27 kernel: [ 5864.708482] [] __do_page_fault+0x4a1/0x560 +Jan 5 15:19:27 kernel: [ 5864.708485] [] ? set_next_entity+0x95/0xb0 +Jan 5 15:19:27 kernel: [ 5864.708489] [] ? __switch_to+0x169/0x4c0 +Jan 5 15:19:27 kernel: [ 5864.708490] [] do_page_fault+0x1a/0x70 +Jan 5 15:19:27 kernel: [ 5864.708492] [] page_fault+0x28/0x30 +Jan 5 15:19:27 kernel: [ 5864.708493] Task in /mem2 killed as a result of limit of /mem2 +Jan 5 15:19:27 kernel: [ 5864.708495] memory: usage 980kB, limit 980kB, failcnt 4152239 +Jan 5 15:19:27 kernel: [ 5864.708495] memory+swap: usage 0kB, limit 18014398509481983kB, failcnt 0 +Jan 5 15:19:27 kernel: [ 5864.708496] kmem: usage 0kB, limit 18014398509481983kB, failcnt 0 +Jan 5 15:19:27 kernel: [ 5864.708497] Memory cgroup stats for /mem2: cache:0KB rss:980KB rss_huge:0KB mapped_file:0KB writeback:20KB inactive_anon:560KB active_anon:420KB inactive_file:0KB active_file:0KB unevictable:0KB +Jan 5 15:19:27 kernel: [ 5864.708505] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name +Jan 5 15:19:27 kernel: [ 5864.708600] [13536] 275858 13536 8389663 343 16267 8324326 0 memorymonster +Jan 5 15:19:27 kernel: [ 5864.708607] Memory cgroup out of memory: Kill process 13536 (memorymonster) score 996 or sacrifice child +Jan 5 15:19:27 kernel: [ 5864.708608] Killed process 13536 (memorymonster) total-vm:33558652kB, anon-rss:920kB, file-rss:452kB +Jan 5 15:20:01 CRON[14608]: (root) CMD (touch /var/run/crond.sittercheck) +Jan 5 15:20:01 CRON[14609]: (root) CMD (/usr/bin/alarm 6000 /usr/share/update-notifier/reevaluate.py) +Jan 5 15:20:01 CRON[14610]: (root) CMD (/usr/bin/corp_cronwrap -j 80 -t 600 -A -K -L -l 'nsscache-client' /usr/bin/nsscacheclient all) +Jan 5 15:20:01 /usr/bin/lock: called by /bin/bash for . uid 0, euid 0. +Jan 5 15:21:01 CRON[14639]: (root) CMD (touch /var/run/crond.sittercheck) +Jan 5 15:21:05 cookie_monster[1249]: uid 0, pid 14643, "/var/lib/certs/machine_cert.crt" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" +Jan 5 15:21:05 cookie_monster[1249]: uid 0, pid 14643, "/var/lib/certs/machine_cert.key" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" +Jan 5 15:21:05 nsscacheclient[14643]: auto.auto(no change) time:0.042264697000000004 retries:0 +Jan 5 15:21:05 nsscacheclient[14643]: auto.home(63c07d09->8686499b write:3631382) time:0.318774602 retries:0 \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go new file mode 100644 index 0000000..8667d32 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go @@ -0,0 +1,41 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "flag" + + "github.com/golang/glog" + "github.com/google/cadvisor/utils/oomparser" +) + +// demonstrates how to run oomparser.OomParser to get OomInstance information +func main() { + flag.Parse() + // out is a user-provided channel from which the user can read incoming + // OomInstance objects + outStream := make(chan *oomparser.OomInstance) + oomLog, err := oomparser.New() + if err != nil { + glog.Infof("Couldn't make a new oomparser. %v", err) + } else { + go oomLog.StreamOoms(outStream) + // demonstration of how to get oomLog's list of oomInstances or access + // the user-declared oomInstance channel, here called outStream + for oomInstance := range outStream { + glog.Infof("Reading the buffer. Output is %v", oomInstance) + } + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go new file mode 100644 index 0000000..a1c9bd1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go @@ -0,0 +1,220 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package oomparser + +import ( + "bufio" + "fmt" + "io" + "os" + "os/exec" + "path" + "regexp" + "strconv" + "time" + + "github.com/golang/glog" + "github.com/google/cadvisor/utils" +) + +var containerRegexp *regexp.Regexp = regexp.MustCompile( + `Task in (.*) killed as a result of limit of (.*)`) +var lastLineRegexp *regexp.Regexp = regexp.MustCompile( + `(^[A-Z]{1}[a-z]{2} .*[0-9]{1,2} [0-9]{1,2}:[0-9]{2}:[0-9]{2}) .* Killed process ([0-9]+) \(([0-9A-Za-z_]+)\)`) +var firstLineRegexp *regexp.Regexp = regexp.MustCompile( + `invoked oom-killer:`) + +// struct to hold file from which we obtain OomInstances +type OomParser struct { + ioreader *bufio.Reader +} + +// struct that contains information related to an OOM kill instance +type OomInstance struct { + // process id of the killed process + Pid int + // the name of the killed process + ProcessName string + // the time that the process was reported to be killed, + // accurate to the minute + TimeOfDeath time.Time + // the absolute name of the container that OOMed + ContainerName string + // the absolute name of the container that was killed + // due to the OOM. + VictimContainerName string +} + +// gets the container name from a line and adds it to the oomInstance. +func getContainerName(line string, currentOomInstance *OomInstance) error { + parsedLine := containerRegexp.FindStringSubmatch(line) + if parsedLine == nil { + return nil + } + currentOomInstance.ContainerName = path.Join("/", parsedLine[1]) + currentOomInstance.VictimContainerName = path.Join("/", parsedLine[2]) + return nil +} + +// gets the pid, name, and date from a line and adds it to oomInstance +func getProcessNamePid(line string, currentOomInstance *OomInstance) (bool, error) { + reList := lastLineRegexp.FindStringSubmatch(line) + + if reList == nil { + return false, nil + } + const longForm = "Jan _2 15:04:05 2006" + stringYear := strconv.Itoa(time.Now().Year()) + linetime, err := time.ParseInLocation(longForm, reList[1]+" "+stringYear, time.Local) + if err != nil { + return false, err + } + + currentOomInstance.TimeOfDeath = linetime + pid, err := strconv.Atoi(reList[2]) + if err != nil { + return false, err + } + currentOomInstance.Pid = pid + currentOomInstance.ProcessName = reList[3] + return true, nil +} + +// uses regex to see if line is the start of a kernel oom log +func checkIfStartOfOomMessages(line string) bool { + potential_oom_start := firstLineRegexp.MatchString(line) + if potential_oom_start { + return true + } + return false +} + +// reads the file and sends only complete lines over a channel to analyzeLines. +// Should prevent EOF errors that occur when lines are read before being fully +// written to the log. It reads line by line splitting on +// the "\n" character. +func readLinesFromFile(lineChannel chan string, ioreader *bufio.Reader) { + linefragment := "" + var line string + var err error + for true { + line, err = ioreader.ReadString('\n') + if err == io.EOF { + if line != "" { + linefragment += line + } + time.Sleep(100 * time.Millisecond) + } else if err == nil { + if linefragment != "" { + line = linefragment + line + linefragment = "" + } + lineChannel <- line + } else if err != nil && err != io.EOF { + glog.Errorf("exiting analyzeLinesHelper with error %v", err) + } + } +} + +// Calls goroutine for readLinesFromFile, which feeds it complete lines. +// Lines are checked against a regexp to check for the pid, process name, etc. +// At the end of an oom message group, StreamOoms adds the new oomInstance to +// oomLog +func (self *OomParser) StreamOoms(outStream chan *OomInstance) { + lineChannel := make(chan string, 10) + go func() { + readLinesFromFile(lineChannel, self.ioreader) + }() + + for line := range lineChannel { + in_oom_kernel_log := checkIfStartOfOomMessages(line) + if in_oom_kernel_log { + oomCurrentInstance := &OomInstance{ + ContainerName: "/", + } + finished := false + for !finished { + err := getContainerName(line, oomCurrentInstance) + if err != nil { + glog.Errorf("%v", err) + } + finished, err = getProcessNamePid(line, oomCurrentInstance) + if err != nil { + glog.Errorf("%v", err) + } + line = <-lineChannel + } + in_oom_kernel_log = false + outStream <- oomCurrentInstance + } + } + glog.Infof("exiting analyzeLines") +} + +func callJournalctl() (io.ReadCloser, error) { + cmd := exec.Command("journalctl", "-k", "-f") + readcloser, err := cmd.StdoutPipe() + if err != nil { + return nil, err + } + if err := cmd.Start(); err != nil { + return nil, err + } + return readcloser, err +} + +func trySystemd() (*OomParser, error) { + readcloser, err := callJournalctl() + if err != nil { + return nil, err + } + glog.Infof("oomparser using systemd") + return &OomParser{ + ioreader: bufio.NewReader(readcloser), + }, nil + +} + +// List of possible kernel log files. These are prioritized in order so that +// we will use the first one that is available. +var kernelLogFiles = []string{"/var/log/kern.log", "/var/log/messages", "/var/log/syslog"} + +// looks for system files that contain kernel messages and if one is found, sets +// the systemFile attribute of the OomParser object +func getSystemFile() (string, error) { + for _, logFile := range kernelLogFiles { + if utils.FileExists(logFile) { + glog.Infof("OOM parser using kernel log file: %q", logFile) + return logFile, nil + } + } + return "", fmt.Errorf("unable to find any kernel log file available from our set: %v", kernelLogFiles) +} + +// initializes an OomParser object and calls getSystemFile to set the systemFile +// attribute. Returns and OomParser object and an error +func New() (*OomParser, error) { + systemFile, err := getSystemFile() + if err != nil { + return trySystemd() + } + file, err := os.Open(systemFile) + if err != nil { + return trySystemd() + } + return &OomParser{ + ioreader: bufio.NewReader(file), + }, nil +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go new file mode 100644 index 0000000..7da55e6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go @@ -0,0 +1,166 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package oomparser + +import ( + "bufio" + "os" + "reflect" + "testing" + "time" +) + +const startLine = "Jan 21 22:01:49 localhost kernel: [62278.816267] ruby invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0" +const endLine = "Jan 21 22:01:49 localhost kernel: [62279.421192] Killed process 19667 (evilprogram2) total-vm:1460016kB, anon-rss:1414008kB, file-rss:4kB" +const containerLine = "Jan 26 14:10:07 kateknister0.mtv.corp.google.com kernel: [1814368.465205] Task in /mem2 killed as a result of limit of /mem3" +const containerLogFile = "containerOomExampleLog.txt" +const systemLogFile = "systemOomExampleLog.txt" + +func createExpectedContainerOomInstance(t *testing.T) *OomInstance { + const longForm = "Jan _2 15:04:05 2006" + deathTime, err := time.ParseInLocation(longForm, "Jan 5 15:19:27 2015", time.Local) + if err != nil { + t.Fatalf("could not parse expected time when creating expected container oom instance. Had error %v", err) + return nil + } + return &OomInstance{ + Pid: 13536, + ProcessName: "memorymonster", + TimeOfDeath: deathTime, + ContainerName: "/mem2", + VictimContainerName: "/mem3", + } +} + +func createExpectedSystemOomInstance(t *testing.T) *OomInstance { + const longForm = "Jan _2 15:04:05 2006" + deathTime, err := time.ParseInLocation(longForm, "Jan 28 19:58:45 2015", time.Local) + if err != nil { + t.Fatalf("could not parse expected time when creating expected system oom instance. Had error %v", err) + return nil + } + return &OomInstance{ + Pid: 1532, + ProcessName: "badsysprogram", + TimeOfDeath: deathTime, + ContainerName: "/", + VictimContainerName: "/", + } +} + +func TestGetContainerName(t *testing.T) { + currentOomInstance := new(OomInstance) + err := getContainerName(startLine, currentOomInstance) + if err != nil { + t.Errorf("bad line fed to getContainerName should yield no error, but had error %v", err) + } + if currentOomInstance.ContainerName != "" { + t.Errorf("bad line fed to getContainerName yielded no container name but set it to %s", currentOomInstance.ContainerName) + } + err = getContainerName(containerLine, currentOomInstance) + if err != nil { + t.Errorf("container line fed to getContainerName should yield no error, but had error %v", err) + } + if currentOomInstance.ContainerName != "/mem2" { + t.Errorf("getContainerName should have set containerName to /mem2, not %s", currentOomInstance.ContainerName) + } + if currentOomInstance.VictimContainerName != "/mem3" { + t.Errorf("getContainerName should have set victimContainerName to /mem3, not %s", currentOomInstance.VictimContainerName) + } +} + +func TestGetProcessNamePid(t *testing.T) { + currentOomInstance := new(OomInstance) + couldParseLine, err := getProcessNamePid(startLine, currentOomInstance) + if err != nil { + t.Errorf("bad line fed to getProcessNamePid should yield no error, but had error %v", err) + } + if couldParseLine { + t.Errorf("bad line fed to getProcessNamePid should return false but returned %v", couldParseLine) + } + + const longForm = "Jan _2 15:04:05 2006" + correctTime, err := time.ParseInLocation(longForm, "Jan 21 22:01:49 2015", time.Local) + couldParseLine, err = getProcessNamePid(endLine, currentOomInstance) + if err != nil { + t.Errorf("good line fed to getProcessNamePid should yield no error, but had error %v", err) + } + if !couldParseLine { + t.Errorf("good line fed to getProcessNamePid should return true but returned %v", couldParseLine) + } + if currentOomInstance.ProcessName != "evilprogram2" { + t.Errorf("getProcessNamePid should have set processName to evilprogram2, not %s", currentOomInstance.ProcessName) + } + if currentOomInstance.Pid != 19667 { + t.Errorf("getProcessNamePid should have set PID to 19667, not %d", currentOomInstance.Pid) + } + if !correctTime.Equal(currentOomInstance.TimeOfDeath) { + t.Errorf("getProcessNamePid should have set date to %v, not %v", correctTime, currentOomInstance.TimeOfDeath) + } +} + +func TestCheckIfStartOfMessages(t *testing.T) { + couldParseLine := checkIfStartOfOomMessages(endLine) + if couldParseLine { + t.Errorf("bad line fed to checkIfStartOfMessages should return false but returned %v", couldParseLine) + } + couldParseLine = checkIfStartOfOomMessages(startLine) + if !couldParseLine { + t.Errorf("start line fed to checkIfStartOfMessages should return true but returned %v", couldParseLine) + } +} + +func TestStreamOomsContainer(t *testing.T) { + expectedContainerOomInstance := createExpectedContainerOomInstance(t) + helpTestStreamOoms(expectedContainerOomInstance, containerLogFile, t) +} + +func TestStreamOomsSystem(t *testing.T) { + expectedSystemOomInstance := createExpectedSystemOomInstance(t) + helpTestStreamOoms(expectedSystemOomInstance, systemLogFile, t) +} + +func helpTestStreamOoms(oomCheckInstance *OomInstance, sysFile string, t *testing.T) { + outStream := make(chan *OomInstance) + oomLog := mockOomParser(sysFile, t) + timeout := make(chan bool, 1) + go func() { + time.Sleep(1 * time.Second) + timeout <- true + }() + + go oomLog.StreamOoms(outStream) + + select { + case oomInstance := <-outStream: + if reflect.DeepEqual(*oomCheckInstance, *oomInstance) { + t.Errorf("wrong instance returned. Expected %v and got %v", + oomCheckInstance, oomInstance) + } + case <-timeout: + t.Error( + "timeout happened before oomInstance was found in test file") + } +} + +func mockOomParser(sysFile string, t *testing.T) *OomParser { + file, err := os.Open(sysFile) + if err != nil { + t.Errorf("had an error opening file: %v", err) + } + return &OomParser{ + ioreader: bufio.NewReader(file), + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt new file mode 100644 index 0000000..9d38bbd --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt @@ -0,0 +1,362 @@ +[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 +[ 0.000000] Hierarchical RCU implementation. +[ 0.000000] RCU dyntick-idle grace-period acceleration is enabled. +[ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1. +[ 0.000000] Offload RCU callbacks from all CPUs +[ 0.000000] Offload RCU callbacks from CPUs: 0. +[ 0.000000] NR_IRQS:16640 nr_irqs:256 16 +[ 0.000000] Console: colour dummy device 80x25 +[ 0.000000] console [ttyS0] enabled +[ 0.000000] allocated 7340032 bytes of page_cgroup +[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups +[ 0.000000] tsc: Detected 2500.000 MHz processor +[ 0.008000] Calibrating delay loop (skipped) preset value.. 5000.00 BogoMIPS (lpj=10000000) +[ 0.008000] pid_max: default: 32768 minimum: 301 +[ 0.008000] Security Framework initialized +[ 0.008000] AppArmor: AppArmor initialized +[ 0.008000] Yama: becoming mindful. +[ 0.008200] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes) +[ 0.011365] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes) +[ 0.013066] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes) +[ 0.014030] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes) +[ 0.016266] Initializing cgroup subsys memory +[ 0.016898] Initializing cgroup subsys devices +[ 0.017546] Initializing cgroup subsys freezer +[ 0.018193] Initializing cgroup subsys blkio +[ 0.018793] Initializing cgroup subsys perf_event +[ 0.019416] Initializing cgroup subsys hugetlb +[ 0.020067] Disabled fast string operations +[ 0.020681] CPU: Physical Processor ID: 0 +[ 0.021238] CPU: Processor Core ID: 0 +[ 0.022587] mce: CPU supports 32 MCE banks +[ 0.023260] Last level iTLB entries: 4KB 512, 2MB 0, 4MB 0 +[ 0.023260] Last level dTLB entries: 4KB 512, 2MB 0, 4MB 0 +[ 0.023260] tlb_flushall_shift: 6 +[ 0.043758] Freeing SMP alternatives memory: 32K (ffffffff81e6c000 - ffffffff81e74000) +[ 0.048361] ACPI: Core revision 20131115 +[ 0.049516] ACPI: All ACPI Tables successfully acquired +[ 0.050342] ftrace: allocating 28458 entries in 112 pages +[ 0.060327] Enabling x2apic +[ 0.060740] Enabled x2apic +[ 0.064005] Switched APIC routing to physical x2apic. +[ 0.065489] ..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1 +[ 0.066331] smpboot: CPU0: Intel(R) Xeon(R) CPU @ 2.50GHz (fam: 06, model: 3e, stepping: 04) +[ 0.072000] APIC calibration not consistent with PM-Timer: 227ms instead of 100ms +[ 0.072000] APIC delta adjusted to PM-Timer: 6250028 (14249259) +[ 0.074382] Performance Events: unsupported p6 CPU model 62 no PMU driver, software events only. +[ 0.077174] x86: Booted up 1 node, 1 CPUs +[ 0.077738] smpboot: Total of 1 processors activated (5000.00 BogoMIPS) +[ 0.078932] NMI watchdog: disabled (cpu0): hardware events not enabled +[ 0.079945] devtmpfs: initialized +[ 0.081784] EVM: security.selinux +[ 0.082251] EVM: security.SMACK64 +[ 0.082720] EVM: security.ima +[ 0.083135] EVM: security.capability +[ 0.084729] pinctrl core: initialized pinctrl subsystem +[ 0.085517] regulator-dummy: no parameters +[ 0.086187] RTC time: 19:51:09, date: 01/28/15 +[ 0.086869] NET: Registered protocol family 16 +[ 0.087613] cpuidle: using governor ladder +[ 0.088009] cpuidle: using governor menu +[ 0.088580] ACPI: bus type PCI registered +[ 0.089191] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 +[ 0.090220] PCI: Using configuration type 1 for base access +[ 0.091749] bio: create slab at 0 +[ 0.092215] ACPI: Added _OSI(Module Device) +[ 0.092799] ACPI: Added _OSI(Processor Device) +[ 0.093410] ACPI: Added _OSI(3.0 _SCP Extensions) +[ 0.094173] ACPI: Added _OSI(Processor Aggregator Device) +[ 0.096962] ACPI: Interpreter enabled +[ 0.097483] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20131115/hwxface-580) +[ 0.098762] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20131115/hwxface-580) +[ 0.100011] ACPI: (supports S0 S3 S4 S5) +[ 0.100555] ACPI: Using IOAPIC for interrupt routing +[ 0.101252] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug +[ 0.102545] ACPI: No dock devices found. +[ 0.105210] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) +[ 0.106060] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI] +[ 0.108025] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM +[ 0.109116] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. +[ 0.112685] PCI host bridge to bus 0000:00 +[ 0.113294] pci_bus 0000:00: root bus resource [bus 00-ff] +[ 0.114054] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7] +[ 0.115065] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff] +[ 0.116004] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff] +[ 0.116955] pci_bus 0000:00: root bus resource [mem 0x6cc00000-0xfebfffff] +[ 0.117916] pci 0000:00:01.0: [8086:7110] type 00 class 0x060100 +[ 0.122089] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 +[ 0.125713] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI +[ 0.127117] pci 0000:00:03.0: [1af4:1004] type 00 class 0x000000 +[ 0.128752] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc03f] +[ 0.130322] pci 0000:00:03.0: reg 0x14: [mem 0xfebfe000-0xfebfe07f] +[ 0.133571] pci 0000:00:04.0: [1af4:1000] type 00 class 0x020000 +[ 0.135267] pci 0000:00:04.0: reg 0x10: [io 0xc040-0xc07f] +[ 0.136777] pci 0000:00:04.0: reg 0x14: [mem 0xfebff000-0xfebff03f] +[ 0.140811] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) +[ 0.141879] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) +[ 0.142886] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) +[ 0.144086] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) +[ 0.145067] ACPI: PCI Interrupt Link [LNKS] (IRQs *9) +[ 0.146245] ACPI: Enabled 16 GPEs in block 00 to 0F +[ 0.147038] ACPI: \_SB_.PCI0: notify handler is installed +[ 0.147840] Found 1 acpi root devices +[ 0.148136] vgaarb: loaded +[ 0.148780] SCSI subsystem initialized +[ 0.149472] libata version 3.00 loaded. +[ 0.150070] ACPI: bus type USB registered +[ 0.150659] usbcore: registered new interface driver usbfs +[ 0.151536] usbcore: registered new interface driver hub +[ 0.152055] usbcore: registered new device driver usb +[ 0.153144] PCI: Using ACPI for IRQ routing +[ 0.153756] PCI: pci_cache_line_size set to 64 bytes +[ 0.154617] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] +[ 0.156004] e820: reserve RAM buffer [mem 0x6cbfe000-0x6fffffff] +[ 0.156993] NetLabel: Initializing +[ 0.157498] NetLabel: domain hash size = 128 +[ 0.158082] NetLabel: protocols = UNLABELED CIPSOv4 +[ 0.158815] NetLabel: unlabeled traffic allowed by default +[ 0.160005] Switched to clocksource kvm-clock +[ 0.168695] AppArmor: AppArmor Filesystem Enabled +[ 0.169361] pnp: PnP ACPI init +[ 0.169853] ACPI: bus type PNP registered +[ 0.170499] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) +[ 0.171591] pnp 00:01: Plug and Play ACPI device, IDs PNP0501 (active) +[ 0.172574] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active) +[ 0.173782] pnp: PnP ACPI: found 3 devices +[ 0.174430] ACPI: bus type PNP unregistered +[ 0.181364] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7] +[ 0.182172] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff] +[ 0.183049] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff] +[ 0.184120] pci_bus 0000:00: resource 7 [mem 0x6cc00000-0xfebfffff] +[ 0.185051] NET: Registered protocol family 2 +[ 0.185859] TCP established hash table entries: 16384 (order: 5, 131072 bytes) +[ 0.187117] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) +[ 0.188393] TCP: Hash tables configured (established 16384 bind 16384) +[ 0.189429] TCP: reno registered +[ 0.189929] UDP hash table entries: 1024 (order: 3, 32768 bytes) +[ 0.190824] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes) +[ 0.191830] NET: Registered protocol family 1 +[ 0.192585] PCI: CLS 0 bytes, default 64 +[ 0.193412] Trying to unpack rootfs image as initramfs... +[ 0.897565] Freeing initrd memory: 18780K (ffff880035b42000 - ffff880036d99000) +[ 0.898982] microcode: CPU0 sig=0x306e4, pf=0x1, revision=0x1 +[ 0.899884] microcode: Microcode Update Driver: v2.00 , Peter Oruba +[ 0.901196] Scanning for low memory corruption every 60 seconds +[ 0.902497] Initialise system trusted keyring +[ 0.903169] audit: initializing netlink socket (disabled) +[ 0.904016] type=2000 audit(1422474669.702:1): initialized +[ 0.926617] HugeTLB registered 2 MB page size, pre-allocated 0 pages +[ 0.928567] zbud: loaded +[ 0.929030] VFS: Disk quotas dquot_6.5.2 +[ 0.929685] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) +[ 0.931113] fuse init (API version 7.22) +[ 0.931781] msgmni has been set to 3390 +[ 0.932595] Key type big_key registered +[ 0.933680] Key type asymmetric registered +[ 0.934332] Asymmetric key parser 'x509' registered +[ 0.935078] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) +[ 0.936224] io scheduler noop registered +[ 0.936858] io scheduler deadline registered (default) +[ 0.937675] io scheduler cfq registered +[ 0.938307] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 +[ 0.939158] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 +[ 0.940239] efifb: probing for efifb +[ 0.940788] efifb: framebuffer at 0xa0000, mapped to 0xffff8800000a0000, using 64k, total 64k +[ 0.942044] efifb: mode is 640x480x1, linelength=80, pages=1 +[ 0.942964] efifb: scrolling: redraw +[ 0.943525] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0 +[ 0.945209] Console: switching to colour frame buffer device 80x30 +[ 0.946826] fb0: EFI VGA frame buffer device +[ 0.947485] intel_idle: does not run on family 6 model 62 +[ 0.948380] ipmi message handler version 39.2 +[ 0.949036] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 +[ 0.950135] ACPI: Power Button [PWRF] +[ 0.950722] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1 +[ 0.951773] ACPI: Sleep Button [SLPF] +[ 0.952529] GHES: HEST is not enabled! +[ 0.953921] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11 +[ 0.955783] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10 +[ 0.957395] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled +[ 1.112167] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A +[ 1.134843] 00:02: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A +[ 1.137110] Linux agpgart interface v0.103 +[ 1.138975] brd: module loaded +[ 1.140117] loop: module loaded +[ 1.140923] libphy: Fixed MDIO Bus: probed +[ 1.141640] tun: Universal TUN/TAP device driver, 1.6 +[ 1.142342] tun: (C) 1999-2004 Max Krasnyansky +[ 1.144063] virtio-pci 0000:00:04.0: irq 40 for MSI/MSI-X +[ 1.144871] virtio-pci 0000:00:04.0: irq 41 for MSI/MSI-X +[ 1.145670] virtio-pci 0000:00:04.0: irq 42 for MSI/MSI-X +[ 1.151673] PPP generic driver version 2.4.2 +[ 1.152344] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver +[ 1.153399] ehci-pci: EHCI PCI platform driver +[ 1.154021] ehci-platform: EHCI generic platform driver +[ 1.154939] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver +[ 1.155973] ohci-pci: OHCI PCI platform driver +[ 1.156675] ohci-platform: OHCI generic platform driver +[ 1.157423] uhci_hcd: USB Universal Host Controller Interface driver +[ 1.158352] i8042: PNP: No PS/2 controller found. Probing ports directly. +[ 3.646820] i8042: No controller found +[ 3.647493] tsc: Refined TSC clocksource calibration: 2500.002 MHz +[ 3.648490] mousedev: PS/2 mouse device common for all mice +[ 3.649499] rtc_cmos 00:00: RTC can wake from S4 +[ 3.650595] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0 +[ 3.651521] rtc_cmos 00:00: alarms up to one day, 114 bytes nvram +[ 3.652422] device-mapper: uevent: version 1.0.3 +[ 3.653131] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: dm-devel@redhat.com +[ 3.654281] ledtrig-cpu: registered to indicate activity on CPUs +[ 3.655182] TCP: cubic registered +[ 3.655704] NET: Registered protocol family 10 +[ 3.656551] NET: Registered protocol family 17 +[ 3.657183] Key type dns_resolver registered +[ 3.657931] Loading compiled-in X.509 certificates +[ 3.659264] Loaded X.509 cert 'Magrathea: Glacier signing key: 23984ac203784325ccf7b95b51f6c119380eb933' +[ 3.660726] registered taskstats version 1 +[ 3.663211] Key type trusted registered +[ 3.665462] Key type encrypted registered +[ 3.667679] AppArmor: AppArmor sha1 policy hashing enabled +[ 3.668454] IMA: No TPM chip found, activating TPM-bypass! +[ 3.669388] regulator-dummy: disabling +[ 3.669971] Magic number: 15:428:901 +[ 3.670625] clocksource clocksource0: hash matches +[ 3.671311] acpi PNP0501:01: hash matches +[ 3.671953] rtc_cmos 00:00: setting system clock to 2015-01-28 19:51:13 UTC (1422474673) +[ 3.673268] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found +[ 3.674088] EDD information not available. +[ 3.674668] PM: Hibernation image not present or could not be loaded. +[ 3.676577] Freeing unused kernel memory: 1332K (ffffffff81d1f000 - ffffffff81e6c000) +[ 3.678370] Write protecting the kernel read-only data: 12288k +[ 3.681251] Freeing unused kernel memory: 828K (ffff880001731000 - ffff880001800000) +[ 3.684444] Freeing unused kernel memory: 700K (ffff880001b51000 - ffff880001c00000) +[ 3.700162] systemd-udevd[90]: starting version 204 +[ 3.866262] virtio-pci 0000:00:03.0: irq 43 for MSI/MSI-X +[ 3.867187] virtio-pci 0000:00:03.0: irq 44 for MSI/MSI-X +[ 3.867997] virtio-pci 0000:00:03.0: irq 45 for MSI/MSI-X +[ 3.876214] virtio-pci 0000:00:03.0: irq 46 for MSI/MSI-X +[ 3.880005] scsi0 : Virtio SCSI HBA +[ 3.912410] scsi 0:0:1:0: Direct-Access Google PersistentDisk 1 PQ: 0 ANSI: 6 +[ 3.938957] sd 0:0:1:0: Attached scsi generic sg0 type 0 +[ 3.939845] sd 0:0:1:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB) +[ 3.941149] sd 0:0:1:0: [sda] 4096-byte physical blocks +[ 3.942233] sd 0:0:1:0: [sda] Write Protect is off +[ 3.942988] sd 0:0:1:0: [sda] Mode Sense: 1f 00 00 08 +[ 3.944398] sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA +[ 3.961885] sda: sda1 +[ 3.963152] sd 0:0:1:0: [sda] Attached SCSI disk +[ 4.414649] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) +[ 5.293574] random: init urandom read with 73 bits of entropy available +[ 6.418187] random: nonblocking pool is initialized +[ 6.692508] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro +[ 7.121847] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready +[ 7.681714] systemd-udevd[293]: starting version 204 +[ 8.437234] lp: driver loaded but no devices found +[ 9.164195] piix4_smbus 0000:00:01.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr +[ 9.648096] device-mapper: multipath: version 1.6.0 loaded +[ 10.434575] type=1400 audit(1422474680.256:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=368 comm="apparmor_parser" +[ 10.437242] type=1400 audit(1422474680.260:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=368 comm="apparmor_parser" +[ 10.439901] type=1400 audit(1422474680.260:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=368 comm="apparmor_parser" +[ 11.126295] type=1400 audit(1422474680.948:5): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=412 comm="apparmor_parser" +[ 11.129123] type=1400 audit(1422474680.952:6): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=412 comm="apparmor_parser" +[ 11.132139] type=1400 audit(1422474680.956:7): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=412 comm="apparmor_parser" +[ 11.196173] type=1400 audit(1422474681.020:8): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=458 comm="apparmor_parser" +[ 11.198887] type=1400 audit(1422474681.020:9): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=458 comm="apparmor_parser" +[ 11.201484] type=1400 audit(1422474681.028:10): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=458 comm="apparmor_parser" +[ 11.361371] init: udev-fallback-graphics main process (454) terminated with status 1 +[ 11.378437] type=1400 audit(1422474681.200:11): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=458 comm="apparmor_parser" +[ 14.366411] init: failsafe main process (491) killed by TERM signal +kateknister@kateknister-test3:~$ tail -f /var/log/syslog +Jan 28 19:51:47 localhost ntpdate[1240]: adjust time server 169.254.169.254 offset -0.383723 sec +Jan 28 19:51:47 localhost ntpd[1312]: ntpd 4.2.6p5@1.2349-o Wed Oct 9 19:08:06 UTC 2013 (1) +Jan 28 19:51:47 localhost ntpd[1313]: proto: precision = 0.449 usec +Jan 28 19:51:47 localhost ntpd[1313]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 +Jan 28 19:51:47 localhost ntpd[1313]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123 +Jan 28 19:51:47 localhost ntpd[1313]: Listen and drop on 1 v6wildcard :: UDP 123 +Jan 28 19:51:47 localhost ntpd[1313]: Listen normally on 2 lo 127.0.0.1 UDP 123 +Jan 28 19:51:47 localhost ntpd[1313]: Listen normally on 3 eth0 10.240.192.196 UDP 123 +Jan 28 19:51:47 localhost ntpd[1313]: peers refreshed +Jan 28 19:51:47 localhost ntpd[1313]: Listening on routing socket on fd #20 for interface updates +Jan 28 19:58:45 localhost kernel: [ 455.498827] badsysprogram invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0 +Jan 28 19:58:45 localhost kernel: [ 455.500173] badsysprogram cpuset=/ mems_allowed=0 +Jan 28 19:58:45 localhost kernel: [ 455.501007] CPU: 0 PID: 1532 Comm: badsysprogram Not tainted 3.13.0-27-generic #50-Ubuntu +Jan 28 19:58:45 localhost kernel: [ 455.502301] Hardware name: Google Google, BIOS Google 01/01/2011 +Jan 28 19:58:45 localhost kernel: [ 455.503298] 0000000000000000 ffff880069715a90 ffffffff817199c4 ffff8800680d8000 +Jan 28 19:58:45 localhost kernel: [ 455.504563] ffff880069715b18 ffffffff817142ff 0000000000000000 0000000000000000 +Jan 28 19:58:45 localhost kernel: [ 455.505779] 0000000000000000 0000000000000000 0000000000000000 0000000000000000 +Jan 28 19:58:45 localhost kernel: [ 455.506971] Call Trace: +Jan 28 19:58:45 localhost kernel: [ 455.507353] [] dump_stack+0x45/0x56 +Jan 28 19:58:45 localhost kernel: [ 455.508289] [] dump_header+0x7f/0x1f1 +Jan 28 19:58:45 localhost kernel: [ 455.509112] [] oom_kill_process+0x1ce/0x330 +Jan 28 19:58:45 localhost kernel: [ 455.510023] [] ? security_capable_noaudit+0x15/0x20 +Jan 28 19:58:45 localhost kernel: [ 455.510994] [] out_of_memory+0x414/0x450 +Jan 28 19:58:45 localhost kernel: [ 455.511820] [] __alloc_pages_nodemask+0xa87/0xb20 +Jan 28 19:58:45 localhost kernel: [ 455.512815] [] alloc_pages_vma+0x9a/0x140 +Jan 28 19:58:45 localhost kernel: [ 455.513647] [] handle_mm_fault+0xb2b/0xf10 +Jan 28 19:58:45 localhost kernel: [ 455.514498] [] __do_page_fault+0x184/0x560 +Jan 28 19:58:45 localhost kernel: [ 455.515415] [] ? sched_clock+0x9/0x10 +Jan 28 19:58:45 localhost kernel: [ 455.516318] [] ? sched_clock_local+0x1d/0x80 +Jan 28 19:58:45 localhost kernel: [ 455.517242] [] ? acct_account_cputime+0x1c/0x20 +Jan 28 19:58:45 localhost kernel: [ 455.518141] [] ? account_user_time+0x8b/0xa0 +Jan 28 19:58:45 localhost kernel: [ 455.519014] [] ? vtime_account_user+0x54/0x60 +Jan 28 19:58:45 localhost kernel: [ 455.519910] [] do_page_fault+0x1a/0x70 +Jan 28 19:58:45 localhost kernel: [ 455.520712] [] page_fault+0x28/0x30 +Jan 28 19:58:45 localhost kernel: [ 455.521498] Mem-Info: +Jan 28 19:58:45 localhost kernel: [ 455.521873] Node 0 DMA per-cpu: +Jan 28 19:58:45 localhost kernel: [ 455.522388] CPU 0: hi: 0, btch: 1 usd: 0 +Jan 28 19:58:45 localhost kernel: [ 455.598342] Node 0 DMA32 per-cpu: +Jan 28 19:58:45 localhost kernel: [ 455.598890] CPU 0: hi: 186, btch: 31 usd: 86 +Jan 28 19:58:45 localhost kernel: [ 455.599687] active_anon:405991 inactive_anon:57 isolated_anon:0 +Jan 28 19:58:45 localhost kernel: [ 455.599687] active_file:35 inactive_file:69 isolated_file:0 +Jan 28 19:58:45 localhost kernel: [ 455.599687] unevictable:0 dirty:0 writeback:0 unstable:0 +Jan 28 19:58:45 localhost kernel: [ 455.599687] free:12929 slab_reclaimable:1635 slab_unreclaimable:1919 +Jan 28 19:58:45 localhost kernel: [ 455.599687] mapped:34 shmem:70 pagetables:1423 bounce:0 +Jan 28 19:58:45 localhost kernel: [ 455.599687] free_cma:0 +Jan 28 19:58:45 localhost kernel: [ 455.604585] Node 0 DMA free:7124kB min:412kB low:512kB high:616kB active_anon:8508kB inactive_anon:4kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15992kB managed:15908kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:4kB slab_reclaimable:16kB slab_unreclaimable:16kB kernel_stack:0kB pagetables:12kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes +Jan 28 19:58:45 localhost kernel: [ 455.610811] lowmem_reserve[]: 0 1679 1679 1679 +Jan 28 19:58:45 localhost kernel: [ 455.611600] Node 0 DMA32 free:44592kB min:44640kB low:55800kB high:66960kB active_anon:1615456kB inactive_anon:224kB active_file:140kB inactive_file:276kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:1765368kB managed:1722912kB mlocked:0kB dirty:0kB writeback:0kB mapped:136kB shmem:276kB slab_reclaimable:6524kB slab_unreclaimable:7660kB kernel_stack:592kB pagetables:5680kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:819 all_unreclaimable? yes +Jan 28 19:58:45 localhost kernel: [ 455.618372] lowmem_reserve[]: 0 0 0 0 +Jan 28 19:58:45 localhost kernel: [ 455.619041] Node 0 DMA: 5*4kB (UM) 6*8kB (UEM) 7*16kB (UEM) 1*32kB (M) 2*64kB (UE) 3*128kB (UEM) 1*256kB (E) 2*512kB (EM) 3*1024kB (UEM) 1*2048kB (R) 0*4096kB = 7124kB +Jan 28 19:58:45 localhost kernel: [ 455.621861] Node 0 DMA32: 74*4kB (UEM) 125*8kB (UEM) 78*16kB (UEM) 26*32kB (UE) 12*64kB (UEM) 4*128kB (UE) 4*256kB (UE) 2*512kB (E) 11*1024kB (UE) 7*2048kB (UE) 3*4096kB (UR) = 44592kB +Jan 28 19:58:45 localhost kernel: [ 455.625174] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB +Jan 28 19:58:45 localhost kernel: [ 455.626394] 204 total pagecache pages +Jan 28 19:58:45 localhost kernel: [ 455.626954] 0 pages in swap cache +Jan 28 19:58:45 localhost kernel: [ 455.627455] Swap cache stats: add 0, delete 0, find 0/0 +Jan 28 19:58:45 localhost kernel: [ 455.628242] Free swap = 0kB +Jan 28 19:58:45 localhost kernel: [ 455.628686] Total swap = 0kB +Jan 28 19:58:45 localhost kernel: [ 455.629147] 445340 pages RAM +Jan 28 19:58:45 localhost kernel: [ 455.629577] 0 pages HighMem/MovableOnly +Jan 28 19:58:45 localhost kernel: [ 455.630301] 10614 pages reserved +Jan 28 19:58:45 localhost kernel: [ 455.630787] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name +Jan 28 19:58:45 localhost kernel: [ 455.631937] [ 273] 0 273 4869 50 13 0 0 upstart-udev-br +Jan 28 19:58:45 localhost kernel: [ 455.633290] [ 293] 0 293 12802 154 28 0 -1000 systemd-udevd +Jan 28 19:58:45 localhost kernel: [ 455.634671] [ 321] 0 321 3819 54 12 0 0 upstart-file-br +Jan 28 19:58:45 localhost kernel: [ 455.636070] [ 326] 102 326 9805 109 24 0 0 dbus-daemon +Jan 28 19:58:45 localhost kernel: [ 455.637373] [ 334] 101 334 63960 94 26 0 0 rsyslogd +Jan 28 19:58:45 localhost kernel: [ 455.638761] [ 343] 0 343 10863 102 26 0 0 systemd-logind +Jan 28 19:58:45 localhost kernel: [ 455.640158] [ 546] 0 546 3815 60 13 0 0 upstart-socket- +Jan 28 19:58:45 localhost kernel: [ 455.641534] [ 710] 0 710 2556 587 8 0 0 dhclient +Jan 28 19:58:45 localhost kernel: [ 455.642834] [ 863] 0 863 3955 48 13 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.644139] [ 865] 0 865 3955 50 13 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.645325] [ 867] 0 867 3955 51 13 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.646621] [ 868] 0 868 3955 51 12 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.647963] [ 870] 0 870 3955 49 13 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.649234] [ 915] 0 915 5914 61 16 0 0 cron +Jan 28 19:58:45 localhost kernel: [ 455.650439] [ 1015] 0 1015 10885 1524 25 0 0 manage_addresse +Jan 28 19:58:45 localhost kernel: [ 455.651817] [ 1028] 0 1028 3955 49 13 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.653091] [ 1033] 0 1033 3197 48 12 0 0 getty +Jan 28 19:58:45 localhost kernel: [ 455.654783] [ 1264] 0 1264 11031 1635 26 0 0 manage_accounts +Jan 28 19:58:45 localhost kernel: [ 455.656657] [ 1268] 0 1268 15341 180 33 0 -1000 sshd +Jan 28 19:58:45 localhost kernel: [ 455.657865] [ 1313] 104 1313 6804 154 17 0 0 ntpd +Jan 28 19:58:45 localhost kernel: [ 455.659085] [ 1389] 0 1389 25889 255 55 0 0 sshd +Jan 28 19:58:45 localhost kernel: [ 455.660440] [ 1407] 1020 1407 25889 255 52 0 0 sshd +Jan 28 19:58:45 localhost kernel: [ 455.661595] [ 1408] 1020 1408 5711 581 17 0 0 bash +Jan 28 19:58:45 localhost kernel: [ 455.662887] [ 1425] 0 1425 25889 256 53 0 0 sshd +Jan 28 19:58:45 localhost kernel: [ 455.664075] [ 1443] 1020 1443 25889 257 52 0 0 sshd +Jan 28 19:58:45 localhost kernel: [ 455.665330] [ 1444] 1020 1444 5711 581 16 0 0 bash +Jan 28 19:58:45 localhost kernel: [ 455.666450] [ 1476] 1020 1476 1809 25 9 0 0 tail +Jan 28 19:58:45 localhost kernel: [ 455.667682] [ 1532] 1020 1532 410347 398810 788 0 0 badsysprogram +Jan 28 19:58:45 localhost kernel: [ 455.669006] Out of memory: Kill process 1532 (badsysprogram) score 919 or sacrifice child +Jan 28 19:58:45 localhost kernel: [ 455.670291] Killed process 1532 (badsysprogram) total-vm:1641388kB, anon-rss:1595164kB, file-rss:76kB +[ 0.170499] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) +[ 0.171591] pnp 00:01: Plug and Play ACPI device, IDs PNP0501 (active) +[ 0.172574] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active) diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/path.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/path.go new file mode 100644 index 0000000..a7aceee --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/path.go @@ -0,0 +1,24 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import "os" + +func FileExists(file string) bool { + if _, err := os.Stat(file); err != nil { + return false + } + return true +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go new file mode 100644 index 0000000..763a556 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go @@ -0,0 +1,17 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// procfs contains several low level functions to read information from /proc +// filesystem, and also provides some utility functions like JiffiesToDuration. +package procfs diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go new file mode 100644 index 0000000..b36772a --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go @@ -0,0 +1,33 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package procfs + +/* +#include +*/ +import "C" +import "time" + +var userHz uint64 + +func init() { + userHzLong := C.sysconf(C._SC_CLK_TCK) + userHz = uint64(userHzLong) +} + +func JiffiesToDuration(jiffies uint64) time.Duration { + d := jiffies * 1000000000 / userHz + return time.Duration(d) +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go new file mode 100644 index 0000000..963fc61 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go @@ -0,0 +1,114 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package fakesysfs + +import ( + "os" + "time" + + "github.com/google/cadvisor/utils/sysfs" +) + +// If we extend sysfs to support more interfaces, it might be worth making this a mock instead of a fake. +type FileInfo struct { + EntryName string +} + +func (self *FileInfo) Name() string { + return self.EntryName +} + +func (self *FileInfo) Size() int64 { + return 1234567 +} + +func (self *FileInfo) Mode() os.FileMode { + return 0 +} + +func (self *FileInfo) ModTime() time.Time { + return time.Time{} +} + +func (self *FileInfo) IsDir() bool { + return true +} + +func (self *FileInfo) Sys() interface{} { + return nil +} + +type FakeSysFs struct { + info FileInfo + cache sysfs.CacheInfo +} + +func (self *FakeSysFs) GetBlockDevices() ([]os.FileInfo, error) { + self.info.EntryName = "sda" + return []os.FileInfo{&self.info}, nil +} + +func (self *FakeSysFs) GetBlockDeviceSize(name string) (string, error) { + return "1234567", nil +} + +func (self *FakeSysFs) GetBlockDeviceScheduler(name string) (string, error) { + return "noop deadline [cfq]", nil +} + +func (self *FakeSysFs) GetBlockDeviceNumbers(name string) (string, error) { + return "8:0\n", nil +} + +func (self *FakeSysFs) GetNetworkDevices() ([]os.FileInfo, error) { + return []os.FileInfo{&self.info}, nil +} + +func (self *FakeSysFs) GetNetworkAddress(name string) (string, error) { + return "42:01:02:03:04:f4\n", nil +} + +func (self *FakeSysFs) GetNetworkMtu(name string) (string, error) { + return "1024\n", nil +} + +func (self *FakeSysFs) GetNetworkSpeed(name string) (string, error) { + return "1000\n", nil +} + +func (self *FakeSysFs) GetNetworkStatValue(name string, stat string) (uint64, error) { + return 1024, nil +} + +func (self *FakeSysFs) GetCaches(id int) ([]os.FileInfo, error) { + self.info.EntryName = "index0" + return []os.FileInfo{&self.info}, nil +} + +func (self *FakeSysFs) GetCacheInfo(cpu int, cache string) (sysfs.CacheInfo, error) { + return self.cache, nil +} + +func (self *FakeSysFs) SetCacheInfo(cache sysfs.CacheInfo) { + self.cache = cache +} + +func (self *FakeSysFs) SetEntryName(name string) { + self.info.EntryName = name +} + +func (self *FakeSysFs) GetSystemUUID() (string, error) { + return "1F862619-BA9F-4526-8F85-ECEAF0C97430", nil +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go new file mode 100644 index 0000000..5667e01 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go @@ -0,0 +1,249 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sysfs + +import ( + "fmt" + "io/ioutil" + "os" + "path" + "strconv" + "strings" +) + +const ( + blockDir = "/sys/block" + cacheDir = "/sys/devices/system/cpu/cpu" + netDir = "/sys/class/net" + dmiDir = "/sys/class/dmi" + ppcDevTree = "/proc/device-tree" + s390xDevTree = "/etc" // s390/s390x changes +) + +type CacheInfo struct { + // size in bytes + Size uint64 + // cache type - instruction, data, unified + Type string + // distance from cpus in a multi-level hierarchy + Level int + // number of cpus that can access this cache. + Cpus int +} + +// Abstracts the lowest level calls to sysfs. +type SysFs interface { + // Get directory information for available block devices. + GetBlockDevices() ([]os.FileInfo, error) + // Get Size of a given block device. + GetBlockDeviceSize(string) (string, error) + // Get scheduler type for the block device. + GetBlockDeviceScheduler(string) (string, error) + // Get device major:minor number string. + GetBlockDeviceNumbers(string) (string, error) + + GetNetworkDevices() ([]os.FileInfo, error) + GetNetworkAddress(string) (string, error) + GetNetworkMtu(string) (string, error) + GetNetworkSpeed(string) (string, error) + GetNetworkStatValue(dev string, stat string) (uint64, error) + + // Get directory information for available caches accessible to given cpu. + GetCaches(id int) ([]os.FileInfo, error) + // Get information for a cache accessible from the given cpu. + GetCacheInfo(cpu int, cache string) (CacheInfo, error) + + GetSystemUUID() (string, error) +} + +type realSysFs struct{} + +func NewRealSysFs() (SysFs, error) { + return &realSysFs{}, nil +} + +func (self *realSysFs) GetBlockDevices() ([]os.FileInfo, error) { + return ioutil.ReadDir(blockDir) +} + +func (self *realSysFs) GetBlockDeviceNumbers(name string) (string, error) { + dev, err := ioutil.ReadFile(path.Join(blockDir, name, "/dev")) + if err != nil { + return "", err + } + return string(dev), nil +} + +func (self *realSysFs) GetBlockDeviceScheduler(name string) (string, error) { + sched, err := ioutil.ReadFile(path.Join(blockDir, name, "/queue/scheduler")) + if err != nil { + return "", err + } + return string(sched), nil +} + +func (self *realSysFs) GetBlockDeviceSize(name string) (string, error) { + size, err := ioutil.ReadFile(path.Join(blockDir, name, "/size")) + if err != nil { + return "", err + } + return string(size), nil +} + +func (self *realSysFs) GetNetworkDevices() ([]os.FileInfo, error) { + files, err := ioutil.ReadDir(netDir) + if err != nil { + return nil, err + } + + // Filter out non-directory & non-symlink files + var dirs []os.FileInfo + for _, f := range files { + if f.Mode()|os.ModeSymlink != 0 { + f, err = os.Stat(path.Join(netDir, f.Name())) + if err != nil { + continue + } + } + if f.IsDir() { + dirs = append(dirs, f) + } + } + return dirs, nil +} + +func (self *realSysFs) GetNetworkAddress(name string) (string, error) { + address, err := ioutil.ReadFile(path.Join(netDir, name, "/address")) + if err != nil { + return "", err + } + return string(address), nil +} + +func (self *realSysFs) GetNetworkMtu(name string) (string, error) { + mtu, err := ioutil.ReadFile(path.Join(netDir, name, "/mtu")) + if err != nil { + return "", err + } + return string(mtu), nil +} + +func (self *realSysFs) GetNetworkSpeed(name string) (string, error) { + speed, err := ioutil.ReadFile(path.Join(netDir, name, "/speed")) + if err != nil { + return "", err + } + return string(speed), nil +} + +func (self *realSysFs) GetNetworkStatValue(dev string, stat string) (uint64, error) { + statPath := path.Join(netDir, dev, "/statistics", stat) + out, err := ioutil.ReadFile(statPath) + if err != nil { + return 0, fmt.Errorf("failed to read stat from %q for device %q", statPath, dev) + } + var s uint64 + n, err := fmt.Sscanf(string(out), "%d", &s) + if err != nil || n != 1 { + return 0, fmt.Errorf("could not parse value from %q for file %s", string(out), statPath) + } + return s, nil +} + +func (self *realSysFs) GetCaches(id int) ([]os.FileInfo, error) { + cpuPath := fmt.Sprintf("%s%d/cache", cacheDir, id) + return ioutil.ReadDir(cpuPath) +} + +func bitCount(i uint64) (count int) { + for i != 0 { + if i&1 == 1 { + count++ + } + i >>= 1 + } + return +} + +func getCpuCount(cache string) (count int, err error) { + out, err := ioutil.ReadFile(path.Join(cache, "/shared_cpu_map")) + if err != nil { + return 0, err + } + masks := strings.Split(string(out), ",") + for _, mask := range masks { + // convert hex string to uint64 + m, err := strconv.ParseUint(strings.TrimSpace(mask), 16, 64) + if err != nil { + return 0, fmt.Errorf("failed to parse cpu map %q: %v", string(out), err) + } + count += bitCount(m) + } + return +} + +func (self *realSysFs) GetCacheInfo(id int, name string) (CacheInfo, error) { + cachePath := fmt.Sprintf("%s%d/cache/%s", cacheDir, id, name) + out, err := ioutil.ReadFile(path.Join(cachePath, "/size")) + if err != nil { + return CacheInfo{}, err + } + var size uint64 + n, err := fmt.Sscanf(string(out), "%dK", &size) + if err != nil || n != 1 { + return CacheInfo{}, err + } + // convert to bytes + size = size * 1024 + out, err = ioutil.ReadFile(path.Join(cachePath, "/level")) + if err != nil { + return CacheInfo{}, err + } + var level int + n, err = fmt.Sscanf(string(out), "%d", &level) + if err != nil || n != 1 { + return CacheInfo{}, err + } + + out, err = ioutil.ReadFile(path.Join(cachePath, "/type")) + if err != nil { + return CacheInfo{}, err + } + cacheType := strings.TrimSpace(string(out)) + cpuCount, err := getCpuCount(cachePath) + if err != nil { + return CacheInfo{}, err + } + return CacheInfo{ + Size: size, + Level: level, + Type: cacheType, + Cpus: cpuCount, + }, nil +} + +func (self *realSysFs) GetSystemUUID() (string, error) { + if id, err := ioutil.ReadFile(path.Join(dmiDir, "id", "product_uuid")); err == nil { + return strings.TrimSpace(string(id)), nil + } else if id, err = ioutil.ReadFile(path.Join(ppcDevTree, "system-id")); err == nil { + return strings.TrimSpace(string(id)), nil + } else if id, err = ioutil.ReadFile(path.Join(ppcDevTree, "vm,uuid")); err == nil { + return strings.TrimSpace(string(id)), nil + } else if id, err = ioutil.ReadFile(path.Join(s390xDevTree, "machine-id")); err == nil { + return strings.TrimSpace(string(id)), nil + } else { + return "", err + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go new file mode 100644 index 0000000..2701738 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go @@ -0,0 +1,210 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sysinfo + +import ( + "fmt" + "regexp" + "strconv" + "strings" + + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/utils/sysfs" +) + +var schedulerRegExp = regexp.MustCompile(".*\\[(.*)\\].*") + +// Get information about block devices present on the system. +// Uses the passed in system interface to retrieve the low level OS information. +func GetBlockDeviceInfo(sysfs sysfs.SysFs) (map[string]info.DiskInfo, error) { + disks, err := sysfs.GetBlockDevices() + if err != nil { + return nil, err + } + + diskMap := make(map[string]info.DiskInfo) + for _, disk := range disks { + name := disk.Name() + // Ignore non-disk devices. + // TODO(rjnagal): Maybe just match hd, sd, and dm prefixes. + if strings.HasPrefix(name, "loop") || strings.HasPrefix(name, "ram") || strings.HasPrefix(name, "sr") { + continue + } + disk_info := info.DiskInfo{ + Name: name, + } + dev, err := sysfs.GetBlockDeviceNumbers(name) + if err != nil { + return nil, err + } + n, err := fmt.Sscanf(dev, "%d:%d", &disk_info.Major, &disk_info.Minor) + if err != nil || n != 2 { + return nil, fmt.Errorf("could not parse device numbers from %s for device %s", dev, name) + } + out, err := sysfs.GetBlockDeviceSize(name) + if err != nil { + return nil, err + } + // Remove trailing newline before conversion. + size, err := strconv.ParseUint(strings.TrimSpace(out), 10, 64) + if err != nil { + return nil, err + } + // size is in 512 bytes blocks. + disk_info.Size = size * 512 + + sched, err := sysfs.GetBlockDeviceScheduler(name) + if err != nil { + sched = "none" + } else { + matches := schedulerRegExp.FindSubmatch([]byte(sched)) + if len(matches) < 2 { + sched = "none" + } else { + sched = string(matches[1]) + } + } + disk_info.Scheduler = sched + device := fmt.Sprintf("%d:%d", disk_info.Major, disk_info.Minor) + diskMap[device] = disk_info + } + return diskMap, nil +} + +// Get information about network devices present on the system. +func GetNetworkDevices(sysfs sysfs.SysFs) ([]info.NetInfo, error) { + devs, err := sysfs.GetNetworkDevices() + if err != nil { + return nil, err + } + netDevices := []info.NetInfo{} + for _, dev := range devs { + name := dev.Name() + // Ignore docker, loopback, and veth devices. + ignoredDevices := []string{"lo", "veth", "docker"} + ignored := false + for _, prefix := range ignoredDevices { + if strings.HasPrefix(name, prefix) { + ignored = true + break + } + } + if ignored { + continue + } + address, err := sysfs.GetNetworkAddress(name) + if err != nil { + return nil, err + } + mtuStr, err := sysfs.GetNetworkMtu(name) + if err != nil { + return nil, err + } + var mtu int64 + n, err := fmt.Sscanf(mtuStr, "%d", &mtu) + if err != nil || n != 1 { + return nil, fmt.Errorf("could not parse mtu from %s for device %s", mtuStr, name) + } + netInfo := info.NetInfo{ + Name: name, + MacAddress: strings.TrimSpace(address), + Mtu: mtu, + } + speed, err := sysfs.GetNetworkSpeed(name) + // Some devices don't set speed. + if err == nil { + var s int64 + n, err := fmt.Sscanf(speed, "%d", &s) + if err != nil || n != 1 { + return nil, fmt.Errorf("could not parse speed from %s for device %s", speed, name) + } + netInfo.Speed = s + } + netDevices = append(netDevices, netInfo) + } + return netDevices, nil +} + +func GetCacheInfo(sysFs sysfs.SysFs, id int) ([]sysfs.CacheInfo, error) { + caches, err := sysFs.GetCaches(id) + if err != nil { + return nil, err + } + + info := []sysfs.CacheInfo{} + for _, cache := range caches { + if !strings.HasPrefix(cache.Name(), "index") { + continue + } + cacheInfo, err := sysFs.GetCacheInfo(id, cache.Name()) + if err != nil { + return nil, err + } + info = append(info, cacheInfo) + } + return info, nil +} + +func GetNetworkStats(name string) (info.InterfaceStats, error) { + // TODO(rjnagal): Take syfs as an argument. + sysFs, err := sysfs.NewRealSysFs() + if err != nil { + return info.InterfaceStats{}, err + } + return getNetworkStats(name, sysFs) +} + +func getNetworkStats(name string, sysFs sysfs.SysFs) (info.InterfaceStats, error) { + var stats info.InterfaceStats + var err error + stats.Name = name + stats.RxBytes, err = sysFs.GetNetworkStatValue(name, "rx_bytes") + if err != nil { + return stats, err + } + stats.RxPackets, err = sysFs.GetNetworkStatValue(name, "rx_packets") + if err != nil { + return stats, err + } + stats.RxErrors, err = sysFs.GetNetworkStatValue(name, "rx_errors") + if err != nil { + return stats, err + } + stats.RxDropped, err = sysFs.GetNetworkStatValue(name, "rx_dropped") + if err != nil { + return stats, err + } + stats.TxBytes, err = sysFs.GetNetworkStatValue(name, "tx_bytes") + if err != nil { + return stats, err + } + stats.TxPackets, err = sysFs.GetNetworkStatValue(name, "tx_packets") + if err != nil { + return stats, err + } + stats.TxErrors, err = sysFs.GetNetworkStatValue(name, "tx_errors") + if err != nil { + return stats, err + } + stats.TxDropped, err = sysFs.GetNetworkStatValue(name, "tx_dropped") + if err != nil { + return stats, err + } + return stats, nil +} + +func GetSystemUUID(sysFs sysfs.SysFs) (string, error) { + return sysFs.GetSystemUUID() +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go new file mode 100644 index 0000000..97df16b --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go @@ -0,0 +1,132 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package sysinfo + +import ( + "testing" + + info "github.com/google/cadvisor/info/v1" + "github.com/google/cadvisor/utils/sysfs" + "github.com/google/cadvisor/utils/sysfs/fakesysfs" +) + +func TestGetBlockDeviceInfo(t *testing.T) { + fakeSys := fakesysfs.FakeSysFs{} + disks, err := GetBlockDeviceInfo(&fakeSys) + if err != nil { + t.Errorf("expected call to GetBlockDeviceInfo() to succeed. Failed with %s", err) + } + if len(disks) != 1 { + t.Errorf("expected to get one disk entry. Got %d", len(disks)) + } + key := "8:0" + disk, ok := disks[key] + if !ok { + t.Fatalf("expected key 8:0 to exist in the disk map.") + } + if disk.Name != "sda" { + t.Errorf("expected to get disk named sda. Got %q", disk.Name) + } + size := uint64(1234567 * 512) + if disk.Size != size { + t.Errorf("expected to get disk size of %d. Got %d", size, disk.Size) + } + if disk.Scheduler != "cfq" { + t.Errorf("expected to get scheduler type of cfq. Got %q", disk.Scheduler) + } +} + +func TestGetNetworkDevices(t *testing.T) { + fakeSys := fakesysfs.FakeSysFs{} + fakeSys.SetEntryName("eth0") + devs, err := GetNetworkDevices(&fakeSys) + if err != nil { + t.Errorf("expected call to GetNetworkDevices() to succeed. Failed with %s", err) + } + if len(devs) != 1 { + t.Errorf("expected to get one network device. Got %d", len(devs)) + } + eth := devs[0] + if eth.Name != "eth0" { + t.Errorf("expected to find device with name eth0. Found name %q", eth.Name) + } + if eth.Mtu != 1024 { + t.Errorf("expected mtu to be set to 1024. Found %d", eth.Mtu) + } + if eth.Speed != 1000 { + t.Errorf("expected device speed to be set to 1000. Found %d", eth.Speed) + } + if eth.MacAddress != "42:01:02:03:04:f4" { + t.Errorf("expected mac address to be '42:01:02:03:04:f4'. Found %q", eth.MacAddress) + } +} + +func TestIgnoredNetworkDevices(t *testing.T) { + fakeSys := fakesysfs.FakeSysFs{} + ignoredDevices := []string{"veth1234", "lo", "docker0"} + for _, name := range ignoredDevices { + fakeSys.SetEntryName(name) + devs, err := GetNetworkDevices(&fakeSys) + if err != nil { + t.Errorf("expected call to GetNetworkDevices() to succeed. Failed with %s", err) + } + if len(devs) != 0 { + t.Errorf("expected dev %s to be ignored, but got info %+v", name, devs) + } + } +} + +func TestGetCacheInfo(t *testing.T) { + fakeSys := &fakesysfs.FakeSysFs{} + cacheInfo := sysfs.CacheInfo{ + Size: 1024, + Type: "Data", + Level: 3, + Cpus: 16, + } + fakeSys.SetCacheInfo(cacheInfo) + caches, err := GetCacheInfo(fakeSys, 0) + if err != nil { + t.Errorf("expected call to GetCacheInfo() to succeed. Failed with %s", err) + } + if len(caches) != 1 { + t.Errorf("expected to get one cache. Got %d", len(caches)) + } + if caches[0] != cacheInfo { + t.Errorf("expected to find cacheinfo %+v. Got %+v", cacheInfo, caches[0]) + } +} + +func TestGetNetworkStats(t *testing.T) { + expected_stats := info.InterfaceStats{ + Name: "eth0", + RxBytes: 1024, + RxPackets: 1024, + RxErrors: 1024, + RxDropped: 1024, + TxBytes: 1024, + TxPackets: 1024, + TxErrors: 1024, + TxDropped: 1024, + } + fakeSys := &fakesysfs.FakeSysFs{} + netStats, err := getNetworkStats("eth0", fakeSys) + if err != nil { + t.Errorf("call to getNetworkStats() failed with %s", err) + } + if expected_stats != netStats { + t.Errorf("expected to get stats %+v, got %+v", expected_stats, netStats) + } +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store.go new file mode 100644 index 0000000..70c310d --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store.go @@ -0,0 +1,161 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "sort" + "time" +) + +type timedStoreDataSlice []timedStoreData + +func (t timedStoreDataSlice) Less(i, j int) bool { + return t[i].timestamp.Before(t[j].timestamp) +} + +func (t timedStoreDataSlice) Len() int { + return len(t) +} + +func (t timedStoreDataSlice) Swap(i, j int) { + t[i], t[j] = t[j], t[i] +} + +// A time-based buffer for ContainerStats. +// Holds information for a specific time period and/or a max number of items. +type TimedStore struct { + buffer timedStoreDataSlice + age time.Duration + maxItems int +} + +type timedStoreData struct { + timestamp time.Time + data interface{} +} + +// Returns a new thread-compatible TimedStore. +// A maxItems value of -1 means no limit. +func NewTimedStore(age time.Duration, maxItems int) *TimedStore { + return &TimedStore{ + buffer: make(timedStoreDataSlice, 0), + age: age, + maxItems: maxItems, + } +} + +// Adds an element to the start of the buffer (removing one from the end if necessary). +func (self *TimedStore) Add(timestamp time.Time, item interface{}) { + // Remove any elements if over our max size. + if self.maxItems >= 0 && (len(self.buffer)+1) > self.maxItems { + startIndex := len(self.buffer) + 1 - self.maxItems + self.buffer = self.buffer[startIndex:] + } + // Add the new element first and sort. We can then remove an expired element, if required. + copied := item + self.buffer = append(self.buffer, timedStoreData{ + timestamp: timestamp, + data: copied, + }) + + sort.Sort(self.buffer) + // Remove any elements before eviction time. + // TODO(rjnagal): This is assuming that the added entry has timestamp close to now. + evictTime := timestamp.Add(-self.age) + index := sort.Search(len(self.buffer), func(index int) bool { + return self.buffer[index].timestamp.After(evictTime) + }) + if index < len(self.buffer) { + self.buffer = self.buffer[index:] + } + +} + +// Returns up to maxResult elements in the specified time period (inclusive). +// Results are from first to last. maxResults of -1 means no limit. When first +// and last are specified, maxResults is ignored. +func (self *TimedStore) InTimeRange(start, end time.Time, maxResults int) []interface{} { + // No stats, return empty. + if len(self.buffer) == 0 { + return []interface{}{} + } + + // Return all results in a time range if specified. + if !start.IsZero() && !end.IsZero() { + maxResults = -1 + } + + var startIndex int + if start.IsZero() { + // None specified, start at the beginning. + startIndex = len(self.buffer) - 1 + } else { + // Start is the index before the elements smaller than it. We do this by + // finding the first element smaller than start and taking the index + // before that element + startIndex = sort.Search(len(self.buffer), func(index int) bool { + // buffer[index] < start + return self.getData(index).timestamp.Before(start) + }) - 1 + // Check if start is after all the data we have. + if startIndex < 0 { + return []interface{}{} + } + } + + var endIndex int + if end.IsZero() { + // None specified, end with the latest stats. + endIndex = 0 + } else { + // End is the first index smaller than or equal to it (so, not larger). + endIndex = sort.Search(len(self.buffer), func(index int) bool { + // buffer[index] <= t -> !(buffer[index] > t) + return !self.getData(index).timestamp.After(end) + }) + // Check if end is before all the data we have. + if endIndex == len(self.buffer) { + return []interface{}{} + } + } + + // Trim to maxResults size. + numResults := startIndex - endIndex + 1 + if maxResults != -1 && numResults > maxResults { + startIndex -= numResults - maxResults + numResults = maxResults + } + + // Return in sorted timestamp order so from the "back" to "front". + result := make([]interface{}, numResults) + for i := 0; i < numResults; i++ { + result[i] = self.Get(startIndex - i) + } + return result +} + +// Gets the element at the specified index. Note that elements are output in LIFO order. +func (self *TimedStore) Get(index int) interface{} { + return self.getData(index).data +} + +// Gets the data at the specified index. Note that elements are output in LIFO order. +func (self *TimedStore) getData(index int) timedStoreData { + return self.buffer[len(self.buffer)-index-1] +} + +func (self *TimedStore) Size() int { + return len(self.buffer) +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go new file mode 100644 index 0000000..76b7778 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go @@ -0,0 +1,221 @@ +// Copyright 2014 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +func createTime(id int) time.Time { + var zero time.Time + return zero.Add(time.Duration(id+1) * time.Second) +} + +func expectSize(t *testing.T, sb *TimedStore, expectedSize int) { + if sb.Size() != expectedSize { + t.Errorf("Expected size %v, got %v", expectedSize, sb.Size()) + } +} + +func expectAllElements(t *testing.T, sb *TimedStore, expected []int) { + size := sb.Size() + els := make([]interface{}, size) + for i := 0; i < size; i++ { + els[i] = sb.Get(size - i - 1) + } + expectElements(t, []interface{}(els), expected) +} + +func expectElements(t *testing.T, actual []interface{}, expected []int) { + if len(actual) != len(expected) { + t.Errorf("Expected elements %v, got %v", expected, actual) + return + } + for i, el := range actual { + if el.(int) != expected[i] { + t.Errorf("Expected elements %v, got %v", expected, actual) + return + } + } +} + +func TestAdd(t *testing.T) { + sb := NewTimedStore(5*time.Second, 100) + + // Add 1. + sb.Add(createTime(0), 0) + expectSize(t, sb, 1) + expectAllElements(t, sb, []int{0}) + + // Fill the buffer. + for i := 1; i <= 5; i++ { + expectSize(t, sb, i) + sb.Add(createTime(i), i) + } + expectSize(t, sb, 5) + expectAllElements(t, sb, []int{1, 2, 3, 4, 5}) + + // Add more than is available in the buffer + sb.Add(createTime(6), 6) + expectSize(t, sb, 5) + expectAllElements(t, sb, []int{2, 3, 4, 5, 6}) + + // Replace all elements. + for i := 7; i <= 10; i++ { + sb.Add(createTime(i), i) + } + expectSize(t, sb, 5) + expectAllElements(t, sb, []int{6, 7, 8, 9, 10}) +} + +func TestGet(t *testing.T) { + sb := NewTimedStore(5*time.Second, -1) + sb.Add(createTime(1), 1) + sb.Add(createTime(2), 2) + sb.Add(createTime(3), 3) + expectSize(t, sb, 3) + + assert := assert.New(t) + assert.Equal(sb.Get(0).(int), 3) + assert.Equal(sb.Get(1).(int), 2) + assert.Equal(sb.Get(2).(int), 1) +} + +func TestInTimeRange(t *testing.T) { + sb := NewTimedStore(5*time.Second, -1) + assert := assert.New(t) + + var empty time.Time + + // No elements. + assert.Empty(sb.InTimeRange(createTime(0), createTime(5), 10)) + assert.Empty(sb.InTimeRange(createTime(0), empty, 10)) + assert.Empty(sb.InTimeRange(empty, createTime(5), 10)) + assert.Empty(sb.InTimeRange(empty, empty, 10)) + + // One element. + sb.Add(createTime(1), 1) + expectSize(t, sb, 1) + expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 10), []int{1}) + expectElements(t, sb.InTimeRange(createTime(0), createTime(1), 10), []int{1}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(1), 10), []int{1}) + assert.Empty(sb.InTimeRange(createTime(2), createTime(5), 10)) + + // Two element. + sb.Add(createTime(2), 2) + expectSize(t, sb, 2) + expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(createTime(0), createTime(2), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(2), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(1), 10), []int{1}) + expectElements(t, sb.InTimeRange(createTime(2), createTime(2), 10), []int{2}) + assert.Empty(sb.InTimeRange(createTime(3), createTime(5), 10)) + + // Many elements. + sb.Add(createTime(3), 3) + sb.Add(createTime(4), 4) + expectSize(t, sb, 4) + expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(0), createTime(4), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(4), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(0), createTime(2), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(createTime(1), createTime(2), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(createTime(2), createTime(3), 10), []int{2, 3}) + expectElements(t, sb.InTimeRange(createTime(3), createTime(4), 10), []int{3, 4}) + expectElements(t, sb.InTimeRange(createTime(3), createTime(5), 10), []int{3, 4}) + assert.Empty(sb.InTimeRange(createTime(5), createTime(5), 10)) + + // Start and end time ignores maxResults. + expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 1), []int{1, 2, 3, 4}) + + // No start time. + expectElements(t, sb.InTimeRange(empty, createTime(5), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(empty, createTime(4), 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(empty, createTime(3), 10), []int{1, 2, 3}) + expectElements(t, sb.InTimeRange(empty, createTime(2), 10), []int{1, 2}) + expectElements(t, sb.InTimeRange(empty, createTime(1), 10), []int{1}) + + // No end time. + expectElements(t, sb.InTimeRange(createTime(0), empty, 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(1), empty, 10), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(2), empty, 10), []int{2, 3, 4}) + expectElements(t, sb.InTimeRange(createTime(3), empty, 10), []int{3, 4}) + expectElements(t, sb.InTimeRange(createTime(4), empty, 10), []int{4}) + + // No start or end time. + expectElements(t, sb.InTimeRange(empty, empty, 10), []int{1, 2, 3, 4}) + + // Start after data. + assert.Empty(sb.InTimeRange(createTime(5), createTime(5), 10)) + assert.Empty(sb.InTimeRange(createTime(5), empty, 10)) + + // End before data. + assert.Empty(sb.InTimeRange(createTime(0), createTime(0), 10)) + assert.Empty(sb.InTimeRange(empty, createTime(0), 10)) +} + +func TestInTimeRangeWithLimit(t *testing.T) { + sb := NewTimedStore(5*time.Second, -1) + sb.Add(createTime(1), 1) + sb.Add(createTime(2), 2) + sb.Add(createTime(3), 3) + sb.Add(createTime(4), 4) + expectSize(t, sb, 4) + + var empty time.Time + + // Limit cuts off from latest timestamp. + expectElements(t, sb.InTimeRange(empty, empty, 4), []int{1, 2, 3, 4}) + expectElements(t, sb.InTimeRange(empty, empty, 3), []int{2, 3, 4}) + expectElements(t, sb.InTimeRange(empty, empty, 2), []int{3, 4}) + expectElements(t, sb.InTimeRange(empty, empty, 1), []int{4}) + assert.Empty(t, sb.InTimeRange(empty, empty, 0)) +} + +func TestLimitedSize(t *testing.T) { + sb := NewTimedStore(time.Hour, 5) + + // Add 1. + sb.Add(createTime(0), 0) + expectSize(t, sb, 1) + expectAllElements(t, sb, []int{0}) + + // Fill the buffer. + for i := 1; i <= 5; i++ { + expectSize(t, sb, i) + sb.Add(createTime(i), i) + } + expectSize(t, sb, 5) + expectAllElements(t, sb, []int{1, 2, 3, 4, 5}) + + // Add more than is available in the buffer + sb.Add(createTime(6), 6) + expectSize(t, sb, 5) + expectAllElements(t, sb, []int{2, 3, 4, 5, 6}) + + // Replace all elements. + for i := 7; i <= 10; i++ { + sb.Add(createTime(i), i) + } + expectSize(t, sb, 5) + expectAllElements(t, sb, []int{6, 7, 8, 9, 10}) +} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/utils.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/utils.go new file mode 100644 index 0000000..9458a4c --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/utils/utils.go @@ -0,0 +1,29 @@ +// Copyright 2015 Google Inc. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package utils + +import "fmt" + +// Returns a mask of all cores on the machine if the passed-in mask is empty. +func FixCpuMask(mask string, cores int) string { + if mask == "" { + if cores > 1 { + mask = fmt.Sprintf("0-%d", cores-1) + } else { + mask = "0" + } + } + return mask +} diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore b/Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore new file mode 100644 index 0000000..010c242 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore @@ -0,0 +1,25 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test + +*.swp diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml b/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml new file mode 100644 index 0000000..aefda90 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml @@ -0,0 +1,5 @@ +language: go +go: + - 1.3 + +sudo: false diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md b/Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md new file mode 100644 index 0000000..d43a6c7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md @@ -0,0 +1,61 @@ +clockwork +========= + +[![Build Status](https://travis-ci.org/jonboulle/clockwork.png?branch=master)](https://travis-ci.org/jonboulle/clockwork) +[![godoc](https://godoc.org/github.com/jonboulle/clockwork?status.svg)](http://godoc.org/github.com/jonboulle/clockwork) + +a simple fake clock for golang + +# Usage + +Replace uses of the `time` package with the `clockwork.Clock` interface instead. + +For example, instead of using `time.Sleep` directly: + +``` +func my_func() { + time.Sleep(3 * time.Second) + do_something() +} +``` + +inject a clock and use its `Sleep` method instead: + +``` +func my_func(clock clockwork.Clock) { + clock.Sleep(3 * time.Second) + do_something() +} +``` + +Now you can easily test `my_func` with a `FakeClock`: + +``` +func TestMyFunc(t *testing.T) { + c := clockwork.NewFakeClock() + + // Start our sleepy function + my_func(c) + + // Ensure we wait until my_func is sleeping + c.BlockUntil(1) + + assert_state() + + // Advance the FakeClock forward in time + c.Advance(3) + + assert_state() +} +``` + +and in production builds, simply inject the real clock instead: +``` +my_func(clockwork.NewRealClock()) +``` + +See [example_test.go](example_test.go) for a full example. + +# Credits + +clockwork is inspired by @wickman's [threaded fake clock](https://gist.github.com/wickman/3840816), and the [Golang playground](http://blog.golang.org/playground#Faking time) diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go b/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go new file mode 100644 index 0000000..cf4e327 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go @@ -0,0 +1,169 @@ +package clockwork + +import ( + "sync" + "time" +) + +// Clock provides an interface that packages can use instead of directly +// using the time module, so that chronology-related behavior can be tested +type Clock interface { + After(d time.Duration) <-chan time.Time + Sleep(d time.Duration) + Now() time.Time +} + +// FakeClock provides an interface for a clock which can be +// manually advanced through time +type FakeClock interface { + Clock + // Advance advances the FakeClock to a new point in time, ensuring any existing + // sleepers are notified appropriately before returning + Advance(d time.Duration) + // BlockUntil will block until the FakeClock has the given number of + // sleepers (callers of Sleep or After) + BlockUntil(n int) +} + +// NewRealClock returns a Clock which simply delegates calls to the actual time +// package; it should be used by packages in production. +func NewRealClock() Clock { + return &realClock{} +} + +// NewFakeClock returns a FakeClock implementation which can be +// manually advanced through time for testing. The initial time of the +// FakeClock will be an arbitrary non-zero time. +func NewFakeClock() FakeClock { + // use a fixture that does not fulfill Time.IsZero() + return NewFakeClockAt(time.Date(1984, time.April, 4, 0, 0, 0, 0, time.UTC)) +} + +// NewFakeClock returns a FakeClock initialised at the given time.Time. +func NewFakeClockAt(t time.Time) FakeClock { + return &fakeClock{ + l: sync.RWMutex{}, + time: t, + } +} + +type realClock struct{} + +func (rc *realClock) After(d time.Duration) <-chan time.Time { + return time.After(d) +} + +func (rc *realClock) Sleep(d time.Duration) { + time.Sleep(d) +} + +func (rc *realClock) Now() time.Time { + return time.Now() +} + +type fakeClock struct { + sleepers []*sleeper + blockers []*blocker + time time.Time + + l sync.RWMutex +} + +// sleeper represents a caller of After or Sleep +type sleeper struct { + until time.Time + done chan time.Time +} + +// blocker represents a caller of BlockUntil +type blocker struct { + count int + ch chan struct{} +} + +// After mimics time.After; it waits for the given duration to elapse on the +// fakeClock, then sends the current time on the returned channel. +func (fc *fakeClock) After(d time.Duration) <-chan time.Time { + fc.l.Lock() + defer fc.l.Unlock() + now := fc.time + done := make(chan time.Time, 1) + if d.Nanoseconds() == 0 { + // special case - trigger immediately + done <- now + } else { + // otherwise, add to the set of sleepers + s := &sleeper{ + until: now.Add(d), + done: done, + } + fc.sleepers = append(fc.sleepers, s) + // and notify any blockers + fc.blockers = notifyBlockers(fc.blockers, len(fc.sleepers)) + } + return done +} + +// notifyBlockers notifies all the blockers waiting until the +// given number of sleepers are waiting on the fakeClock. It +// returns an updated slice of blockers (i.e. those still waiting) +func notifyBlockers(blockers []*blocker, count int) (newBlockers []*blocker) { + for _, b := range blockers { + if b.count == count { + close(b.ch) + } else { + newBlockers = append(newBlockers, b) + } + } + return +} + +// Sleep blocks until the given duration has passed on the fakeClock +func (fc *fakeClock) Sleep(d time.Duration) { + <-fc.After(d) +} + +// Time returns the current time of the fakeClock +func (fc *fakeClock) Now() time.Time { + fc.l.Lock() + defer fc.l.Unlock() + return fc.time +} + +// Advance advances fakeClock to a new point in time, ensuring channels from any +// previous invocations of After are notified appropriately before returning +func (fc *fakeClock) Advance(d time.Duration) { + fc.l.Lock() + defer fc.l.Unlock() + end := fc.time.Add(d) + var newSleepers []*sleeper + for _, s := range fc.sleepers { + if end.Sub(s.until) >= 0 { + s.done <- end + } else { + newSleepers = append(newSleepers, s) + } + } + fc.sleepers = newSleepers + fc.blockers = notifyBlockers(fc.blockers, len(fc.sleepers)) + fc.time = end +} + +// BlockUntil will block until the fakeClock has the given number of sleepers +// (callers of Sleep or After) +func (fc *fakeClock) BlockUntil(n int) { + fc.l.Lock() + // Fast path: current number of sleepers is what we're looking for + if len(fc.sleepers) == n { + fc.l.Unlock() + return + } + // Otherwise, set up a new blocker + b := &blocker{ + count: n, + ch: make(chan struct{}), + } + fc.blockers = append(fc.blockers, b) + fc.l.Unlock() + <-b.ch +} diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go b/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go new file mode 100644 index 0000000..21c8f16 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go @@ -0,0 +1,129 @@ +package clockwork + +import ( + "reflect" + "testing" + "time" +) + +func TestFakeClockAfter(t *testing.T) { + fc := &fakeClock{} + + zero := fc.After(0) + select { + case <-zero: + default: + t.Errorf("zero did not return!") + } + one := fc.After(1) + two := fc.After(2) + six := fc.After(6) + ten := fc.After(10) + fc.Advance(1) + select { + case <-one: + default: + t.Errorf("one did not return!") + } + select { + case <-two: + t.Errorf("two returned prematurely!") + case <-six: + t.Errorf("six returned prematurely!") + case <-ten: + t.Errorf("ten returned prematurely!") + default: + } + fc.Advance(1) + select { + case <-two: + default: + t.Errorf("two did not return!") + } + select { + case <-six: + t.Errorf("six returned prematurely!") + case <-ten: + t.Errorf("ten returned prematurely!") + default: + } + fc.Advance(1) + select { + case <-six: + t.Errorf("six returned prematurely!") + case <-ten: + t.Errorf("ten returned prematurely!") + default: + } + fc.Advance(3) + select { + case <-six: + default: + t.Errorf("six did not return!") + } + select { + case <-ten: + t.Errorf("ten returned prematurely!") + default: + } + fc.Advance(100) + select { + case <-ten: + default: + t.Errorf("ten did not return!") + } +} + +func TestNotifyBlockers(t *testing.T) { + b1 := &blocker{1, make(chan struct{})} + b2 := &blocker{2, make(chan struct{})} + b3 := &blocker{5, make(chan struct{})} + b4 := &blocker{10, make(chan struct{})} + b5 := &blocker{10, make(chan struct{})} + bs := []*blocker{b1, b2, b3, b4, b5} + bs1 := notifyBlockers(bs, 2) + if n := len(bs1); n != 4 { + t.Fatalf("got %d blockers, want %d", n, 4) + } + select { + case <-b2.ch: + case <-time.After(time.Second): + t.Fatalf("timed out waiting for channel close!") + } + bs2 := notifyBlockers(bs1, 10) + if n := len(bs2); n != 2 { + t.Fatalf("got %d blockers, want %d", n, 2) + } + select { + case <-b4.ch: + case <-time.After(time.Second): + t.Fatalf("timed out waiting for channel close!") + } + select { + case <-b5.ch: + case <-time.After(time.Second): + t.Fatalf("timed out waiting for channel close!") + } +} + +func TestNewFakeClock(t *testing.T) { + fc := NewFakeClock() + now := fc.Now() + if now.IsZero() { + t.Fatalf("fakeClock.Now() fulfills IsZero") + } + + now2 := fc.Now() + if !reflect.DeepEqual(now, now2) { + t.Fatalf("fakeClock.Now() returned different value: want=%#v got=%#v", now, now2) + } +} + +func TestNewFakeClockAt(t *testing.T) { + t1 := time.Date(1999, time.February, 3, 4, 5, 6, 7, time.UTC) + fc := NewFakeClockAt(t1) + now := fc.Now() + if !reflect.DeepEqual(now, t1) { + t.Fatalf("fakeClock.Now() returned unexpected non-initialised value: want=%#v, got %#v", t1, now) + } +} diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go b/Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go new file mode 100644 index 0000000..6a41bd8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go @@ -0,0 +1,49 @@ +package clockwork + +import ( + "sync" + "testing" + "time" +) + +// my_func is an example of a time-dependent function, using an +// injected clock +func my_func(clock Clock, i *int) { + clock.Sleep(3 * time.Second) + *i += 1 +} + +// assert_state is an example of a state assertion in a test +func assert_state(t *testing.T, i, j int) { + if i != j { + t.Fatalf("i %d, j %d", i, j) + } +} + +// TestMyFunc tests my_func's behaviour with a FakeClock +func TestMyFunc(t *testing.T) { + var i int + c := NewFakeClock() + + var wg sync.WaitGroup + wg.Add(1) + go func() { + my_func(c, &i) + wg.Done() + }() + + // Wait until my_func is actually sleeping on the clock + c.BlockUntil(1) + + // Assert the initial state + assert_state(t, i, 0) + + // Now advance the clock forward in time + c.Advance(1 * time.Hour) + + // Wait until the function completes + wg.Wait() + + // Assert the final state + assert_state(t, i, 1) +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go new file mode 100644 index 0000000..dd8b589 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go @@ -0,0 +1,150 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +High Performance, Feature-Rich Idiomatic Go codec/encoding library for +binc, msgpack, cbor, json. + +Supported Serialization formats are: + + - msgpack: https://github.com/msgpack/msgpack + - binc: http://github.com/ugorji/binc + - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 + - json: http://json.org http://tools.ietf.org/html/rfc7159 + - simple: + +To install: + + go get github.com/ugorji/go/codec + +This package understands the 'unsafe' tag, to allow using unsafe semantics: + + - When decoding into a struct, you need to read the field name as a string + so you can find the struct field it is mapped to. + Using `unsafe` will bypass the allocation and copying overhead of []byte->string conversion. + +To install using unsafe, pass the 'unsafe' tag: + + go get -tags=unsafe github.com/ugorji/go/codec + +For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer . + +The idiomatic Go support is as seen in other encoding packages in +the standard library (ie json, xml, gob, etc). + +Rich Feature Set includes: + + - Simple but extremely powerful and feature-rich API + - Very High Performance. + Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. + - Multiple conversions: + Package coerces types where appropriate + e.g. decode an int in the stream into a float, etc. + - Corner Cases: + Overflows, nil maps/slices, nil values in streams are handled correctly + - Standard field renaming via tags + - Support for omitting empty fields during an encoding + - Encoding from any value and decoding into pointer to any value + (struct, slice, map, primitives, pointers, interface{}, etc) + - Extensions to support efficient encoding/decoding of any named types + - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Decoding without a schema (into a interface{}). + Includes Options to configure what specific map or slice type to use + when decoding an encoded list or map into a nil interface{} + - Encode a struct as an array, and decode struct from an array in the data stream + - Comprehensive support for anonymous fields + - Fast (no-reflection) encoding/decoding of common maps and slices + - Code-generation for faster performance. + - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats + - Support indefinite-length formats to enable true streaming + (for formats which support it e.g. json, cbor) + - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. + This mostly applies to maps, where iteration order is non-deterministic. + - NIL in data stream decoded as zero value + - Never silently skip data when decoding. + User decides whether to return an error or silently skip data when keys or indexes + in the data stream do not map to fields in the struct. + - Encode/Decode from/to chan types (for iterative streaming support) + - Drop-in replacement for encoding/json. `json:` key in struct tag supported. + - Provides a RPC Server and Client Codec for net/rpc communication protocol. + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support + msgpack-rpc protocol defined at: + https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md + +Extension Support + +Users can register a function to handle the encoding or decoding of +their custom types. + +There are no restrictions on what the custom type can be. Some examples: + + type BisSet []int + type BitSet64 uint64 + type UUID string + type MyStructWithUnexportedFields struct { a int; b bool; c []int; } + type GifImage struct { ... } + +As an illustration, MyStructWithUnexportedFields would normally be +encoded as an empty map because it has no exported fields, while UUID +would be encoded as a string. However, with extension support, you can +encode any of these however you like. + +RPC + +RPC Client and Server Codecs are implemented, so the codecs can be used +with the standard net/rpc package. + +Usage + +Typical usage model: + + // create and configure Handle + var ( + bh codec.BincHandle + mh codec.MsgpackHandle + ch codec.CborHandle + ) + + mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) + + // configure extensions + // e.g. for msgpack, define functions and enable Time support for tag 1 + // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) + + // create and use decoder/encoder + var ( + r io.Reader + w io.Writer + b []byte + h = &bh // or mh to use msgpack + ) + + dec = codec.NewDecoder(r, h) + dec = codec.NewDecoderBytes(b, h) + err = dec.Decode(&v) + + enc = codec.NewEncoder(w, h) + enc = codec.NewEncoderBytes(&b, h) + err = enc.Encode(v) + + //RPC Server + go func() { + for { + conn, err := listener.Accept() + rpcCodec := codec.GoRpc.ServerCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) + rpc.ServeCodec(rpcCodec) + } + }() + + //RPC Communication (client side) + conn, err = net.Dial("tcp", "localhost:5555") + rpcCodec := codec.GoRpc.ClientCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) + client := rpc.NewClientWithCodec(rpcCodec) + +*/ +package codec + diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md b/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md new file mode 100644 index 0000000..a790a52 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md @@ -0,0 +1,148 @@ +# Codec + +High Performance, Feature-Rich Idiomatic Go codec/encoding library for +binc, msgpack, cbor, json. + +Supported Serialization formats are: + + - msgpack: https://github.com/msgpack/msgpack + - binc: http://github.com/ugorji/binc + - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 + - json: http://json.org http://tools.ietf.org/html/rfc7159 + - simple: + +To install: + + go get github.com/ugorji/go/codec + +This package understands the `unsafe` tag, to allow using unsafe semantics: + + - When decoding into a struct, you need to read the field name as a string + so you can find the struct field it is mapped to. + Using `unsafe` will bypass the allocation and copying overhead of `[]byte->string` conversion. + +To use it, you must pass the `unsafe` tag during install: + +``` +go install -tags=unsafe github.com/ugorji/go/codec +``` + +Online documentation: http://godoc.org/github.com/ugorji/go/codec +Detailed Usage/How-to Primer: http://ugorji.net/blog/go-codec-primer + +The idiomatic Go support is as seen in other encoding packages in +the standard library (ie json, xml, gob, etc). + +Rich Feature Set includes: + + - Simple but extremely powerful and feature-rich API + - Very High Performance. + Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. + - Multiple conversions: + Package coerces types where appropriate + e.g. decode an int in the stream into a float, etc. + - Corner Cases: + Overflows, nil maps/slices, nil values in streams are handled correctly + - Standard field renaming via tags + - Support for omitting empty fields during an encoding + - Encoding from any value and decoding into pointer to any value + (struct, slice, map, primitives, pointers, interface{}, etc) + - Extensions to support efficient encoding/decoding of any named types + - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Decoding without a schema (into a interface{}). + Includes Options to configure what specific map or slice type to use + when decoding an encoded list or map into a nil interface{} + - Encode a struct as an array, and decode struct from an array in the data stream + - Comprehensive support for anonymous fields + - Fast (no-reflection) encoding/decoding of common maps and slices + - Code-generation for faster performance. + - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats + - Support indefinite-length formats to enable true streaming + (for formats which support it e.g. json, cbor) + - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. + This mostly applies to maps, where iteration order is non-deterministic. + - NIL in data stream decoded as zero value + - Never silently skip data when decoding. + User decides whether to return an error or silently skip data when keys or indexes + in the data stream do not map to fields in the struct. + - Encode/Decode from/to chan types (for iterative streaming support) + - Drop-in replacement for encoding/json. `json:` key in struct tag supported. + - Provides a RPC Server and Client Codec for net/rpc communication protocol. + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support + msgpack-rpc protocol defined at: + https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md + +## Extension Support + +Users can register a function to handle the encoding or decoding of +their custom types. + +There are no restrictions on what the custom type can be. Some examples: + + type BisSet []int + type BitSet64 uint64 + type UUID string + type MyStructWithUnexportedFields struct { a int; b bool; c []int; } + type GifImage struct { ... } + +As an illustration, MyStructWithUnexportedFields would normally be +encoded as an empty map because it has no exported fields, while UUID +would be encoded as a string. However, with extension support, you can +encode any of these however you like. + +## RPC + +RPC Client and Server Codecs are implemented, so the codecs can be used +with the standard net/rpc package. + +## Usage + +Typical usage model: + + // create and configure Handle + var ( + bh codec.BincHandle + mh codec.MsgpackHandle + ch codec.CborHandle + ) + + mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) + + // configure extensions + // e.g. for msgpack, define functions and enable Time support for tag 1 + // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) + + // create and use decoder/encoder + var ( + r io.Reader + w io.Writer + b []byte + h = &bh // or mh to use msgpack + ) + + dec = codec.NewDecoder(r, h) + dec = codec.NewDecoderBytes(b, h) + err = dec.Decode(&v) + + enc = codec.NewEncoder(w, h) + enc = codec.NewEncoderBytes(&b, h) + err = enc.Encode(v) + + //RPC Server + go func() { + for { + conn, err := listener.Accept() + rpcCodec := codec.GoRpc.ServerCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) + rpc.ServeCodec(rpcCodec) + } + }() + + //RPC Communication (client side) + conn, err = net.Dial("tcp", "localhost:5555") + rpcCodec := codec.GoRpc.ClientCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) + client := rpc.NewClientWithCodec(rpcCodec) + diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go new file mode 100644 index 0000000..251609e --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go @@ -0,0 +1,909 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math" + "time" +) + +const bincDoPrune = true // No longer needed. Needed before as C lib did not support pruning. + +// vd as low 4 bits (there are 16 slots) +const ( + bincVdSpecial byte = iota + bincVdPosInt + bincVdNegInt + bincVdFloat + + bincVdString + bincVdByteArray + bincVdArray + bincVdMap + + bincVdTimestamp + bincVdSmallInt + bincVdUnicodeOther + bincVdSymbol + + bincVdDecimal + _ // open slot + _ // open slot + bincVdCustomExt = 0x0f +) + +const ( + bincSpNil byte = iota + bincSpFalse + bincSpTrue + bincSpNan + bincSpPosInf + bincSpNegInf + bincSpZeroFloat + bincSpZero + bincSpNegOne +) + +const ( + bincFlBin16 byte = iota + bincFlBin32 + _ // bincFlBin32e + bincFlBin64 + _ // bincFlBin64e + // others not currently supported +) + +type bincEncDriver struct { + e *Encoder + w encWriter + m map[string]uint16 // symbols + s uint16 // symbols sequencer + b [scratchByteArrayLen]byte + encNoSeparator +} + +func (e *bincEncDriver) IsBuiltinType(rt uintptr) bool { + return rt == timeTypId +} + +func (e *bincEncDriver) EncodeBuiltin(rt uintptr, v interface{}) { + if rt == timeTypId { + var bs []byte + switch x := v.(type) { + case time.Time: + bs = encodeTime(x) + case *time.Time: + bs = encodeTime(*x) + default: + e.e.errorf("binc error encoding builtin: expect time.Time, received %T", v) + } + e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs))) + e.w.writeb(bs) + } +} + +func (e *bincEncDriver) EncodeNil() { + e.w.writen1(bincVdSpecial<<4 | bincSpNil) +} + +func (e *bincEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(bincVdSpecial<<4 | bincSpTrue) + } else { + e.w.writen1(bincVdSpecial<<4 | bincSpFalse) + } +} + +func (e *bincEncDriver) EncodeFloat32(f float32) { + if f == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + return + } + e.w.writen1(bincVdFloat<<4 | bincFlBin32) + bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *bincEncDriver) EncodeFloat64(f float64) { + if f == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + return + } + bigen.PutUint64(e.b[:8], math.Float64bits(f)) + if bincDoPrune { + i := 7 + for ; i >= 0 && (e.b[i] == 0); i-- { + } + i++ + if i <= 6 { + e.w.writen1(bincVdFloat<<4 | 0x8 | bincFlBin64) + e.w.writen1(byte(i)) + e.w.writeb(e.b[:i]) + return + } + } + e.w.writen1(bincVdFloat<<4 | bincFlBin64) + e.w.writeb(e.b[:8]) +} + +func (e *bincEncDriver) encIntegerPrune(bd byte, pos bool, v uint64, lim uint8) { + if lim == 4 { + bigen.PutUint32(e.b[:lim], uint32(v)) + } else { + bigen.PutUint64(e.b[:lim], v) + } + if bincDoPrune { + i := pruneSignExt(e.b[:lim], pos) + e.w.writen1(bd | lim - 1 - byte(i)) + e.w.writeb(e.b[i:lim]) + } else { + e.w.writen1(bd | lim - 1) + e.w.writeb(e.b[:lim]) + } +} + +func (e *bincEncDriver) EncodeInt(v int64) { + const nbd byte = bincVdNegInt << 4 + if v >= 0 { + e.encUint(bincVdPosInt<<4, true, uint64(v)) + } else if v == -1 { + e.w.writen1(bincVdSpecial<<4 | bincSpNegOne) + } else { + e.encUint(bincVdNegInt<<4, false, uint64(-v)) + } +} + +func (e *bincEncDriver) EncodeUint(v uint64) { + e.encUint(bincVdPosInt<<4, true, v) +} + +func (e *bincEncDriver) encUint(bd byte, pos bool, v uint64) { + if v == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZero) + } else if pos && v >= 1 && v <= 16 { + e.w.writen1(bincVdSmallInt<<4 | byte(v-1)) + } else if v <= math.MaxUint8 { + e.w.writen2(bd|0x0, byte(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.encIntegerPrune(bd, pos, v, 4) + } else { + e.encIntegerPrune(bd, pos, v, 8) + } +} + +func (e *bincEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(rv) + if bs == nil { + e.EncodeNil() + return + } + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) +} + +func (e *bincEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) { + e.encLen(bincVdCustomExt<<4, uint64(length)) + e.w.writen1(xtag) +} + +func (e *bincEncDriver) EncodeArrayStart(length int) { + e.encLen(bincVdArray<<4, uint64(length)) +} + +func (e *bincEncDriver) EncodeMapStart(length int) { + e.encLen(bincVdMap<<4, uint64(length)) +} + +func (e *bincEncDriver) EncodeString(c charEncoding, v string) { + l := uint64(len(v)) + e.encBytesLen(c, l) + if l > 0 { + e.w.writestr(v) + } +} + +func (e *bincEncDriver) EncodeSymbol(v string) { + // if WriteSymbolsNoRefs { + // e.encodeString(c_UTF8, v) + // return + // } + + //symbols only offer benefit when string length > 1. + //This is because strings with length 1 take only 2 bytes to store + //(bd with embedded length, and single byte for string val). + + l := len(v) + if l == 0 { + e.encBytesLen(c_UTF8, 0) + return + } else if l == 1 { + e.encBytesLen(c_UTF8, 1) + e.w.writen1(v[0]) + return + } + if e.m == nil { + e.m = make(map[string]uint16, 16) + } + ui, ok := e.m[v] + if ok { + if ui <= math.MaxUint8 { + e.w.writen2(bincVdSymbol<<4, byte(ui)) + } else { + e.w.writen1(bincVdSymbol<<4 | 0x8) + bigenHelper{e.b[:2], e.w}.writeUint16(ui) + } + } else { + e.s++ + ui = e.s + //ui = uint16(atomic.AddUint32(&e.s, 1)) + e.m[v] = ui + var lenprec uint8 + if l <= math.MaxUint8 { + // lenprec = 0 + } else if l <= math.MaxUint16 { + lenprec = 1 + } else if int64(l) <= math.MaxUint32 { + lenprec = 2 + } else { + lenprec = 3 + } + if ui <= math.MaxUint8 { + e.w.writen2(bincVdSymbol<<4|0x0|0x4|lenprec, byte(ui)) + } else { + e.w.writen1(bincVdSymbol<<4 | 0x8 | 0x4 | lenprec) + bigenHelper{e.b[:2], e.w}.writeUint16(ui) + } + if lenprec == 0 { + e.w.writen1(byte(l)) + } else if lenprec == 1 { + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(l)) + } else if lenprec == 2 { + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(l)) + } else { + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(l)) + } + e.w.writestr(v) + } +} + +func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + l := uint64(len(v)) + e.encBytesLen(c, l) + if l > 0 { + e.w.writeb(v) + } +} + +func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) { + //TODO: support bincUnicodeOther (for now, just use string or bytearray) + if c == c_RAW { + e.encLen(bincVdByteArray<<4, length) + } else { + e.encLen(bincVdString<<4, length) + } +} + +func (e *bincEncDriver) encLen(bd byte, l uint64) { + if l < 12 { + e.w.writen1(bd | uint8(l+4)) + } else { + e.encLenNumber(bd, l) + } +} + +func (e *bincEncDriver) encLenNumber(bd byte, v uint64) { + if v <= math.MaxUint8 { + e.w.writen2(bd, byte(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd | 0x02) + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v)) + } else { + e.w.writen1(bd | 0x03) + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(v)) + } +} + +//------------------------------------ + +type bincDecSymbol struct { + i uint16 + s string + b []byte +} + +type bincDecDriver struct { + d *Decoder + h *BincHandle + r decReader + br bool // bytes reader + bdRead bool + bdType valueType + bd byte + vd byte + vs byte + noStreamingCodec + decNoSeparator + b [scratchByteArrayLen]byte + + // linear searching on this slice is ok, + // because we typically expect < 32 symbols in each stream. + s []bincDecSymbol +} + +func (d *bincDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.vd = d.bd >> 4 + d.vs = d.bd & 0x0f + d.bdRead = true + d.bdType = valueTypeUnset +} + +func (d *bincDecDriver) IsContainerType(vt valueType) (b bool) { + switch vt { + case valueTypeNil: + return d.vd == bincVdSpecial && d.vs == bincSpNil + case valueTypeBytes: + return d.vd == bincVdByteArray + case valueTypeString: + return d.vd == bincVdString + case valueTypeArray: + return d.vd == bincVdArray + case valueTypeMap: + return d.vd == bincVdMap + } + d.d.errorf("isContainerType: unsupported parameter: %v", vt) + return // "unreachable" +} + +func (d *bincDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return true + } + return false +} + +func (d *bincDecDriver) IsBuiltinType(rt uintptr) bool { + return rt == timeTypId +} + +func (d *bincDecDriver) DecodeBuiltin(rt uintptr, v interface{}) { + if !d.bdRead { + d.readNextBd() + } + if rt == timeTypId { + if d.vd != bincVdTimestamp { + d.d.errorf("Invalid d.vd. Expecting 0x%x. Received: 0x%x", bincVdTimestamp, d.vd) + return + } + tt, err := decodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + var vt *time.Time = v.(*time.Time) + *vt = tt + d.bdRead = false + } +} + +func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) { + if vs&0x8 == 0 { + d.r.readb(d.b[0:defaultLen]) + } else { + l := d.r.readn1() + if l > 8 { + d.d.errorf("At most 8 bytes used to represent float. Received: %v bytes", l) + return + } + for i := l; i < 8; i++ { + d.b[i] = 0 + } + d.r.readb(d.b[0:l]) + } +} + +func (d *bincDecDriver) decFloat() (f float64) { + //if true { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))); break; } + if x := d.vs & 0x7; x == bincFlBin32 { + d.decFloatPre(d.vs, 4) + f = float64(math.Float32frombits(bigen.Uint32(d.b[0:4]))) + } else if x == bincFlBin64 { + d.decFloatPre(d.vs, 8) + f = math.Float64frombits(bigen.Uint64(d.b[0:8])) + } else { + d.d.errorf("only float32 and float64 are supported. d.vd: 0x%x, d.vs: 0x%x", d.vd, d.vs) + return + } + return +} + +func (d *bincDecDriver) decUint() (v uint64) { + // need to inline the code (interface conversion and type assertion expensive) + switch d.vs { + case 0: + v = uint64(d.r.readn1()) + case 1: + d.r.readb(d.b[6:8]) + v = uint64(bigen.Uint16(d.b[6:8])) + case 2: + d.b[4] = 0 + d.r.readb(d.b[5:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + case 3: + d.r.readb(d.b[4:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + case 4, 5, 6: + lim := int(7 - d.vs) + d.r.readb(d.b[lim:8]) + for i := 0; i < lim; i++ { + d.b[i] = 0 + } + v = uint64(bigen.Uint64(d.b[:8])) + case 7: + d.r.readb(d.b[:8]) + v = uint64(bigen.Uint64(d.b[:8])) + default: + d.d.errorf("unsigned integers with greater than 64 bits of precision not supported") + return + } + return +} + +func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) { + if !d.bdRead { + d.readNextBd() + } + vd, vs := d.vd, d.vs + if vd == bincVdPosInt { + ui = d.decUint() + } else if vd == bincVdNegInt { + ui = d.decUint() + neg = true + } else if vd == bincVdSmallInt { + ui = uint64(d.vs) + 1 + } else if vd == bincVdSpecial { + if vs == bincSpZero { + //i = 0 + } else if vs == bincSpNegOne { + neg = true + ui = 1 + } else { + d.d.errorf("numeric decode fails for special value: d.vs: 0x%x", d.vs) + return + } + } else { + d.d.errorf("number can only be decoded from uint or int values. d.bd: 0x%x, d.vd: 0x%x", d.bd, d.vd) + return + } + return +} + +func (d *bincDecDriver) DecodeInt(bitsize uint8) (i int64) { + ui, neg := d.decCheckInteger() + i, overflow := chkOvf.SignedInt(ui) + if overflow { + d.d.errorf("simple: overflow converting %v to signed integer", ui) + return + } + if neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("binc: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + ui, neg := d.decCheckInteger() + if neg { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("binc: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + vd, vs := d.vd, d.vs + if vd == bincVdSpecial { + d.bdRead = false + if vs == bincSpNan { + return math.NaN() + } else if vs == bincSpPosInf { + return math.Inf(1) + } else if vs == bincSpZeroFloat || vs == bincSpZero { + return + } else if vs == bincSpNegInf { + return math.Inf(-1) + } else { + d.d.errorf("Invalid d.vs decoding float where d.vd=bincVdSpecial: %v", d.vs) + return + } + } else if vd == bincVdFloat { + f = d.decFloat() + } else { + f = float64(d.DecodeInt(64)) + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("binc: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *bincDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == (bincVdSpecial | bincSpFalse) { + // b = false + } else if bd == (bincVdSpecial | bincSpTrue) { + b = true + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) ReadMapStart() (length int) { + if d.vd != bincVdMap { + d.d.errorf("Invalid d.vd for map. Expecting 0x%x. Got: 0x%x", bincVdMap, d.vd) + return + } + length = d.decLen() + d.bdRead = false + return +} + +func (d *bincDecDriver) ReadArrayStart() (length int) { + if d.vd != bincVdArray { + d.d.errorf("Invalid d.vd for array. Expecting 0x%x. Got: 0x%x", bincVdArray, d.vd) + return + } + length = d.decLen() + d.bdRead = false + return +} + +func (d *bincDecDriver) decLen() int { + if d.vs > 3 { + return int(d.vs - 4) + } + return int(d.decLenNumber()) +} + +func (d *bincDecDriver) decLenNumber() (v uint64) { + if x := d.vs; x == 0 { + v = uint64(d.r.readn1()) + } else if x == 1 { + d.r.readb(d.b[6:8]) + v = uint64(bigen.Uint16(d.b[6:8])) + } else if x == 2 { + d.r.readb(d.b[4:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + } else { + d.r.readb(d.b[:8]) + v = bigen.Uint64(d.b[:8]) + } + return +} + +func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) (bs2 []byte, s string) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return + } + var slen int = -1 + // var ok bool + switch d.vd { + case bincVdString, bincVdByteArray: + slen = d.decLen() + if zerocopy { + if d.br { + bs2 = d.r.readx(slen) + } else if len(bs) == 0 { + bs2 = decByteSlice(d.r, slen, d.b[:]) + } else { + bs2 = decByteSlice(d.r, slen, bs) + } + } else { + bs2 = decByteSlice(d.r, slen, bs) + } + if withString { + s = string(bs2) + } + case bincVdSymbol: + // zerocopy doesn't apply for symbols, + // as the values must be stored in a table for later use. + // + //from vs: extract numSymbolBytes, containsStringVal, strLenPrecision, + //extract symbol + //if containsStringVal, read it and put in map + //else look in map for string value + var symbol uint16 + vs := d.vs + if vs&0x8 == 0 { + symbol = uint16(d.r.readn1()) + } else { + symbol = uint16(bigen.Uint16(d.r.readx(2))) + } + if d.s == nil { + d.s = make([]bincDecSymbol, 0, 16) + } + + if vs&0x4 == 0 { + for i := range d.s { + j := &d.s[i] + if j.i == symbol { + bs2 = j.b + if withString { + if j.s == "" && bs2 != nil { + j.s = string(bs2) + } + s = j.s + } + break + } + } + } else { + switch vs & 0x3 { + case 0: + slen = int(d.r.readn1()) + case 1: + slen = int(bigen.Uint16(d.r.readx(2))) + case 2: + slen = int(bigen.Uint32(d.r.readx(4))) + case 3: + slen = int(bigen.Uint64(d.r.readx(8))) + } + // since using symbols, do not store any part of + // the parameter bs in the map, as it might be a shared buffer. + // bs2 = decByteSlice(d.r, slen, bs) + bs2 = decByteSlice(d.r, slen, nil) + if withString { + s = string(bs2) + } + d.s = append(d.s, bincDecSymbol{symbol, s, bs2}) + } + default: + d.d.errorf("Invalid d.vd. Expecting string:0x%x, bytearray:0x%x or symbol: 0x%x. Got: 0x%x", + bincVdString, bincVdByteArray, bincVdSymbol, d.vd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeString() (s string) { + // DecodeBytes does not accomodate symbols, whose impl stores string version in map. + // Use decStringAndBytes directly. + // return string(d.DecodeBytes(d.b[:], true, true)) + _, s = d.decStringAndBytes(d.b[:], true, true) + return +} + +func (d *bincDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if isstring { + bsOut, _ = d.decStringAndBytes(bs, false, zerocopy) + return + } + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return nil + } + var clen int + if d.vd == bincVdString || d.vd == bincVdByteArray { + clen = d.decLen() + } else { + d.d.errorf("Invalid d.vd for bytes. Expecting string:0x%x or bytearray:0x%x. Got: 0x%x", + bincVdString, bincVdByteArray, d.vd) + return + } + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *bincDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.vd == bincVdCustomExt { + l := d.decLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(l) + } else if d.vd == bincVdByteArray { + xbs = d.DecodeBytes(nil, false, true) + } else { + d.d.errorf("Invalid d.vd for extensions (Expecting extensions or byte array). Got: 0x%x", d.vd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { + if !d.bdRead { + d.readNextBd() + } + + switch d.vd { + case bincVdSpecial: + switch d.vs { + case bincSpNil: + vt = valueTypeNil + case bincSpFalse: + vt = valueTypeBool + v = false + case bincSpTrue: + vt = valueTypeBool + v = true + case bincSpNan: + vt = valueTypeFloat + v = math.NaN() + case bincSpPosInf: + vt = valueTypeFloat + v = math.Inf(1) + case bincSpNegInf: + vt = valueTypeFloat + v = math.Inf(-1) + case bincSpZeroFloat: + vt = valueTypeFloat + v = float64(0) + case bincSpZero: + vt = valueTypeUint + v = uint64(0) // int8(0) + case bincSpNegOne: + vt = valueTypeInt + v = int64(-1) // int8(-1) + default: + d.d.errorf("decodeNaked: Unrecognized special value 0x%x", d.vs) + return + } + case bincVdSmallInt: + vt = valueTypeUint + v = uint64(int8(d.vs)) + 1 // int8(d.vs) + 1 + case bincVdPosInt: + vt = valueTypeUint + v = d.decUint() + case bincVdNegInt: + vt = valueTypeInt + v = -(int64(d.decUint())) + case bincVdFloat: + vt = valueTypeFloat + v = d.decFloat() + case bincVdSymbol: + vt = valueTypeSymbol + v = d.DecodeString() + case bincVdString: + vt = valueTypeString + v = d.DecodeString() + case bincVdByteArray: + vt = valueTypeBytes + v = d.DecodeBytes(nil, false, false) + case bincVdTimestamp: + vt = valueTypeTimestamp + tt, err := decodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + v = tt + case bincVdCustomExt: + vt = valueTypeExt + l := d.decLen() + var re RawExt + re.Tag = uint64(d.r.readn1()) + re.Data = d.r.readx(l) + v = &re + vt = valueTypeExt + case bincVdArray: + vt = valueTypeArray + decodeFurther = true + case bincVdMap: + vt = valueTypeMap + decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.vd: 0x%x", d.vd) + return + } + + if !decodeFurther { + d.bdRead = false + } + if vt == valueTypeUint && d.h.SignedInteger { + d.bdType = valueTypeInt + v = int64(v.(uint64)) + } + return +} + +//------------------------------------ + +//BincHandle is a Handle for the Binc Schema-Free Encoding Format +//defined at https://github.com/ugorji/binc . +// +//BincHandle currently supports all Binc features with the following EXCEPTIONS: +// - only integers up to 64 bits of precision are supported. +// big integers are unsupported. +// - Only IEEE 754 binary32 and binary64 floats are supported (ie Go float32 and float64 types). +// extended precision and decimal IEEE 754 floats are unsupported. +// - Only UTF-8 strings supported. +// Unicode_Other Binc types (UTF16, UTF32) are currently unsupported. +// +//Note that these EXCEPTIONS are temporary and full support is possible and may happen soon. +type BincHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *BincHandle) newEncDriver(e *Encoder) encDriver { + return &bincEncDriver{e: e, w: e.w} +} + +func (h *BincHandle) newDecDriver(d *Decoder) decDriver { + return &bincDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +var _ decDriver = (*bincDecDriver)(nil) +var _ encDriver = (*bincEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go new file mode 100644 index 0000000..c3b88da --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go @@ -0,0 +1,566 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import "math" + +const ( + cborMajorUint byte = iota + cborMajorNegInt + cborMajorBytes + cborMajorText + cborMajorArray + cborMajorMap + cborMajorTag + cborMajorOther +) + +const ( + cborBdFalse byte = 0xf4 + iota + cborBdTrue + cborBdNil + cborBdUndefined + cborBdExt + cborBdFloat16 + cborBdFloat32 + cborBdFloat64 +) + +const ( + cborBdIndefiniteBytes byte = 0x5f + cborBdIndefiniteString = 0x7f + cborBdIndefiniteArray = 0x9f + cborBdIndefiniteMap = 0xbf + cborBdBreak = 0xff +) + +const ( + CborStreamBytes byte = 0x5f + CborStreamString = 0x7f + CborStreamArray = 0x9f + CborStreamMap = 0xbf + CborStreamBreak = 0xff +) + +const ( + cborBaseUint byte = 0x00 + cborBaseNegInt = 0x20 + cborBaseBytes = 0x40 + cborBaseString = 0x60 + cborBaseArray = 0x80 + cborBaseMap = 0xa0 + cborBaseTag = 0xc0 + cborBaseSimple = 0xe0 +) + +// ------------------- + +type cborEncDriver struct { + e *Encoder + w encWriter + h *CborHandle + noBuiltInTypes + encNoSeparator + x [8]byte +} + +func (e *cborEncDriver) EncodeNil() { + e.w.writen1(cborBdNil) +} + +func (e *cborEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(cborBdTrue) + } else { + e.w.writen1(cborBdFalse) + } +} + +func (e *cborEncDriver) EncodeFloat32(f float32) { + e.w.writen1(cborBdFloat32) + bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *cborEncDriver) EncodeFloat64(f float64) { + e.w.writen1(cborBdFloat64) + bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *cborEncDriver) encUint(v uint64, bd byte) { + if v <= 0x17 { + e.w.writen1(byte(v) + bd) + } else if v <= math.MaxUint8 { + e.w.writen2(bd+0x18, uint8(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd + 0x19) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd + 0x1a) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(v)) + } else { // if v <= math.MaxUint64 { + e.w.writen1(bd + 0x1b) + bigenHelper{e.x[:8], e.w}.writeUint64(v) + } +} + +func (e *cborEncDriver) EncodeInt(v int64) { + if v < 0 { + e.encUint(uint64(-1-v), cborBaseNegInt) + } else { + e.encUint(uint64(v), cborBaseUint) + } +} + +func (e *cborEncDriver) EncodeUint(v uint64) { + e.encUint(v, cborBaseUint) +} + +func (e *cborEncDriver) encLen(bd byte, length int) { + e.encUint(uint64(length), bd) +} + +func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { + e.encUint(uint64(xtag), cborBaseTag) + if v := ext.ConvertExt(rv); v == nil { + e.EncodeNil() + } else { + en.encode(v) + } +} + +func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { + e.encUint(uint64(re.Tag), cborBaseTag) + if re.Data != nil { + en.encode(re.Data) + } else if re.Value == nil { + e.EncodeNil() + } else { + en.encode(re.Value) + } +} + +func (e *cborEncDriver) EncodeArrayStart(length int) { + e.encLen(cborBaseArray, length) +} + +func (e *cborEncDriver) EncodeMapStart(length int) { + e.encLen(cborBaseMap, length) +} + +func (e *cborEncDriver) EncodeString(c charEncoding, v string) { + e.encLen(cborBaseString, len(v)) + e.w.writestr(v) +} + +func (e *cborEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + e.encLen(cborBaseBytes, len(v)) + e.w.writeb(v) +} + +// ---------------------- + +type cborDecDriver struct { + d *Decoder + h *CborHandle + r decReader + br bool // bytes reader + bdRead bool + bdType valueType + bd byte + b [scratchByteArrayLen]byte + noBuiltInTypes + decNoSeparator +} + +func (d *cborDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true + d.bdType = valueTypeUnset +} + +func (d *cborDecDriver) IsContainerType(vt valueType) (bv bool) { + switch vt { + case valueTypeNil: + return d.bd == cborBdNil + case valueTypeBytes: + return d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) + case valueTypeString: + return d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) + case valueTypeArray: + return d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) + case valueTypeMap: + return d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) + } + d.d.errorf("isContainerType: unsupported parameter: %v", vt) + return // "unreachable" +} + +func (d *cborDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + // treat Nil and Undefined as nil values + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return true + } + return false +} + +func (d *cborDecDriver) CheckBreak() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdBreak { + d.bdRead = false + return true + } + return false +} + +func (d *cborDecDriver) decUint() (ui uint64) { + v := d.bd & 0x1f + if v <= 0x17 { + ui = uint64(v) + } else { + if v == 0x18 { + ui = uint64(d.r.readn1()) + } else if v == 0x19 { + ui = uint64(bigen.Uint16(d.r.readx(2))) + } else if v == 0x1a { + ui = uint64(bigen.Uint32(d.r.readx(4))) + } else if v == 0x1b { + ui = uint64(bigen.Uint64(d.r.readx(8))) + } else { + d.d.errorf("decUint: Invalid descriptor: %v", d.bd) + return + } + } + return +} + +func (d *cborDecDriver) decCheckInteger() (neg bool) { + if !d.bdRead { + d.readNextBd() + } + major := d.bd >> 5 + if major == cborMajorUint { + } else if major == cborMajorNegInt { + neg = true + } else { + d.d.errorf("invalid major: %v (bd: %v)", major, d.bd) + return + } + return +} + +func (d *cborDecDriver) DecodeInt(bitsize uint8) (i int64) { + neg := d.decCheckInteger() + ui := d.decUint() + // check if this number can be converted to an int without overflow + var overflow bool + if neg { + if i, overflow = chkOvf.SignedInt(ui + 1); overflow { + d.d.errorf("cbor: overflow converting %v to signed integer", ui+1) + return + } + i = -i + } else { + if i, overflow = chkOvf.SignedInt(ui); overflow { + d.d.errorf("cbor: overflow converting %v to signed integer", ui) + return + } + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("cbor: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + if d.decCheckInteger() { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + ui = d.decUint() + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("cbor: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == cborBdFloat16 { + f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.r.readx(2))))) + } else if bd == cborBdFloat32 { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if bd == cborBdFloat64 { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else if bd >= cborBaseUint && bd < cborBaseBytes { + f = float64(d.DecodeInt(64)) + } else { + d.d.errorf("Float only valid from float16/32/64: Invalid descriptor: %v", bd) + return + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("cbor: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *cborDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == cborBdTrue { + b = true + } else if bd == cborBdFalse { + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) ReadMapStart() (length int) { + d.bdRead = false + if d.bd == cborBdIndefiniteMap { + return -1 + } + return d.decLen() +} + +func (d *cborDecDriver) ReadArrayStart() (length int) { + d.bdRead = false + if d.bd == cborBdIndefiniteArray { + return -1 + } + return d.decLen() +} + +func (d *cborDecDriver) decLen() int { + return int(d.decUint()) +} + +func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte { + d.bdRead = false + for { + if d.CheckBreak() { + break + } + if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText { + d.d.errorf("cbor: expect bytes or string major type in indefinite string/bytes; got: %v, byte: %v", major, d.bd) + return nil + } + n := d.decLen() + oldLen := len(bs) + newLen := oldLen + n + if newLen > cap(bs) { + bs2 := make([]byte, newLen, 2*cap(bs)+n) + copy(bs2, bs) + bs = bs2 + } else { + bs = bs[:newLen] + } + d.r.readb(bs[oldLen:newLen]) + // bs = append(bs, d.r.readn()...) + d.bdRead = false + } + d.bdRead = false + return bs +} + +func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return nil + } + if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString { + if bs == nil { + return d.decAppendIndefiniteBytes(nil) + } + return d.decAppendIndefiniteBytes(bs[:0]) + } + clen := d.decLen() + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *cborDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if !d.bdRead { + d.readNextBd() + } + u := d.decUint() + d.bdRead = false + realxtag = u + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + d.d.decode(&re.Value) + } else if xtag != realxtag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", realxtag, xtag) + return + } else { + var v interface{} + d.d.decode(&v) + ext.UpdateExt(rv, v) + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { + if !d.bdRead { + d.readNextBd() + } + + switch d.bd { + case cborBdNil: + vt = valueTypeNil + case cborBdFalse: + vt = valueTypeBool + v = false + case cborBdTrue: + vt = valueTypeBool + v = true + case cborBdFloat16, cborBdFloat32: + vt = valueTypeFloat + v = d.DecodeFloat(true) + case cborBdFloat64: + vt = valueTypeFloat + v = d.DecodeFloat(false) + case cborBdIndefiniteBytes: + vt = valueTypeBytes + v = d.DecodeBytes(nil, false, false) + case cborBdIndefiniteString: + vt = valueTypeString + v = d.DecodeString() + case cborBdIndefiniteArray: + vt = valueTypeArray + decodeFurther = true + case cborBdIndefiniteMap: + vt = valueTypeMap + decodeFurther = true + default: + switch { + case d.bd >= cborBaseUint && d.bd < cborBaseNegInt: + if d.h.SignedInteger { + vt = valueTypeInt + v = d.DecodeInt(64) + } else { + vt = valueTypeUint + v = d.DecodeUint(64) + } + case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: + vt = valueTypeInt + v = d.DecodeInt(64) + case d.bd >= cborBaseBytes && d.bd < cborBaseString: + vt = valueTypeBytes + v = d.DecodeBytes(nil, false, false) + case d.bd >= cborBaseString && d.bd < cborBaseArray: + vt = valueTypeString + v = d.DecodeString() + case d.bd >= cborBaseArray && d.bd < cborBaseMap: + vt = valueTypeArray + decodeFurther = true + case d.bd >= cborBaseMap && d.bd < cborBaseTag: + vt = valueTypeMap + decodeFurther = true + case d.bd >= cborBaseTag && d.bd < cborBaseSimple: + vt = valueTypeExt + var re RawExt + ui := d.decUint() + d.bdRead = false + re.Tag = ui + d.d.decode(&re.Value) + v = &re + // decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) + return + } + } + + if !decodeFurther { + d.bdRead = false + } + return +} + +// ------------------------- + +// CborHandle is a Handle for the CBOR encoding format, +// defined at http://tools.ietf.org/html/rfc7049 and documented further at http://cbor.io . +// +// CBOR is comprehensively supported, including support for: +// - indefinite-length arrays/maps/bytes/strings +// - (extension) tags in range 0..0xffff (0 .. 65535) +// - half, single and double-precision floats +// - all numbers (1, 2, 4 and 8-byte signed and unsigned integers) +// - nil, true, false, ... +// - arrays and maps, bytes and text strings +// +// None of the optional extensions (with tags) defined in the spec are supported out-of-the-box. +// Users can implement them as needed (using SetExt), including spec-documented ones: +// - timestamp, BigNum, BigFloat, Decimals, Encoded Text (e.g. URL, regexp, base64, MIME Message), etc. +// +// To encode with indefinite lengths (streaming), users will use +// (Must)Encode methods of *Encoder, along with writing CborStreamXXX constants. +// +// For example, to encode "one-byte" as an indefinite length string: +// var buf bytes.Buffer +// e := NewEncoder(&buf, new(CborHandle)) +// buf.WriteByte(CborStreamString) +// e.MustEncode("one-") +// e.MustEncode("byte") +// buf.WriteByte(CborStreamBreak) +// encodedBytes := buf.Bytes() +// var vv interface{} +// NewDecoderBytes(buf.Bytes(), new(CborHandle)).MustDecode(&vv) +// // Now, vv contains the same string "one-byte" +// +type CborHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *CborHandle) newEncDriver(e *Encoder) encDriver { + return &cborEncDriver{e: e, w: e.w, h: h} +} + +func (h *CborHandle) newDecDriver(d *Decoder) decDriver { + return &cborDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +var _ decDriver = (*cborDecDriver)(nil) +var _ encDriver = (*cborEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go new file mode 100644 index 0000000..205dffa --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go @@ -0,0 +1,205 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "bufio" + "bytes" + "encoding/hex" + "math" + "os" + "regexp" + "strings" + "testing" +) + +func TestCborIndefiniteLength(t *testing.T) { + oldMapType := testCborH.MapType + defer func() { + testCborH.MapType = oldMapType + }() + testCborH.MapType = testMapStrIntfTyp + // var ( + // M1 map[string][]byte + // M2 map[uint64]bool + // L1 []interface{} + // S1 []string + // B1 []byte + // ) + var v, vv interface{} + // define it (v), encode it using indefinite lengths, decode it (vv), compare v to vv + v = map[string]interface{}{ + "one-byte-key": []byte{1, 2, 3, 4, 5, 6}, + "two-string-key": "two-value", + "three-list-key": []interface{}{true, false, uint64(1), int64(-1)}, + } + var buf bytes.Buffer + // buf.Reset() + e := NewEncoder(&buf, testCborH) + buf.WriteByte(cborBdIndefiniteMap) + //---- + buf.WriteByte(cborBdIndefiniteString) + e.MustEncode("one-") + e.MustEncode("byte-") + e.MustEncode("key") + buf.WriteByte(cborBdBreak) + + buf.WriteByte(cborBdIndefiniteBytes) + e.MustEncode([]byte{1, 2, 3}) + e.MustEncode([]byte{4, 5, 6}) + buf.WriteByte(cborBdBreak) + + //---- + buf.WriteByte(cborBdIndefiniteString) + e.MustEncode("two-") + e.MustEncode("string-") + e.MustEncode("key") + buf.WriteByte(cborBdBreak) + + buf.WriteByte(cborBdIndefiniteString) + e.MustEncode([]byte("two-")) // encode as bytes, to check robustness of code + e.MustEncode([]byte("value")) + buf.WriteByte(cborBdBreak) + + //---- + buf.WriteByte(cborBdIndefiniteString) + e.MustEncode("three-") + e.MustEncode("list-") + e.MustEncode("key") + buf.WriteByte(cborBdBreak) + + buf.WriteByte(cborBdIndefiniteArray) + e.MustEncode(true) + e.MustEncode(false) + e.MustEncode(uint64(1)) + e.MustEncode(int64(-1)) + buf.WriteByte(cborBdBreak) + + buf.WriteByte(cborBdBreak) // close map + + NewDecoderBytes(buf.Bytes(), testCborH).MustDecode(&vv) + if err := deepEqual(v, vv); err != nil { + logT(t, "-------- Before and After marshal do not match: Error: %v", err) + logT(t, " ....... GOLDEN: (%T) %#v", v, v) + logT(t, " ....... DECODED: (%T) %#v", vv, vv) + failT(t) + } +} + +type testCborGolden struct { + Base64 string `codec:"cbor"` + Hex string `codec:"hex"` + Roundtrip bool `codec:"roundtrip"` + Decoded interface{} `codec:"decoded"` + Diagnostic string `codec:"diagnostic"` + Skip bool `codec:"skip"` +} + +// Some tests are skipped because they include numbers outside the range of int64/uint64 +func doTestCborGoldens(t *testing.T) { + oldMapType := testCborH.MapType + defer func() { + testCborH.MapType = oldMapType + }() + testCborH.MapType = testMapStrIntfTyp + // decode test-cbor-goldens.json into a list of []*testCborGolden + // for each one, + // - decode hex into []byte bs + // - decode bs into interface{} v + // - compare both using deepequal + // - for any miss, record it + var gs []*testCborGolden + f, err := os.Open("test-cbor-goldens.json") + if err != nil { + logT(t, "error opening test-cbor-goldens.json: %v", err) + failT(t) + } + defer f.Close() + jh := new(JsonHandle) + jh.MapType = testMapStrIntfTyp + // d := NewDecoder(f, jh) + d := NewDecoder(bufio.NewReader(f), jh) + // err = d.Decode(&gs) + d.MustDecode(&gs) + if err != nil { + logT(t, "error json decoding test-cbor-goldens.json: %v", err) + failT(t) + } + + tagregex := regexp.MustCompile(`[\d]+\(.+?\)`) + hexregex := regexp.MustCompile(`h'([0-9a-fA-F]*)'`) + for i, g := range gs { + // fmt.Printf("%v, skip: %v, isTag: %v, %s\n", i, g.Skip, tagregex.MatchString(g.Diagnostic), g.Diagnostic) + // skip tags or simple or those with prefix, as we can't verify them. + if g.Skip || strings.HasPrefix(g.Diagnostic, "simple(") || tagregex.MatchString(g.Diagnostic) { + // fmt.Printf("%v: skipped\n", i) + logT(t, "[%v] skipping because skip=true OR unsupported simple value or Tag Value", i) + continue + } + // println("++++++++++++", i, "g.Diagnostic", g.Diagnostic) + if hexregex.MatchString(g.Diagnostic) { + // println(i, "g.Diagnostic matched hex") + if s2 := g.Diagnostic[2 : len(g.Diagnostic)-1]; s2 == "" { + g.Decoded = zeroByteSlice + } else if bs2, err2 := hex.DecodeString(s2); err2 == nil { + g.Decoded = bs2 + } + // fmt.Printf("%v: hex: %v\n", i, g.Decoded) + } + bs, err := hex.DecodeString(g.Hex) + if err != nil { + logT(t, "[%v] error hex decoding %s [%v]: %v", i, g.Hex, err) + failT(t) + } + var v interface{} + NewDecoderBytes(bs, testCborH).MustDecode(&v) + if _, ok := v.(RawExt); ok { + continue + } + // check the diagnostics to compare + switch g.Diagnostic { + case "Infinity": + b := math.IsInf(v.(float64), 1) + testCborError(t, i, math.Inf(1), v, nil, &b) + case "-Infinity": + b := math.IsInf(v.(float64), -1) + testCborError(t, i, math.Inf(-1), v, nil, &b) + case "NaN": + // println(i, "checking NaN") + b := math.IsNaN(v.(float64)) + testCborError(t, i, math.NaN(), v, nil, &b) + case "undefined": + b := v == nil + testCborError(t, i, nil, v, nil, &b) + default: + v0 := g.Decoded + // testCborCoerceJsonNumber(reflect.ValueOf(&v0)) + testCborError(t, i, v0, v, deepEqual(v0, v), nil) + } + } +} + +func testCborError(t *testing.T, i int, v0, v1 interface{}, err error, equal *bool) { + if err == nil && equal == nil { + // fmt.Printf("%v testCborError passed (err and equal nil)\n", i) + return + } + if err != nil { + logT(t, "[%v] deepEqual error: %v", i, err) + logT(t, " ....... GOLDEN: (%T) %#v", v0, v0) + logT(t, " ....... DECODED: (%T) %#v", v1, v1) + failT(t) + } + if equal != nil && !*equal { + logT(t, "[%v] values not equal", i) + logT(t, " ....... GOLDEN: (%T) %#v", v0, v0) + logT(t, " ....... DECODED: (%T) %#v", v1, v1) + failT(t) + } + // fmt.Printf("%v testCborError passed (checks passed)\n", i) +} + +func TestCborGoldens(t *testing.T) { + doTestCborGoldens(t) +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go new file mode 100644 index 0000000..d9583a9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go @@ -0,0 +1,1175 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// Test works by using a slice of interfaces. +// It can test for encoding/decoding into/from a nil interface{} +// or passing the object to encode/decode into. +// +// There are basically 2 main tests here. +// First test internally encodes and decodes things and verifies that +// the artifact was as expected. +// Second test will use python msgpack to create a bunch of golden files, +// read those files, and compare them to what it should be. It then +// writes those files back out and compares the byte streams. +// +// Taken together, the tests are pretty extensive. +// +// The following manual tests must be done: +// - TestCodecUnderlyingType +// - Set fastpathEnabled to false and run tests (to ensure that regular reflection works). +// We don't want to use a variable there so that code is ellided. + +import ( + "bytes" + "encoding/gob" + "flag" + "fmt" + "io/ioutil" + "math" + "net" + "net/rpc" + "os" + "os/exec" + "path/filepath" + "reflect" + "runtime" + "strconv" + "sync/atomic" + "testing" + "time" +) + +func init() { + testInitFlags() + testPreInitFns = append(testPreInitFns, testInit) +} + +type testVerifyArg int + +const ( + testVerifyMapTypeSame testVerifyArg = iota + testVerifyMapTypeStrIntf + testVerifyMapTypeIntfIntf + // testVerifySliceIntf + testVerifyForPython +) + +const testSkipRPCTests = false + +var ( + testVerbose bool + testInitDebug bool + testUseIoEncDec bool + testStructToArray bool + testCanonical bool + testWriteNoSymbols bool + testSkipIntf bool + + skipVerifyVal interface{} = &(struct{}{}) + + testMapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) + + // For Go Time, do not use a descriptive timezone. + // It's unnecessary, and makes it harder to do a reflect.DeepEqual. + // The Offset already tells what the offset should be, if not on UTC and unknown zone name. + timeLoc = time.FixedZone("", -8*60*60) // UTC-08:00 //time.UTC-8 + timeToCompare1 = time.Date(2012, 2, 2, 2, 2, 2, 2000, timeLoc).UTC() + timeToCompare2 = time.Date(1900, 2, 2, 2, 2, 2, 2000, timeLoc).UTC() + timeToCompare3 = time.Unix(0, 270).UTC() // use value that must be encoded as uint64 for nanoseconds (for cbor/msgpack comparison) + //timeToCompare4 = time.Time{}.UTC() // does not work well with simple cbor time encoding (overflow) + timeToCompare4 = time.Unix(-2013855848, 4223).UTC() + + table []interface{} // main items we encode + tableVerify []interface{} // we verify encoded things against this after decode + tableTestNilVerify []interface{} // for nil interface, use this to verify (rules are different) + tablePythonVerify []interface{} // for verifying for python, since Python sometimes + // will encode a float32 as float64, or large int as uint + testRpcInt = new(TestRpcInt) +) + +func testInitFlags() { + // delete(testDecOpts.ExtFuncs, timeTyp) + flag.BoolVar(&testVerbose, "tv", false, "Test Verbose") + flag.BoolVar(&testInitDebug, "tg", false, "Test Init Debug") + flag.BoolVar(&testUseIoEncDec, "ti", false, "Use IO Reader/Writer for Marshal/Unmarshal") + flag.BoolVar(&testStructToArray, "ts", false, "Set StructToArray option") + flag.BoolVar(&testWriteNoSymbols, "tn", false, "Set NoSymbols option") + flag.BoolVar(&testCanonical, "tc", false, "Set Canonical option") + flag.BoolVar(&testSkipIntf, "tf", false, "Skip Interfaces") +} + +type TestABC struct { + A, B, C string +} + +type TestRpcInt struct { + i int +} + +func (r *TestRpcInt) Update(n int, res *int) error { r.i = n; *res = r.i; return nil } +func (r *TestRpcInt) Square(ignore int, res *int) error { *res = r.i * r.i; return nil } +func (r *TestRpcInt) Mult(n int, res *int) error { *res = r.i * n; return nil } +func (r *TestRpcInt) EchoStruct(arg TestABC, res *string) error { + *res = fmt.Sprintf("%#v", arg) + return nil +} +func (r *TestRpcInt) Echo123(args []string, res *string) error { + *res = fmt.Sprintf("%#v", args) + return nil +} + +type testUnixNanoTimeExt struct{} + +func (x testUnixNanoTimeExt) WriteExt(interface{}) []byte { panic("unsupported") } +func (x testUnixNanoTimeExt) ReadExt(interface{}, []byte) { panic("unsupported") } +func (x testUnixNanoTimeExt) ConvertExt(v interface{}) interface{} { + switch v2 := v.(type) { + case time.Time: + return v2.UTC().UnixNano() + case *time.Time: + return v2.UTC().UnixNano() + default: + panic(fmt.Sprintf("unsupported format for time conversion: expecting time.Time; got %T", v)) + } +} +func (x testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { + // fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v\n", v) + tt := dest.(*time.Time) + switch v2 := v.(type) { + case int64: + *tt = time.Unix(0, v2).UTC() + case uint64: + *tt = time.Unix(0, int64(v2)).UTC() + //case float64: + //case string: + default: + panic(fmt.Sprintf("unsupported format for time conversion: expecting int64/uint64; got %T", v)) + } + // fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v, tt: %#v\n", v, tt) +} + +func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) { + //for python msgpack, + // - all positive integers are unsigned 64-bit ints + // - all floats are float64 + switch iv := v.(type) { + case int8: + if iv >= 0 { + v2 = uint64(iv) + } else { + v2 = int64(iv) + } + case int16: + if iv >= 0 { + v2 = uint64(iv) + } else { + v2 = int64(iv) + } + case int32: + if iv >= 0 { + v2 = uint64(iv) + } else { + v2 = int64(iv) + } + case int64: + if iv >= 0 { + v2 = uint64(iv) + } else { + v2 = int64(iv) + } + case uint8: + v2 = uint64(iv) + case uint16: + v2 = uint64(iv) + case uint32: + v2 = uint64(iv) + case uint64: + v2 = uint64(iv) + case float32: + v2 = float64(iv) + case float64: + v2 = float64(iv) + case []interface{}: + m2 := make([]interface{}, len(iv)) + for j, vj := range iv { + m2[j] = testVerifyVal(vj, arg) + } + v2 = m2 + case map[string]bool: + switch arg { + case testVerifyMapTypeSame: + m2 := make(map[string]bool) + for kj, kv := range iv { + m2[kj] = kv + } + v2 = m2 + case testVerifyMapTypeStrIntf, testVerifyForPython: + m2 := make(map[string]interface{}) + for kj, kv := range iv { + m2[kj] = kv + } + v2 = m2 + case testVerifyMapTypeIntfIntf: + m2 := make(map[interface{}]interface{}) + for kj, kv := range iv { + m2[kj] = kv + } + v2 = m2 + } + case map[string]interface{}: + switch arg { + case testVerifyMapTypeSame: + m2 := make(map[string]interface{}) + for kj, kv := range iv { + m2[kj] = testVerifyVal(kv, arg) + } + v2 = m2 + case testVerifyMapTypeStrIntf, testVerifyForPython: + m2 := make(map[string]interface{}) + for kj, kv := range iv { + m2[kj] = testVerifyVal(kv, arg) + } + v2 = m2 + case testVerifyMapTypeIntfIntf: + m2 := make(map[interface{}]interface{}) + for kj, kv := range iv { + m2[kj] = testVerifyVal(kv, arg) + } + v2 = m2 + } + case map[interface{}]interface{}: + m2 := make(map[interface{}]interface{}) + for kj, kv := range iv { + m2[testVerifyVal(kj, arg)] = testVerifyVal(kv, arg) + } + v2 = m2 + case time.Time: + switch arg { + case testVerifyForPython: + if iv2 := iv.UnixNano(); iv2 >= 0 { + v2 = uint64(iv2) + } else { + v2 = int64(iv2) + } + default: + v2 = v + } + default: + v2 = v + } + return +} + +func testInit() { + gob.Register(new(TestStruc)) + if testInitDebug { + ts0 := newTestStruc(2, false, !testSkipIntf, false) + fmt.Printf("====> depth: %v, ts: %#v\n", 2, ts0) + } + + testJsonH.Canonical = testCanonical + testCborH.Canonical = testCanonical + testSimpleH.Canonical = testCanonical + testBincH.Canonical = testCanonical + testMsgpackH.Canonical = testCanonical + + testJsonH.StructToArray = testStructToArray + testCborH.StructToArray = testStructToArray + testSimpleH.StructToArray = testStructToArray + testBincH.StructToArray = testStructToArray + testMsgpackH.StructToArray = testStructToArray + + testMsgpackH.RawToString = true + + if testWriteNoSymbols { + testBincH.AsSymbols = AsSymbolNone + } else { + testBincH.AsSymbols = AsSymbolAll + } + + // testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt) + // testMsgpackH.AddExt(timeTyp, 1, testMsgpackH.TimeEncodeExt, testMsgpackH.TimeDecodeExt) + timeEncExt := func(rv reflect.Value) (bs []byte, err error) { + switch v2 := rv.Interface().(type) { + case time.Time: + bs = encodeTime(v2) + case *time.Time: + bs = encodeTime(*v2) + default: + err = fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2) + } + return + } + timeDecExt := func(rv reflect.Value, bs []byte) (err error) { + tt, err := decodeTime(bs) + if err == nil { + *(rv.Interface().(*time.Time)) = tt + } + return + } + + // add extensions for msgpack, simple for time.Time, so we can encode/decode same way. + testMsgpackH.AddExt(timeTyp, 1, timeEncExt, timeDecExt) + testSimpleH.AddExt(timeTyp, 1, timeEncExt, timeDecExt) + testCborH.SetExt(timeTyp, 1, &testUnixNanoTimeExt{}) + testJsonH.SetExt(timeTyp, 1, &testUnixNanoTimeExt{}) + + primitives := []interface{}{ + int8(-8), + int16(-1616), + int32(-32323232), + int64(-6464646464646464), + uint8(192), + uint16(1616), + uint32(32323232), + uint64(6464646464646464), + byte(192), + float32(-3232.0), + float64(-6464646464.0), + float32(3232.0), + float64(6464646464.0), + false, + true, + nil, + "someday", + "", + "bytestring", + timeToCompare1, + timeToCompare2, + timeToCompare3, + timeToCompare4, + } + mapsAndStrucs := []interface{}{ + map[string]bool{ + "true": true, + "false": false, + }, + map[string]interface{}{ + "true": "True", + "false": false, + "uint16(1616)": uint16(1616), + }, + //add a complex combo map in here. (map has list which has map) + //note that after the first thing, everything else should be generic. + map[string]interface{}{ + "list": []interface{}{ + int16(1616), + int32(32323232), + true, + float32(-3232.0), + map[string]interface{}{ + "TRUE": true, + "FALSE": false, + }, + []interface{}{true, false}, + }, + "int32": int32(32323232), + "bool": true, + "LONG STRING": "123456789012345678901234567890123456789012345678901234567890", + "SHORT STRING": "1234567890", + }, + map[interface{}]interface{}{ + true: "true", + uint8(138): false, + "false": uint8(200), + }, + newTestStruc(0, false, !testSkipIntf, false), + } + + table = []interface{}{} + table = append(table, primitives...) //0-19 are primitives + table = append(table, primitives) //20 is a list of primitives + table = append(table, mapsAndStrucs...) //21-24 are maps. 25 is a *struct + + tableVerify = make([]interface{}, len(table)) + tableTestNilVerify = make([]interface{}, len(table)) + tablePythonVerify = make([]interface{}, len(table)) + + lp := len(primitives) + av := tableVerify + for i, v := range table { + if i == lp+3 { + av[i] = skipVerifyVal + continue + } + //av[i] = testVerifyVal(v, testVerifyMapTypeSame) + switch v.(type) { + case []interface{}: + av[i] = testVerifyVal(v, testVerifyMapTypeSame) + case map[string]interface{}: + av[i] = testVerifyVal(v, testVerifyMapTypeSame) + case map[interface{}]interface{}: + av[i] = testVerifyVal(v, testVerifyMapTypeSame) + default: + av[i] = v + } + } + + av = tableTestNilVerify + for i, v := range table { + if i > lp+3 { + av[i] = skipVerifyVal + continue + } + av[i] = testVerifyVal(v, testVerifyMapTypeStrIntf) + } + + av = tablePythonVerify + for i, v := range table { + if i > lp+3 { + av[i] = skipVerifyVal + continue + } + av[i] = testVerifyVal(v, testVerifyForPython) + } + + tablePythonVerify = tablePythonVerify[:24] +} + +func testUnmarshal(v interface{}, data []byte, h Handle) (err error) { + if testUseIoEncDec { + NewDecoder(bytes.NewBuffer(data), h).MustDecode(v) + } else { + NewDecoderBytes(data, h).MustDecode(v) + } + return +} + +func testMarshal(v interface{}, h Handle) (bs []byte, err error) { + if testUseIoEncDec { + var buf bytes.Buffer + NewEncoder(&buf, h).MustEncode(v) + bs = buf.Bytes() + return + } + NewEncoderBytes(&bs, h).MustEncode(v) + return +} + +func testMarshalErr(v interface{}, h Handle, t *testing.T, name string) (bs []byte, err error) { + if bs, err = testMarshal(v, h); err != nil { + logT(t, "Error encoding %s: %v, Err: %v", name, v, err) + t.FailNow() + } + return +} + +func testUnmarshalErr(v interface{}, data []byte, h Handle, t *testing.T, name string) (err error) { + if err = testUnmarshal(v, data, h); err != nil { + logT(t, "Error Decoding into %s: %v, Err: %v", name, v, err) + t.FailNow() + } + return +} + +// doTestCodecTableOne allows us test for different variations based on arguments passed. +func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, + vs []interface{}, vsVerify []interface{}) { + //if testNil, then just test for when a pointer to a nil interface{} is passed. It should work. + //Current setup allows us test (at least manually) the nil interface or typed interface. + logT(t, "================ TestNil: %v ================\n", testNil) + for i, v0 := range vs { + logT(t, "..............................................") + logT(t, " Testing: #%d:, %T, %#v\n", i, v0, v0) + b0, err := testMarshalErr(v0, h, t, "v0") + if err != nil { + continue + } + if h.isBinary() { + logT(t, " Encoded bytes: len: %v, %v\n", len(b0), b0) + } else { + logT(t, " Encoded string: len: %v, %v\n", len(string(b0)), string(b0)) + // println("########### encoded string: " + string(b0)) + } + var v1 interface{} + + if testNil { + err = testUnmarshal(&v1, b0, h) + } else { + if v0 != nil { + v0rt := reflect.TypeOf(v0) // ptr + rv1 := reflect.New(v0rt) + err = testUnmarshal(rv1.Interface(), b0, h) + v1 = rv1.Elem().Interface() + // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() + } + } + + logT(t, " v1 returned: %T, %#v", v1, v1) + // if v1 != nil { + // logT(t, " v1 returned: %T, %#v", v1, v1) + // //we always indirect, because ptr to typed value may be passed (if not testNil) + // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() + // } + if err != nil { + logT(t, "-------- Error: %v. Partial return: %v", err, v1) + failT(t) + continue + } + v0check := vsVerify[i] + if v0check == skipVerifyVal { + logT(t, " Nil Check skipped: Decoded: %T, %#v\n", v1, v1) + continue + } + + if err = deepEqual(v0check, v1); err == nil { + logT(t, "++++++++ Before and After marshal matched\n") + } else { + // logT(t, "-------- Before and After marshal do not match: Error: %v"+ + // " ====> GOLDEN: (%T) %#v, DECODED: (%T) %#v\n", err, v0check, v0check, v1, v1) + logT(t, "-------- Before and After marshal do not match: Error: %v", err) + logT(t, " ....... GOLDEN: (%T) %#v", v0check, v0check) + logT(t, " ....... DECODED: (%T) %#v", v1, v1) + failT(t) + } + } +} + +func testCodecTableOne(t *testing.T, h Handle) { + testOnce.Do(testInitAll) + // func TestMsgpackAllExperimental(t *testing.T) { + // dopts := testDecOpts(nil, nil, false, true, true), + + idxTime, numPrim, numMap := 19, 23, 4 + //println("#################") + switch v := h.(type) { + case *MsgpackHandle: + var oldWriteExt, oldRawToString bool + oldWriteExt, v.WriteExt = v.WriteExt, true + oldRawToString, v.RawToString = v.RawToString, true + doTestCodecTableOne(t, false, h, table, tableVerify) + v.WriteExt, v.RawToString = oldWriteExt, oldRawToString + case *JsonHandle: + //skip []interface{} containing time.Time, as it encodes as a number, but cannot decode back to time.Time. + //As there is no real support for extension tags in json, this must be skipped. + doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim]) + doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:]) + default: + doTestCodecTableOne(t, false, h, table, tableVerify) + } + // func TestMsgpackAll(t *testing.T) { + + // //skip []interface{} containing time.Time + // doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim]) + // doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:]) + // func TestMsgpackNilStringMap(t *testing.T) { + var oldMapType reflect.Type + v := h.getBasicHandle() + + oldMapType, v.MapType = v.MapType, testMapStrIntfTyp + + //skip time.Time, []interface{} containing time.Time, last map, and newStruc + doTestCodecTableOne(t, true, h, table[:idxTime], tableTestNilVerify[:idxTime]) + doTestCodecTableOne(t, true, h, table[numPrim+1:numPrim+numMap], tableTestNilVerify[numPrim+1:numPrim+numMap]) + + v.MapType = oldMapType + + // func TestMsgpackNilIntf(t *testing.T) { + + //do newTestStruc and last element of map + doTestCodecTableOne(t, true, h, table[numPrim+numMap:], tableTestNilVerify[numPrim+numMap:]) + //TODO? What is this one? + //doTestCodecTableOne(t, true, h, table[17:18], tableTestNilVerify[17:18]) +} + +func testCodecMiscOne(t *testing.T, h Handle) { + testOnce.Do(testInitAll) + b, err := testMarshalErr(32, h, t, "32") + // Cannot do this nil one, because faster type assertion decoding will panic + // var i *int32 + // if err = testUnmarshal(b, i, nil); err == nil { + // logT(t, "------- Expecting error because we cannot unmarshal to int32 nil ptr") + // t.FailNow() + // } + var i2 int32 = 0 + err = testUnmarshalErr(&i2, b, h, t, "int32-ptr") + if i2 != int32(32) { + logT(t, "------- didn't unmarshal to 32: Received: %d", i2) + t.FailNow() + } + + // func TestMsgpackDecodePtr(t *testing.T) { + ts := newTestStruc(0, false, !testSkipIntf, false) + b, err = testMarshalErr(ts, h, t, "pointer-to-struct") + if len(b) < 40 { + logT(t, "------- Size must be > 40. Size: %d", len(b)) + t.FailNow() + } + if h.isBinary() { + logT(t, "------- b: %v", b) + } else { + logT(t, "------- b: %s", b) + } + ts2 := new(TestStruc) + err = testUnmarshalErr(ts2, b, h, t, "pointer-to-struct") + if ts2.I64 != math.MaxInt64*2/3 { + logT(t, "------- Unmarshal wrong. Expect I64 = 64. Got: %v", ts2.I64) + t.FailNow() + } + + // func TestMsgpackIntfDecode(t *testing.T) { + m := map[string]int{"A": 2, "B": 3} + p := []interface{}{m} + bs, err := testMarshalErr(p, h, t, "p") + + m2 := map[string]int{} + p2 := []interface{}{m2} + err = testUnmarshalErr(&p2, bs, h, t, "&p2") + + if m2["A"] != 2 || m2["B"] != 3 { + logT(t, "m2 not as expected: expecting: %v, got: %v", m, m2) + t.FailNow() + } + // log("m: %v, m2: %v, p: %v, p2: %v", m, m2, p, p2) + checkEqualT(t, p, p2, "p=p2") + checkEqualT(t, m, m2, "m=m2") + if err = deepEqual(p, p2); err == nil { + logT(t, "p and p2 match") + } else { + logT(t, "Not Equal: %v. p: %v, p2: %v", err, p, p2) + t.FailNow() + } + if err = deepEqual(m, m2); err == nil { + logT(t, "m and m2 match") + } else { + logT(t, "Not Equal: %v. m: %v, m2: %v", err, m, m2) + t.FailNow() + } + + // func TestMsgpackDecodeStructSubset(t *testing.T) { + // test that we can decode a subset of the stream + mm := map[string]interface{}{"A": 5, "B": 99, "C": 333} + bs, err = testMarshalErr(mm, h, t, "mm") + type ttt struct { + A uint8 + C int32 + } + var t2 ttt + testUnmarshalErr(&t2, bs, h, t, "t2") + t3 := ttt{5, 333} + checkEqualT(t, t2, t3, "t2=t3") + + // println(">>>>>") + // test simple arrays, non-addressable arrays, slices + type tarr struct { + A int64 + B [3]int64 + C []byte + D [3]byte + } + var tarr0 = tarr{1, [3]int64{2, 3, 4}, []byte{4, 5, 6}, [3]byte{7, 8, 9}} + // test both pointer and non-pointer (value) + for _, tarr1 := range []interface{}{tarr0, &tarr0} { + bs, err = testMarshalErr(tarr1, h, t, "tarr1") + var tarr2 tarr + testUnmarshalErr(&tarr2, bs, h, t, "tarr2") + checkEqualT(t, tarr0, tarr2, "tarr0=tarr2") + // fmt.Printf(">>>> err: %v. tarr1: %v, tarr2: %v\n", err, tarr0, tarr2) + } + + // test byte array, even if empty (msgpack only) + if h == testMsgpackH { + type ystruct struct { + Anarray []byte + } + var ya = ystruct{} + testUnmarshalErr(&ya, []byte{0x91, 0x90}, h, t, "ya") + } +} + +func testCodecEmbeddedPointer(t *testing.T, h Handle) { + testOnce.Do(testInitAll) + type Z int + type A struct { + AnInt int + } + type B struct { + *Z + *A + MoreInt int + } + var z Z = 4 + x1 := &B{&z, &A{5}, 6} + bs, err := testMarshalErr(x1, h, t, "x1") + // fmt.Printf("buf: len(%v): %x\n", buf.Len(), buf.Bytes()) + var x2 = new(B) + err = testUnmarshalErr(x2, bs, h, t, "x2") + err = checkEqualT(t, x1, x2, "x1=x2") + _ = err +} + +func testCodecUnderlyingType(t *testing.T, h Handle) { + testOnce.Do(testInitAll) + // Manual Test. + // Run by hand, with accompanying print statements in fast-path.go + // to ensure that the fast functions are called. + type T1 map[string]string + v := T1{"1": "1s", "2": "2s"} + var bs []byte + var err error + NewEncoderBytes(&bs, h).MustEncode(v) + if err != nil { + logT(t, "Error during encode: %v", err) + failT(t) + } + var v2 T1 + NewDecoderBytes(bs, h).MustDecode(&v2) + if err != nil { + logT(t, "Error during decode: %v", err) + failT(t) + } +} + +func testCodecChan(t *testing.T, h Handle) { + // - send a slice []*int64 (sl1) into an chan (ch1) with cap > len(s1) + // - encode ch1 as a stream array + // - decode a chan (ch2), with cap > len(s1) from the stream array + // - receive from ch2 into slice sl2 + // - compare sl1 and sl2 + // - do this for codecs: json, cbor (covers all types) + sl1 := make([]*int64, 4) + for i := range sl1 { + var j int64 = int64(i) + sl1[i] = &j + } + ch1 := make(chan *int64, 4) + for _, j := range sl1 { + ch1 <- j + } + var bs []byte + NewEncoderBytes(&bs, h).MustEncode(ch1) + // if !h.isBinary() { + // fmt.Printf("before: len(ch1): %v, bs: %s\n", len(ch1), bs) + // } + // var ch2 chan *int64 // this will block if json, etc. + ch2 := make(chan *int64, 8) + NewDecoderBytes(bs, h).MustDecode(&ch2) + // logT(t, "Len(ch2): %v", len(ch2)) + // fmt.Printf("after: len(ch2): %v, ch2: %v\n", len(ch2), ch2) + close(ch2) + var sl2 []*int64 + for j := range ch2 { + sl2 = append(sl2, j) + } + if err := deepEqual(sl1, sl2); err != nil { + logT(t, "Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) + failT(t) + } +} + +func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs time.Duration, +) (port int) { + testOnce.Do(testInitAll) + if testSkipRPCTests { + return + } + // rpc needs EOF, which is sent via a panic, and so must be recovered. + if !recoverPanicToErr { + logT(t, "EXPECTED. set recoverPanicToErr=true, since rpc needs EOF") + t.FailNow() + } + srv := rpc.NewServer() + srv.Register(testRpcInt) + ln, err := net.Listen("tcp", "127.0.0.1:0") + // log("listener: %v", ln.Addr()) + checkErrT(t, err) + port = (ln.Addr().(*net.TCPAddr)).Port + // var opts *DecoderOptions + // opts := testDecOpts + // opts.MapType = mapStrIntfTyp + // opts.RawToString = false + serverExitChan := make(chan bool, 1) + var serverExitFlag uint64 = 0 + serverFn := func() { + for { + conn1, err1 := ln.Accept() + // if err1 != nil { + // //fmt.Printf("accept err1: %v\n", err1) + // continue + // } + if atomic.LoadUint64(&serverExitFlag) == 1 { + serverExitChan <- true + conn1.Close() + return // exit serverFn goroutine + } + if err1 == nil { + var sc rpc.ServerCodec = rr.ServerCodec(conn1, h) + srv.ServeCodec(sc) + } + } + } + + clientFn := func(cc rpc.ClientCodec) { + cl := rpc.NewClientWithCodec(cc) + defer cl.Close() + // defer func() { println("##### client closing"); cl.Close() }() + var up, sq, mult int + var rstr string + // log("Calling client") + checkErrT(t, cl.Call("TestRpcInt.Update", 5, &up)) + // log("Called TestRpcInt.Update") + checkEqualT(t, testRpcInt.i, 5, "testRpcInt.i=5") + checkEqualT(t, up, 5, "up=5") + checkErrT(t, cl.Call("TestRpcInt.Square", 1, &sq)) + checkEqualT(t, sq, 25, "sq=25") + checkErrT(t, cl.Call("TestRpcInt.Mult", 20, &mult)) + checkEqualT(t, mult, 100, "mult=100") + checkErrT(t, cl.Call("TestRpcInt.EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr)) + checkEqualT(t, rstr, fmt.Sprintf("%#v", TestABC{"Aa", "Bb", "Cc"}), "rstr=") + checkErrT(t, cl.Call("TestRpcInt.Echo123", []string{"A1", "B2", "C3"}, &rstr)) + checkEqualT(t, rstr, fmt.Sprintf("%#v", []string{"A1", "B2", "C3"}), "rstr=") + } + + connFn := func() (bs net.Conn) { + // log("calling f1") + bs, err2 := net.Dial(ln.Addr().Network(), ln.Addr().String()) + //fmt.Printf("f1. bs: %v, err2: %v\n", bs, err2) + checkErrT(t, err2) + return + } + + exitFn := func() { + atomic.StoreUint64(&serverExitFlag, 1) + bs := connFn() + <-serverExitChan + bs.Close() + // serverExitChan <- true + } + + go serverFn() + runtime.Gosched() + //time.Sleep(100 * time.Millisecond) + if exitSleepMs == 0 { + defer ln.Close() + defer exitFn() + } + if doRequest { + bs := connFn() + cc := rr.ClientCodec(bs, h) + clientFn(cc) + } + if exitSleepMs != 0 { + go func() { + defer ln.Close() + time.Sleep(exitSleepMs) + exitFn() + }() + } + return +} + +func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) { + v1 := map[string]interface{}{ + "a": 1, + "b": "hello", + "c": map[string]interface{}{ + "c/a": 1, + "c/b": "world", + "c/c": []int{1, 2, 3, 4}, + "c/d": map[string]interface{}{ + "c/d/a": "fdisajfoidsajfopdjsaopfjdsapofda", + "c/d/b": "fdsafjdposakfodpsakfopdsakfpodsakfpodksaopfkdsopafkdopsa", + "c/d/c": "poir02 ir30qif4p03qir0pogjfpoaerfgjp ofke[padfk[ewapf kdp[afep[aw", + "c/d/d": "fdsopafkd[sa f-32qor-=4qeof -afo-erfo r-eafo 4e- o r4-qwo ag", + "c/d/e": "kfep[a sfkr0[paf[a foe-[wq ewpfao-q ro3-q ro-4qof4-qor 3-e orfkropzjbvoisdb", + "c/d/f": "", + }, + "c/e": map[int]string{ + 1: "1", + 22: "22", + 333: "333", + 4444: "4444", + 55555: "55555", + }, + "c/f": map[string]int{ + "1": 1, + "22": 22, + "333": 333, + "4444": 4444, + "55555": 55555, + }, + }, + } + var v2 map[string]interface{} + var b1, b2 []byte + + // encode v1 into b1, decode b1 into v2, encode v2 into b2, compare b1 and b2 + + bh := h.getBasicHandle() + canonical0 := bh.Canonical + bh.Canonical = true + defer func() { bh.Canonical = canonical0 }() + + e1 := NewEncoderBytes(&b1, h) + e1.MustEncode(v1) + d1 := NewDecoderBytes(b1, h) + d1.MustDecode(&v2) + e2 := NewEncoderBytes(&b2, h) + e2.MustEncode(v2) + if !bytes.Equal(b1, b2) { + logT(t, "Unequal bytes: %v VS %v", b1, b2) + t.FailNow() + } +} + +// Comprehensive testing that generates data encoded from python handle (cbor, msgpack), +// and validates that our code can read and write it out accordingly. +// We keep this unexported here, and put actual test in ext_dep_test.go. +// This way, it can be excluded by excluding file completely. +func doTestPythonGenStreams(t *testing.T, name string, h Handle) { + logT(t, "TestPythonGenStreams-%v", name) + tmpdir, err := ioutil.TempDir("", "golang-"+name+"-test") + if err != nil { + logT(t, "-------- Unable to create temp directory\n") + t.FailNow() + } + defer os.RemoveAll(tmpdir) + logT(t, "tmpdir: %v", tmpdir) + cmd := exec.Command("python", "test.py", "testdata", tmpdir) + //cmd.Stdin = strings.NewReader("some input") + //cmd.Stdout = &out + var cmdout []byte + if cmdout, err = cmd.CombinedOutput(); err != nil { + logT(t, "-------- Error running test.py testdata. Err: %v", err) + logT(t, " %v", string(cmdout)) + t.FailNow() + } + + bh := h.getBasicHandle() + + oldMapType := bh.MapType + for i, v := range tablePythonVerify { + // if v == uint64(0) && h == testMsgpackH { + // v = int64(0) + // } + bh.MapType = oldMapType + //load up the golden file based on number + //decode it + //compare to in-mem object + //encode it again + //compare to output stream + logT(t, "..............................................") + logT(t, " Testing: #%d: %T, %#v\n", i, v, v) + var bss []byte + bss, err = ioutil.ReadFile(filepath.Join(tmpdir, strconv.Itoa(i)+"."+name+".golden")) + if err != nil { + logT(t, "-------- Error reading golden file: %d. Err: %v", i, err) + failT(t) + continue + } + bh.MapType = testMapStrIntfTyp + + var v1 interface{} + if err = testUnmarshal(&v1, bss, h); err != nil { + logT(t, "-------- Error decoding stream: %d: Err: %v", i, err) + failT(t) + continue + } + if v == skipVerifyVal { + continue + } + //no need to indirect, because we pass a nil ptr, so we already have the value + //if v1 != nil { v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() } + if err = deepEqual(v, v1); err == nil { + logT(t, "++++++++ Objects match: %T, %v", v, v) + } else { + logT(t, "-------- Objects do not match: %v. Source: %T. Decoded: %T", err, v, v1) + logT(t, "-------- GOLDEN: %#v", v) + // logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface()) + logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface()) + failT(t) + } + bsb, err := testMarshal(v1, h) + if err != nil { + logT(t, "Error encoding to stream: %d: Err: %v", i, err) + failT(t) + continue + } + if err = deepEqual(bsb, bss); err == nil { + logT(t, "++++++++ Bytes match") + } else { + logT(t, "???????? Bytes do not match. %v.", err) + xs := "--------" + if reflect.ValueOf(v).Kind() == reflect.Map { + xs = " " + logT(t, "%s It's a map. Ok that they don't match (dependent on ordering).", xs) + } else { + logT(t, "%s It's not a map. They should match.", xs) + failT(t) + } + logT(t, "%s FROM_FILE: %4d] %v", xs, len(bss), bss) + logT(t, "%s ENCODED: %4d] %v", xs, len(bsb), bsb) + } + } + bh.MapType = oldMapType +} + +// To test MsgpackSpecRpc, we test 3 scenarios: +// - Go Client to Go RPC Service (contained within TestMsgpackRpcSpec) +// - Go client to Python RPC Service (contained within doTestMsgpackRpcSpecGoClientToPythonSvc) +// - Python Client to Go RPC Service (contained within doTestMsgpackRpcSpecPythonClientToGoSvc) +// +// This allows us test the different calling conventions +// - Go Service requires only one argument +// - Python Service allows multiple arguments + +func doTestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) { + if testSkipRPCTests { + return + } + openPort := "6789" + cmd := exec.Command("python", "test.py", "rpc-server", openPort, "2") + checkErrT(t, cmd.Start()) + time.Sleep(100 * time.Millisecond) // time for python rpc server to start + bs, err2 := net.Dial("tcp", ":"+openPort) + checkErrT(t, err2) + cc := MsgpackSpecRpc.ClientCodec(bs, testMsgpackH) + cl := rpc.NewClientWithCodec(cc) + defer cl.Close() + var rstr string + checkErrT(t, cl.Call("EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr)) + //checkEqualT(t, rstr, "{'A': 'Aa', 'B': 'Bb', 'C': 'Cc'}") + var mArgs MsgpackSpecRpcMultiArgs = []interface{}{"A1", "B2", "C3"} + checkErrT(t, cl.Call("Echo123", mArgs, &rstr)) + checkEqualT(t, rstr, "1:A1 2:B2 3:C3", "rstr=") +} + +func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) { + if testSkipRPCTests { + return + } + port := testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, false, 1*time.Second) + //time.Sleep(1000 * time.Millisecond) + cmd := exec.Command("python", "test.py", "rpc-client-go-service", strconv.Itoa(port)) + var cmdout []byte + var err error + if cmdout, err = cmd.CombinedOutput(); err != nil { + logT(t, "-------- Error running test.py rpc-client-go-service. Err: %v", err) + logT(t, " %v", string(cmdout)) + t.FailNow() + } + checkEqualT(t, string(cmdout), + fmt.Sprintf("%#v\n%#v\n", []string{"A1", "B2", "C3"}, TestABC{"Aa", "Bb", "Cc"}), "cmdout=") +} + +func TestBincCodecsTable(t *testing.T) { + testCodecTableOne(t, testBincH) +} + +func TestBincCodecsMisc(t *testing.T) { + testCodecMiscOne(t, testBincH) +} + +func TestBincCodecsEmbeddedPointer(t *testing.T) { + testCodecEmbeddedPointer(t, testBincH) +} + +func TestSimpleCodecsTable(t *testing.T) { + testCodecTableOne(t, testSimpleH) +} + +func TestSimpleCodecsMisc(t *testing.T) { + testCodecMiscOne(t, testSimpleH) +} + +func TestSimpleCodecsEmbeddedPointer(t *testing.T) { + testCodecEmbeddedPointer(t, testSimpleH) +} + +func TestMsgpackCodecsTable(t *testing.T) { + testCodecTableOne(t, testMsgpackH) +} + +func TestMsgpackCodecsMisc(t *testing.T) { + testCodecMiscOne(t, testMsgpackH) +} + +func TestMsgpackCodecsEmbeddedPointer(t *testing.T) { + testCodecEmbeddedPointer(t, testMsgpackH) +} + +func TestCborCodecsTable(t *testing.T) { + testCodecTableOne(t, testCborH) +} + +func TestCborCodecsMisc(t *testing.T) { + testCodecMiscOne(t, testCborH) +} + +func TestCborCodecsEmbeddedPointer(t *testing.T) { + testCodecEmbeddedPointer(t, testCborH) +} + +func TestCborMapEncodeForCanonical(t *testing.T) { + doTestMapEncodeForCanonical(t, "cbor", testCborH) +} + +func TestJsonCodecsTable(t *testing.T) { + testCodecTableOne(t, testJsonH) +} + +func TestJsonCodecsMisc(t *testing.T) { + testCodecMiscOne(t, testJsonH) +} + +func TestJsonCodecsEmbeddedPointer(t *testing.T) { + testCodecEmbeddedPointer(t, testJsonH) +} + +func TestJsonCodecChan(t *testing.T) { + testCodecChan(t, testJsonH) +} + +func TestCborCodecChan(t *testing.T) { + testCodecChan(t, testCborH) +} + +// ----- RPC ----- + +func TestBincRpcGo(t *testing.T) { + testCodecRpcOne(t, GoRpc, testBincH, true, 0) +} + +func TestSimpleRpcGo(t *testing.T) { + testCodecRpcOne(t, GoRpc, testSimpleH, true, 0) +} + +func TestMsgpackRpcGo(t *testing.T) { + testCodecRpcOne(t, GoRpc, testMsgpackH, true, 0) +} + +func TestCborRpcGo(t *testing.T) { + testCodecRpcOne(t, GoRpc, testCborH, true, 0) +} + +func TestJsonRpcGo(t *testing.T) { + testCodecRpcOne(t, GoRpc, testJsonH, true, 0) +} + +func TestMsgpackRpcSpec(t *testing.T) { + testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, true, 0) +} + +func TestBincUnderlyingType(t *testing.T) { + testCodecUnderlyingType(t, testBincH) +} + +// TODO: +// Add Tests for: +// - decoding empty list/map in stream into a nil slice/map +// - binary(M|Unm)arsher support for time.Time (e.g. cbor encoding) +// - text(M|Unm)arshaler support for time.Time (e.g. json encoding) +// - non fast-path scenarios e.g. map[string]uint16, []customStruct. +// Expand cbor to include indefinite length stuff for this non-fast-path types. +// This may not be necessary, since we have the manual tests (fastpathEnabled=false) to test/validate with. +// - CodecSelfer +// Ensure it is called when (en|de)coding interface{} or reflect.Value (2 different codepaths). +// - interfaces: textMarshaler, binaryMarshaler, codecSelfer +// - struct tags: +// on anonymous fields, _struct (all fields), etc +// - codecgen of struct containing channels. +// +// Cleanup tests: +// - The are brittle in their handling of validation and skipping diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md new file mode 100644 index 0000000..3ae8a05 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md @@ -0,0 +1,36 @@ +# codecgen tool + +Generate is given a list of *.go files to parse, and an output file (fout), +codecgen will create an output file __file.go__ which +contains `codec.Selfer` implementations for the named types found +in the files parsed. + +Using codecgen is very straightforward. + +**Download and install the tool** + +`go get -u github.com/ugorji/go/codec/codecgen` + +**Run the tool on your files** + +The command line format is: + +`codecgen [options] (-o outfile) (infile ...)` + +```sh +% codecgen -? +Usage of codecgen: + -c="github.com/ugorji/go/codec": codec path + -o="": out file + -r=".*": regex for type name to match + -rt="": tags for go run + -t="": build tag to put in file + -u=false: Use unsafe, e.g. to avoid unnecessary allocation on []byte->string + -x=false: keep temp file + +% codecgen -o values_codecgen.go values.go values2.go moretypedefs.go +``` + +Please see the [blog article](http://ugorji.net/blog/go-codecgen) +for more information on how to use the tool. + diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go new file mode 100644 index 0000000..8f42643 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go @@ -0,0 +1,281 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// codecgen generates codec.Selfer implementations for a set of types. +package main + +import ( + "bufio" + "bytes" + "errors" + "flag" + "fmt" + "go/ast" + "go/build" + "go/parser" + "go/token" + "math/rand" + "os" + "os/exec" + "path/filepath" + "regexp" + "strconv" + "text/template" + "time" +) + +const genCodecPkg = "codec1978" // keep this in sync with codec.genCodecPkg + +const genFrunMainTmpl = `//+build ignore + +package main +{{ if .Types }}import "{{ .ImportPath }}"{{ end }} +func main() { + {{ $.PackageName }}.CodecGenTempWrite{{ .RandString }}() +} +` + +// const genFrunPkgTmpl = `//+build codecgen +const genFrunPkgTmpl = ` +package {{ $.PackageName }} + +import ( + {{ if not .CodecPkgFiles }}{{ .CodecPkgName }} "{{ .CodecImportPath }}"{{ end }} +{{/* + {{ if .Types }}"{{ .ImportPath }}"{{ end }} + "io" +*/}} + "os" + "reflect" + "bytes" + "go/format" +) + +{{/* This is not used anymore. Remove it. +func write(w io.Writer, s string) { + if _, err := io.WriteString(w, s); err != nil { + panic(err) + } +} +*/}} + +func CodecGenTempWrite{{ .RandString }}() { + fout, err := os.Create("{{ .OutFile }}") + if err != nil { + panic(err) + } + defer fout.Close() + var out bytes.Buffer + + var typs []reflect.Type +{{ range $index, $element := .Types }} + var t{{ $index }} {{ . }} + typs = append(typs, reflect.TypeOf(t{{ $index }})) +{{ end }} + {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .UseUnsafe }}, typs...) + bout, err := format.Source(out.Bytes()) + if err != nil { + fout.Write(out.Bytes()) + panic(err) + } + fout.Write(bout) +} + +` + +// Generate is given a list of *.go files to parse, and an output file (fout). +// +// It finds all types T in the files, and it creates 2 tmp files (frun). +// - main package file passed to 'go run' +// - package level file which calls *genRunner.Selfer to write Selfer impls for each T. +// We use a package level file so that it can reference unexported types in the package being worked on. +// Tool then executes: "go run __frun__" which creates fout. +// fout contains Codec(En|De)codeSelf implementations for every type T. +// +func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, goRunTag string, + regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) { + // For each file, grab AST, find each type, and write a call to it. + if len(infiles) == 0 { + return + } + if outfile == "" || codecPkgPath == "" { + err = errors.New("outfile and codec package path cannot be blank") + return + } + if uid < 0 { + uid = -uid + } + if uid == 0 { + rr := rand.New(rand.NewSource(time.Now().UnixNano())) + uid = 101 + rr.Int63n(9777) + } + // We have to parse dir for package, before opening the temp file for writing (else ImportDir fails). + // Also, ImportDir(...) must take an absolute path. + lastdir := filepath.Dir(outfile) + absdir, err := filepath.Abs(lastdir) + if err != nil { + return + } + pkg, err := build.Default.ImportDir(absdir, build.AllowBinary) + if err != nil { + return + } + type tmplT struct { + CodecPkgName string + CodecImportPath string + ImportPath string + OutFile string + PackageName string + RandString string + BuildTag string + Types []string + CodecPkgFiles bool + UseUnsafe bool + } + tv := tmplT{ + CodecPkgName: genCodecPkg, + OutFile: outfile, + CodecImportPath: codecPkgPath, + BuildTag: buildTag, + UseUnsafe: useUnsafe, + RandString: strconv.FormatInt(uid, 10), + } + tv.ImportPath = pkg.ImportPath + if tv.ImportPath == tv.CodecImportPath { + tv.CodecPkgFiles = true + tv.CodecPkgName = "codec" + } + astfiles := make([]*ast.File, len(infiles)) + for i, infile := range infiles { + if filepath.Dir(infile) != lastdir { + err = errors.New("in files must all be in same directory as outfile") + return + } + fset := token.NewFileSet() + astfiles[i], err = parser.ParseFile(fset, infile, nil, 0) + if err != nil { + return + } + if i == 0 { + tv.PackageName = astfiles[i].Name.Name + if tv.PackageName == "main" { + // codecgen cannot be run on types in the 'main' package. + // A temporary 'main' package must be created, and should reference the fully built + // package containing the types. + // Also, the temporary main package will conflict with the main package which already has a main method. + err = errors.New("codecgen cannot be run on types in the 'main' package") + return + } + } + } + + for _, f := range astfiles { + for _, d := range f.Decls { + if gd, ok := d.(*ast.GenDecl); ok { + for _, dd := range gd.Specs { + if td, ok := dd.(*ast.TypeSpec); ok { + // if len(td.Name.Name) == 0 || td.Name.Name[0] > 'Z' || td.Name.Name[0] < 'A' { + if len(td.Name.Name) == 0 { + continue + } + + // only generate for: + // struct: StructType + // primitives (numbers, bool, string): Ident + // map: MapType + // slice, array: ArrayType + // chan: ChanType + // do not generate: + // FuncType, InterfaceType, StarExpr (ptr), etc + switch td.Type.(type) { + case *ast.StructType, *ast.Ident, *ast.MapType, *ast.ArrayType, *ast.ChanType: + if regexName.FindStringIndex(td.Name.Name) != nil { + tv.Types = append(tv.Types, td.Name.Name) + } + } + } + } + } + } + } + + if len(tv.Types) == 0 { + return + } + + // we cannot use ioutil.TempFile, because we cannot guarantee the file suffix (.go). + // Also, we cannot create file in temp directory, + // because go run will not work (as it needs to see the types here). + // Consequently, create the temp file in the current directory, and remove when done. + + // frun, err = ioutil.TempFile("", "codecgen-") + // frunName := filepath.Join(os.TempDir(), "codecgen-"+strconv.FormatInt(time.Now().UnixNano(), 10)+".go") + + frunMainName := "codecgen-main-" + tv.RandString + ".generated.go" + frunPkgName := "codecgen-pkg-" + tv.RandString + ".generated.go" + if deleteTempFile { + defer os.Remove(frunMainName) + defer os.Remove(frunPkgName) + } + // var frunMain, frunPkg *os.File + if _, err = gen1(frunMainName, genFrunMainTmpl, &tv); err != nil { + return + } + if _, err = gen1(frunPkgName, genFrunPkgTmpl, &tv); err != nil { + return + } + + // remove outfile, so "go run ..." will not think that types in outfile already exist. + os.Remove(outfile) + + // execute go run frun + cmd := exec.Command("go", "run", "-tags="+goRunTag, frunMainName) //, frunPkg.Name()) + var buf bytes.Buffer + cmd.Stdout = &buf + cmd.Stderr = &buf + if err = cmd.Run(); err != nil { + err = fmt.Errorf("error running 'go run %s': %v, console: %s", + frunMainName, err, buf.Bytes()) + return + } + os.Stdout.Write(buf.Bytes()) + return +} + +func gen1(frunName, tmplStr string, tv interface{}) (frun *os.File, err error) { + os.Remove(frunName) + if frun, err = os.Create(frunName); err != nil { + return + } + defer frun.Close() + + t := template.New("") + if t, err = t.Parse(tmplStr); err != nil { + return + } + bw := bufio.NewWriter(frun) + if err = t.Execute(bw, tv); err != nil { + return + } + if err = bw.Flush(); err != nil { + return + } + return +} + +func main() { + o := flag.String("o", "", "out file") + c := flag.String("c", genCodecPath, "codec path") + t := flag.String("t", "", "build tag to put in file") + r := flag.String("r", ".*", "regex for type name to match") + rt := flag.String("rt", "", "tags for go run") + x := flag.Bool("x", false, "keep temp file") + u := flag.Bool("u", false, "Use unsafe, e.g. to avoid unnecessary allocation on []byte->string") + d := flag.Int64("d", 0, "random identifier for use in generated code") + flag.Parse() + if err := Generate(*o, *t, *c, *d, *u, *rt, + regexp.MustCompile(*r), !*x, flag.Args()...); err != nil { + fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err) + os.Exit(1) + } +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go new file mode 100644 index 0000000..e120a4e --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go @@ -0,0 +1,3 @@ +package main + +const genCodecPath = "github.com/ugorji/go/codec" diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go new file mode 100644 index 0000000..2fdfd16 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go @@ -0,0 +1,22 @@ +//+build x,codecgen + +package codec + +import ( + "fmt" + "testing" +) + +func TestCodecgenJson1(t *testing.T) { + const callCodecgenDirect bool = true + v := newTestStruc(2, false, !testSkipIntf, false) + var bs []byte + e := NewEncoderBytes(&bs, testJsonH) + if callCodecgenDirect { + v.CodecEncodeSelf(e) + e.w.atEndOfEncode() + } else { + e.MustEncode(v) + } + fmt.Printf("%s\n", bs) +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go new file mode 100644 index 0000000..34eacc6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go @@ -0,0 +1,1544 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "encoding" + "errors" + "fmt" + "io" + "reflect" +) + +// Some tagging information for error messages. +const ( + msgBadDesc = "Unrecognized descriptor byte" + msgDecCannotExpandArr = "cannot expand go array from %v to stream length: %v" +) + +var ( + onlyMapOrArrayCanDecodeIntoStructErr = errors.New("only encoded map or array can be decoded into a struct") + cannotDecodeIntoNilErr = errors.New("cannot decode into nil") +) + +// decReader abstracts the reading source, allowing implementations that can +// read from an io.Reader or directly off a byte slice with zero-copying. +type decReader interface { + unreadn1() + + // readx will use the implementation scratch buffer if possible i.e. n < len(scratchbuf), OR + // just return a view of the []byte being decoded from. + // Ensure you call detachZeroCopyBytes later if this needs to be sent outside codec control. + readx(n int) []byte + readb([]byte) + readn1() uint8 + readn1eof() (v uint8, eof bool) + numread() int // number of bytes read + track() + stopTrack() []byte +} + +type decReaderByteScanner interface { + io.Reader + io.ByteScanner +} + +type decDriver interface { + // this will check if the next token is a break. + CheckBreak() bool + TryDecodeAsNil() bool + // check if a container type: vt is one of: Bytes, String, Nil, Slice or Map. + // if vt param == valueTypeNil, and nil is seen in stream, consume the nil. + IsContainerType(vt valueType) bool + IsBuiltinType(rt uintptr) bool + DecodeBuiltin(rt uintptr, v interface{}) + //decodeNaked: Numbers are decoded as int64, uint64, float64 only (no smaller sized number types). + //for extensions, decodeNaked must completely decode them as a *RawExt. + //extensions should also use readx to decode them, for efficiency. + //kInterface will extract the detached byte slice if it has to pass it outside its realm. + DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) + DecodeInt(bitsize uint8) (i int64) + DecodeUint(bitsize uint8) (ui uint64) + DecodeFloat(chkOverflow32 bool) (f float64) + DecodeBool() (b bool) + // DecodeString can also decode symbols. + // It looks redundant as DecodeBytes is available. + // However, some codecs (e.g. binc) support symbols and can + // return a pre-stored string value, meaning that it can bypass + // the cost of []byte->string conversion. + DecodeString() (s string) + + // DecodeBytes may be called directly, without going through reflection. + // Consequently, it must be designed to handle possible nil. + DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) + + // decodeExt will decode into a *RawExt or into an extension. + DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64) + // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) + ReadMapStart() int + ReadArrayStart() int + // ReadEnd registers the end of a map or array. + ReadEnd() +} + +type decNoSeparator struct{} + +func (_ decNoSeparator) ReadEnd() {} + +type DecodeOptions struct { + // MapType specifies type to use during schema-less decoding of a map in the stream. + // If nil, we use map[interface{}]interface{} + MapType reflect.Type + + // SliceType specifies type to use during schema-less decoding of an array in the stream. + // If nil, we use []interface{} + SliceType reflect.Type + + // If ErrorIfNoField, return an error when decoding a map + // from a codec stream into a struct, and no matching struct field is found. + ErrorIfNoField bool + + // If ErrorIfNoArrayExpand, return an error when decoding a slice/array that cannot be expanded. + // For example, the stream contains an array of 8 items, but you are decoding into a [4]T array, + // or you are decoding into a slice of length 4 which is non-addressable (and so cannot be set). + ErrorIfNoArrayExpand bool + + // If SignedInteger, use the int64 during schema-less decoding of unsigned values (not uint64). + SignedInteger bool +} + +// ------------------------------------ + +// ioDecByteScanner implements Read(), ReadByte(...), UnreadByte(...) methods +// of io.Reader, io.ByteScanner. +type ioDecByteScanner struct { + r io.Reader + l byte // last byte + ls byte // last byte status. 0: init-canDoNothing, 1: canRead, 2: canUnread + b [1]byte // tiny buffer for reading single bytes +} + +func (z *ioDecByteScanner) Read(p []byte) (n int, err error) { + var firstByte bool + if z.ls == 1 { + z.ls = 2 + p[0] = z.l + if len(p) == 1 { + n = 1 + return + } + firstByte = true + p = p[1:] + } + n, err = z.r.Read(p) + if n > 0 { + if err == io.EOF && n == len(p) { + err = nil // read was successful, so postpone EOF (till next time) + } + z.l = p[n-1] + z.ls = 2 + } + if firstByte { + n++ + } + return +} + +func (z *ioDecByteScanner) ReadByte() (c byte, err error) { + n, err := z.Read(z.b[:]) + if n == 1 { + c = z.b[0] + if err == io.EOF { + err = nil // read was successful, so postpone EOF (till next time) + } + } + return +} + +func (z *ioDecByteScanner) UnreadByte() (err error) { + x := z.ls + if x == 0 { + err = errors.New("cannot unread - nothing has been read") + } else if x == 1 { + err = errors.New("cannot unread - last byte has not been read") + } else if x == 2 { + z.ls = 1 + } + return +} + +// ioDecReader is a decReader that reads off an io.Reader +type ioDecReader struct { + br decReaderByteScanner + // temp byte array re-used internally for efficiency during read. + // shares buffer with Decoder, so we keep size of struct within 8 words. + x *[scratchByteArrayLen]byte + bs ioDecByteScanner + n int // num read + tr []byte // tracking bytes read + trb bool +} + +func (z *ioDecReader) numread() int { + return z.n +} + +func (z *ioDecReader) readx(n int) (bs []byte) { + if n <= 0 { + return + } + if n < len(z.x) { + bs = z.x[:n] + } else { + bs = make([]byte, n) + } + if _, err := io.ReadAtLeast(z.br, bs, n); err != nil { + panic(err) + } + z.n += len(bs) + if z.trb { + z.tr = append(z.tr, bs...) + } + return +} + +func (z *ioDecReader) readb(bs []byte) { + if len(bs) == 0 { + return + } + n, err := io.ReadAtLeast(z.br, bs, len(bs)) + z.n += n + if err != nil { + panic(err) + } + if z.trb { + z.tr = append(z.tr, bs...) + } +} + +func (z *ioDecReader) readn1() (b uint8) { + b, err := z.br.ReadByte() + if err != nil { + panic(err) + } + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + return b +} + +func (z *ioDecReader) readn1eof() (b uint8, eof bool) { + b, err := z.br.ReadByte() + if err == nil { + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + } else if err == io.EOF { + eof = true + } else { + panic(err) + } + return +} + +func (z *ioDecReader) unreadn1() { + err := z.br.UnreadByte() + if err != nil { + panic(err) + } + z.n-- + if z.trb { + if l := len(z.tr) - 1; l >= 0 { + z.tr = z.tr[:l] + } + } +} + +func (z *ioDecReader) track() { + if z.tr != nil { + z.tr = z.tr[:0] + } + z.trb = true +} + +func (z *ioDecReader) stopTrack() (bs []byte) { + z.trb = false + return z.tr +} + +// ------------------------------------ + +var bytesDecReaderCannotUnreadErr = errors.New("cannot unread last byte read") + +// bytesDecReader is a decReader that reads off a byte slice with zero copying +type bytesDecReader struct { + b []byte // data + c int // cursor + a int // available + t int // track start +} + +func (z *bytesDecReader) numread() int { + return z.c +} + +func (z *bytesDecReader) unreadn1() { + if z.c == 0 || len(z.b) == 0 { + panic(bytesDecReaderCannotUnreadErr) + } + z.c-- + z.a++ + return +} + +func (z *bytesDecReader) readx(n int) (bs []byte) { + // slicing from a non-constant start position is more expensive, + // as more computation is required to decipher the pointer start position. + // However, we do it only once, and it's better than reslicing both z.b and return value. + + if n <= 0 { + } else if z.a == 0 { + panic(io.EOF) + } else if n > z.a { + panic(io.ErrUnexpectedEOF) + } else { + c0 := z.c + z.c = c0 + n + z.a = z.a - n + bs = z.b[c0:z.c] + } + return +} + +func (z *bytesDecReader) readn1() (v uint8) { + if z.a == 0 { + panic(io.EOF) + } + v = z.b[z.c] + z.c++ + z.a-- + return +} + +func (z *bytesDecReader) readn1eof() (v uint8, eof bool) { + if z.a == 0 { + eof = true + return + } + v = z.b[z.c] + z.c++ + z.a-- + return +} + +func (z *bytesDecReader) readb(bs []byte) { + copy(bs, z.readx(len(bs))) +} + +func (z *bytesDecReader) track() { + z.t = z.c +} + +func (z *bytesDecReader) stopTrack() (bs []byte) { + return z.b[z.t:z.c] +} + +// ------------------------------------ + +type decFnInfoX struct { + d *Decoder + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType +} + +// decFnInfo has methods for handling decoding of a specific type +// based on some characteristics (builtin, extension, reflect Kind, etc) +type decFnInfo struct { + // use decFnInfo as a value receiver. + // keep most of it less-used variables accessible via a pointer (*decFnInfoX). + // As sweet spot for value-receiver is 3 words, keep everything except + // decDriver (which everyone needs) directly accessible. + // ensure decFnInfoX is set for everyone who needs it i.e. + // rawExt, ext, builtin, (selfer|binary|text)Marshal, kSlice, kStruct, kMap, kInterface, fastpath + + dd decDriver + *decFnInfoX +} + +// ---------------------------------------- + +type decFn struct { + i decFnInfo + f func(decFnInfo, reflect.Value) +} + +func (f decFnInfo) builtin(rv reflect.Value) { + f.dd.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface()) +} + +func (f decFnInfo) rawExt(rv reflect.Value) { + f.dd.DecodeExt(rv.Addr().Interface(), 0, nil) +} + +func (f decFnInfo) ext(rv reflect.Value) { + f.dd.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn) +} + +func (f decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { + if indir == -1 { + v = rv.Addr().Interface() + } else if indir == 0 { + v = rv.Interface() + } else { + for j := int8(0); j < indir; j++ { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rv = rv.Elem() + } + v = rv.Interface() + } + return +} + +func (f decFnInfo) selferUnmarshal(rv reflect.Value) { + f.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(f.d) +} + +func (f decFnInfo) binaryUnmarshal(rv reflect.Value) { + bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler) + xbs := f.dd.DecodeBytes(nil, false, true) + if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { + panic(fnerr) + } +} + +func (f decFnInfo) textUnmarshal(rv reflect.Value) { + tm := f.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler) + fnerr := tm.UnmarshalText(f.dd.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} + +func (f decFnInfo) jsonUnmarshal(rv reflect.Value) { + tm := f.getValueForUnmarshalInterface(rv, f.ti.junmIndir).(jsonUnmarshaler) + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON wants the full JSON to unmarshal it itself. + f.d.r.track() + f.d.swallow() + bs := f.d.r.stopTrack() + // fmt.Printf(">>>>>> REFLECTION JSON: %s\n", bs) + fnerr := tm.UnmarshalJSON(bs) + if fnerr != nil { + panic(fnerr) + } +} + +func (f decFnInfo) kErr(rv reflect.Value) { + f.d.errorf("no decoding function defined for kind %v", rv.Kind()) +} + +func (f decFnInfo) kString(rv reflect.Value) { + rv.SetString(f.dd.DecodeString()) +} + +func (f decFnInfo) kBool(rv reflect.Value) { + rv.SetBool(f.dd.DecodeBool()) +} + +func (f decFnInfo) kInt(rv reflect.Value) { + rv.SetInt(f.dd.DecodeInt(intBitsize)) +} + +func (f decFnInfo) kInt64(rv reflect.Value) { + rv.SetInt(f.dd.DecodeInt(64)) +} + +func (f decFnInfo) kInt32(rv reflect.Value) { + rv.SetInt(f.dd.DecodeInt(32)) +} + +func (f decFnInfo) kInt8(rv reflect.Value) { + rv.SetInt(f.dd.DecodeInt(8)) +} + +func (f decFnInfo) kInt16(rv reflect.Value) { + rv.SetInt(f.dd.DecodeInt(16)) +} + +func (f decFnInfo) kFloat32(rv reflect.Value) { + rv.SetFloat(f.dd.DecodeFloat(true)) +} + +func (f decFnInfo) kFloat64(rv reflect.Value) { + rv.SetFloat(f.dd.DecodeFloat(false)) +} + +func (f decFnInfo) kUint8(rv reflect.Value) { + rv.SetUint(f.dd.DecodeUint(8)) +} + +func (f decFnInfo) kUint64(rv reflect.Value) { + rv.SetUint(f.dd.DecodeUint(64)) +} + +func (f decFnInfo) kUint(rv reflect.Value) { + rv.SetUint(f.dd.DecodeUint(uintBitsize)) +} + +func (f decFnInfo) kUintptr(rv reflect.Value) { + rv.SetUint(f.dd.DecodeUint(uintBitsize)) +} + +func (f decFnInfo) kUint32(rv reflect.Value) { + rv.SetUint(f.dd.DecodeUint(32)) +} + +func (f decFnInfo) kUint16(rv reflect.Value) { + rv.SetUint(f.dd.DecodeUint(16)) +} + +// func (f decFnInfo) kPtr(rv reflect.Value) { +// debugf(">>>>>>> ??? decode kPtr called - shouldn't get called") +// if rv.IsNil() { +// rv.Set(reflect.New(rv.Type().Elem())) +// } +// f.d.decodeValue(rv.Elem()) +// } + +// var kIntfCtr uint64 + +func (f decFnInfo) kInterfaceNaked() (rvn reflect.Value) { + // nil interface: + // use some hieristics to decode it appropriately + // based on the detected next value in the stream. + v, vt, decodeFurther := f.dd.DecodeNaked() + if vt == valueTypeNil { + return + } + // We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader). + if num := f.ti.rt.NumMethod(); num > 0 { + f.d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, num) + return + } + var useRvn bool + switch vt { + case valueTypeMap: + if f.d.h.MapType == nil { + var m2 map[interface{}]interface{} + v = &m2 + } else { + rvn = reflect.New(f.d.h.MapType).Elem() + useRvn = true + } + case valueTypeArray: + if f.d.h.SliceType == nil { + var m2 []interface{} + v = &m2 + } else { + rvn = reflect.New(f.d.h.SliceType).Elem() + useRvn = true + } + case valueTypeExt: + re := v.(*RawExt) + bfn := f.d.h.getExtForTag(re.Tag) + if bfn == nil { + re.Data = detachZeroCopyBytes(f.d.bytes, nil, re.Data) + rvn = reflect.ValueOf(*re) + } else { + rvnA := reflect.New(bfn.rt) + rvn = rvnA.Elem() + if re.Data != nil { + bfn.ext.ReadExt(rvnA.Interface(), re.Data) + } else { + bfn.ext.UpdateExt(rvnA.Interface(), re.Value) + } + } + return + } + if decodeFurther { + if useRvn { + f.d.decodeValue(rvn, decFn{}) + } else if v != nil { + // this v is a pointer, so we need to dereference it when done + f.d.decode(v) + rvn = reflect.ValueOf(v).Elem() + useRvn = true + } + } + + if !useRvn && v != nil { + rvn = reflect.ValueOf(v) + } + return +} + +func (f decFnInfo) kInterface(rv reflect.Value) { + // debugf("\t===> kInterface") + + // Note: + // A consequence of how kInterface works, is that + // if an interface already contains something, we try + // to decode into what was there before. + // We do not replace with a generic value (as got from decodeNaked). + + if rv.IsNil() { + rvn := f.kInterfaceNaked() + if rvn.IsValid() { + rv.Set(rvn) + } + } else { + rve := rv.Elem() + // Note: interface{} is settable, but underlying type may not be. + // Consequently, we have to set the reflect.Value directly. + // if underlying type is settable (e.g. ptr or interface), + // we just decode into it. + // Else we create a settable value, decode into it, and set on the interface. + if rve.CanSet() { + f.d.decodeValue(rve, decFn{}) + } else { + rve2 := reflect.New(rve.Type()).Elem() + rve2.Set(rve) + f.d.decodeValue(rve2, decFn{}) + rv.Set(rve2) + } + } +} + +func (f decFnInfo) kStruct(rv reflect.Value) { + fti := f.ti + d := f.d + if f.dd.IsContainerType(valueTypeMap) { + containerLen := f.dd.ReadMapStart() + if containerLen == 0 { + f.dd.ReadEnd() + return + } + tisfi := fti.sfi + hasLen := containerLen >= 0 + if hasLen { + for j := 0; j < containerLen; j++ { + // rvkencname := f.dd.DecodeString() + rvkencname := stringView(f.dd.DecodeBytes(f.d.b[:], true, true)) + // rvksi := ti.getForEncName(rvkencname) + if k := fti.indexForEncName(rvkencname); k > -1 { + si := tisfi[k] + if f.dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), decFn{}) + } + } else { + d.structFieldNotFound(-1, rvkencname) + } + } + } else { + for j := 0; !f.dd.CheckBreak(); j++ { + // rvkencname := f.dd.DecodeString() + rvkencname := stringView(f.dd.DecodeBytes(f.d.b[:], true, true)) + // rvksi := ti.getForEncName(rvkencname) + if k := fti.indexForEncName(rvkencname); k > -1 { + si := tisfi[k] + if f.dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), decFn{}) + } + } else { + d.structFieldNotFound(-1, rvkencname) + } + } + f.dd.ReadEnd() + } + } else if f.dd.IsContainerType(valueTypeArray) { + containerLen := f.dd.ReadArrayStart() + if containerLen == 0 { + f.dd.ReadEnd() + return + } + // Not much gain from doing it two ways for array. + // Arrays are not used as much for structs. + hasLen := containerLen >= 0 + for j, si := range fti.sfip { + if hasLen { + if j == containerLen { + break + } + } else if f.dd.CheckBreak() { + break + } + if f.dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), decFn{}) + } + } + if containerLen > len(fti.sfip) { + // read remaining values and throw away + for j := len(fti.sfip); j < containerLen; j++ { + d.structFieldNotFound(j, "") + } + } + f.dd.ReadEnd() + } else { + f.d.error(onlyMapOrArrayCanDecodeIntoStructErr) + return + } +} + +func (f decFnInfo) kSlice(rv reflect.Value) { + // A slice can be set from a map or array in stream. + // This way, the order can be kept (as order is lost with map). + ti := f.ti + d := f.d + if f.dd.IsContainerType(valueTypeBytes) || f.dd.IsContainerType(valueTypeString) { + if ti.rtid == uint8SliceTypId || ti.rt.Elem().Kind() == reflect.Uint8 { + if f.seq == seqTypeChan { + bs2 := f.dd.DecodeBytes(nil, false, true) + ch := rv.Interface().(chan<- byte) + for _, b := range bs2 { + ch <- b + } + } else { + rvbs := rv.Bytes() + bs2 := f.dd.DecodeBytes(rvbs, false, false) + if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + if rv.CanSet() { + rv.SetBytes(bs2) + } else { + copy(rvbs, bs2) + } + } + } + return + } + } + + // array := f.seq == seqTypeChan + + slh, containerLenS := d.decSliceHelperStart() + + // an array can never return a nil slice. so no need to check f.array here. + if rv.IsNil() { + // either chan or slice + if f.seq == seqTypeSlice { + if containerLenS <= 0 { + rv.Set(reflect.MakeSlice(ti.rt, 0, 0)) + } else { + rv.Set(reflect.MakeSlice(ti.rt, containerLenS, containerLenS)) + } + } else if f.seq == seqTypeChan { + if containerLenS <= 0 { + rv.Set(reflect.MakeChan(ti.rt, 0)) + } else { + rv.Set(reflect.MakeChan(ti.rt, containerLenS)) + } + } + } + + rvlen := rv.Len() + if containerLenS == 0 { + if f.seq == seqTypeSlice && rvlen != 0 { + rv.SetLen(0) + } + // f.dd.ReadEnd() + return + } + + rtelem0 := ti.rt.Elem() + rtelem := rtelem0 + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() + } + fn := d.getDecFn(rtelem, true, true) + + rv0 := rv + rvChanged := false + + rvcap := rv.Cap() + + // for j := 0; j < containerLenS; j++ { + + hasLen := containerLenS >= 0 + if hasLen { + if f.seq == seqTypeChan { + // handle chan specially: + for j := 0; j < containerLenS; j++ { + rv0 := reflect.New(rtelem0).Elem() + d.decodeValue(rv0, fn) + rv.Send(rv0) + } + } else { + numToRead := containerLenS + if containerLenS > rvcap { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rv.Len(), containerLenS) + numToRead = rvlen + } else { + rv = reflect.MakeSlice(ti.rt, containerLenS, containerLenS) + if rvlen > 0 && !isMutableKind(ti.rt.Kind()) { + rv1 := rv0 + rv1.SetLen(rvcap) + reflect.Copy(rv, rv1) + } + rvChanged = true + rvlen = containerLenS + } + } else if containerLenS != rvlen { + if f.seq == seqTypeSlice { + rv.SetLen(containerLenS) + rvlen = containerLenS + } + } + j := 0 + for ; j < numToRead; j++ { + d.decodeValue(rv.Index(j), fn) + } + if f.seq == seqTypeArray { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } + } else { + for j := 0; !f.dd.CheckBreak(); j++ { + var decodeIntoBlank bool + // if indefinite, etc, then expand the slice if necessary + if j >= rvlen { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, j+1) + decodeIntoBlank = true + } else if f.seq == seqTypeSlice { + rv = reflect.Append(rv, reflect.Zero(rtelem0)) + rvlen++ + rvChanged = true + } + } + if f.seq == seqTypeChan { + rv0 := reflect.New(rtelem0).Elem() + d.decodeValue(rv0, fn) + rv.Send(rv0) + } else if decodeIntoBlank { + d.swallow() + } else { + d.decodeValue(rv.Index(j), fn) + } + } + slh.End() + } + + if rvChanged { + rv0.Set(rv) + } +} + +func (f decFnInfo) kArray(rv reflect.Value) { + // f.d.decodeValue(rv.Slice(0, rv.Len())) + f.kSlice(rv.Slice(0, rv.Len())) +} + +func (f decFnInfo) kMap(rv reflect.Value) { + containerLen := f.dd.ReadMapStart() + + ti := f.ti + if rv.IsNil() { + rv.Set(reflect.MakeMap(ti.rt)) + } + + if containerLen == 0 { + // It is not length-prefix style container. They have no End marker. + // f.dd.ReadMapEnd() + return + } + + d := f.d + + ktype, vtype := ti.rt.Key(), ti.rt.Elem() + ktypeId := reflect.ValueOf(ktype).Pointer() + var keyFn, valFn decFn + var xtyp reflect.Type + for xtyp = ktype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + } + keyFn = d.getDecFn(xtyp, true, true) + for xtyp = vtype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + } + valFn = d.getDecFn(xtyp, true, true) + // for j := 0; j < containerLen; j++ { + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + rvk := reflect.New(ktype).Elem() + d.decodeValue(rvk, keyFn) + + // special case if a byte array. + if ktypeId == intfTypId { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(string(rvk.Bytes())) + } + } + rvv := rv.MapIndex(rvk) + // TODO: is !IsValid check required? + if !rvv.IsValid() { + rvv = reflect.New(vtype).Elem() + } + d.decodeValue(rvv, valFn) + rv.SetMapIndex(rvk, rvv) + } + } else { + for j := 0; !f.dd.CheckBreak(); j++ { + rvk := reflect.New(ktype).Elem() + d.decodeValue(rvk, keyFn) + + // special case if a byte array. + if ktypeId == intfTypId { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(string(rvk.Bytes())) + } + } + rvv := rv.MapIndex(rvk) + if !rvv.IsValid() { + rvv = reflect.New(vtype).Elem() + } + d.decodeValue(rvv, valFn) + rv.SetMapIndex(rvk, rvv) + } + f.dd.ReadEnd() + } +} + +type rtidDecFn struct { + rtid uintptr + fn decFn +} + +// A Decoder reads and decodes an object from an input stream in the codec format. +type Decoder struct { + // hopefully, reduce derefencing cost by laying the decReader inside the Decoder. + // Try to put things that go together to fit within a cache line (8 words). + + d decDriver + // NOTE: Decoder shouldn't call it's read methods, + // as the handler MAY need to do some coordination. + r decReader + //sa [32]rtidDecFn + s []rtidDecFn + h *BasicHandle + + rb bytesDecReader + hh Handle + be bool // is binary encoding + bytes bool // is bytes reader + js bool // is json handle + + ri ioDecReader + f map[uintptr]decFn + _ uintptr // for alignment purposes, so next one starts from a cache line + + b [scratchByteArrayLen]byte +} + +// NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. +// +// For efficiency, Users are encouraged to pass in a memory buffered reader +// (eg bufio.Reader, bytes.Buffer). +func NewDecoder(r io.Reader, h Handle) (d *Decoder) { + d = &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + //d.s = d.sa[:0] + d.ri.x = &d.b + d.ri.bs.r = r + var ok bool + d.ri.br, ok = r.(decReaderByteScanner) + if !ok { + d.ri.br = &d.ri.bs + } + d.r = &d.ri + _, d.js = h.(*JsonHandle) + d.d = h.newDecDriver(d) + return +} + +// NewDecoderBytes returns a Decoder which efficiently decodes directly +// from a byte slice with zero copying. +func NewDecoderBytes(in []byte, h Handle) (d *Decoder) { + d = &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary(), bytes: true} + //d.s = d.sa[:0] + d.rb.b = in + d.rb.a = len(in) + d.r = &d.rb + _, d.js = h.(*JsonHandle) + d.d = h.newDecDriver(d) + // d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri}) + return +} + +// Decode decodes the stream from reader and stores the result in the +// value pointed to by v. v cannot be a nil pointer. v can also be +// a reflect.Value of a pointer. +// +// Note that a pointer to a nil interface is not a nil pointer. +// If you do not know what type of stream it is, pass in a pointer to a nil interface. +// We will decode and store a value in that nil interface. +// +// Sample usages: +// // Decoding into a non-nil typed value +// var f float32 +// err = codec.NewDecoder(r, handle).Decode(&f) +// +// // Decoding into nil interface +// var v interface{} +// dec := codec.NewDecoder(r, handle) +// err = dec.Decode(&v) +// +// When decoding into a nil interface{}, we will decode into an appropriate value based +// on the contents of the stream: +// - Numbers are decoded as float64, int64 or uint64. +// - Other values are decoded appropriately depending on the type: +// bool, string, []byte, time.Time, etc +// - Extensions are decoded as RawExt (if no ext function registered for the tag) +// Configurations exist on the Handle to override defaults +// (e.g. for MapType, SliceType and how to decode raw bytes). +// +// When decoding into a non-nil interface{} value, the mode of encoding is based on the +// type of the value. When a value is seen: +// - If an extension is registered for it, call that extension function +// - If it implements BinaryUnmarshaler, call its UnmarshalBinary(data []byte) error +// - Else decode it based on its reflect.Kind +// +// There are some special rules when decoding into containers (slice/array/map/struct). +// Decode will typically use the stream contents to UPDATE the container. +// - A map can be decoded from a stream map, by updating matching keys. +// - A slice can be decoded from a stream array, +// by updating the first n elements, where n is length of the stream. +// - A slice can be decoded from a stream map, by decoding as if +// it contains a sequence of key-value pairs. +// - A struct can be decoded from a stream map, by updating matching fields. +// - A struct can be decoded from a stream array, +// by updating fields as they occur in the struct (by index). +// +// When decoding a stream map or array with length of 0 into a nil map or slice, +// we reset the destination map or slice to a zero-length value. +// +// However, when decoding a stream nil, we reset the destination container +// to its "zero" value (e.g. nil for slice/map, etc). +// +func (d *Decoder) Decode(v interface{}) (err error) { + defer panicToErr(&err) + d.decode(v) + return +} + +// this is not a smart swallow, as it allocates objects and does unnecessary work. +func (d *Decoder) swallowViaHammer() { + var blank interface{} + d.decodeValue(reflect.ValueOf(&blank).Elem(), decFn{}) +} + +func (d *Decoder) swallow() { + // smarter decode that just swallows the content + dd := d.d + switch { + case dd.TryDecodeAsNil(): + case dd.IsContainerType(valueTypeMap): + containerLen := dd.ReadMapStart() + clenGtEqualZero := containerLen >= 0 + for j := 0; ; j++ { + if clenGtEqualZero { + if j >= containerLen { + break + } + } else if dd.CheckBreak() { + break + } + d.swallow() + d.swallow() + } + dd.ReadEnd() + case dd.IsContainerType(valueTypeArray): + containerLenS := dd.ReadArrayStart() + clenGtEqualZero := containerLenS >= 0 + for j := 0; ; j++ { + if clenGtEqualZero { + if j >= containerLenS { + break + } + } else if dd.CheckBreak() { + break + } + d.swallow() + } + dd.ReadEnd() + case dd.IsContainerType(valueTypeBytes): + dd.DecodeBytes(d.b[:], false, true) + case dd.IsContainerType(valueTypeString): + dd.DecodeBytes(d.b[:], true, true) + // dd.DecodeStringAsBytes(d.b[:]) + default: + // these are all primitives, which we can get from decodeNaked + dd.DecodeNaked() + } +} + +// MustDecode is like Decode, but panics if unable to Decode. +// This provides insight to the code location that triggered the error. +func (d *Decoder) MustDecode(v interface{}) { + d.decode(v) +} + +func (d *Decoder) decode(iv interface{}) { + // if ics, ok := iv.(Selfer); ok { + // ics.CodecDecodeSelf(d) + // return + // } + + if d.d.TryDecodeAsNil() { + switch v := iv.(type) { + case nil: + case *string: + *v = "" + case *bool: + *v = false + case *int: + *v = 0 + case *int8: + *v = 0 + case *int16: + *v = 0 + case *int32: + *v = 0 + case *int64: + *v = 0 + case *uint: + *v = 0 + case *uint8: + *v = 0 + case *uint16: + *v = 0 + case *uint32: + *v = 0 + case *uint64: + *v = 0 + case *float32: + *v = 0 + case *float64: + *v = 0 + case *[]uint8: + *v = nil + case reflect.Value: + d.chkPtrValue(v) + v = v.Elem() + if v.IsValid() { + v.Set(reflect.Zero(v.Type())) + } + default: + rv := reflect.ValueOf(iv) + d.chkPtrValue(rv) + rv = rv.Elem() + if rv.IsValid() { + rv.Set(reflect.Zero(rv.Type())) + } + } + return + } + + switch v := iv.(type) { + case nil: + d.error(cannotDecodeIntoNilErr) + return + + case Selfer: + v.CodecDecodeSelf(d) + + case reflect.Value: + d.chkPtrValue(v) + d.decodeValueNotNil(v.Elem(), decFn{}) + + case *string: + + *v = d.d.DecodeString() + case *bool: + *v = d.d.DecodeBool() + case *int: + *v = int(d.d.DecodeInt(intBitsize)) + case *int8: + *v = int8(d.d.DecodeInt(8)) + case *int16: + *v = int16(d.d.DecodeInt(16)) + case *int32: + *v = int32(d.d.DecodeInt(32)) + case *int64: + *v = d.d.DecodeInt(64) + case *uint: + *v = uint(d.d.DecodeUint(uintBitsize)) + case *uint8: + *v = uint8(d.d.DecodeUint(8)) + case *uint16: + *v = uint16(d.d.DecodeUint(16)) + case *uint32: + *v = uint32(d.d.DecodeUint(32)) + case *uint64: + *v = d.d.DecodeUint(64) + case *float32: + *v = float32(d.d.DecodeFloat(true)) + case *float64: + *v = d.d.DecodeFloat(false) + case *[]uint8: + *v = d.d.DecodeBytes(*v, false, false) + + case *interface{}: + d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), decFn{}) + + default: + if !fastpathDecodeTypeSwitch(iv, d) { + d.decodeI(iv, true, false, false, false) + } + } +} + +func (d *Decoder) preDecodeValue(rv reflect.Value, tryNil bool) (rv2 reflect.Value, proceed bool) { + if tryNil && d.d.TryDecodeAsNil() { + // No need to check if a ptr, recursively, to determine + // whether to set value to nil. + // Just always set value to its zero type. + if rv.IsValid() { // rv.CanSet() // always settable, except it's invalid + rv.Set(reflect.Zero(rv.Type())) + } + return + } + + // If stream is not containing a nil value, then we can deref to the base + // non-pointer value, and decode into that. + for rv.Kind() == reflect.Ptr { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rv = rv.Elem() + } + return rv, true +} + +func (d *Decoder) decodeI(iv interface{}, checkPtr, tryNil, checkFastpath, checkCodecSelfer bool) { + rv := reflect.ValueOf(iv) + if checkPtr { + d.chkPtrValue(rv) + } + rv, proceed := d.preDecodeValue(rv, tryNil) + if proceed { + fn := d.getDecFn(rv.Type(), checkFastpath, checkCodecSelfer) + fn.f(fn.i, rv) + } +} + +func (d *Decoder) decodeValue(rv reflect.Value, fn decFn) { + if rv, proceed := d.preDecodeValue(rv, true); proceed { + if fn.f == nil { + fn = d.getDecFn(rv.Type(), true, true) + } + fn.f(fn.i, rv) + } +} + +func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn decFn) { + if rv, proceed := d.preDecodeValue(rv, false); proceed { + if fn.f == nil { + fn = d.getDecFn(rv.Type(), true, true) + } + fn.f(fn.i, rv) + } +} + +func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn decFn) { + rtid := reflect.ValueOf(rt).Pointer() + + // retrieve or register a focus'ed function for this type + // to eliminate need to do the retrieval multiple times + + // if d.f == nil && d.s == nil { debugf("---->Creating new dec f map for type: %v\n", rt) } + var ok bool + if useMapForCodecCache { + fn, ok = d.f[rtid] + } else { + for _, v := range d.s { + if v.rtid == rtid { + fn, ok = v.fn, true + break + } + } + } + if ok { + return + } + + // debugf("\tCreating new dec fn for type: %v\n", rt) + ti := getTypeInfo(rtid, rt) + var fi decFnInfo + fi.dd = d.d + // fi.decFnInfoX = new(decFnInfoX) + + // An extension can be registered for any type, regardless of the Kind + // (e.g. type BitSet int64, type MyStruct { / * unexported fields * / }, type X []int, etc. + // + // We can't check if it's an extension byte here first, because the user may have + // registered a pointer or non-pointer type, meaning we may have to recurse first + // before matching a mapped type, even though the extension byte is already detected. + // + // NOTE: if decoding into a nil interface{}, we return a non-nil + // value except even if the container registers a length of 0. + if checkCodecSelfer && ti.cs { + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).selferUnmarshal + } else if rtid == rawExtTypId { + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).rawExt + } else if d.d.IsBuiltinType(rtid) { + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).builtin + } else if xfFn := d.h.getExt(rtid); xfFn != nil { + // fi.decFnInfoX = &decFnInfoX{xfTag: xfFn.tag, xfFn: xfFn.ext} + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext + fn.f = (decFnInfo).ext + } else if supportMarshalInterfaces && d.be && ti.bunm { + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).binaryUnmarshal + } else if supportMarshalInterfaces && !d.be && d.js && ti.junm { + //If JSON, we should check JSONUnmarshal before textUnmarshal + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).jsonUnmarshal + } else if supportMarshalInterfaces && !d.be && ti.tunm { + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).textUnmarshal + } else { + rk := rt.Kind() + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if rt.PkgPath() == "" { + if idx := fastpathAV.index(rtid); idx != -1 { + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = fastpathAV[idx].decfn + } + } else { + // use mapping for underlying type if there + ok = false + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := reflect.ValueOf(rtu).Pointer() + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].decfn + xrt := fastpathAV[idx].rt + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = func(xf decFnInfo, xrv reflect.Value) { + // xfnf(xf, xrv.Convert(xrt)) + xfnf(xf, xrv.Addr().Convert(reflect.PtrTo(xrt)).Elem()) + } + } + } + } + if fn.f == nil { + switch rk { + case reflect.String: + fn.f = (decFnInfo).kString + case reflect.Bool: + fn.f = (decFnInfo).kBool + case reflect.Int: + fn.f = (decFnInfo).kInt + case reflect.Int64: + fn.f = (decFnInfo).kInt64 + case reflect.Int32: + fn.f = (decFnInfo).kInt32 + case reflect.Int8: + fn.f = (decFnInfo).kInt8 + case reflect.Int16: + fn.f = (decFnInfo).kInt16 + case reflect.Float32: + fn.f = (decFnInfo).kFloat32 + case reflect.Float64: + fn.f = (decFnInfo).kFloat64 + case reflect.Uint8: + fn.f = (decFnInfo).kUint8 + case reflect.Uint64: + fn.f = (decFnInfo).kUint64 + case reflect.Uint: + fn.f = (decFnInfo).kUint + case reflect.Uint32: + fn.f = (decFnInfo).kUint32 + case reflect.Uint16: + fn.f = (decFnInfo).kUint16 + // case reflect.Ptr: + // fn.f = (decFnInfo).kPtr + case reflect.Uintptr: + fn.f = (decFnInfo).kUintptr + case reflect.Interface: + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).kInterface + case reflect.Struct: + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).kStruct + case reflect.Chan: + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeChan} + fn.f = (decFnInfo).kSlice + case reflect.Slice: + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeSlice} + fn.f = (decFnInfo).kSlice + case reflect.Array: + // fi.decFnInfoX = &decFnInfoX{array: true} + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeArray} + fn.f = (decFnInfo).kArray + case reflect.Map: + fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} + fn.f = (decFnInfo).kMap + default: + fn.f = (decFnInfo).kErr + } + } + } + fn.i = fi + + if useMapForCodecCache { + if d.f == nil { + d.f = make(map[uintptr]decFn, 32) + } + d.f[rtid] = fn + } else { + if d.s == nil { + d.s = make([]rtidDecFn, 0, 32) + } + d.s = append(d.s, rtidDecFn{rtid, fn}) + } + return +} + +func (d *Decoder) structFieldNotFound(index int, rvkencname string) { + if d.h.ErrorIfNoField { + if index >= 0 { + d.errorf("no matching struct field found when decoding stream array at index %v", index) + return + } else if rvkencname != "" { + d.errorf("no matching struct field found when decoding stream map with key %s", rvkencname) + return + } + } + d.swallow() +} + +func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) { + if d.h.ErrorIfNoArrayExpand { + d.errorf("cannot expand array len during decode from %v to %v", sliceLen, streamLen) + } +} + +func (d *Decoder) chkPtrValue(rv reflect.Value) { + // We can only decode into a non-nil pointer + if rv.Kind() == reflect.Ptr && !rv.IsNil() { + return + } + if !rv.IsValid() { + d.error(cannotDecodeIntoNilErr) + return + } + if !rv.CanInterface() { + d.errorf("cannot decode into a value without an interface: %v", rv) + return + } + rvi := rv.Interface() + d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi) +} + +func (d *Decoder) error(err error) { + panic(err) +} + +func (d *Decoder) errorf(format string, params ...interface{}) { + params2 := make([]interface{}, len(params)+1) + params2[0] = d.r.numread() + copy(params2[1:], params) + err := fmt.Errorf("[pos %d]: "+format, params2...) + panic(err) +} + +// -------------------------------------------------- + +// decSliceHelper assists when decoding into a slice, from a map or an array in the stream. +// A slice can be set from a map or array in stream. This supports the MapBySlice interface. +type decSliceHelper struct { + dd decDriver + ct valueType +} + +func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { + x.dd = d.d + if x.dd.IsContainerType(valueTypeArray) { + x.ct = valueTypeArray + clen = x.dd.ReadArrayStart() + } else if x.dd.IsContainerType(valueTypeMap) { + x.ct = valueTypeMap + clen = x.dd.ReadMapStart() * 2 + } else { + d.errorf("only encoded map or array can be decoded into a slice") + } + return +} + +func (x decSliceHelper) End() { + x.dd.ReadEnd() +} + +func decByteSlice(r decReader, clen int, bs []byte) (bsOut []byte) { + if clen == 0 { + return zeroByteSlice + } + if len(bs) == clen { + bsOut = bs + } else if cap(bs) >= clen { + bsOut = bs[:clen] + } else { + bsOut = make([]byte, clen) + } + r.readb(bsOut) + return +} + +func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte) { + if xlen := len(in); xlen > 0 { + if isBytesReader || xlen <= scratchByteArrayLen { + if cap(dest) >= xlen { + out = dest[:xlen] + } else { + out = make([]byte, xlen) + } + copy(out, in) + return + } + } + return in +} + +// // implement overall decReader wrapping both, for possible use inline: +// type decReaderT struct { +// bytes bool +// rb *bytesDecReader +// ri *ioDecReader +// } +// +// // implement *Decoder as a decReader. +// // Using decReaderT (defined just above) caused performance degradation +// // possibly because of constant copying the value, +// // and some value->interface conversion causing allocation. +// func (d *Decoder) unreadn1() { +// if d.bytes { +// d.rb.unreadn1() +// } else { +// d.ri.unreadn1() +// } +// } +// ... for other methods of decReader. +// Testing showed that performance improvement was negligible. diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go new file mode 100644 index 0000000..dbb9886 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go @@ -0,0 +1,1190 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "bytes" + "encoding" + "errors" + "fmt" + "io" + "reflect" + "sort" + "sync" +) + +const ( + defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024 +) + +// AsSymbolFlag defines what should be encoded as symbols. +type AsSymbolFlag uint8 + +const ( + // AsSymbolDefault is default. + // Currently, this means only encode struct field names as symbols. + // The default is subject to change. + AsSymbolDefault AsSymbolFlag = iota + + // AsSymbolAll means encode anything which could be a symbol as a symbol. + AsSymbolAll = 0xfe + + // AsSymbolNone means do not encode anything as a symbol. + AsSymbolNone = 1 << iota + + // AsSymbolMapStringKeys means encode keys in map[string]XXX as symbols. + AsSymbolMapStringKeysFlag + + // AsSymbolStructFieldName means encode struct field names as symbols. + AsSymbolStructFieldNameFlag +) + +// encWriter abstracts writing to a byte array or to an io.Writer. +type encWriter interface { + writeb([]byte) + writestr(string) + writen1(byte) + writen2(byte, byte) + atEndOfEncode() +} + +// encDriver abstracts the actual codec (binc vs msgpack, etc) +type encDriver interface { + IsBuiltinType(rt uintptr) bool + EncodeBuiltin(rt uintptr, v interface{}) + EncodeNil() + EncodeInt(i int64) + EncodeUint(i uint64) + EncodeBool(b bool) + EncodeFloat32(f float32) + EncodeFloat64(f float64) + // encodeExtPreamble(xtag byte, length int) + EncodeRawExt(re *RawExt, e *Encoder) + EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) + EncodeArrayStart(length int) + EncodeMapStart(length int) + EncodeEnd() + EncodeString(c charEncoding, v string) + EncodeSymbol(v string) + EncodeStringBytes(c charEncoding, v []byte) + //TODO + //encBignum(f *big.Int) + //encStringRunes(c charEncoding, v []rune) +} + +type encDriverAsis interface { + EncodeAsis(v []byte) +} + +type encNoSeparator struct{} + +func (_ encNoSeparator) EncodeEnd() {} + +type encStructFieldBytesV struct { + b []byte + v reflect.Value +} + +type encStructFieldBytesVslice []encStructFieldBytesV + +func (p encStructFieldBytesVslice) Len() int { return len(p) } +func (p encStructFieldBytesVslice) Less(i, j int) bool { return bytes.Compare(p[i].b, p[j].b) == -1 } +func (p encStructFieldBytesVslice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +type ioEncWriterWriter interface { + WriteByte(c byte) error + WriteString(s string) (n int, err error) + Write(p []byte) (n int, err error) +} + +type ioEncStringWriter interface { + WriteString(s string) (n int, err error) +} + +type EncodeOptions struct { + // Encode a struct as an array, and not as a map + StructToArray bool + + // Canonical representation means that encoding a value will always result in the same + // sequence of bytes. + // + // This only affects maps, as the iteration order for maps is random. + // In this case, the map keys will first be encoded into []byte, and then sorted, + // before writing the sorted keys and the corresponding map values to the stream. + Canonical bool + + // AsSymbols defines what should be encoded as symbols. + // + // Encoding as symbols can reduce the encoded size significantly. + // + // However, during decoding, each string to be encoded as a symbol must + // be checked to see if it has been seen before. Consequently, encoding time + // will increase if using symbols, because string comparisons has a clear cost. + // + // Sample values: + // AsSymbolNone + // AsSymbolAll + // AsSymbolMapStringKeys + // AsSymbolMapStringKeysFlag | AsSymbolStructFieldNameFlag + AsSymbols AsSymbolFlag +} + +// --------------------------------------------- + +type simpleIoEncWriterWriter struct { + w io.Writer + bw io.ByteWriter + sw ioEncStringWriter +} + +func (o *simpleIoEncWriterWriter) WriteByte(c byte) (err error) { + if o.bw != nil { + return o.bw.WriteByte(c) + } + _, err = o.w.Write([]byte{c}) + return +} + +func (o *simpleIoEncWriterWriter) WriteString(s string) (n int, err error) { + if o.sw != nil { + return o.sw.WriteString(s) + } + // return o.w.Write([]byte(s)) + return o.w.Write(bytesView(s)) +} + +func (o *simpleIoEncWriterWriter) Write(p []byte) (n int, err error) { + return o.w.Write(p) +} + +// ---------------------------------------- + +// ioEncWriter implements encWriter and can write to an io.Writer implementation +type ioEncWriter struct { + w ioEncWriterWriter + // x [8]byte // temp byte array re-used internally for efficiency +} + +func (z *ioEncWriter) writeb(bs []byte) { + if len(bs) == 0 { + return + } + n, err := z.w.Write(bs) + if err != nil { + panic(err) + } + if n != len(bs) { + panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(bs), n)) + } +} + +func (z *ioEncWriter) writestr(s string) { + n, err := z.w.WriteString(s) + if err != nil { + panic(err) + } + if n != len(s) { + panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(s), n)) + } +} + +func (z *ioEncWriter) writen1(b byte) { + if err := z.w.WriteByte(b); err != nil { + panic(err) + } +} + +func (z *ioEncWriter) writen2(b1 byte, b2 byte) { + z.writen1(b1) + z.writen1(b2) +} + +func (z *ioEncWriter) atEndOfEncode() {} + +// ---------------------------------------- + +// bytesEncWriter implements encWriter and can write to an byte slice. +// It is used by Marshal function. +type bytesEncWriter struct { + b []byte + c int // cursor + out *[]byte // write out on atEndOfEncode +} + +func (z *bytesEncWriter) writeb(s []byte) { + if len(s) > 0 { + c := z.grow(len(s)) + copy(z.b[c:], s) + } +} + +func (z *bytesEncWriter) writestr(s string) { + if len(s) > 0 { + c := z.grow(len(s)) + copy(z.b[c:], s) + } +} + +func (z *bytesEncWriter) writen1(b1 byte) { + c := z.grow(1) + z.b[c] = b1 +} + +func (z *bytesEncWriter) writen2(b1 byte, b2 byte) { + c := z.grow(2) + z.b[c] = b1 + z.b[c+1] = b2 +} + +func (z *bytesEncWriter) atEndOfEncode() { + *(z.out) = z.b[:z.c] +} + +func (z *bytesEncWriter) grow(n int) (oldcursor int) { + oldcursor = z.c + z.c = oldcursor + n + if z.c > len(z.b) { + if z.c > cap(z.b) { + // Tried using appendslice logic: (if cap < 1024, *2, else *1.25). + // However, it was too expensive, causing too many iterations of copy. + // Using bytes.Buffer model was much better (2*cap + n) + bs := make([]byte, 2*cap(z.b)+n) + copy(bs, z.b[:oldcursor]) + z.b = bs + } else { + z.b = z.b[:cap(z.b)] + } + } + return +} + +// --------------------------------------------- + +type encFnInfoX struct { + e *Encoder + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType +} + +type encFnInfo struct { + // use encFnInfo as a value receiver. + // keep most of it less-used variables accessible via a pointer (*encFnInfoX). + // As sweet spot for value-receiver is 3 words, keep everything except + // encDriver (which everyone needs) directly accessible. + // ensure encFnInfoX is set for everyone who needs it i.e. + // rawExt, ext, builtin, (selfer|binary|text)Marshal, kSlice, kStruct, kMap, kInterface, fastpath + + ee encDriver + *encFnInfoX +} + +func (f encFnInfo) builtin(rv reflect.Value) { + f.ee.EncodeBuiltin(f.ti.rtid, rv.Interface()) +} + +func (f encFnInfo) rawExt(rv reflect.Value) { + // rev := rv.Interface().(RawExt) + // f.ee.EncodeRawExt(&rev, f.e) + var re *RawExt + if rv.CanAddr() { + re = rv.Addr().Interface().(*RawExt) + } else { + rev := rv.Interface().(RawExt) + re = &rev + } + f.ee.EncodeRawExt(re, f.e) +} + +func (f encFnInfo) ext(rv reflect.Value) { + // if this is a struct|array and it was addressable, then pass the address directly (not the value) + if k := rv.Kind(); (k == reflect.Struct || k == reflect.Array) && rv.CanAddr() { + rv = rv.Addr() + } + f.ee.EncodeExt(rv.Interface(), f.xfTag, f.xfFn, f.e) +} + +func (f encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { + if indir == 0 { + v = rv.Interface() + } else if indir == -1 { + // If a non-pointer was passed to Encode(), then that value is not addressable. + // Take addr if addresable, else copy value to an addressable value. + if rv.CanAddr() { + v = rv.Addr().Interface() + } else { + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + v = rv2.Interface() + // fmt.Printf("rv.Type: %v, rv2.Type: %v, v: %v\n", rv.Type(), rv2.Type(), v) + } + } else { + for j := int8(0); j < indir; j++ { + if rv.IsNil() { + f.ee.EncodeNil() + return + } + rv = rv.Elem() + } + v = rv.Interface() + } + return v, true +} + +func (f encFnInfo) selferMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.csIndir); proceed { + v.(Selfer).CodecEncodeSelf(f.e) + } +} + +func (f encFnInfo) binaryMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed { + bs, fnerr := v.(encoding.BinaryMarshaler).MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) + } +} + +func (f encFnInfo) textMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed { + // debugf(">>>> encoding.TextMarshaler: %T", rv.Interface()) + bs, fnerr := v.(encoding.TextMarshaler).MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) + } +} + +func (f encFnInfo) jsonMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.jmIndir); proceed { + bs, fnerr := v.(jsonMarshaler).MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) + } +} + +func (f encFnInfo) kBool(rv reflect.Value) { + f.ee.EncodeBool(rv.Bool()) +} + +func (f encFnInfo) kString(rv reflect.Value) { + f.ee.EncodeString(c_UTF8, rv.String()) +} + +func (f encFnInfo) kFloat64(rv reflect.Value) { + f.ee.EncodeFloat64(rv.Float()) +} + +func (f encFnInfo) kFloat32(rv reflect.Value) { + f.ee.EncodeFloat32(float32(rv.Float())) +} + +func (f encFnInfo) kInt(rv reflect.Value) { + f.ee.EncodeInt(rv.Int()) +} + +func (f encFnInfo) kUint(rv reflect.Value) { + f.ee.EncodeUint(rv.Uint()) +} + +func (f encFnInfo) kInvalid(rv reflect.Value) { + f.ee.EncodeNil() +} + +func (f encFnInfo) kErr(rv reflect.Value) { + f.e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) +} + +func (f encFnInfo) kSlice(rv reflect.Value) { + ti := f.ti + // array may be non-addressable, so we have to manage with care + // (don't call rv.Bytes, rv.Slice, etc). + // E.g. type struct S{B [2]byte}; + // Encode(S{}) will bomb on "panic: slice of unaddressable array". + if f.seq != seqTypeArray { + if rv.IsNil() { + f.ee.EncodeNil() + return + } + // If in this method, then there was no extension function defined. + // So it's okay to treat as []byte. + if ti.rtid == uint8SliceTypId { + f.ee.EncodeStringBytes(c_RAW, rv.Bytes()) + return + } + } + rtelem := ti.rt.Elem() + l := rv.Len() + if rtelem.Kind() == reflect.Uint8 { + switch f.seq { + case seqTypeArray: + // if l == 0 { f.ee.encodeStringBytes(c_RAW, nil) } else + if rv.CanAddr() { + f.ee.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) + } else { + var bs []byte + if l <= cap(f.e.b) { + bs = f.e.b[:l] + } else { + bs = make([]byte, l) + } + reflect.Copy(reflect.ValueOf(bs), rv) + // TODO: Test that reflect.Copy works instead of manual one-by-one + // for i := 0; i < l; i++ { + // bs[i] = byte(rv.Index(i).Uint()) + // } + f.ee.EncodeStringBytes(c_RAW, bs) + } + case seqTypeSlice: + f.ee.EncodeStringBytes(c_RAW, rv.Bytes()) + case seqTypeChan: + bs := f.e.b[:0] + // do not use range, so that the number of elements encoded + // does not change, and encoding does not hang waiting on someone to close chan. + // for b := range rv.Interface().(<-chan byte) { + // bs = append(bs, b) + // } + ch := rv.Interface().(<-chan byte) + for i := 0; i < l; i++ { + bs = append(bs, <-ch) + } + f.ee.EncodeStringBytes(c_RAW, bs) + } + return + } + + if ti.mbs { + if l%2 == 1 { + f.e.errorf("mapBySlice requires even slice length, but got %v", l) + return + } + f.ee.EncodeMapStart(l / 2) + } else { + f.ee.EncodeArrayStart(l) + } + + e := f.e + if l > 0 { + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() + } + // if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + var fn encFn + if rtelem.Kind() != reflect.Interface { + rtelemid := reflect.ValueOf(rtelem).Pointer() + fn = e.getEncFn(rtelemid, rtelem, true, true) + } + // TODO: Consider perf implication of encoding odd index values as symbols if type is string + for j := 0; j < l; j++ { + if f.seq == seqTypeChan { + if rv2, ok2 := rv.Recv(); ok2 { + e.encodeValue(rv2, fn) + } + } else { + e.encodeValue(rv.Index(j), fn) + } + } + + } + + f.ee.EncodeEnd() +} + +func (f encFnInfo) kStruct(rv reflect.Value) { + fti := f.ti + e := f.e + tisfi := fti.sfip + toMap := !(fti.toArray || e.h.StructToArray) + newlen := len(fti.sfi) + // Use sync.Pool to reduce allocating slices unnecessarily. + // The cost of the occasional locking is less than the cost of locking. + + var fkvs []encStructFieldKV + var pool *sync.Pool + var poolv interface{} + idxpool := newlen / 8 + if encStructPoolLen != 4 { + panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed + } + if idxpool < encStructPoolLen { + pool = &encStructPool[idxpool] + poolv = pool.Get() + switch vv := poolv.(type) { + case *[8]encStructFieldKV: + fkvs = vv[:newlen] + case *[16]encStructFieldKV: + fkvs = vv[:newlen] + case *[32]encStructFieldKV: + fkvs = vv[:newlen] + case *[64]encStructFieldKV: + fkvs = vv[:newlen] + } + } + if fkvs == nil { + fkvs = make([]encStructFieldKV, newlen) + } + // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) + if toMap { + tisfi = fti.sfi + } + newlen = 0 + var kv encStructFieldKV + for _, si := range tisfi { + kv.v = si.field(rv, false) + // if si.i != -1 { + // rvals[newlen] = rv.Field(int(si.i)) + // } else { + // rvals[newlen] = rv.FieldByIndex(si.is) + // } + if toMap { + if si.omitEmpty && isEmptyValue(kv.v) { + continue + } + kv.k = si.encName + } else { + // use the zero value. + // if a reference or struct, set to nil (so you do not output too much) + if si.omitEmpty && isEmptyValue(kv.v) { + switch kv.v.Kind() { + case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array, + reflect.Map, reflect.Slice: + kv.v = reflect.Value{} //encode as nil + } + } + } + fkvs[newlen] = kv + newlen++ + } + + // debugf(">>>> kStruct: newlen: %v", newlen) + // sep := !e.be + ee := f.ee //don't dereference everytime + + if toMap { + ee.EncodeMapStart(newlen) + // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + for j := 0; j < newlen; j++ { + kv = fkvs[j] + if asSymbols { + ee.EncodeSymbol(kv.k) + } else { + ee.EncodeString(c_UTF8, kv.k) + } + e.encodeValue(kv.v, encFn{}) + } + } else { + ee.EncodeArrayStart(newlen) + for j := 0; j < newlen; j++ { + kv = fkvs[j] + e.encodeValue(kv.v, encFn{}) + } + } + ee.EncodeEnd() + + // do not use defer. Instead, use explicit pool return at end of function. + // defer has a cost we are trying to avoid. + // If there is a panic and these slices are not returned, it is ok. + if pool != nil { + pool.Put(poolv) + } +} + +// func (f encFnInfo) kPtr(rv reflect.Value) { +// debugf(">>>>>>> ??? encode kPtr called - shouldn't get called") +// if rv.IsNil() { +// f.ee.encodeNil() +// return +// } +// f.e.encodeValue(rv.Elem()) +// } + +func (f encFnInfo) kInterface(rv reflect.Value) { + if rv.IsNil() { + f.ee.EncodeNil() + return + } + f.e.encodeValue(rv.Elem(), encFn{}) +} + +func (f encFnInfo) kMap(rv reflect.Value) { + if rv.IsNil() { + f.ee.EncodeNil() + return + } + + l := rv.Len() + f.ee.EncodeMapStart(l) + e := f.e + if l == 0 { + f.ee.EncodeEnd() + return + } + var asSymbols bool + // determine the underlying key and val encFn's for the map. + // This eliminates some work which is done for each loop iteration i.e. + // rv.Type(), ref.ValueOf(rt).Pointer(), then check map/list for fn. + // + // However, if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + var keyFn, valFn encFn + ti := f.ti + rtkey := ti.rt.Key() + rtval := ti.rt.Elem() + rtkeyid := reflect.ValueOf(rtkey).Pointer() + // keyTypeIsString := f.ti.rt.Key().Kind() == reflect.String + var keyTypeIsString = rtkeyid == stringTypId + if keyTypeIsString { + asSymbols = e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + } else { + for rtkey.Kind() == reflect.Ptr { + rtkey = rtkey.Elem() + } + if rtkey.Kind() != reflect.Interface { + rtkeyid = reflect.ValueOf(rtkey).Pointer() + keyFn = e.getEncFn(rtkeyid, rtkey, true, true) + } + } + for rtval.Kind() == reflect.Ptr { + rtval = rtval.Elem() + } + if rtval.Kind() != reflect.Interface { + rtvalid := reflect.ValueOf(rtval).Pointer() + valFn = e.getEncFn(rtvalid, rtval, true, true) + } + mks := rv.MapKeys() + // for j, lmks := 0, len(mks); j < lmks; j++ { + ee := f.ee //don't dereference everytime + if e.h.Canonical { + // first encode each key to a []byte first, then sort them, then record + // println(">>>>>>>> CANONICAL <<<<<<<<") + var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + mksbv := make([]encStructFieldBytesV, len(mks)) + for i, k := range mks { + l := len(mksv) + e2.MustEncode(k) + mksbv[i].v = k + mksbv[i].b = mksv[l:] + // fmt.Printf(">>>>> %s\n", mksv[l:]) + } + sort.Sort(encStructFieldBytesVslice(mksbv)) + for j := range mksbv { + e.asis(mksbv[j].b) + e.encodeValue(rv.MapIndex(mksbv[j].v), valFn) + } + } else { + for j := range mks { + if keyTypeIsString { + if asSymbols { + ee.EncodeSymbol(mks[j].String()) + } else { + ee.EncodeString(c_UTF8, mks[j].String()) + } + } else { + e.encodeValue(mks[j], keyFn) + } + e.encodeValue(rv.MapIndex(mks[j]), valFn) + } + } + ee.EncodeEnd() +} + +// -------------------------------------------------- + +// encFn encapsulates the captured variables and the encode function. +// This way, we only do some calculations one times, and pass to the +// code block that should be called (encapsulated in a function) +// instead of executing the checks every time. +type encFn struct { + i encFnInfo + f func(encFnInfo, reflect.Value) +} + +// -------------------------------------------------- + +type rtidEncFn struct { + rtid uintptr + fn encFn +} + +// An Encoder writes an object to an output stream in the codec format. +type Encoder struct { + // hopefully, reduce derefencing cost by laying the encWriter inside the Encoder + e encDriver + // NOTE: Encoder shouldn't call it's write methods, + // as the handler MAY need to do some coordination. + w encWriter + s []rtidEncFn + be bool // is binary encoding + js bool // is json handle + + wi ioEncWriter + wb bytesEncWriter + h *BasicHandle + + as encDriverAsis + hh Handle + f map[uintptr]encFn + b [scratchByteArrayLen]byte +} + +// NewEncoder returns an Encoder for encoding into an io.Writer. +// +// For efficiency, Users are encouraged to pass in a memory buffered writer +// (eg bufio.Writer, bytes.Buffer). +func NewEncoder(w io.Writer, h Handle) *Encoder { + e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + ww, ok := w.(ioEncWriterWriter) + if !ok { + sww := simpleIoEncWriterWriter{w: w} + sww.bw, _ = w.(io.ByteWriter) + sww.sw, _ = w.(ioEncStringWriter) + ww = &sww + //ww = bufio.NewWriterSize(w, defEncByteBufSize) + } + e.wi.w = ww + e.w = &e.wi + _, e.js = h.(*JsonHandle) + e.e = h.newEncDriver(e) + e.as, _ = e.e.(encDriverAsis) + return e +} + +// NewEncoderBytes returns an encoder for encoding directly and efficiently +// into a byte slice, using zero-copying to temporary slices. +// +// It will potentially replace the output byte slice pointed to. +// After encoding, the out parameter contains the encoded contents. +func NewEncoderBytes(out *[]byte, h Handle) *Encoder { + e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + in := *out + if in == nil { + in = make([]byte, defEncByteBufSize) + } + e.wb.b, e.wb.out = in, out + e.w = &e.wb + _, e.js = h.(*JsonHandle) + e.e = h.newEncDriver(e) + e.as, _ = e.e.(encDriverAsis) + return e +} + +// Encode writes an object into a stream. +// +// Encoding can be configured via the struct tag for the fields. +// The "codec" key in struct field's tag value is the key name, +// followed by an optional comma and options. +// Note that the "json" key is used in the absence of the "codec" key. +// +// To set an option on all fields (e.g. omitempty on all fields), you +// can create a field called _struct, and set flags on it. +// +// Struct values "usually" encode as maps. Each exported struct field is encoded unless: +// - the field's tag is "-", OR +// - the field is empty (empty or the zero value) and its tag specifies the "omitempty" option. +// +// When encoding as a map, the first string in the tag (before the comma) +// is the map key string to use when encoding. +// +// However, struct values may encode as arrays. This happens when: +// - StructToArray Encode option is set, OR +// - the tag on the _struct field sets the "toarray" option +// +// Values with types that implement MapBySlice are encoded as stream maps. +// +// The empty values (for omitempty option) are false, 0, any nil pointer +// or interface value, and any array, slice, map, or string of length zero. +// +// Anonymous fields are encoded inline except: +// - the struct tag specifies a replacement name (first value) +// - the field is of an interface type +// +// Examples: +// +// // NOTE: 'json:' can be used as struct tag key, in place 'codec:' below. +// type MyStruct struct { +// _struct bool `codec:",omitempty"` //set omitempty for every field +// Field1 string `codec:"-"` //skip this field +// Field2 int `codec:"myName"` //Use key "myName" in encode stream +// Field3 int32 `codec:",omitempty"` //use key "Field3". Omit if empty. +// Field4 bool `codec:"f4,omitempty"` //use key "f4". Omit if empty. +// io.Reader //use key "Reader". +// MyStruct `codec:"my1" //use key "my1". +// MyStruct //inline it +// ... +// } +// +// type MyStruct struct { +// _struct bool `codec:",omitempty,toarray"` //set omitempty for every field +// //and encode struct as an array +// } +// +// The mode of encoding is based on the type of the value. When a value is seen: +// - If a Selfer, call its CodecEncodeSelf method +// - If an extension is registered for it, call that extension function +// - If it implements encoding.(Binary|Text|JSON)Marshaler, call its Marshal(Binary|Text|JSON) method +// - Else encode it based on its reflect.Kind +// +// Note that struct field names and keys in map[string]XXX will be treated as symbols. +// Some formats support symbols (e.g. binc) and will properly encode the string +// only once in the stream, and use a tag to refer to it thereafter. +func (e *Encoder) Encode(v interface{}) (err error) { + defer panicToErr(&err) + e.encode(v) + e.w.atEndOfEncode() + return +} + +// MustEncode is like Encode, but panics if unable to Encode. +// This provides insight to the code location that triggered the error. +func (e *Encoder) MustEncode(v interface{}) { + e.encode(v) + e.w.atEndOfEncode() +} + +// comment out these (Must)Write methods. They were only put there to support cbor. +// However, users already have access to the streams, and can write directly. +// +// // Write allows users write to the Encoder stream directly. +// func (e *Encoder) Write(bs []byte) (err error) { +// defer panicToErr(&err) +// e.w.writeb(bs) +// return +// } +// // MustWrite is like write, but panics if unable to Write. +// func (e *Encoder) MustWrite(bs []byte) { +// e.w.writeb(bs) +// } + +func (e *Encoder) encode(iv interface{}) { + // if ics, ok := iv.(Selfer); ok { + // ics.CodecEncodeSelf(e) + // return + // } + + switch v := iv.(type) { + case nil: + e.e.EncodeNil() + case Selfer: + v.CodecEncodeSelf(e) + + case reflect.Value: + e.encodeValue(v, encFn{}) + + case string: + e.e.EncodeString(c_UTF8, v) + case bool: + e.e.EncodeBool(v) + case int: + e.e.EncodeInt(int64(v)) + case int8: + e.e.EncodeInt(int64(v)) + case int16: + e.e.EncodeInt(int64(v)) + case int32: + e.e.EncodeInt(int64(v)) + case int64: + e.e.EncodeInt(v) + case uint: + e.e.EncodeUint(uint64(v)) + case uint8: + e.e.EncodeUint(uint64(v)) + case uint16: + e.e.EncodeUint(uint64(v)) + case uint32: + e.e.EncodeUint(uint64(v)) + case uint64: + e.e.EncodeUint(v) + case float32: + e.e.EncodeFloat32(v) + case float64: + e.e.EncodeFloat64(v) + + case []uint8: + e.e.EncodeStringBytes(c_RAW, v) + + case *string: + e.e.EncodeString(c_UTF8, *v) + case *bool: + e.e.EncodeBool(*v) + case *int: + e.e.EncodeInt(int64(*v)) + case *int8: + e.e.EncodeInt(int64(*v)) + case *int16: + e.e.EncodeInt(int64(*v)) + case *int32: + e.e.EncodeInt(int64(*v)) + case *int64: + e.e.EncodeInt(*v) + case *uint: + e.e.EncodeUint(uint64(*v)) + case *uint8: + e.e.EncodeUint(uint64(*v)) + case *uint16: + e.e.EncodeUint(uint64(*v)) + case *uint32: + e.e.EncodeUint(uint64(*v)) + case *uint64: + e.e.EncodeUint(*v) + case *float32: + e.e.EncodeFloat32(*v) + case *float64: + e.e.EncodeFloat64(*v) + + case *[]uint8: + e.e.EncodeStringBytes(c_RAW, *v) + + default: + // canonical mode is not supported for fastpath of maps (but is fine for slices) + const checkCodecSelfer1 = true // in case T is passed, where *T is a Selfer, still checkCodecSelfer + if e.h.Canonical { + if !fastpathEncodeTypeSwitchSlice(iv, e) { + e.encodeI(iv, false, checkCodecSelfer1) + } + } else { + if !fastpathEncodeTypeSwitch(iv, e) { + e.encodeI(iv, false, checkCodecSelfer1) + } + } + } +} + +func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { + if rv, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn := e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer) + fn.f(fn.i, rv) + } +} + +func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, proceed bool) { +LOOP: + for { + switch rv.Kind() { + case reflect.Ptr, reflect.Interface: + if rv.IsNil() { + e.e.EncodeNil() + return + } + rv = rv.Elem() + continue LOOP + case reflect.Slice, reflect.Map: + if rv.IsNil() { + e.e.EncodeNil() + return + } + case reflect.Invalid, reflect.Func: + e.e.EncodeNil() + return + } + break + } + + return rv, true +} + +func (e *Encoder) encodeValue(rv reflect.Value, fn encFn) { + // if a valid fn is passed, it MUST BE for the dereferenced type of rv + if rv, proceed := e.preEncodeValue(rv); proceed { + if fn.f == nil { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn = e.getEncFn(rtid, rt, true, true) + } + fn.f(fn.i, rv) + } +} + +func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn encFn) { + // rtid := reflect.ValueOf(rt).Pointer() + var ok bool + if useMapForCodecCache { + fn, ok = e.f[rtid] + } else { + for _, v := range e.s { + if v.rtid == rtid { + fn, ok = v.fn, true + break + } + } + } + if ok { + return + } + // fi.encFnInfoX = new(encFnInfoX) + ti := getTypeInfo(rtid, rt) + var fi encFnInfo + fi.ee = e.e + + if checkCodecSelfer && ti.cs { + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).selferMarshal + } else if rtid == rawExtTypId { + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).rawExt + } else if e.e.IsBuiltinType(rtid) { + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).builtin + } else if xfFn := e.h.getExt(rtid); xfFn != nil { + // fi.encFnInfoX = new(encFnInfoX) + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext + fn.f = (encFnInfo).ext + } else if supportMarshalInterfaces && e.be && ti.bm { + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).binaryMarshal + } else if supportMarshalInterfaces && !e.be && e.js && ti.jm { + //If JSON, we should check JSONMarshal before textMarshal + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).jsonMarshal + } else if supportMarshalInterfaces && !e.be && ti.tm { + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).textMarshal + } else { + rk := rt.Kind() + // if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if fastpathEnabled && checkFastpath && (rk == reflect.Slice || (rk == reflect.Map && !e.h.Canonical)) { + if rt.PkgPath() == "" { + if idx := fastpathAV.index(rtid); idx != -1 { + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = fastpathAV[idx].encfn + } + } else { + ok = false + // use mapping for underlying type if there + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := reflect.ValueOf(rtu).Pointer() + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].encfn + xrt := fastpathAV[idx].rt + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = func(xf encFnInfo, xrv reflect.Value) { + xfnf(xf, xrv.Convert(xrt)) + } + } + } + } + if fn.f == nil { + switch rk { + case reflect.Bool: + fn.f = (encFnInfo).kBool + case reflect.String: + fn.f = (encFnInfo).kString + case reflect.Float64: + fn.f = (encFnInfo).kFloat64 + case reflect.Float32: + fn.f = (encFnInfo).kFloat32 + case reflect.Int, reflect.Int8, reflect.Int64, reflect.Int32, reflect.Int16: + fn.f = (encFnInfo).kInt + case reflect.Uint8, reflect.Uint64, reflect.Uint, reflect.Uint32, reflect.Uint16, reflect.Uintptr: + fn.f = (encFnInfo).kUint + case reflect.Invalid: + fn.f = (encFnInfo).kInvalid + case reflect.Chan: + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeChan} + fn.f = (encFnInfo).kSlice + case reflect.Slice: + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeSlice} + fn.f = (encFnInfo).kSlice + case reflect.Array: + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeArray} + fn.f = (encFnInfo).kSlice + case reflect.Struct: + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).kStruct + // case reflect.Ptr: + // fn.f = (encFnInfo).kPtr + case reflect.Interface: + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).kInterface + case reflect.Map: + fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} + fn.f = (encFnInfo).kMap + default: + fn.f = (encFnInfo).kErr + } + } + } + fn.i = fi + + if useMapForCodecCache { + if e.f == nil { + e.f = make(map[uintptr]encFn, 32) + } + e.f[rtid] = fn + } else { + if e.s == nil { + e.s = make([]rtidEncFn, 0, 32) + } + e.s = append(e.s, rtidEncFn{rtid, fn}) + } + return +} + +func (e *Encoder) marshal(bs []byte, fnerr error, asis bool, c charEncoding) { + if fnerr != nil { + panic(fnerr) + } + if bs == nil { + e.e.EncodeNil() + } else if asis { + e.asis(bs) + } else { + e.e.EncodeStringBytes(c, bs) + } +} + +func (e *Encoder) asis(v []byte) { + if e.as == nil { + e.w.writeb(v) + } else { + e.as.EncodeAsis(v) + } +} + +func (e *Encoder) errorf(format string, params ...interface{}) { + err := fmt.Errorf(format, params...) + panic(err) +} + +// ---------------------------------------- + +type encStructFieldKV struct { + k string + v reflect.Value +} + +const encStructPoolLen = 4 + +// encStructPool is an array of sync.Pool. +// Each element of the array pools one of encStructPool(8|16|32|64). +// It allows the re-use of slices up to 64 in length. +// A performance cost of encoding structs was collecting +// which values were empty and should be omitted. +// We needed slices of reflect.Value and string to collect them. +// This shared pool reduces the amount of unnecessary creation we do. +// The cost is that of locking sometimes, but sync.Pool is efficient +// enough to reduce thread contention. +var encStructPool [encStructPoolLen]sync.Pool + +func init() { + encStructPool[0].New = func() interface{} { return new([8]encStructFieldKV) } + encStructPool[1].New = func() interface{} { return new([16]encStructFieldKV) } + encStructPool[2].New = func() interface{} { return new([32]encStructFieldKV) } + encStructPool[3].New = func() interface{} { return new([64]encStructFieldKV) } +} + +// ---------------------------------------- + +// func encErr(format string, params ...interface{}) { +// doPanic(msgTagEnc, format, params...) +// } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go new file mode 100644 index 0000000..b395b0c --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go @@ -0,0 +1,24254 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl +// ************************************************************ + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register then in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +import ( + "reflect" + "sort" +) + +const fastpathCheckNilFalse = false // for reflect +const fastpathCheckNilTrue = true // for type switch + +type fastpathT struct{} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(encFnInfo, reflect.Value) + decfn func(decFnInfo, reflect.Value) +} + +type fastpathA [239]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + h, i, j := 0, 0, 239 // len(x) + for i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + } + if i < 239 && x[i].rtid == rtid { + return i + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid } +func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + if !fastpathEnabled { + return + } + i := 0 + fn := func(v interface{}, fe func(encFnInfo, reflect.Value), fd func(decFnInfo, reflect.Value)) (f fastpathE) { + xrt := reflect.TypeOf(v) + xptr := reflect.ValueOf(xrt).Pointer() + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + return + } + + fn([]interface{}(nil), (encFnInfo).fastpathEncSliceIntfR, (decFnInfo).fastpathDecSliceIntfR) + fn([]string(nil), (encFnInfo).fastpathEncSliceStringR, (decFnInfo).fastpathDecSliceStringR) + fn([]float32(nil), (encFnInfo).fastpathEncSliceFloat32R, (decFnInfo).fastpathDecSliceFloat32R) + fn([]float64(nil), (encFnInfo).fastpathEncSliceFloat64R, (decFnInfo).fastpathDecSliceFloat64R) + fn([]uint(nil), (encFnInfo).fastpathEncSliceUintR, (decFnInfo).fastpathDecSliceUintR) + fn([]uint16(nil), (encFnInfo).fastpathEncSliceUint16R, (decFnInfo).fastpathDecSliceUint16R) + fn([]uint32(nil), (encFnInfo).fastpathEncSliceUint32R, (decFnInfo).fastpathDecSliceUint32R) + fn([]uint64(nil), (encFnInfo).fastpathEncSliceUint64R, (decFnInfo).fastpathDecSliceUint64R) + fn([]int(nil), (encFnInfo).fastpathEncSliceIntR, (decFnInfo).fastpathDecSliceIntR) + fn([]int8(nil), (encFnInfo).fastpathEncSliceInt8R, (decFnInfo).fastpathDecSliceInt8R) + fn([]int16(nil), (encFnInfo).fastpathEncSliceInt16R, (decFnInfo).fastpathDecSliceInt16R) + fn([]int32(nil), (encFnInfo).fastpathEncSliceInt32R, (decFnInfo).fastpathDecSliceInt32R) + fn([]int64(nil), (encFnInfo).fastpathEncSliceInt64R, (decFnInfo).fastpathDecSliceInt64R) + fn([]bool(nil), (encFnInfo).fastpathEncSliceBoolR, (decFnInfo).fastpathDecSliceBoolR) + + fn(map[interface{}]interface{}(nil), (encFnInfo).fastpathEncMapIntfIntfR, (decFnInfo).fastpathDecMapIntfIntfR) + fn(map[interface{}]string(nil), (encFnInfo).fastpathEncMapIntfStringR, (decFnInfo).fastpathDecMapIntfStringR) + fn(map[interface{}]uint(nil), (encFnInfo).fastpathEncMapIntfUintR, (decFnInfo).fastpathDecMapIntfUintR) + fn(map[interface{}]uint8(nil), (encFnInfo).fastpathEncMapIntfUint8R, (decFnInfo).fastpathDecMapIntfUint8R) + fn(map[interface{}]uint16(nil), (encFnInfo).fastpathEncMapIntfUint16R, (decFnInfo).fastpathDecMapIntfUint16R) + fn(map[interface{}]uint32(nil), (encFnInfo).fastpathEncMapIntfUint32R, (decFnInfo).fastpathDecMapIntfUint32R) + fn(map[interface{}]uint64(nil), (encFnInfo).fastpathEncMapIntfUint64R, (decFnInfo).fastpathDecMapIntfUint64R) + fn(map[interface{}]int(nil), (encFnInfo).fastpathEncMapIntfIntR, (decFnInfo).fastpathDecMapIntfIntR) + fn(map[interface{}]int8(nil), (encFnInfo).fastpathEncMapIntfInt8R, (decFnInfo).fastpathDecMapIntfInt8R) + fn(map[interface{}]int16(nil), (encFnInfo).fastpathEncMapIntfInt16R, (decFnInfo).fastpathDecMapIntfInt16R) + fn(map[interface{}]int32(nil), (encFnInfo).fastpathEncMapIntfInt32R, (decFnInfo).fastpathDecMapIntfInt32R) + fn(map[interface{}]int64(nil), (encFnInfo).fastpathEncMapIntfInt64R, (decFnInfo).fastpathDecMapIntfInt64R) + fn(map[interface{}]float32(nil), (encFnInfo).fastpathEncMapIntfFloat32R, (decFnInfo).fastpathDecMapIntfFloat32R) + fn(map[interface{}]float64(nil), (encFnInfo).fastpathEncMapIntfFloat64R, (decFnInfo).fastpathDecMapIntfFloat64R) + fn(map[interface{}]bool(nil), (encFnInfo).fastpathEncMapIntfBoolR, (decFnInfo).fastpathDecMapIntfBoolR) + fn(map[string]interface{}(nil), (encFnInfo).fastpathEncMapStringIntfR, (decFnInfo).fastpathDecMapStringIntfR) + fn(map[string]string(nil), (encFnInfo).fastpathEncMapStringStringR, (decFnInfo).fastpathDecMapStringStringR) + fn(map[string]uint(nil), (encFnInfo).fastpathEncMapStringUintR, (decFnInfo).fastpathDecMapStringUintR) + fn(map[string]uint8(nil), (encFnInfo).fastpathEncMapStringUint8R, (decFnInfo).fastpathDecMapStringUint8R) + fn(map[string]uint16(nil), (encFnInfo).fastpathEncMapStringUint16R, (decFnInfo).fastpathDecMapStringUint16R) + fn(map[string]uint32(nil), (encFnInfo).fastpathEncMapStringUint32R, (decFnInfo).fastpathDecMapStringUint32R) + fn(map[string]uint64(nil), (encFnInfo).fastpathEncMapStringUint64R, (decFnInfo).fastpathDecMapStringUint64R) + fn(map[string]int(nil), (encFnInfo).fastpathEncMapStringIntR, (decFnInfo).fastpathDecMapStringIntR) + fn(map[string]int8(nil), (encFnInfo).fastpathEncMapStringInt8R, (decFnInfo).fastpathDecMapStringInt8R) + fn(map[string]int16(nil), (encFnInfo).fastpathEncMapStringInt16R, (decFnInfo).fastpathDecMapStringInt16R) + fn(map[string]int32(nil), (encFnInfo).fastpathEncMapStringInt32R, (decFnInfo).fastpathDecMapStringInt32R) + fn(map[string]int64(nil), (encFnInfo).fastpathEncMapStringInt64R, (decFnInfo).fastpathDecMapStringInt64R) + fn(map[string]float32(nil), (encFnInfo).fastpathEncMapStringFloat32R, (decFnInfo).fastpathDecMapStringFloat32R) + fn(map[string]float64(nil), (encFnInfo).fastpathEncMapStringFloat64R, (decFnInfo).fastpathDecMapStringFloat64R) + fn(map[string]bool(nil), (encFnInfo).fastpathEncMapStringBoolR, (decFnInfo).fastpathDecMapStringBoolR) + fn(map[float32]interface{}(nil), (encFnInfo).fastpathEncMapFloat32IntfR, (decFnInfo).fastpathDecMapFloat32IntfR) + fn(map[float32]string(nil), (encFnInfo).fastpathEncMapFloat32StringR, (decFnInfo).fastpathDecMapFloat32StringR) + fn(map[float32]uint(nil), (encFnInfo).fastpathEncMapFloat32UintR, (decFnInfo).fastpathDecMapFloat32UintR) + fn(map[float32]uint8(nil), (encFnInfo).fastpathEncMapFloat32Uint8R, (decFnInfo).fastpathDecMapFloat32Uint8R) + fn(map[float32]uint16(nil), (encFnInfo).fastpathEncMapFloat32Uint16R, (decFnInfo).fastpathDecMapFloat32Uint16R) + fn(map[float32]uint32(nil), (encFnInfo).fastpathEncMapFloat32Uint32R, (decFnInfo).fastpathDecMapFloat32Uint32R) + fn(map[float32]uint64(nil), (encFnInfo).fastpathEncMapFloat32Uint64R, (decFnInfo).fastpathDecMapFloat32Uint64R) + fn(map[float32]int(nil), (encFnInfo).fastpathEncMapFloat32IntR, (decFnInfo).fastpathDecMapFloat32IntR) + fn(map[float32]int8(nil), (encFnInfo).fastpathEncMapFloat32Int8R, (decFnInfo).fastpathDecMapFloat32Int8R) + fn(map[float32]int16(nil), (encFnInfo).fastpathEncMapFloat32Int16R, (decFnInfo).fastpathDecMapFloat32Int16R) + fn(map[float32]int32(nil), (encFnInfo).fastpathEncMapFloat32Int32R, (decFnInfo).fastpathDecMapFloat32Int32R) + fn(map[float32]int64(nil), (encFnInfo).fastpathEncMapFloat32Int64R, (decFnInfo).fastpathDecMapFloat32Int64R) + fn(map[float32]float32(nil), (encFnInfo).fastpathEncMapFloat32Float32R, (decFnInfo).fastpathDecMapFloat32Float32R) + fn(map[float32]float64(nil), (encFnInfo).fastpathEncMapFloat32Float64R, (decFnInfo).fastpathDecMapFloat32Float64R) + fn(map[float32]bool(nil), (encFnInfo).fastpathEncMapFloat32BoolR, (decFnInfo).fastpathDecMapFloat32BoolR) + fn(map[float64]interface{}(nil), (encFnInfo).fastpathEncMapFloat64IntfR, (decFnInfo).fastpathDecMapFloat64IntfR) + fn(map[float64]string(nil), (encFnInfo).fastpathEncMapFloat64StringR, (decFnInfo).fastpathDecMapFloat64StringR) + fn(map[float64]uint(nil), (encFnInfo).fastpathEncMapFloat64UintR, (decFnInfo).fastpathDecMapFloat64UintR) + fn(map[float64]uint8(nil), (encFnInfo).fastpathEncMapFloat64Uint8R, (decFnInfo).fastpathDecMapFloat64Uint8R) + fn(map[float64]uint16(nil), (encFnInfo).fastpathEncMapFloat64Uint16R, (decFnInfo).fastpathDecMapFloat64Uint16R) + fn(map[float64]uint32(nil), (encFnInfo).fastpathEncMapFloat64Uint32R, (decFnInfo).fastpathDecMapFloat64Uint32R) + fn(map[float64]uint64(nil), (encFnInfo).fastpathEncMapFloat64Uint64R, (decFnInfo).fastpathDecMapFloat64Uint64R) + fn(map[float64]int(nil), (encFnInfo).fastpathEncMapFloat64IntR, (decFnInfo).fastpathDecMapFloat64IntR) + fn(map[float64]int8(nil), (encFnInfo).fastpathEncMapFloat64Int8R, (decFnInfo).fastpathDecMapFloat64Int8R) + fn(map[float64]int16(nil), (encFnInfo).fastpathEncMapFloat64Int16R, (decFnInfo).fastpathDecMapFloat64Int16R) + fn(map[float64]int32(nil), (encFnInfo).fastpathEncMapFloat64Int32R, (decFnInfo).fastpathDecMapFloat64Int32R) + fn(map[float64]int64(nil), (encFnInfo).fastpathEncMapFloat64Int64R, (decFnInfo).fastpathDecMapFloat64Int64R) + fn(map[float64]float32(nil), (encFnInfo).fastpathEncMapFloat64Float32R, (decFnInfo).fastpathDecMapFloat64Float32R) + fn(map[float64]float64(nil), (encFnInfo).fastpathEncMapFloat64Float64R, (decFnInfo).fastpathDecMapFloat64Float64R) + fn(map[float64]bool(nil), (encFnInfo).fastpathEncMapFloat64BoolR, (decFnInfo).fastpathDecMapFloat64BoolR) + fn(map[uint]interface{}(nil), (encFnInfo).fastpathEncMapUintIntfR, (decFnInfo).fastpathDecMapUintIntfR) + fn(map[uint]string(nil), (encFnInfo).fastpathEncMapUintStringR, (decFnInfo).fastpathDecMapUintStringR) + fn(map[uint]uint(nil), (encFnInfo).fastpathEncMapUintUintR, (decFnInfo).fastpathDecMapUintUintR) + fn(map[uint]uint8(nil), (encFnInfo).fastpathEncMapUintUint8R, (decFnInfo).fastpathDecMapUintUint8R) + fn(map[uint]uint16(nil), (encFnInfo).fastpathEncMapUintUint16R, (decFnInfo).fastpathDecMapUintUint16R) + fn(map[uint]uint32(nil), (encFnInfo).fastpathEncMapUintUint32R, (decFnInfo).fastpathDecMapUintUint32R) + fn(map[uint]uint64(nil), (encFnInfo).fastpathEncMapUintUint64R, (decFnInfo).fastpathDecMapUintUint64R) + fn(map[uint]int(nil), (encFnInfo).fastpathEncMapUintIntR, (decFnInfo).fastpathDecMapUintIntR) + fn(map[uint]int8(nil), (encFnInfo).fastpathEncMapUintInt8R, (decFnInfo).fastpathDecMapUintInt8R) + fn(map[uint]int16(nil), (encFnInfo).fastpathEncMapUintInt16R, (decFnInfo).fastpathDecMapUintInt16R) + fn(map[uint]int32(nil), (encFnInfo).fastpathEncMapUintInt32R, (decFnInfo).fastpathDecMapUintInt32R) + fn(map[uint]int64(nil), (encFnInfo).fastpathEncMapUintInt64R, (decFnInfo).fastpathDecMapUintInt64R) + fn(map[uint]float32(nil), (encFnInfo).fastpathEncMapUintFloat32R, (decFnInfo).fastpathDecMapUintFloat32R) + fn(map[uint]float64(nil), (encFnInfo).fastpathEncMapUintFloat64R, (decFnInfo).fastpathDecMapUintFloat64R) + fn(map[uint]bool(nil), (encFnInfo).fastpathEncMapUintBoolR, (decFnInfo).fastpathDecMapUintBoolR) + fn(map[uint8]interface{}(nil), (encFnInfo).fastpathEncMapUint8IntfR, (decFnInfo).fastpathDecMapUint8IntfR) + fn(map[uint8]string(nil), (encFnInfo).fastpathEncMapUint8StringR, (decFnInfo).fastpathDecMapUint8StringR) + fn(map[uint8]uint(nil), (encFnInfo).fastpathEncMapUint8UintR, (decFnInfo).fastpathDecMapUint8UintR) + fn(map[uint8]uint8(nil), (encFnInfo).fastpathEncMapUint8Uint8R, (decFnInfo).fastpathDecMapUint8Uint8R) + fn(map[uint8]uint16(nil), (encFnInfo).fastpathEncMapUint8Uint16R, (decFnInfo).fastpathDecMapUint8Uint16R) + fn(map[uint8]uint32(nil), (encFnInfo).fastpathEncMapUint8Uint32R, (decFnInfo).fastpathDecMapUint8Uint32R) + fn(map[uint8]uint64(nil), (encFnInfo).fastpathEncMapUint8Uint64R, (decFnInfo).fastpathDecMapUint8Uint64R) + fn(map[uint8]int(nil), (encFnInfo).fastpathEncMapUint8IntR, (decFnInfo).fastpathDecMapUint8IntR) + fn(map[uint8]int8(nil), (encFnInfo).fastpathEncMapUint8Int8R, (decFnInfo).fastpathDecMapUint8Int8R) + fn(map[uint8]int16(nil), (encFnInfo).fastpathEncMapUint8Int16R, (decFnInfo).fastpathDecMapUint8Int16R) + fn(map[uint8]int32(nil), (encFnInfo).fastpathEncMapUint8Int32R, (decFnInfo).fastpathDecMapUint8Int32R) + fn(map[uint8]int64(nil), (encFnInfo).fastpathEncMapUint8Int64R, (decFnInfo).fastpathDecMapUint8Int64R) + fn(map[uint8]float32(nil), (encFnInfo).fastpathEncMapUint8Float32R, (decFnInfo).fastpathDecMapUint8Float32R) + fn(map[uint8]float64(nil), (encFnInfo).fastpathEncMapUint8Float64R, (decFnInfo).fastpathDecMapUint8Float64R) + fn(map[uint8]bool(nil), (encFnInfo).fastpathEncMapUint8BoolR, (decFnInfo).fastpathDecMapUint8BoolR) + fn(map[uint16]interface{}(nil), (encFnInfo).fastpathEncMapUint16IntfR, (decFnInfo).fastpathDecMapUint16IntfR) + fn(map[uint16]string(nil), (encFnInfo).fastpathEncMapUint16StringR, (decFnInfo).fastpathDecMapUint16StringR) + fn(map[uint16]uint(nil), (encFnInfo).fastpathEncMapUint16UintR, (decFnInfo).fastpathDecMapUint16UintR) + fn(map[uint16]uint8(nil), (encFnInfo).fastpathEncMapUint16Uint8R, (decFnInfo).fastpathDecMapUint16Uint8R) + fn(map[uint16]uint16(nil), (encFnInfo).fastpathEncMapUint16Uint16R, (decFnInfo).fastpathDecMapUint16Uint16R) + fn(map[uint16]uint32(nil), (encFnInfo).fastpathEncMapUint16Uint32R, (decFnInfo).fastpathDecMapUint16Uint32R) + fn(map[uint16]uint64(nil), (encFnInfo).fastpathEncMapUint16Uint64R, (decFnInfo).fastpathDecMapUint16Uint64R) + fn(map[uint16]int(nil), (encFnInfo).fastpathEncMapUint16IntR, (decFnInfo).fastpathDecMapUint16IntR) + fn(map[uint16]int8(nil), (encFnInfo).fastpathEncMapUint16Int8R, (decFnInfo).fastpathDecMapUint16Int8R) + fn(map[uint16]int16(nil), (encFnInfo).fastpathEncMapUint16Int16R, (decFnInfo).fastpathDecMapUint16Int16R) + fn(map[uint16]int32(nil), (encFnInfo).fastpathEncMapUint16Int32R, (decFnInfo).fastpathDecMapUint16Int32R) + fn(map[uint16]int64(nil), (encFnInfo).fastpathEncMapUint16Int64R, (decFnInfo).fastpathDecMapUint16Int64R) + fn(map[uint16]float32(nil), (encFnInfo).fastpathEncMapUint16Float32R, (decFnInfo).fastpathDecMapUint16Float32R) + fn(map[uint16]float64(nil), (encFnInfo).fastpathEncMapUint16Float64R, (decFnInfo).fastpathDecMapUint16Float64R) + fn(map[uint16]bool(nil), (encFnInfo).fastpathEncMapUint16BoolR, (decFnInfo).fastpathDecMapUint16BoolR) + fn(map[uint32]interface{}(nil), (encFnInfo).fastpathEncMapUint32IntfR, (decFnInfo).fastpathDecMapUint32IntfR) + fn(map[uint32]string(nil), (encFnInfo).fastpathEncMapUint32StringR, (decFnInfo).fastpathDecMapUint32StringR) + fn(map[uint32]uint(nil), (encFnInfo).fastpathEncMapUint32UintR, (decFnInfo).fastpathDecMapUint32UintR) + fn(map[uint32]uint8(nil), (encFnInfo).fastpathEncMapUint32Uint8R, (decFnInfo).fastpathDecMapUint32Uint8R) + fn(map[uint32]uint16(nil), (encFnInfo).fastpathEncMapUint32Uint16R, (decFnInfo).fastpathDecMapUint32Uint16R) + fn(map[uint32]uint32(nil), (encFnInfo).fastpathEncMapUint32Uint32R, (decFnInfo).fastpathDecMapUint32Uint32R) + fn(map[uint32]uint64(nil), (encFnInfo).fastpathEncMapUint32Uint64R, (decFnInfo).fastpathDecMapUint32Uint64R) + fn(map[uint32]int(nil), (encFnInfo).fastpathEncMapUint32IntR, (decFnInfo).fastpathDecMapUint32IntR) + fn(map[uint32]int8(nil), (encFnInfo).fastpathEncMapUint32Int8R, (decFnInfo).fastpathDecMapUint32Int8R) + fn(map[uint32]int16(nil), (encFnInfo).fastpathEncMapUint32Int16R, (decFnInfo).fastpathDecMapUint32Int16R) + fn(map[uint32]int32(nil), (encFnInfo).fastpathEncMapUint32Int32R, (decFnInfo).fastpathDecMapUint32Int32R) + fn(map[uint32]int64(nil), (encFnInfo).fastpathEncMapUint32Int64R, (decFnInfo).fastpathDecMapUint32Int64R) + fn(map[uint32]float32(nil), (encFnInfo).fastpathEncMapUint32Float32R, (decFnInfo).fastpathDecMapUint32Float32R) + fn(map[uint32]float64(nil), (encFnInfo).fastpathEncMapUint32Float64R, (decFnInfo).fastpathDecMapUint32Float64R) + fn(map[uint32]bool(nil), (encFnInfo).fastpathEncMapUint32BoolR, (decFnInfo).fastpathDecMapUint32BoolR) + fn(map[uint64]interface{}(nil), (encFnInfo).fastpathEncMapUint64IntfR, (decFnInfo).fastpathDecMapUint64IntfR) + fn(map[uint64]string(nil), (encFnInfo).fastpathEncMapUint64StringR, (decFnInfo).fastpathDecMapUint64StringR) + fn(map[uint64]uint(nil), (encFnInfo).fastpathEncMapUint64UintR, (decFnInfo).fastpathDecMapUint64UintR) + fn(map[uint64]uint8(nil), (encFnInfo).fastpathEncMapUint64Uint8R, (decFnInfo).fastpathDecMapUint64Uint8R) + fn(map[uint64]uint16(nil), (encFnInfo).fastpathEncMapUint64Uint16R, (decFnInfo).fastpathDecMapUint64Uint16R) + fn(map[uint64]uint32(nil), (encFnInfo).fastpathEncMapUint64Uint32R, (decFnInfo).fastpathDecMapUint64Uint32R) + fn(map[uint64]uint64(nil), (encFnInfo).fastpathEncMapUint64Uint64R, (decFnInfo).fastpathDecMapUint64Uint64R) + fn(map[uint64]int(nil), (encFnInfo).fastpathEncMapUint64IntR, (decFnInfo).fastpathDecMapUint64IntR) + fn(map[uint64]int8(nil), (encFnInfo).fastpathEncMapUint64Int8R, (decFnInfo).fastpathDecMapUint64Int8R) + fn(map[uint64]int16(nil), (encFnInfo).fastpathEncMapUint64Int16R, (decFnInfo).fastpathDecMapUint64Int16R) + fn(map[uint64]int32(nil), (encFnInfo).fastpathEncMapUint64Int32R, (decFnInfo).fastpathDecMapUint64Int32R) + fn(map[uint64]int64(nil), (encFnInfo).fastpathEncMapUint64Int64R, (decFnInfo).fastpathDecMapUint64Int64R) + fn(map[uint64]float32(nil), (encFnInfo).fastpathEncMapUint64Float32R, (decFnInfo).fastpathDecMapUint64Float32R) + fn(map[uint64]float64(nil), (encFnInfo).fastpathEncMapUint64Float64R, (decFnInfo).fastpathDecMapUint64Float64R) + fn(map[uint64]bool(nil), (encFnInfo).fastpathEncMapUint64BoolR, (decFnInfo).fastpathDecMapUint64BoolR) + fn(map[int]interface{}(nil), (encFnInfo).fastpathEncMapIntIntfR, (decFnInfo).fastpathDecMapIntIntfR) + fn(map[int]string(nil), (encFnInfo).fastpathEncMapIntStringR, (decFnInfo).fastpathDecMapIntStringR) + fn(map[int]uint(nil), (encFnInfo).fastpathEncMapIntUintR, (decFnInfo).fastpathDecMapIntUintR) + fn(map[int]uint8(nil), (encFnInfo).fastpathEncMapIntUint8R, (decFnInfo).fastpathDecMapIntUint8R) + fn(map[int]uint16(nil), (encFnInfo).fastpathEncMapIntUint16R, (decFnInfo).fastpathDecMapIntUint16R) + fn(map[int]uint32(nil), (encFnInfo).fastpathEncMapIntUint32R, (decFnInfo).fastpathDecMapIntUint32R) + fn(map[int]uint64(nil), (encFnInfo).fastpathEncMapIntUint64R, (decFnInfo).fastpathDecMapIntUint64R) + fn(map[int]int(nil), (encFnInfo).fastpathEncMapIntIntR, (decFnInfo).fastpathDecMapIntIntR) + fn(map[int]int8(nil), (encFnInfo).fastpathEncMapIntInt8R, (decFnInfo).fastpathDecMapIntInt8R) + fn(map[int]int16(nil), (encFnInfo).fastpathEncMapIntInt16R, (decFnInfo).fastpathDecMapIntInt16R) + fn(map[int]int32(nil), (encFnInfo).fastpathEncMapIntInt32R, (decFnInfo).fastpathDecMapIntInt32R) + fn(map[int]int64(nil), (encFnInfo).fastpathEncMapIntInt64R, (decFnInfo).fastpathDecMapIntInt64R) + fn(map[int]float32(nil), (encFnInfo).fastpathEncMapIntFloat32R, (decFnInfo).fastpathDecMapIntFloat32R) + fn(map[int]float64(nil), (encFnInfo).fastpathEncMapIntFloat64R, (decFnInfo).fastpathDecMapIntFloat64R) + fn(map[int]bool(nil), (encFnInfo).fastpathEncMapIntBoolR, (decFnInfo).fastpathDecMapIntBoolR) + fn(map[int8]interface{}(nil), (encFnInfo).fastpathEncMapInt8IntfR, (decFnInfo).fastpathDecMapInt8IntfR) + fn(map[int8]string(nil), (encFnInfo).fastpathEncMapInt8StringR, (decFnInfo).fastpathDecMapInt8StringR) + fn(map[int8]uint(nil), (encFnInfo).fastpathEncMapInt8UintR, (decFnInfo).fastpathDecMapInt8UintR) + fn(map[int8]uint8(nil), (encFnInfo).fastpathEncMapInt8Uint8R, (decFnInfo).fastpathDecMapInt8Uint8R) + fn(map[int8]uint16(nil), (encFnInfo).fastpathEncMapInt8Uint16R, (decFnInfo).fastpathDecMapInt8Uint16R) + fn(map[int8]uint32(nil), (encFnInfo).fastpathEncMapInt8Uint32R, (decFnInfo).fastpathDecMapInt8Uint32R) + fn(map[int8]uint64(nil), (encFnInfo).fastpathEncMapInt8Uint64R, (decFnInfo).fastpathDecMapInt8Uint64R) + fn(map[int8]int(nil), (encFnInfo).fastpathEncMapInt8IntR, (decFnInfo).fastpathDecMapInt8IntR) + fn(map[int8]int8(nil), (encFnInfo).fastpathEncMapInt8Int8R, (decFnInfo).fastpathDecMapInt8Int8R) + fn(map[int8]int16(nil), (encFnInfo).fastpathEncMapInt8Int16R, (decFnInfo).fastpathDecMapInt8Int16R) + fn(map[int8]int32(nil), (encFnInfo).fastpathEncMapInt8Int32R, (decFnInfo).fastpathDecMapInt8Int32R) + fn(map[int8]int64(nil), (encFnInfo).fastpathEncMapInt8Int64R, (decFnInfo).fastpathDecMapInt8Int64R) + fn(map[int8]float32(nil), (encFnInfo).fastpathEncMapInt8Float32R, (decFnInfo).fastpathDecMapInt8Float32R) + fn(map[int8]float64(nil), (encFnInfo).fastpathEncMapInt8Float64R, (decFnInfo).fastpathDecMapInt8Float64R) + fn(map[int8]bool(nil), (encFnInfo).fastpathEncMapInt8BoolR, (decFnInfo).fastpathDecMapInt8BoolR) + fn(map[int16]interface{}(nil), (encFnInfo).fastpathEncMapInt16IntfR, (decFnInfo).fastpathDecMapInt16IntfR) + fn(map[int16]string(nil), (encFnInfo).fastpathEncMapInt16StringR, (decFnInfo).fastpathDecMapInt16StringR) + fn(map[int16]uint(nil), (encFnInfo).fastpathEncMapInt16UintR, (decFnInfo).fastpathDecMapInt16UintR) + fn(map[int16]uint8(nil), (encFnInfo).fastpathEncMapInt16Uint8R, (decFnInfo).fastpathDecMapInt16Uint8R) + fn(map[int16]uint16(nil), (encFnInfo).fastpathEncMapInt16Uint16R, (decFnInfo).fastpathDecMapInt16Uint16R) + fn(map[int16]uint32(nil), (encFnInfo).fastpathEncMapInt16Uint32R, (decFnInfo).fastpathDecMapInt16Uint32R) + fn(map[int16]uint64(nil), (encFnInfo).fastpathEncMapInt16Uint64R, (decFnInfo).fastpathDecMapInt16Uint64R) + fn(map[int16]int(nil), (encFnInfo).fastpathEncMapInt16IntR, (decFnInfo).fastpathDecMapInt16IntR) + fn(map[int16]int8(nil), (encFnInfo).fastpathEncMapInt16Int8R, (decFnInfo).fastpathDecMapInt16Int8R) + fn(map[int16]int16(nil), (encFnInfo).fastpathEncMapInt16Int16R, (decFnInfo).fastpathDecMapInt16Int16R) + fn(map[int16]int32(nil), (encFnInfo).fastpathEncMapInt16Int32R, (decFnInfo).fastpathDecMapInt16Int32R) + fn(map[int16]int64(nil), (encFnInfo).fastpathEncMapInt16Int64R, (decFnInfo).fastpathDecMapInt16Int64R) + fn(map[int16]float32(nil), (encFnInfo).fastpathEncMapInt16Float32R, (decFnInfo).fastpathDecMapInt16Float32R) + fn(map[int16]float64(nil), (encFnInfo).fastpathEncMapInt16Float64R, (decFnInfo).fastpathDecMapInt16Float64R) + fn(map[int16]bool(nil), (encFnInfo).fastpathEncMapInt16BoolR, (decFnInfo).fastpathDecMapInt16BoolR) + fn(map[int32]interface{}(nil), (encFnInfo).fastpathEncMapInt32IntfR, (decFnInfo).fastpathDecMapInt32IntfR) + fn(map[int32]string(nil), (encFnInfo).fastpathEncMapInt32StringR, (decFnInfo).fastpathDecMapInt32StringR) + fn(map[int32]uint(nil), (encFnInfo).fastpathEncMapInt32UintR, (decFnInfo).fastpathDecMapInt32UintR) + fn(map[int32]uint8(nil), (encFnInfo).fastpathEncMapInt32Uint8R, (decFnInfo).fastpathDecMapInt32Uint8R) + fn(map[int32]uint16(nil), (encFnInfo).fastpathEncMapInt32Uint16R, (decFnInfo).fastpathDecMapInt32Uint16R) + fn(map[int32]uint32(nil), (encFnInfo).fastpathEncMapInt32Uint32R, (decFnInfo).fastpathDecMapInt32Uint32R) + fn(map[int32]uint64(nil), (encFnInfo).fastpathEncMapInt32Uint64R, (decFnInfo).fastpathDecMapInt32Uint64R) + fn(map[int32]int(nil), (encFnInfo).fastpathEncMapInt32IntR, (decFnInfo).fastpathDecMapInt32IntR) + fn(map[int32]int8(nil), (encFnInfo).fastpathEncMapInt32Int8R, (decFnInfo).fastpathDecMapInt32Int8R) + fn(map[int32]int16(nil), (encFnInfo).fastpathEncMapInt32Int16R, (decFnInfo).fastpathDecMapInt32Int16R) + fn(map[int32]int32(nil), (encFnInfo).fastpathEncMapInt32Int32R, (decFnInfo).fastpathDecMapInt32Int32R) + fn(map[int32]int64(nil), (encFnInfo).fastpathEncMapInt32Int64R, (decFnInfo).fastpathDecMapInt32Int64R) + fn(map[int32]float32(nil), (encFnInfo).fastpathEncMapInt32Float32R, (decFnInfo).fastpathDecMapInt32Float32R) + fn(map[int32]float64(nil), (encFnInfo).fastpathEncMapInt32Float64R, (decFnInfo).fastpathDecMapInt32Float64R) + fn(map[int32]bool(nil), (encFnInfo).fastpathEncMapInt32BoolR, (decFnInfo).fastpathDecMapInt32BoolR) + fn(map[int64]interface{}(nil), (encFnInfo).fastpathEncMapInt64IntfR, (decFnInfo).fastpathDecMapInt64IntfR) + fn(map[int64]string(nil), (encFnInfo).fastpathEncMapInt64StringR, (decFnInfo).fastpathDecMapInt64StringR) + fn(map[int64]uint(nil), (encFnInfo).fastpathEncMapInt64UintR, (decFnInfo).fastpathDecMapInt64UintR) + fn(map[int64]uint8(nil), (encFnInfo).fastpathEncMapInt64Uint8R, (decFnInfo).fastpathDecMapInt64Uint8R) + fn(map[int64]uint16(nil), (encFnInfo).fastpathEncMapInt64Uint16R, (decFnInfo).fastpathDecMapInt64Uint16R) + fn(map[int64]uint32(nil), (encFnInfo).fastpathEncMapInt64Uint32R, (decFnInfo).fastpathDecMapInt64Uint32R) + fn(map[int64]uint64(nil), (encFnInfo).fastpathEncMapInt64Uint64R, (decFnInfo).fastpathDecMapInt64Uint64R) + fn(map[int64]int(nil), (encFnInfo).fastpathEncMapInt64IntR, (decFnInfo).fastpathDecMapInt64IntR) + fn(map[int64]int8(nil), (encFnInfo).fastpathEncMapInt64Int8R, (decFnInfo).fastpathDecMapInt64Int8R) + fn(map[int64]int16(nil), (encFnInfo).fastpathEncMapInt64Int16R, (decFnInfo).fastpathDecMapInt64Int16R) + fn(map[int64]int32(nil), (encFnInfo).fastpathEncMapInt64Int32R, (decFnInfo).fastpathDecMapInt64Int32R) + fn(map[int64]int64(nil), (encFnInfo).fastpathEncMapInt64Int64R, (decFnInfo).fastpathDecMapInt64Int64R) + fn(map[int64]float32(nil), (encFnInfo).fastpathEncMapInt64Float32R, (decFnInfo).fastpathDecMapInt64Float32R) + fn(map[int64]float64(nil), (encFnInfo).fastpathEncMapInt64Float64R, (decFnInfo).fastpathDecMapInt64Float64R) + fn(map[int64]bool(nil), (encFnInfo).fastpathEncMapInt64BoolR, (decFnInfo).fastpathDecMapInt64BoolR) + fn(map[bool]interface{}(nil), (encFnInfo).fastpathEncMapBoolIntfR, (decFnInfo).fastpathDecMapBoolIntfR) + fn(map[bool]string(nil), (encFnInfo).fastpathEncMapBoolStringR, (decFnInfo).fastpathDecMapBoolStringR) + fn(map[bool]uint(nil), (encFnInfo).fastpathEncMapBoolUintR, (decFnInfo).fastpathDecMapBoolUintR) + fn(map[bool]uint8(nil), (encFnInfo).fastpathEncMapBoolUint8R, (decFnInfo).fastpathDecMapBoolUint8R) + fn(map[bool]uint16(nil), (encFnInfo).fastpathEncMapBoolUint16R, (decFnInfo).fastpathDecMapBoolUint16R) + fn(map[bool]uint32(nil), (encFnInfo).fastpathEncMapBoolUint32R, (decFnInfo).fastpathDecMapBoolUint32R) + fn(map[bool]uint64(nil), (encFnInfo).fastpathEncMapBoolUint64R, (decFnInfo).fastpathDecMapBoolUint64R) + fn(map[bool]int(nil), (encFnInfo).fastpathEncMapBoolIntR, (decFnInfo).fastpathDecMapBoolIntR) + fn(map[bool]int8(nil), (encFnInfo).fastpathEncMapBoolInt8R, (decFnInfo).fastpathDecMapBoolInt8R) + fn(map[bool]int16(nil), (encFnInfo).fastpathEncMapBoolInt16R, (decFnInfo).fastpathDecMapBoolInt16R) + fn(map[bool]int32(nil), (encFnInfo).fastpathEncMapBoolInt32R, (decFnInfo).fastpathDecMapBoolInt32R) + fn(map[bool]int64(nil), (encFnInfo).fastpathEncMapBoolInt64R, (decFnInfo).fastpathDecMapBoolInt64R) + fn(map[bool]float32(nil), (encFnInfo).fastpathEncMapBoolFloat32R, (decFnInfo).fastpathDecMapBoolFloat32R) + fn(map[bool]float64(nil), (encFnInfo).fastpathEncMapBoolFloat64R, (decFnInfo).fastpathDecMapBoolFloat64R) + fn(map[bool]bool(nil), (encFnInfo).fastpathEncMapBoolBoolR, (decFnInfo).fastpathDecMapBoolBoolR) + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { + + case []interface{}: + fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + case *[]interface{}: + fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + + case []string: + fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + case *[]string: + fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + + case map[string]string: + fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + + case map[string]uint: + fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + + case map[string]int: + fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + + case []float32: + fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + case *[]float32: + fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + + case []float64: + fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + case *[]float64: + fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + + case []uint: + fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + case *[]uint: + fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + + case map[uint]string: + fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint]int: + fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + + case []uint16: + fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + case *[]uint16: + fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + + case []uint32: + fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + case *[]uint32: + fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + + case []uint64: + fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + case *[]uint64: + fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + + case []int: + fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + case *[]int: + fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + + case map[int]string: + fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + + case map[int]uint: + fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + + case map[int]int: + fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + + case []int8: + fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + case *[]int8: + fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + + case []int16: + fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + case *[]int16: + fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + + case []int32: + fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + case *[]int32: + fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + + case []int64: + fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + case *[]int64: + fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + + case []bool: + fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + case *[]bool: + fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + + case map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + case *map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + + case map[bool]string: + fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + case *map[bool]string: + fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint: + fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + case *map[bool]uint: + fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint8: + fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + case *map[bool]uint8: + fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint16: + fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + case *map[bool]uint16: + fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint32: + fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + case *map[bool]uint32: + fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint64: + fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + case *map[bool]uint64: + fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + + case map[bool]int: + fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + case *map[bool]int: + fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + + case map[bool]int8: + fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + case *map[bool]int8: + fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + + case map[bool]int16: + fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + case *map[bool]int16: + fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + + case map[bool]int32: + fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + case *map[bool]int32: + fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + + case map[bool]int64: + fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + case *map[bool]int64: + fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + + case map[bool]float32: + fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + case *map[bool]float32: + fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + + case map[bool]float64: + fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + case *map[bool]float64: + fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + + case map[bool]bool: + fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + case *map[bool]bool: + fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + + default: + return false + } + return true +} + +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { + + case []interface{}: + fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + case *[]interface{}: + fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + + case []string: + fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + case *[]string: + fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + + case []float32: + fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + case *[]float32: + fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + + case []float64: + fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + case *[]float64: + fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + + case []uint: + fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + case *[]uint: + fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + + case []uint16: + fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + case *[]uint16: + fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + + case []uint32: + fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + case *[]uint32: + fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + + case []uint64: + fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + case *[]uint64: + fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + + case []int: + fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + case *[]int: + fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + + case []int8: + fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + case *[]int8: + fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + + case []int16: + fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + case *[]int16: + fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + + case []int32: + fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + case *[]int32: + fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + + case []int64: + fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + case *[]int64: + fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + + case []bool: + fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + case *[]bool: + fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + + default: + return false + } + return true +} + +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { + + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + + case map[string]string: + fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + + case map[string]uint: + fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + + case map[string]int: + fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + + case map[uint]string: + fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint]int: + fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + + case map[int]string: + fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + + case map[int]uint: + fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + + case map[int]int: + fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + + case map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + case *map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + + case map[bool]string: + fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + case *map[bool]string: + fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint: + fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + case *map[bool]uint: + fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint8: + fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + case *map[bool]uint8: + fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint16: + fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + case *map[bool]uint16: + fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint32: + fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + case *map[bool]uint32: + fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint64: + fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + case *map[bool]uint64: + fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + + case map[bool]int: + fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + case *map[bool]int: + fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + + case map[bool]int8: + fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + case *map[bool]int8: + fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + + case map[bool]int16: + fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + case *map[bool]int16: + fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + + case map[bool]int32: + fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + case *map[bool]int32: + fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + + case map[bool]int64: + fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + case *map[bool]int64: + fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + + case map[bool]float32: + fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + case *map[bool]float32: + fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + + case map[bool]float64: + fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + case *map[bool]float64: + fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + + case map[bool]bool: + fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + case *map[bool]bool: + fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + + default: + return false + } + return true +} + +// -- -- fast path functions + +func (f encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) { + fastpathTV.EncSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceStringR(rv reflect.Value) { + fastpathTV.EncSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) { + fastpathTV.EncSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) { + fastpathTV.EncSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceUintR(rv reflect.Value) { + fastpathTV.EncSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) { + fastpathTV.EncSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) { + fastpathTV.EncSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) { + fastpathTV.EncSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceIntR(rv reflect.Value) { + fastpathTV.EncSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) { + fastpathTV.EncSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) { + fastpathTV.EncSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) { + fastpathTV.EncSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) { + fastpathTV.EncSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) { + fastpathTV.EncSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) { + fastpathTV.EncMapIntfIntfV(rv.Interface().(map[interface{}]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) { + fastpathTV.EncMapIntfStringV(rv.Interface().(map[interface{}]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) { + fastpathTV.EncMapIntfUintV(rv.Interface().(map[interface{}]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) { + fastpathTV.EncMapIntfUint8V(rv.Interface().(map[interface{}]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) { + fastpathTV.EncMapIntfUint16V(rv.Interface().(map[interface{}]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) { + fastpathTV.EncMapIntfUint32V(rv.Interface().(map[interface{}]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) { + fastpathTV.EncMapIntfUint64V(rv.Interface().(map[interface{}]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) { + fastpathTV.EncMapIntfIntV(rv.Interface().(map[interface{}]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) { + fastpathTV.EncMapIntfInt8V(rv.Interface().(map[interface{}]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) { + fastpathTV.EncMapIntfInt16V(rv.Interface().(map[interface{}]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) { + fastpathTV.EncMapIntfInt32V(rv.Interface().(map[interface{}]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) { + fastpathTV.EncMapIntfInt64V(rv.Interface().(map[interface{}]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntfFloat32V(rv.Interface().(map[interface{}]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntfFloat64V(rv.Interface().(map[interface{}]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) { + fastpathTV.EncMapIntfBoolV(rv.Interface().(map[interface{}]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + e.encode(k2) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) { + fastpathTV.EncMapStringIntfV(rv.Interface().(map[string]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) { + fastpathTV.EncMapStringStringV(rv.Interface().(map[string]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) { + fastpathTV.EncMapStringUintV(rv.Interface().(map[string]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) { + fastpathTV.EncMapStringUint8V(rv.Interface().(map[string]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) { + fastpathTV.EncMapStringUint16V(rv.Interface().(map[string]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) { + fastpathTV.EncMapStringUint32V(rv.Interface().(map[string]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) { + fastpathTV.EncMapStringUint64V(rv.Interface().(map[string]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) { + fastpathTV.EncMapStringIntV(rv.Interface().(map[string]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) { + fastpathTV.EncMapStringInt8V(rv.Interface().(map[string]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) { + fastpathTV.EncMapStringInt16V(rv.Interface().(map[string]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) { + fastpathTV.EncMapStringInt32V(rv.Interface().(map[string]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) { + fastpathTV.EncMapStringInt64V(rv.Interface().(map[string]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) { + fastpathTV.EncMapStringFloat32V(rv.Interface().(map[string]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) { + fastpathTV.EncMapStringFloat64V(rv.Interface().(map[string]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) { + fastpathTV.EncMapStringBoolV(rv.Interface().(map[string]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + for k2, v2 := range v { + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntfV(rv.Interface().(map[float32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) { + fastpathTV.EncMapFloat32StringV(rv.Interface().(map[float32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) { + fastpathTV.EncMapFloat32UintV(rv.Interface().(map[float32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint8V(rv.Interface().(map[float32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint16V(rv.Interface().(map[float32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint32V(rv.Interface().(map[float32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint64V(rv.Interface().(map[float32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int8V(rv.Interface().(map[float32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int16V(rv.Interface().(map[float32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int32V(rv.Interface().(map[float32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int64V(rv.Interface().(map[float32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Float32V(rv.Interface().(map[float32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Float64V(rv.Interface().(map[float32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) { + fastpathTV.EncMapFloat32BoolV(rv.Interface().(map[float32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat32(k2) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) { + fastpathTV.EncMapFloat64IntfV(rv.Interface().(map[float64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) { + fastpathTV.EncMapFloat64StringV(rv.Interface().(map[float64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) { + fastpathTV.EncMapFloat64UintV(rv.Interface().(map[float64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint8V(rv.Interface().(map[float64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint16V(rv.Interface().(map[float64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint32V(rv.Interface().(map[float64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint64V(rv.Interface().(map[float64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) { + fastpathTV.EncMapFloat64IntV(rv.Interface().(map[float64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int8V(rv.Interface().(map[float64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int16V(rv.Interface().(map[float64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int32V(rv.Interface().(map[float64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int64V(rv.Interface().(map[float64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float32V(rv.Interface().(map[float64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) { + fastpathTV.EncMapFloat64BoolV(rv.Interface().(map[float64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeFloat64(k2) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) { + fastpathTV.EncMapUintIntfV(rv.Interface().(map[uint]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) { + fastpathTV.EncMapUintStringV(rv.Interface().(map[uint]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) { + fastpathTV.EncMapUintUintV(rv.Interface().(map[uint]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) { + fastpathTV.EncMapUintUint8V(rv.Interface().(map[uint]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) { + fastpathTV.EncMapUintUint16V(rv.Interface().(map[uint]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) { + fastpathTV.EncMapUintUint32V(rv.Interface().(map[uint]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) { + fastpathTV.EncMapUintUint64V(rv.Interface().(map[uint]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) { + fastpathTV.EncMapUintIntV(rv.Interface().(map[uint]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) { + fastpathTV.EncMapUintInt8V(rv.Interface().(map[uint]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) { + fastpathTV.EncMapUintInt16V(rv.Interface().(map[uint]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) { + fastpathTV.EncMapUintInt32V(rv.Interface().(map[uint]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) { + fastpathTV.EncMapUintInt64V(rv.Interface().(map[uint]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) { + fastpathTV.EncMapUintFloat32V(rv.Interface().(map[uint]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) { + fastpathTV.EncMapUintFloat64V(rv.Interface().(map[uint]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) { + fastpathTV.EncMapUintBoolV(rv.Interface().(map[uint]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) { + fastpathTV.EncMapUint8IntfV(rv.Interface().(map[uint8]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) { + fastpathTV.EncMapUint8StringV(rv.Interface().(map[uint8]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) { + fastpathTV.EncMapUint8UintV(rv.Interface().(map[uint8]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint8V(rv.Interface().(map[uint8]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint16V(rv.Interface().(map[uint8]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint32V(rv.Interface().(map[uint8]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint64V(rv.Interface().(map[uint8]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) { + fastpathTV.EncMapUint8IntV(rv.Interface().(map[uint8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) { + fastpathTV.EncMapUint8Int8V(rv.Interface().(map[uint8]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) { + fastpathTV.EncMapUint8Int16V(rv.Interface().(map[uint8]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) { + fastpathTV.EncMapUint8Int32V(rv.Interface().(map[uint8]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) { + fastpathTV.EncMapUint8Int64V(rv.Interface().(map[uint8]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) { + fastpathTV.EncMapUint8Float32V(rv.Interface().(map[uint8]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) { + fastpathTV.EncMapUint8Float64V(rv.Interface().(map[uint8]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) { + fastpathTV.EncMapUint8BoolV(rv.Interface().(map[uint8]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) { + fastpathTV.EncMapUint16IntfV(rv.Interface().(map[uint16]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) { + fastpathTV.EncMapUint16StringV(rv.Interface().(map[uint16]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) { + fastpathTV.EncMapUint16UintV(rv.Interface().(map[uint16]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint8V(rv.Interface().(map[uint16]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint16V(rv.Interface().(map[uint16]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint32V(rv.Interface().(map[uint16]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint64V(rv.Interface().(map[uint16]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) { + fastpathTV.EncMapUint16IntV(rv.Interface().(map[uint16]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) { + fastpathTV.EncMapUint16Int8V(rv.Interface().(map[uint16]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) { + fastpathTV.EncMapUint16Int16V(rv.Interface().(map[uint16]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) { + fastpathTV.EncMapUint16Int32V(rv.Interface().(map[uint16]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) { + fastpathTV.EncMapUint16Int64V(rv.Interface().(map[uint16]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) { + fastpathTV.EncMapUint16Float32V(rv.Interface().(map[uint16]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) { + fastpathTV.EncMapUint16Float64V(rv.Interface().(map[uint16]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) { + fastpathTV.EncMapUint16BoolV(rv.Interface().(map[uint16]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) { + fastpathTV.EncMapUint32IntfV(rv.Interface().(map[uint32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) { + fastpathTV.EncMapUint32StringV(rv.Interface().(map[uint32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) { + fastpathTV.EncMapUint32UintV(rv.Interface().(map[uint32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint8V(rv.Interface().(map[uint32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint16V(rv.Interface().(map[uint32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint32V(rv.Interface().(map[uint32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint64V(rv.Interface().(map[uint32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) { + fastpathTV.EncMapUint32IntV(rv.Interface().(map[uint32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) { + fastpathTV.EncMapUint32Int8V(rv.Interface().(map[uint32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) { + fastpathTV.EncMapUint32Int16V(rv.Interface().(map[uint32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) { + fastpathTV.EncMapUint32Int32V(rv.Interface().(map[uint32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) { + fastpathTV.EncMapUint32Int64V(rv.Interface().(map[uint32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) { + fastpathTV.EncMapUint32Float32V(rv.Interface().(map[uint32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) { + fastpathTV.EncMapUint32Float64V(rv.Interface().(map[uint32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) { + fastpathTV.EncMapUint32BoolV(rv.Interface().(map[uint32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) { + fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) { + fastpathTV.EncMapUint64StringV(rv.Interface().(map[uint64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) { + fastpathTV.EncMapUint64UintV(rv.Interface().(map[uint64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint8V(rv.Interface().(map[uint64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint16V(rv.Interface().(map[uint64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint32V(rv.Interface().(map[uint64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint64V(rv.Interface().(map[uint64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) { + fastpathTV.EncMapUint64IntV(rv.Interface().(map[uint64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) { + fastpathTV.EncMapUint64Int8V(rv.Interface().(map[uint64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) { + fastpathTV.EncMapUint64Int16V(rv.Interface().(map[uint64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) { + fastpathTV.EncMapUint64Int32V(rv.Interface().(map[uint64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) { + fastpathTV.EncMapUint64Int64V(rv.Interface().(map[uint64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) { + fastpathTV.EncMapUint64Float32V(rv.Interface().(map[uint64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) { + fastpathTV.EncMapUint64Float64V(rv.Interface().(map[uint64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) { + fastpathTV.EncMapUint64BoolV(rv.Interface().(map[uint64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeUint(uint64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) { + fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) { + fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) { + fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) { + fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) { + fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) { + fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) { + fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) { + fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) { + fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) { + fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) { + fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) { + fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) { + fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) { + fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) { + fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) { + fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) { + fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) { + fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) { + fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) { + fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) { + fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) { + fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) { + fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) { + fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) { + fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) { + fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) { + fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) { + fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) { + fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) { + fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) { + fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) { + fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) { + fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) { + fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) { + fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) { + fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) { + fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) { + fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) { + fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) { + fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) { + fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) { + fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) { + fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) { + fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) { + fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) { + fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) { + fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) { + fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) { + fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) { + fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) { + fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) { + fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) { + fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) { + fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) { + fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) { + fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) { + fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeInt(int64(k2)) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) { + fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + e.encode(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) { + fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeString(c_UTF8, v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) { + fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) { + fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) { + fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) { + fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) { + fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeUint(uint64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) { + fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) { + fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) { + fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) { + fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) { + fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeInt(int64(v2)) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeFloat32(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeFloat64(v2) + } + ee.EncodeEnd() +} + +func (f encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) { + fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + + for k2, v2 := range v { + ee.EncodeBool(k2) + ee.EncodeBool(v2) + } + ee.EncodeEnd() +} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + switch v := iv.(type) { + + case []interface{}: + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d) + case *[]interface{}: + v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]interface{}: + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]interface{}: + v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]string: + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]string: + v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint: + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint: + v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint8: + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint8: + v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint16: + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint16: + v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint32: + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint32: + v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint64: + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint64: + v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int: + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int: + v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int8: + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int8: + v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int16: + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int16: + v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int32: + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int32: + v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int64: + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int64: + v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]float32: + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float32: + v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]float64: + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float64: + v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]bool: + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]bool: + v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []string: + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d) + case *[]string: + v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]interface{}: + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d) + case *map[string]interface{}: + v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]string: + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d) + case *map[string]string: + v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint: + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d) + case *map[string]uint: + v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint8: + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint8: + v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint16: + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint16: + v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint32: + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint32: + v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint64: + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint64: + v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int: + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d) + case *map[string]int: + v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int8: + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d) + case *map[string]int8: + v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int16: + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d) + case *map[string]int16: + v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int32: + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d) + case *map[string]int32: + v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int64: + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d) + case *map[string]int64: + v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]float32: + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[string]float32: + v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]float64: + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[string]float64: + v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]bool: + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d) + case *map[string]bool: + v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []float32: + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d) + case *[]float32: + v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]interface{}: + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float32]interface{}: + v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]string: + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d) + case *map[float32]string: + v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint: + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint: + v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint8: + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint8: + v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint16: + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint16: + v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint32: + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint32: + v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint64: + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint64: + v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int: + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d) + case *map[float32]int: + v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int8: + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int8: + v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int16: + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int16: + v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int32: + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int32: + v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int64: + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int64: + v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]float32: + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float32: + v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]float64: + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float64: + v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]bool: + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float32]bool: + v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []float64: + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d) + case *[]float64: + v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]interface{}: + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float64]interface{}: + v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]string: + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d) + case *map[float64]string: + v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint: + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint: + v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint8: + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint8: + v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint16: + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint16: + v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint32: + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint32: + v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint64: + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint64: + v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int: + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d) + case *map[float64]int: + v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int8: + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int8: + v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int16: + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int16: + v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int32: + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int32: + v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int64: + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int64: + v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]float32: + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float32: + v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]float64: + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float64: + v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]bool: + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float64]bool: + v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint: + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d) + case *[]uint: + v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]interface{}: + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint]interface{}: + v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]string: + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d) + case *map[uint]string: + v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint: + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint: + v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint8: + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint8: + v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint16: + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint16: + v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint32: + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint32: + v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint64: + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint64: + v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int: + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d) + case *map[uint]int: + v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int8: + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int8: + v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int16: + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int16: + v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int32: + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int32: + v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int64: + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int64: + v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]float32: + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float32: + v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]float64: + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float64: + v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]bool: + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint]bool: + v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]interface{}: + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]interface{}: + v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]string: + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]string: + v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint: + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint: + v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint8: + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint8: + v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint16: + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint16: + v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint32: + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint32: + v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint64: + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint64: + v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int: + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int: + v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int8: + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int8: + v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int16: + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int16: + v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int32: + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int32: + v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int64: + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int64: + v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]float32: + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float32: + v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]float64: + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float64: + v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]bool: + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]bool: + v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint16: + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d) + case *[]uint16: + v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]interface{}: + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]interface{}: + v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]string: + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]string: + v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint: + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint: + v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint8: + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint8: + v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint16: + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint16: + v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint32: + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint32: + v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint64: + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint64: + v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int: + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int: + v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int8: + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int8: + v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int16: + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int16: + v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int32: + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int32: + v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int64: + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int64: + v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]float32: + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float32: + v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]float64: + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float64: + v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]bool: + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]bool: + v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint32: + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d) + case *[]uint32: + v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]interface{}: + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]interface{}: + v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]string: + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]string: + v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint: + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint: + v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint8: + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint8: + v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint16: + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint16: + v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint32: + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint32: + v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint64: + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint64: + v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int: + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int: + v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int8: + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int8: + v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int16: + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int16: + v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int32: + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int32: + v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int64: + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int64: + v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]float32: + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float32: + v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]float64: + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float64: + v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]bool: + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]bool: + v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint64: + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d) + case *[]uint64: + v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]interface{}: + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]interface{}: + v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]string: + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]string: + v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint: + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint: + v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint8: + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint8: + v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint16: + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint16: + v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint32: + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint32: + v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint64: + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint64: + v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int: + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int: + v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int8: + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int8: + v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int16: + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int16: + v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int32: + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int32: + v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int64: + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int64: + v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]float32: + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float32: + v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]float64: + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float64: + v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]bool: + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]bool: + v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int: + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d) + case *[]int: + v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]interface{}: + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d) + case *map[int]interface{}: + v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]string: + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d) + case *map[int]string: + v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint: + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d) + case *map[int]uint: + v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint8: + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint8: + v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint16: + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint16: + v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint32: + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint32: + v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint64: + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint64: + v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int: + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d) + case *map[int]int: + v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int8: + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d) + case *map[int]int8: + v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int16: + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d) + case *map[int]int16: + v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int32: + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d) + case *map[int]int32: + v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int64: + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d) + case *map[int]int64: + v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]float32: + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[int]float32: + v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]float64: + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[int]float64: + v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]bool: + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d) + case *map[int]bool: + v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int8: + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d) + case *[]int8: + v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]interface{}: + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int8]interface{}: + v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]string: + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d) + case *map[int8]string: + v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint: + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint: + v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint8: + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint8: + v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint16: + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint16: + v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint32: + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint32: + v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint64: + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint64: + v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int: + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d) + case *map[int8]int: + v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int8: + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int8: + v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int16: + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int16: + v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int32: + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int32: + v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int64: + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int64: + v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float32: + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float32: + v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float64: + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float64: + v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]bool: + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int8]bool: + v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int16: + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d) + case *[]int16: + v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]interface{}: + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int16]interface{}: + v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]string: + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d) + case *map[int16]string: + v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint: + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint: + v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint8: + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint8: + v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint16: + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint16: + v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint32: + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint32: + v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint64: + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint64: + v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int: + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d) + case *map[int16]int: + v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int8: + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int8: + v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int16: + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int16: + v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int32: + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int32: + v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int64: + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int64: + v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float32: + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float32: + v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float64: + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float64: + v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]bool: + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int16]bool: + v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int32: + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d) + case *[]int32: + v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]interface{}: + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int32]interface{}: + v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]string: + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d) + case *map[int32]string: + v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint: + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint: + v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint8: + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint8: + v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint16: + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint16: + v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint32: + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint32: + v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint64: + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint64: + v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int: + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d) + case *map[int32]int: + v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int8: + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int8: + v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int16: + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int16: + v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int32: + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int32: + v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int64: + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int64: + v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float32: + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float32: + v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float64: + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float64: + v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]bool: + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int32]bool: + v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int64: + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d) + case *[]int64: + v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]interface{}: + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int64]interface{}: + v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]string: + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d) + case *map[int64]string: + v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint: + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint: + v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint8: + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint8: + v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint16: + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint16: + v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint32: + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint32: + v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint64: + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint64: + v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int: + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d) + case *map[int64]int: + v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int8: + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int8: + v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int16: + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int16: + v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int32: + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int32: + v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int64: + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int64: + v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float32: + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float32: + v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float64: + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float64: + v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]bool: + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int64]bool: + v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []bool: + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d) + case *[]bool: + v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]interface{}: + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d) + case *map[bool]interface{}: + v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]string: + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d) + case *map[bool]string: + v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint: + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint: + v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint8: + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint8: + v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint16: + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint16: + v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint32: + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint32: + v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint64: + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint64: + v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int: + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d) + case *map[bool]int: + v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int8: + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int8: + v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int16: + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int16: + v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int32: + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int32: + v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int64: + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int64: + v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float32: + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float32: + v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float64: + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float64: + v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]bool: + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d) + case *map[bool]bool: + v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + default: + return false + } + return true +} + +// -- -- fast path functions + +func (f decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]interface{}) + v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]interface{}) + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, + d *Decoder) (_ []interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []interface{}{} + } else { + v = make([]interface{}, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]interface{}, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + d.decode(&v[j]) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, nil) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + d.decode(&v[j]) + + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceStringR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]string) + v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]string) + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) { + v, changed := f.DecSliceStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, + d *Decoder) (_ []string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []string{} + } else { + v = make([]string, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]string, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = dd.DecodeString() + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, "") + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = dd.DecodeString() + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]float32) + v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float32) + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, + d *Decoder) (_ []float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []float32{} + } else { + v = make([]float32, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]float32, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = float32(dd.DecodeFloat(true)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = float32(dd.DecodeFloat(true)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]float64) + v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float64) + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, + d *Decoder) (_ []float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []float64{} + } else { + v = make([]float64, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]float64, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = dd.DecodeFloat(false) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = dd.DecodeFloat(false) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceUintR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]uint) + v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint) + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, + d *Decoder) (_ []uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []uint{} + } else { + v = make([]uint, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]uint, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = uint(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]uint16) + v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint16) + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, + d *Decoder) (_ []uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []uint16{} + } else { + v = make([]uint16, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]uint16, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = uint16(dd.DecodeUint(16)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = uint16(dd.DecodeUint(16)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]uint32) + v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint32) + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, + d *Decoder) (_ []uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []uint32{} + } else { + v = make([]uint32, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]uint32, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = uint32(dd.DecodeUint(32)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = uint32(dd.DecodeUint(32)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]uint64) + v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint64) + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, + d *Decoder) (_ []uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []uint64{} + } else { + v = make([]uint64, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]uint64, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = dd.DecodeUint(64) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = dd.DecodeUint(64) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceIntR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]int) + v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int) + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, + d *Decoder) (_ []int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []int{} + } else { + v = make([]int, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]int, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = int(dd.DecodeInt(intBitsize)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = int(dd.DecodeInt(intBitsize)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]int8) + v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int8) + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, + d *Decoder) (_ []int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []int8{} + } else { + v = make([]int8, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]int8, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = int8(dd.DecodeInt(8)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = int8(dd.DecodeInt(8)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]int16) + v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int16) + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, + d *Decoder) (_ []int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []int16{} + } else { + v = make([]int16, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]int16, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = int16(dd.DecodeInt(16)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = int16(dd.DecodeInt(16)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]int32) + v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int32) + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, + d *Decoder) (_ []int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []int32{} + } else { + v = make([]int32, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]int32, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = int32(dd.DecodeInt(32)) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = int32(dd.DecodeInt(32)) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]int64) + v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int64) + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, + d *Decoder) (_ []int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []int64{} + } else { + v = make([]int64, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]int64, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = dd.DecodeInt(64) + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = dd.DecodeInt(64) + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]bool) + v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]bool) + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) { + v, changed := f.DecSliceBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, + d *Decoder) (_ []bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []bool{} + } else { + v = make([]bool, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + } + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]bool, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + v[j] = dd.DecodeBool() + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, false) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + v[j] = dd.DecodeBool() + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]interface{}) + v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]interface{}) + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]interface{}, containerLen) + } else { + v = make(map[interface{}]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]string) + v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]string) + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]string, containerLen) + } else { + v = make(map[interface{}]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint) + v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint) + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]uint, containerLen) + } else { + v = make(map[interface{}]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint8) + v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint8) + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]uint8, containerLen) + } else { + v = make(map[interface{}]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint16) + v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint16) + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]uint16, containerLen) + } else { + v = make(map[interface{}]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint32) + v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint32) + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]uint32, containerLen) + } else { + v = make(map[interface{}]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint64) + v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint64) + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]uint64, containerLen) + } else { + v = make(map[interface{}]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int) + v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int) + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]int, containerLen) + } else { + v = make(map[interface{}]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int8) + v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int8) + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]int8, containerLen) + } else { + v = make(map[interface{}]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int16) + v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int16) + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]int16, containerLen) + } else { + v = make(map[interface{}]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int32) + v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int32) + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]int32, containerLen) + } else { + v = make(map[interface{}]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int64) + v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int64) + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]int64, containerLen) + } else { + v = make(map[interface{}]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float32) + v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]float32) + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]float32, containerLen) + } else { + v = make(map[interface{}]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float64) + v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]float64) + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]float64, containerLen) + } else { + v = make(map[interface{}]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]bool) + v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]bool) + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[interface{}]bool, containerLen) + } else { + v = make(map[interface{}]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + } + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]interface{}) + v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]interface{}) + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[string]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]interface{}, containerLen) + } else { + v = make(map[string]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]string) + v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]string) + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool, + d *Decoder) (_ map[string]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]string, containerLen) + } else { + v = make(map[string]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint) + v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint) + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]uint, containerLen) + } else { + v = make(map[string]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint8) + v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint8) + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]uint8, containerLen) + } else { + v = make(map[string]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint16) + v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint16) + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]uint16, containerLen) + } else { + v = make(map[string]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint32) + v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint32) + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]uint32, containerLen) + } else { + v = make(map[string]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint64) + v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint64) + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]uint64, containerLen) + } else { + v = make(map[string]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int) + v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int) + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]int, containerLen) + } else { + v = make(map[string]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int8) + v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int8) + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]int8, containerLen) + } else { + v = make(map[string]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int16) + v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int16) + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]int16, containerLen) + } else { + v = make(map[string]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int32) + v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int32) + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]int32, containerLen) + } else { + v = make(map[string]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int64) + v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int64) + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]int64, containerLen) + } else { + v = make(map[string]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]float32) + v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]float32) + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]float32, containerLen) + } else { + v = make(map[string]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]float64) + v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]float64) + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]float64, containerLen) + } else { + v = make(map[string]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]bool) + v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]bool) + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[string]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[string]bool, containerLen) + } else { + v = make(map[string]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeString() + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]interface{}) + v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]interface{}) + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]interface{}, containerLen) + } else { + v = make(map[float32]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]string) + v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]string) + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]string, containerLen) + } else { + v = make(map[float32]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint) + v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint) + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]uint, containerLen) + } else { + v = make(map[float32]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint8) + v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint8) + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]uint8, containerLen) + } else { + v = make(map[float32]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint16) + v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint16) + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]uint16, containerLen) + } else { + v = make(map[float32]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint32) + v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint32) + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]uint32, containerLen) + } else { + v = make(map[float32]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint64) + v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint64) + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]uint64, containerLen) + } else { + v = make(map[float32]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int) + v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int) + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]int, containerLen) + } else { + v = make(map[float32]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int8) + v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int8) + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]int8, containerLen) + } else { + v = make(map[float32]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int16) + v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int16) + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]int16, containerLen) + } else { + v = make(map[float32]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int32) + v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int32) + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]int32, containerLen) + } else { + v = make(map[float32]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int64) + v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int64) + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]int64, containerLen) + } else { + v = make(map[float32]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]float32) + v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]float32) + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]float32, containerLen) + } else { + v = make(map[float32]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]float64) + v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]float64) + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]float64, containerLen) + } else { + v = make(map[float32]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]bool) + v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]bool) + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float32]bool, containerLen) + } else { + v = make(map[float32]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := float32(dd.DecodeFloat(true)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]interface{}) + v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]interface{}) + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]interface{}, containerLen) + } else { + v = make(map[float64]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]string) + v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]string) + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]string, containerLen) + } else { + v = make(map[float64]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint) + v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint) + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]uint, containerLen) + } else { + v = make(map[float64]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint8) + v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint8) + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]uint8, containerLen) + } else { + v = make(map[float64]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint16) + v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint16) + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]uint16, containerLen) + } else { + v = make(map[float64]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint32) + v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint32) + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]uint32, containerLen) + } else { + v = make(map[float64]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint64) + v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint64) + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]uint64, containerLen) + } else { + v = make(map[float64]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int) + v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int) + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]int, containerLen) + } else { + v = make(map[float64]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int8) + v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int8) + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]int8, containerLen) + } else { + v = make(map[float64]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int16) + v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int16) + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]int16, containerLen) + } else { + v = make(map[float64]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int32) + v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int32) + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]int32, containerLen) + } else { + v = make(map[float64]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int64) + v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int64) + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]int64, containerLen) + } else { + v = make(map[float64]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]float32) + v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]float32) + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]float32, containerLen) + } else { + v = make(map[float64]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]float64) + v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]float64) + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]float64, containerLen) + } else { + v = make(map[float64]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]bool) + v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]bool) + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[float64]bool, containerLen) + } else { + v = make(map[float64]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeFloat(false) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]interface{}) + v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]interface{}) + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]interface{}, containerLen) + } else { + v = make(map[uint]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]string) + v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]string) + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]string, containerLen) + } else { + v = make(map[uint]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint) + v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint) + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]uint, containerLen) + } else { + v = make(map[uint]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint8) + v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint8) + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]uint8, containerLen) + } else { + v = make(map[uint]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint16) + v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint16) + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]uint16, containerLen) + } else { + v = make(map[uint]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint32) + v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint32) + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]uint32, containerLen) + } else { + v = make(map[uint]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint64) + v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint64) + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]uint64, containerLen) + } else { + v = make(map[uint]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int) + v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int) + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]int, containerLen) + } else { + v = make(map[uint]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int8) + v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int8) + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]int8, containerLen) + } else { + v = make(map[uint]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int16) + v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int16) + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]int16, containerLen) + } else { + v = make(map[uint]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int32) + v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int32) + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]int32, containerLen) + } else { + v = make(map[uint]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int64) + v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int64) + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]int64, containerLen) + } else { + v = make(map[uint]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]float32) + v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]float32) + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]float32, containerLen) + } else { + v = make(map[uint]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]float64) + v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]float64) + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]float64, containerLen) + } else { + v = make(map[uint]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]bool) + v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]bool) + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint]bool, containerLen) + } else { + v = make(map[uint]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint(dd.DecodeUint(uintBitsize)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]interface{}) + v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]interface{}) + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]interface{}, containerLen) + } else { + v = make(map[uint8]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]string) + v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]string) + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]string, containerLen) + } else { + v = make(map[uint8]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint) + v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint) + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]uint, containerLen) + } else { + v = make(map[uint8]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint8) + v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint8) + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]uint8, containerLen) + } else { + v = make(map[uint8]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint16) + v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint16) + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]uint16, containerLen) + } else { + v = make(map[uint8]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint32) + v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint32) + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]uint32, containerLen) + } else { + v = make(map[uint8]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint64) + v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint64) + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]uint64, containerLen) + } else { + v = make(map[uint8]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int) + v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int) + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]int, containerLen) + } else { + v = make(map[uint8]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int8) + v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int8) + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]int8, containerLen) + } else { + v = make(map[uint8]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int16) + v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int16) + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]int16, containerLen) + } else { + v = make(map[uint8]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int32) + v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int32) + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]int32, containerLen) + } else { + v = make(map[uint8]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int64) + v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int64) + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]int64, containerLen) + } else { + v = make(map[uint8]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]float32) + v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]float32) + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]float32, containerLen) + } else { + v = make(map[uint8]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]float64) + v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]float64) + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]float64, containerLen) + } else { + v = make(map[uint8]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]bool) + v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]bool) + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint8]bool, containerLen) + } else { + v = make(map[uint8]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint8(dd.DecodeUint(8)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]interface{}) + v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]interface{}) + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]interface{}, containerLen) + } else { + v = make(map[uint16]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]string) + v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]string) + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]string, containerLen) + } else { + v = make(map[uint16]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint) + v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint) + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]uint, containerLen) + } else { + v = make(map[uint16]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint8) + v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint8) + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]uint8, containerLen) + } else { + v = make(map[uint16]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint16) + v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint16) + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]uint16, containerLen) + } else { + v = make(map[uint16]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint32) + v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint32) + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]uint32, containerLen) + } else { + v = make(map[uint16]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint64) + v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint64) + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]uint64, containerLen) + } else { + v = make(map[uint16]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int) + v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int) + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]int, containerLen) + } else { + v = make(map[uint16]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int8) + v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int8) + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]int8, containerLen) + } else { + v = make(map[uint16]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int16) + v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int16) + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]int16, containerLen) + } else { + v = make(map[uint16]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int32) + v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int32) + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]int32, containerLen) + } else { + v = make(map[uint16]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int64) + v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int64) + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]int64, containerLen) + } else { + v = make(map[uint16]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]float32) + v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]float32) + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]float32, containerLen) + } else { + v = make(map[uint16]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]float64) + v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]float64) + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]float64, containerLen) + } else { + v = make(map[uint16]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]bool) + v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]bool) + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint16]bool, containerLen) + } else { + v = make(map[uint16]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint16(dd.DecodeUint(16)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]interface{}) + v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]interface{}) + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]interface{}, containerLen) + } else { + v = make(map[uint32]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]string) + v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]string) + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]string, containerLen) + } else { + v = make(map[uint32]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint) + v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint) + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]uint, containerLen) + } else { + v = make(map[uint32]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint8) + v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint8) + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]uint8, containerLen) + } else { + v = make(map[uint32]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint16) + v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint16) + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]uint16, containerLen) + } else { + v = make(map[uint32]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint32) + v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint32) + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]uint32, containerLen) + } else { + v = make(map[uint32]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint64) + v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint64) + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]uint64, containerLen) + } else { + v = make(map[uint32]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int) + v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int) + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]int, containerLen) + } else { + v = make(map[uint32]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int8) + v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int8) + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]int8, containerLen) + } else { + v = make(map[uint32]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int16) + v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int16) + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]int16, containerLen) + } else { + v = make(map[uint32]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int32) + v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int32) + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]int32, containerLen) + } else { + v = make(map[uint32]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int64) + v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int64) + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]int64, containerLen) + } else { + v = make(map[uint32]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]float32) + v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]float32) + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]float32, containerLen) + } else { + v = make(map[uint32]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]float64) + v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]float64) + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]float64, containerLen) + } else { + v = make(map[uint32]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]bool) + v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]bool) + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint32]bool, containerLen) + } else { + v = make(map[uint32]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := uint32(dd.DecodeUint(32)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]interface{}) + v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]interface{}) + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]interface{}, containerLen) + } else { + v = make(map[uint64]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]string) + v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]string) + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]string, containerLen) + } else { + v = make(map[uint64]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint) + v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint) + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]uint, containerLen) + } else { + v = make(map[uint64]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint8) + v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint8) + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]uint8, containerLen) + } else { + v = make(map[uint64]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint16) + v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint16) + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]uint16, containerLen) + } else { + v = make(map[uint64]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint32) + v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint32) + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]uint32, containerLen) + } else { + v = make(map[uint64]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint64) + v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint64) + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]uint64, containerLen) + } else { + v = make(map[uint64]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int) + v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int) + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]int, containerLen) + } else { + v = make(map[uint64]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int8) + v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int8) + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]int8, containerLen) + } else { + v = make(map[uint64]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int16) + v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int16) + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]int16, containerLen) + } else { + v = make(map[uint64]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int32) + v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int32) + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]int32, containerLen) + } else { + v = make(map[uint64]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int64) + v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int64) + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]int64, containerLen) + } else { + v = make(map[uint64]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]float32) + v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]float32) + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]float32, containerLen) + } else { + v = make(map[uint64]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]float64) + v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]float64) + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]float64, containerLen) + } else { + v = make(map[uint64]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]bool) + v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]bool) + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[uint64]bool, containerLen) + } else { + v = make(map[uint64]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeUint(64) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]interface{}) + v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]interface{}) + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]interface{}, containerLen) + } else { + v = make(map[int]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]string) + v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]string) + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntStringX(vp *map[int]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]string, containerLen) + } else { + v = make(map[int]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint) + v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint) + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUintX(vp *map[int]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]uint, containerLen) + } else { + v = make(map[int]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint8) + v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint8) + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]uint8, containerLen) + } else { + v = make(map[int]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint16) + v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint16) + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]uint16, containerLen) + } else { + v = make(map[int]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint32) + v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint32) + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]uint32, containerLen) + } else { + v = make(map[int]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint64) + v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint64) + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]uint64, containerLen) + } else { + v = make(map[int]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int) + v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int) + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntIntX(vp *map[int]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]int, containerLen) + } else { + v = make(map[int]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int8) + v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int8) + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]int8, containerLen) + } else { + v = make(map[int]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int16) + v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int16) + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]int16, containerLen) + } else { + v = make(map[int]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int32) + v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int32) + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]int32, containerLen) + } else { + v = make(map[int]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int64) + v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int64) + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]int64, containerLen) + } else { + v = make(map[int]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]float32) + v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]float32) + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]float32, containerLen) + } else { + v = make(map[int]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]float64) + v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]float64) + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]float64, containerLen) + } else { + v = make(map[int]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]bool) + v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]bool) + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int]bool, containerLen) + } else { + v = make(map[int]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int(dd.DecodeInt(intBitsize)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]interface{}) + v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]interface{}) + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]interface{}, containerLen) + } else { + v = make(map[int8]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]string) + v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]string) + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]string, containerLen) + } else { + v = make(map[int8]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint) + v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint) + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]uint, containerLen) + } else { + v = make(map[int8]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint8) + v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint8) + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]uint8, containerLen) + } else { + v = make(map[int8]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint16) + v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint16) + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]uint16, containerLen) + } else { + v = make(map[int8]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint32) + v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint32) + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]uint32, containerLen) + } else { + v = make(map[int8]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint64) + v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint64) + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]uint64, containerLen) + } else { + v = make(map[int8]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int) + v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int) + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]int, containerLen) + } else { + v = make(map[int8]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int8) + v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int8) + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]int8, containerLen) + } else { + v = make(map[int8]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int16) + v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int16) + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]int16, containerLen) + } else { + v = make(map[int8]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int32) + v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int32) + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]int32, containerLen) + } else { + v = make(map[int8]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int64) + v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int64) + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]int64, containerLen) + } else { + v = make(map[int8]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]float32) + v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]float32) + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]float32, containerLen) + } else { + v = make(map[int8]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]float64) + v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]float64) + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]float64, containerLen) + } else { + v = make(map[int8]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]bool) + v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]bool) + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int8]bool, containerLen) + } else { + v = make(map[int8]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int8(dd.DecodeInt(8)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]interface{}) + v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]interface{}) + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]interface{}, containerLen) + } else { + v = make(map[int16]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]string) + v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]string) + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]string, containerLen) + } else { + v = make(map[int16]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint) + v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint) + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]uint, containerLen) + } else { + v = make(map[int16]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint8) + v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint8) + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]uint8, containerLen) + } else { + v = make(map[int16]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint16) + v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint16) + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]uint16, containerLen) + } else { + v = make(map[int16]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint32) + v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint32) + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]uint32, containerLen) + } else { + v = make(map[int16]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint64) + v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint64) + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]uint64, containerLen) + } else { + v = make(map[int16]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int) + v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int) + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]int, containerLen) + } else { + v = make(map[int16]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int8) + v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int8) + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]int8, containerLen) + } else { + v = make(map[int16]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int16) + v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int16) + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]int16, containerLen) + } else { + v = make(map[int16]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int32) + v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int32) + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]int32, containerLen) + } else { + v = make(map[int16]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int64) + v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int64) + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]int64, containerLen) + } else { + v = make(map[int16]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]float32) + v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]float32) + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]float32, containerLen) + } else { + v = make(map[int16]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]float64) + v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]float64) + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]float64, containerLen) + } else { + v = make(map[int16]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]bool) + v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]bool) + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int16]bool, containerLen) + } else { + v = make(map[int16]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int16(dd.DecodeInt(16)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]interface{}) + v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]interface{}) + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]interface{}, containerLen) + } else { + v = make(map[int32]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]string) + v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]string) + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]string, containerLen) + } else { + v = make(map[int32]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint) + v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint) + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]uint, containerLen) + } else { + v = make(map[int32]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint8) + v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint8) + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]uint8, containerLen) + } else { + v = make(map[int32]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint16) + v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint16) + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]uint16, containerLen) + } else { + v = make(map[int32]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint32) + v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint32) + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]uint32, containerLen) + } else { + v = make(map[int32]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint64) + v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint64) + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]uint64, containerLen) + } else { + v = make(map[int32]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int) + v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int) + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]int, containerLen) + } else { + v = make(map[int32]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int8) + v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int8) + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]int8, containerLen) + } else { + v = make(map[int32]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int16) + v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int16) + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]int16, containerLen) + } else { + v = make(map[int32]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int32) + v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int32) + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]int32, containerLen) + } else { + v = make(map[int32]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int64) + v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int64) + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]int64, containerLen) + } else { + v = make(map[int32]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]float32) + v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]float32) + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]float32, containerLen) + } else { + v = make(map[int32]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]float64) + v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]float64) + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]float64, containerLen) + } else { + v = make(map[int32]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]bool) + v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]bool) + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int32]bool, containerLen) + } else { + v = make(map[int32]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := int32(dd.DecodeInt(32)) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]interface{}) + v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]interface{}) + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]interface{}, containerLen) + } else { + v = make(map[int64]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]string) + v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]string) + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]string, containerLen) + } else { + v = make(map[int64]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint) + v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint) + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]uint, containerLen) + } else { + v = make(map[int64]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint8) + v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint8) + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]uint8, containerLen) + } else { + v = make(map[int64]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint16) + v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint16) + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]uint16, containerLen) + } else { + v = make(map[int64]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint32) + v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint32) + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]uint32, containerLen) + } else { + v = make(map[int64]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint64) + v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint64) + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]uint64, containerLen) + } else { + v = make(map[int64]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int) + v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int) + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]int, containerLen) + } else { + v = make(map[int64]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int8) + v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int8) + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]int8, containerLen) + } else { + v = make(map[int64]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int16) + v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int16) + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]int16, containerLen) + } else { + v = make(map[int64]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int32) + v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int32) + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]int32, containerLen) + } else { + v = make(map[int64]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int64) + v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int64) + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]int64, containerLen) + } else { + v = make(map[int64]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]float32) + v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]float32) + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]float32, containerLen) + } else { + v = make(map[int64]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]float64) + v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]float64) + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]float64, containerLen) + } else { + v = make(map[int64]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]bool) + v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]bool) + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[int64]bool, containerLen) + } else { + v = make(map[int64]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeInt(64) + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]interface{}) + v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]interface{}) + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]interface{}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]interface{}, containerLen) + } else { + v = make(map[bool]interface{}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + d.decode(&mv) + + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]string) + v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]string) + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]string, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]string, containerLen) + } else { + v = make(map[bool]string) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint) + v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint) + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]uint, containerLen) + } else { + v = make(map[bool]uint) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint8) + v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint8) + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]uint8, containerLen) + } else { + v = make(map[bool]uint8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint16) + v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint16) + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]uint16, containerLen) + } else { + v = make(map[bool]uint16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint32) + v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint32) + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]uint32, containerLen) + } else { + v = make(map[bool]uint32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint64) + v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint64) + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]uint64, containerLen) + } else { + v = make(map[bool]uint64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int) + v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int) + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]int, containerLen) + } else { + v = make(map[bool]int) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int8) + v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int8) + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int8, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]int8, containerLen) + } else { + v = make(map[bool]int8) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int16) + v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int16) + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int16, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]int16, containerLen) + } else { + v = make(map[bool]int16) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int32) + v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int32) + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]int32, containerLen) + } else { + v = make(map[bool]int32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int64) + v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int64) + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]int64, containerLen) + } else { + v = make(map[bool]int64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]float32) + v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]float32) + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]float32, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]float32, containerLen) + } else { + v = make(map[bool]float32) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]float64) + v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]float64) + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]float64, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]float64, containerLen) + } else { + v = make(map[bool]float64) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +func (f decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]bool) + v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]bool) + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]bool, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[bool]bool, containerLen) + } else { + v = make(map[bool]bool) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + mk := dd.DecodeBool() + mv := v[mk] + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl new file mode 100644 index 0000000..d45e2b6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl @@ -0,0 +1,409 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl +// ************************************************************ + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register then in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +import ( + "reflect" + "sort" +) + +const fastpathCheckNilFalse = false // for reflect +const fastpathCheckNilTrue = true // for type switch + +type fastpathT struct {} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(encFnInfo, reflect.Value) + decfn func(decFnInfo, reflect.Value) +} + +type fastpathA [{{ .FastpathLen }}]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + h, i, j := 0, 0, {{ .FastpathLen }} // len(x) + for i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + } + if i < {{ .FastpathLen }} && x[i].rtid == rtid { + return i + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid } +func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + if !fastpathEnabled { + return + } + i := 0 + fn := func(v interface{}, fe func(encFnInfo, reflect.Value), fd func(decFnInfo, reflect.Value)) (f fastpathE) { + xrt := reflect.TypeOf(v) + xptr := reflect.ValueOf(xrt).Pointer() + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + return + } + + {{range .Values}}{{if not .Primitive}}{{if .Slice }} + fn([]{{ .Elem }}(nil), (encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + + {{range .Values}}{{if not .Primitive}}{{if not .Slice }} + fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if .Slice }} + case []{{ .Elem }}:{{else}} + case map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if .Slice }} + case *[]{{ .Elem }}:{{else}} + case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}} + default: + return false + } + return true +} + +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if .Slice }} + case []{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + case *[]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}}{{end}} + default: + return false + } + return true +} + +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .Slice }} + case map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + case *map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}}{{end}} + default: + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if .Slice }} + +func (f encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + {{ encmd .Elem "v2"}} + } + ee.EncodeEnd() +} + +{{end}}{{end}}{{end}} + +{{range .Values}}{{if not .Primitive}}{{if not .Slice }} + +func (f encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0{{end}} + for k2, v2 := range v { + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ encmd .MapKey "k2"}}{{end}} + {{ encmd .Elem "v2"}} + } + ee.EncodeEnd() +} + +{{end}}{{end}}{{end}} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if .Slice }} + case []{{ .Elem }}:{{else}} + case map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if .Slice }} + case *[]{{ .Elem }}:{{else}} + case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} + v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } +{{end}}{{end}} + default: + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if .Slice }} +{{/* +Slices can change if they +- did not come from an array +- are addressable (from a ptr) +- are settable (e.g. contained in an interface{}) +*/}} +func (f decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + vp := rv.Addr().Interface().(*[]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]{{ .Elem }}) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, checkNil bool, d *Decoder) { + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, + d *Decoder) (_ []{{ .Elem }}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if canChange && v == nil { + if containerLenS <= 0 { + v = []{{ .Elem }}{} + } else { + v = make([]{{ .Elem }}, containerLenS, containerLenS) + } + changed = true + } + if containerLenS == 0 { + if canChange && len(v) != 0 { + v = v[:0] + changed = true + }{{/* + // slh.End() // dd.ReadArrayEnd() + */}} + return v, changed + } + + // for j := 0; j < containerLenS; j++ { + if containerLenS > 0 { + decLen := containerLenS + if containerLenS > cap(v) { + if canChange { + s := make([]{{ .Elem }}, containerLenS, containerLenS) + // copy(s, v[:cap(v)]) + v = s + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + decLen = len(v) + } + } else if containerLenS != len(v) { + v = v[:containerLenS] + changed = true + } + // all checks done. cannot go past len. + j := 0 + for ; j < decLen; j++ { + {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } + if !canChange { + for ; j < containerLenS; j++ { + d.swallow() + } + } + } else { + j := 0 + for ; !dd.CheckBreak(); j++ { + if j >= len(v) { + if canChange { + v = append(v, {{ zerocmd .Elem }}) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + if j < len(v) { // all checks done. cannot go past len. + {{ if eq .Elem "interface{}" }}d.decode(&v[j]) + {{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } else { + d.swallow() + } + } + slh.End() + } + return v, changed +} + +{{end}}{{end}}{{end}} + + +{{range .Values}}{{if not .Primitive}}{{if not .Slice }} +{{/* +Maps can change if they are +- addressable (from a ptr) +- settable (e.g. contained in an interface{}) +*/}} +func (f decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[{{ .MapKey }}]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, d *Decoder) { + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, canChange bool, + d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { + dd := d.d + // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + if containerLen > 0 { + v = make(map[{{ .MapKey }}]{{ .Elem }}, containerLen) + } else { + v = make(map[{{ .MapKey }}]{{ .Elem }}) // supports indefinite-length, etc + } + changed = true + } + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + {{ if eq .MapKey "interface{}" }}var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + }{{ else }}mk := {{ decmd .MapKey }}{{ end }} + mv := v[mk] + {{ if eq .Elem "interface{}" }}d.decode(&mv) + {{ else }}mv = {{ decmd .Elem }}{{ end }} + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + {{ if eq .MapKey "interface{}" }}var mk interface{} + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = string(bv) // maps cannot have []byte as key. switch to string. + }{{ else }}mk := {{ decmd .MapKey }}{{ end }} + mv := v[mk] + {{ if eq .Elem "interface{}" }}d.decode(&mv) + {{ else }}mv = {{ decmd .Elem }}{{ end }} + if v != nil { + v[mk] = mv + } + } + dd.ReadEnd() + } + return v, changed +} + +{{end}}{{end}}{{end}} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl new file mode 100644 index 0000000..4c15e85 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl @@ -0,0 +1,77 @@ +{{var "v"}} := {{ if not isArray}}*{{ end }}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() + +var {{var "c"}} bool +_ = {{var "c"}} + +{{ if not isArray }}if {{var "v"}} == nil { + if {{var "l"}} <= 0 { + {{var "v"}} = make({{ .CTyp }}, 0) + } else { + {{var "v"}} = make({{ .CTyp }}, {{var "l"}}) + } + {{var "c"}} = true +} +{{ end }} +if {{var "l"}} == 0 { {{ if isSlice }} + if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{ end }} +} else if {{var "l"}} > 0 { + {{ if isChan }} + for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + {{var "n"}} := {{var "l"}} + if {{var "l"}} > cap({{var "v"}}) { + {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{var "n"}} = len({{var "v"}}) + {{ else }}{{ if .Immutable }} + {{var "v2"}} := {{var "v"}} + {{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) + if len({{var "v"}}) > 0 { + copy({{var "v"}}, {{var "v2"}}[:cap({{var "v2"}})]) + } + {{ else }}{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) + {{ end }}{{var "c"}} = true + {{ end }} + } else if {{var "l"}} != len({{var "v"}}) { + {{ if isSlice }}{{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true {{ end }} + } + {{var "j"}} := 0 + for ; {{var "j"}} < {{var "n"}} ; {{var "j"}}++ { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } {{ if isArray }} + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + z.DecSwallow() + }{{ end }} + {{ end }}{{/* closing if not chan */}} +} else { + for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + if {{var "j"}} >= len({{var "v"}}) { + {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else if isSlice}}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{ end }} + } + {{ if isChan}} + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + if {{var "j"}} < len({{var "v"}}) { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } else { + z.DecSwallow() + } + {{ end }} + } + {{var "h"}}.End() +} +{{ if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +}{{ end }} + diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl new file mode 100644 index 0000000..07e570c --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl @@ -0,0 +1,42 @@ +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := r.ReadMapStart() +if {{var "v"}} == nil { + if {{var "l"}} > 0 { + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "l"}}) + } else { + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}) // supports indefinite-length, etc + } + *{{ .Varname }} = {{var "v"}} +} +if {{var "l"}} > 0 { +for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { + var {{var "mk"}} {{ .KTyp }} + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}// special case if a byte array. + if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + } +{{ end }} + {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} else if {{var "l"}} < 0 { +for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + var {{var "mk"}} {{ .KTyp }} + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}// special case if a byte array. + if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + } +{{ end }} + {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +r.ReadEnd() +} // else len==0: TODO: Should we clear map entries? diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go new file mode 100644 index 0000000..32f4946 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go @@ -0,0 +1,215 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl +// ************************************************************ + +package codec + +import ( + "encoding" + "reflect" +) + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continously and without notice. +// +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { + return genHelperEncoder{e: e}, e.e +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { + return genHelperDecoder{d: d}, d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + e *Encoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + d *Decoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // println(">>>>>>>>> EncFallback") + f.e.encodeI(iv, false, false) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) TimeRtidIfBinc() uintptr { + if _, ok := f.e.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) HasExtensions() bool { + return len(f.e.h.extHandle) != 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v) + if rt.Kind() == reflect.Ptr { + rt = rt.Elem() + } + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.e.h.getExt(rtid); xfFn != nil { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + return true + } + return false +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { + f.d.swallow() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + // println(">>>>>>>>> DecFallback") + f.d.decodeI(iv, chkPtr, false, false, false) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + f.d.r.track() + f.d.swallow() + bs := f.d.r.stopTrack() + // fmt.Printf(">>>>>> CODECGEN JSON: %s\n", bs) + fnerr := tm.UnmarshalJSON(bs) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, false, true)) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) TimeRtidIfBinc() uintptr { + if _, ok := f.d.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) HasExtensions() bool { + return len(f.d.h.extHandle) != 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v).Elem() + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.d.h.getExt(rtid); xfFn != nil { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) + return true + } + return false +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl new file mode 100644 index 0000000..0960b56 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl @@ -0,0 +1,349 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl +// ************************************************************ + +package codec + +import ( + "encoding" + "reflect" +) + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continously and without notice. +// +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { + return genHelperEncoder{e:e}, e.e +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { + return genHelperDecoder{d:d}, d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + e *Encoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + d *Decoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // println(">>>>>>>>> EncFallback") + f.e.encodeI(iv, false, false) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) TimeRtidIfBinc() uintptr { + if _, ok := f.e.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) HasExtensions() bool { + return len(f.e.h.extHandle) != 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v) + if rt.Kind() == reflect.Ptr { + rt = rt.Elem() + } + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.e.h.getExt(rtid); xfFn != nil { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + return true + } + return false +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { + f.d.swallow() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + // println(">>>>>>>>> DecFallback") + f.d.decodeI(iv, chkPtr, false, false, false) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + f.d.r.track() + f.d.swallow() + bs := f.d.r.stopTrack() + // fmt.Printf(">>>>>> CODECGEN JSON: %s\n", bs) + fnerr := tm.UnmarshalJSON(bs) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, false, true)) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) TimeRtidIfBinc() uintptr { + if _, ok := f.d.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) HasExtensions() bool { + return len(f.d.h.extHandle) != 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v).Elem() + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.d.h.getExt(rtid); xfFn != nil { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) + return true + } + return false +} + +{{/* + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncDriver() encDriver { + return f.e.e +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecDriver() decDriver { + return f.d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncNil() { + f.e.e.EncodeNil() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBytes(v []byte) { + f.e.e.EncodeStringBytes(c_RAW, v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayStart(length int) { + f.e.e.EncodeArrayStart(length) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayEnd() { + f.e.e.EncodeArrayEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayEntrySeparator() { + f.e.e.EncodeArrayEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapStart(length int) { + f.e.e.EncodeMapStart(length) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapEnd() { + f.e.e.EncodeMapEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapEntrySeparator() { + f.e.e.EncodeMapEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapKVSeparator() { + f.e.e.EncodeMapKVSeparator() +} + +// --------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBytes(v *[]byte) { + *v = f.d.d.DecodeBytes(*v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTryNil() bool { + return f.d.d.TryDecodeAsNil() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsNil() (b bool) { + return f.d.d.IsContainerType(valueTypeNil) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsMap() (b bool) { + return f.d.d.IsContainerType(valueTypeMap) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsArray() (b bool) { + return f.d.d.IsContainerType(valueTypeArray) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecCheckBreak() bool { + return f.d.d.CheckBreak() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapStart() int { + return f.d.d.ReadMapStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayStart() int { + return f.d.d.ReadArrayStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapEnd() { + f.d.d.ReadMapEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayEnd() { + f.d.d.ReadArrayEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayEntrySeparator() { + f.d.d.ReadArrayEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapEntrySeparator() { + f.d.d.ReadMapEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapKVSeparator() { + f.d.d.ReadMapKVSeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) ReadStringAsBytes(bs []byte) []byte { + return f.d.d.DecodeStringAsBytes(bs) +} + + +// -- encode calls (primitives) +{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" true }}(v {{ .Primitive }}) { + ee := f.e.e + {{ encmd .Primitive "v" }} +} +{{ end }}{{ end }}{{ end }} + +// -- decode calls (primitives) +{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) {{ .MethodNamePfx "Dec" true }}(vp *{{ .Primitive }}) { + dd := f.d.d + *vp = {{ decmd .Primitive }} +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) {{ .MethodNamePfx "Read" true }}() (v {{ .Primitive }}) { + dd := f.d.d + v = {{ decmd .Primitive }} + return +} +{{ end }}{{ end }}{{ end }} + + +// -- encode calls (slices/maps) +{{range .Values}}{{if not .Primitive }}{{if .Slice }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v []{{ .Elem }}) { {{ else }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v map[{{ .MapKey }}]{{ .Elem }}) { {{end}} + f.F.{{ .MethodNamePfx "Enc" false }}V(v, false, f.e) +} +{{ end }}{{ end }} + +// -- decode calls (slices/maps) +{{range .Values}}{{if not .Primitive }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +{{if .Slice }}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *[]{{ .Elem }}) { +{{else}}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *map[{{ .MapKey }}]{{ .Elem }}) { {{end}} + v, changed := f.F.{{ .MethodNamePfx "Dec" false }}V(*vp, false, true, f.d) + if changed { + *vp = v + } +} +{{ end }}{{ end }} +*/}} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go new file mode 100644 index 0000000..adc1645 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go @@ -0,0 +1,132 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// DO NOT EDIT. THIS FILE IS AUTO-GENERATED FROM gen-dec-(map|array).go.tmpl + +const genDecMapTmpl = ` +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := r.ReadMapStart() +if {{var "v"}} == nil { + if {{var "l"}} > 0 { + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "l"}}) + } else { + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}) // supports indefinite-length, etc + } + *{{ .Varname }} = {{var "v"}} +} +if {{var "l"}} > 0 { +for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { + var {{var "mk"}} {{ .KTyp }} + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}// special case if a byte array. + if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + } +{{ end }} + {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} else if {{var "l"}} < 0 { +for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + var {{var "mk"}} {{ .KTyp }} + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}// special case if a byte array. + if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + } +{{ end }} + {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +r.ReadEnd() +} // else len==0: TODO: Should we clear map entries? +` + +const genDecListTmpl = ` +{{var "v"}} := {{ if not isArray}}*{{ end }}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() + +var {{var "c"}} bool +_ = {{var "c"}} + +{{ if not isArray }}if {{var "v"}} == nil { + if {{var "l"}} <= 0 { + {{var "v"}} = make({{ .CTyp }}, 0) + } else { + {{var "v"}} = make({{ .CTyp }}, {{var "l"}}) + } + {{var "c"}} = true +} +{{ end }} +if {{var "l"}} == 0 { {{ if isSlice }} + if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{ end }} +} else if {{var "l"}} > 0 { + {{ if isChan }} + for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + {{var "n"}} := {{var "l"}} + if {{var "l"}} > cap({{var "v"}}) { + {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{var "n"}} = len({{var "v"}}) + {{ else }}{{ if .Immutable }} + {{var "v2"}} := {{var "v"}} + {{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) + if len({{var "v"}}) > 0 { + copy({{var "v"}}, {{var "v2"}}[:cap({{var "v2"}})]) + } + {{ else }}{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) + {{ end }}{{var "c"}} = true + {{ end }} + } else if {{var "l"}} != len({{var "v"}}) { + {{ if isSlice }}{{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true {{ end }} + } + {{var "j"}} := 0 + for ; {{var "j"}} < {{var "n"}} ; {{var "j"}}++ { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } {{ if isArray }} + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + z.DecSwallow() + }{{ end }} + {{ end }}{{/* closing if not chan */}} +} else { + for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + if {{var "j"}} >= len({{var "v"}}) { + {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else if isSlice}}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{ end }} + } + {{ if isChan}} + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + if {{var "j"}} < len({{var "v"}}) { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } else { + z.DecSwallow() + } + {{ end }} + } + {{var "h"}}.End() +} +{{ if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +}{{ end }} + +` + diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go new file mode 100644 index 0000000..64acfa3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go @@ -0,0 +1,1805 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "bytes" + "encoding/base64" + "errors" + "fmt" + "go/format" + "io" + "io/ioutil" + "math/rand" + "reflect" + "regexp" + "strconv" + "strings" + "sync" + "text/template" + "time" +) + +// --------------------------------------------------- +// codecgen supports the full cycle of reflection-based codec: +// - RawExt +// - Builtins +// - Extensions +// - (Binary|Text|JSON)(Unm|M)arshal +// - generic by-kind +// +// This means that, for dynamic things, we MUST use reflection to at least get the reflect.Type. +// In those areas, we try to only do reflection or interface-conversion when NECESSARY: +// - Extensions, only if Extensions are configured. +// +// However, codecgen doesn't support the following: +// - Canonical option. (codecgen IGNORES it currently) +// This is just because it has not been implemented. +// +// During encode/decode, Selfer takes precedence. +// A type implementing Selfer will know how to encode/decode itself statically. +// +// The following field types are supported: +// array: [n]T +// slice: []T +// map: map[K]V +// primitive: [u]int[n], float(32|64), bool, string +// struct +// +// --------------------------------------------------- +// Note that a Selfer cannot call (e|d).(En|De)code on itself, +// as this will cause a circular reference, as (En|De)code will call Selfer methods. +// Any type that implements Selfer must implement completely and not fallback to (En|De)code. +// +// In addition, code in this file manages the generation of fast-path implementations of +// encode/decode of slices/maps of primitive keys/values. +// +// Users MUST re-generate their implementations whenever the code shape changes. +// The generated code will panic if it was generated with a version older than the supporting library. +// --------------------------------------------------- +// +// codec framework is very feature rich. +// When encoding or decoding into an interface, it depends on the runtime type of the interface. +// The type of the interface may be a named type, an extension, etc. +// Consequently, we fallback to runtime codec for encoding/decoding interfaces. +// In addition, we fallback for any value which cannot be guaranteed at runtime. +// This allows us support ANY value, including any named types, specifically those which +// do not implement our interfaces (e.g. Selfer). +// +// This explains some slowness compared to other code generation codecs (e.g. msgp). +// This reduction in speed is only seen when your refers to interfaces, +// e.g. type T struct { A interface{}; B []interface{}; C map[string]interface{} } +// +// codecgen will panic if the file was generated with an old version of the library in use. +// +// Note: +// It was a concious decision to have gen.go always explicitly call EncodeNil or TryDecodeAsNil. +// This way, there isn't a function call overhead just to see that we should not enter a block of code. + +// GenVersion is the current version of codecgen. +// +// NOTE: Increment this value each time codecgen changes fundamentally. +// Fundamental changes are: +// - helper methods change (signature change, new ones added, some removed, etc) +// - codecgen command line changes +// +// v1: Initial Version +// v2: +// v3: Changes for Kubernetes: +// changes in signature of some unpublished helper methods and codecgen cmdline arguments. +// v4: Removed separator support from (en|de)cDriver, and refactored codec(gen) +const GenVersion = 4 + +const ( + genCodecPkg = "codec1978" + genTempVarPfx = "yy" + genTopLevelVarName = "x" + + // ignore canBeNil parameter, and always set to true. + // This is because nil can appear anywhere, so we should always check. + genAnythingCanBeNil = true + + // if genUseOneFunctionForDecStructMap, make a single codecDecodeSelferFromMap function; + // else make codecDecodeSelferFromMap{LenPrefix,CheckBreak} so that conditionals + // are not executed a lot. + // + // From testing, it didn't make much difference in runtime, so keep as true (one function only) + genUseOneFunctionForDecStructMap = true +) + +var ( + genAllTypesSamePkgErr = errors.New("All types must be in the same package") + genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice") + genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__") + genQNameRegex = regexp.MustCompile(`[A-Za-z_.]+`) +) + +// genRunner holds some state used during a Gen run. +type genRunner struct { + w io.Writer // output + c uint64 // counter used for generating varsfx + t []reflect.Type // list of types to run selfer on + + tc reflect.Type // currently running selfer on this type + te map[uintptr]bool // types for which the encoder has been created + td map[uintptr]bool // types for which the decoder has been created + cp string // codec import path + + im map[string]reflect.Type // imports to add + imn map[string]string // package names of imports to add + imc uint64 // counter for import numbers + + is map[reflect.Type]struct{} // types seen during import search + bp string // base PkgPath, for which we are generating for + + cpfx string // codec package prefix + unsafe bool // is unsafe to be used in generated code? + + tm map[reflect.Type]struct{} // types for which enc/dec must be generated + ts []reflect.Type // types for which enc/dec must be generated + + xs string // top level variable/constant suffix + hn string // fn helper type name + + // rr *rand.Rand // random generator for file-specific types +} + +// Gen will write a complete go file containing Selfer implementations for each +// type passed. All the types must be in the same package. +// +// Library users: *DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.* +func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...reflect.Type) { + if len(typ) == 0 { + return + } + x := genRunner{ + unsafe: useUnsafe, + w: w, + t: typ, + te: make(map[uintptr]bool), + td: make(map[uintptr]bool), + im: make(map[string]reflect.Type), + imn: make(map[string]string), + is: make(map[reflect.Type]struct{}), + tm: make(map[reflect.Type]struct{}), + ts: []reflect.Type{}, + bp: typ[0].PkgPath(), + xs: uid, + } + if x.xs == "" { + rr := rand.New(rand.NewSource(time.Now().UnixNano())) + x.xs = strconv.FormatInt(rr.Int63n(9999), 10) + } + + // gather imports first: + x.cp = reflect.TypeOf(x).PkgPath() + x.imn[x.cp] = genCodecPkg + for _, t := range typ { + // fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", t.PkgPath(), t.Name()) + if t.PkgPath() != x.bp { + panic(genAllTypesSamePkgErr) + } + x.genRefPkgs(t) + } + if buildTags != "" { + x.line("//+build " + buildTags) + x.line("") + } + x.line(` + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +`) + x.line("package " + pkgName) + x.line("") + x.line("import (") + if x.cp != x.bp { + x.cpfx = genCodecPkg + "." + x.linef("%s \"%s\"", genCodecPkg, x.cp) + } + for k, _ := range x.im { + x.linef("%s \"%s\"", x.imn[k], k) + } + // add required packages + for _, k := range [...]string{"reflect", "unsafe", "runtime", "fmt", "errors"} { + if _, ok := x.im[k]; !ok { + if k == "unsafe" && !x.unsafe { + continue + } + x.line("\"" + k + "\"") + } + } + x.line(")") + x.line("") + + x.line("const (") + x.linef("codecSelferC_UTF8%s = %v", x.xs, int64(c_UTF8)) + x.linef("codecSelferC_RAW%s = %v", x.xs, int64(c_RAW)) + x.linef("codecSelverValueTypeArray%s = %v", x.xs, int64(valueTypeArray)) + x.linef("codecSelverValueTypeMap%s = %v", x.xs, int64(valueTypeMap)) + x.line(")") + x.line("var (") + x.line("codecSelferBitsize" + x.xs + " = uint8(reflect.TypeOf(uint(0)).Bits())") + x.line("codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)") + x.line(")") + x.line("") + + if x.unsafe { + x.line("type codecSelferUnsafeString" + x.xs + " struct { Data uintptr; Len int}") + x.line("") + } + x.hn = "codecSelfer" + x.xs + x.line("type " + x.hn + " struct{}") + x.line("") + + x.line("func init() {") + x.linef("if %sGenVersion != %v {", x.cpfx, GenVersion) + x.line("_, file, _, _ := runtime.Caller(0)") + x.line(`err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) + x.linef(`%v, %sGenVersion, file)`, GenVersion, x.cpfx) + x.line("panic(err)") + // x.linef(`panic(fmt.Errorf("Re-run codecgen due to version mismatch: `+ + // `current: %%v, need %%v, file: %%v", %v, %sGenVersion, file))`, GenVersion, x.cpfx) + x.linef("}") + x.line("if false { // reference the types, but skip this branch at build/run time") + var n int + for k, t := range x.im { + x.linef("var v%v %s.%s", n, x.imn[k], t.Name()) + n++ + } + if x.unsafe { + x.linef("var v%v unsafe.Pointer", n) + n++ + } + if n > 0 { + x.out("_") + for i := 1; i < n; i++ { + x.out(", _") + } + x.out(" = v0") + for i := 1; i < n; i++ { + x.outf(", v%v", i) + } + } + x.line("} ") // close if false + x.line("}") // close init + x.line("") + + // generate rest of type info + for _, t := range typ { + x.tc = t + x.selfer(true) + x.selfer(false) + } + + for _, t := range x.ts { + rtid := reflect.ValueOf(t).Pointer() + // generate enc functions for all these slice/map types. + x.linef("func (x %s) enc%s(v %s%s, e *%sEncoder) {", x.hn, x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), x.cpfx) + x.genRequiredMethodVars(true) + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + x.encListFallback("v", t) + case reflect.Map: + x.encMapFallback("v", t) + default: + panic(genExpectArrayOrMapErr) + } + x.line("}") + x.line("") + + // generate dec functions for all these slice/map types. + x.linef("func (x %s) dec%s(v *%s, d *%sDecoder) {", x.hn, x.genMethodNameT(t), x.genTypeName(t), x.cpfx) + x.genRequiredMethodVars(false) + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + x.decListFallback("v", rtid, t) + case reflect.Map: + x.decMapFallback("v", rtid, t) + default: + panic(genExpectArrayOrMapErr) + } + x.line("}") + x.line("") + } + + x.line("") +} + +func (x *genRunner) checkForSelfer(t reflect.Type, varname string) bool { + // return varname != genTopLevelVarName && t != x.tc + // the only time we checkForSelfer is if we are not at the TOP of the generated code. + return varname != genTopLevelVarName +} + +func (x *genRunner) arr2str(t reflect.Type, s string) string { + if t.Kind() == reflect.Array { + return s + } + return "" +} + +func (x *genRunner) genRequiredMethodVars(encode bool) { + x.line("var h " + x.hn) + if encode { + x.line("z, r := " + x.cpfx + "GenHelperEncoder(e)") + } else { + x.line("z, r := " + x.cpfx + "GenHelperDecoder(d)") + } + x.line("_, _, _ = h, z, r") +} + +func (x *genRunner) genRefPkgs(t reflect.Type) { + if _, ok := x.is[t]; ok { + return + } + // fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", t.PkgPath(), t.Name()) + x.is[t] = struct{}{} + tpkg, tname := t.PkgPath(), t.Name() + if tpkg != "" && tpkg != x.bp && tpkg != x.cp && tname != "" && tname[0] >= 'A' && tname[0] <= 'Z' { + if _, ok := x.im[tpkg]; !ok { + x.im[tpkg] = t + if idx := strings.LastIndex(tpkg, "/"); idx < 0 { + x.imn[tpkg] = tpkg + } else { + x.imc++ + x.imn[tpkg] = "pkg" + strconv.FormatUint(x.imc, 10) + "_" + tpkg[idx+1:] + } + } + } + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Ptr, reflect.Chan: + x.genRefPkgs(t.Elem()) + case reflect.Map: + x.genRefPkgs(t.Elem()) + x.genRefPkgs(t.Key()) + case reflect.Struct: + for i := 0; i < t.NumField(); i++ { + if fname := t.Field(i).Name; fname != "" && fname[0] >= 'A' && fname[0] <= 'Z' { + x.genRefPkgs(t.Field(i).Type) + } + } + } +} + +func (x *genRunner) line(s string) { + x.out(s) + if len(s) == 0 || s[len(s)-1] != '\n' { + x.out("\n") + } +} + +func (x *genRunner) varsfx() string { + x.c++ + return strconv.FormatUint(x.c, 10) +} + +func (x *genRunner) out(s string) { + if _, err := io.WriteString(x.w, s); err != nil { + panic(err) + } +} + +func (x *genRunner) linef(s string, params ...interface{}) { + x.line(fmt.Sprintf(s, params...)) +} + +func (x *genRunner) outf(s string, params ...interface{}) { + x.out(fmt.Sprintf(s, params...)) +} + +func (x *genRunner) genTypeName(t reflect.Type) (n string) { + // defer func() { fmt.Printf(">>>> ####: genTypeName: t: %v, name: '%s'\n", t, n) }() + + // if the type has a PkgPath, which doesn't match the current package, + // then include it. + // We cannot depend on t.String() because it includes current package, + // or t.PkgPath because it includes full import path, + // + var ptrPfx string + for t.Kind() == reflect.Ptr { + ptrPfx += "*" + t = t.Elem() + } + if tn := t.Name(); tn != "" { + return ptrPfx + x.genTypeNamePrim(t) + } + switch t.Kind() { + case reflect.Map: + return ptrPfx + "map[" + x.genTypeName(t.Key()) + "]" + x.genTypeName(t.Elem()) + case reflect.Slice: + return ptrPfx + "[]" + x.genTypeName(t.Elem()) + case reflect.Array: + return ptrPfx + "[" + strconv.FormatInt(int64(t.Len()), 10) + "]" + x.genTypeName(t.Elem()) + case reflect.Chan: + return ptrPfx + t.ChanDir().String() + " " + x.genTypeName(t.Elem()) + default: + if t == intfTyp { + return ptrPfx + "interface{}" + } else { + return ptrPfx + x.genTypeNamePrim(t) + } + } +} + +func (x *genRunner) genTypeNamePrim(t reflect.Type) (n string) { + if t.Name() == "" { + return t.String() + } else if t.PkgPath() == "" || t.PkgPath() == x.tc.PkgPath() { + return t.Name() + } else { + return x.imn[t.PkgPath()] + "." + t.Name() + // return t.String() // best way to get the package name inclusive + } +} + +func (x *genRunner) genZeroValueR(t reflect.Type) string { + // if t is a named type, w + switch t.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func, + reflect.Slice, reflect.Map, reflect.Invalid: + return "nil" + case reflect.Bool: + return "false" + case reflect.String: + return `""` + case reflect.Struct, reflect.Array: + return x.genTypeName(t) + "{}" + default: // all numbers + return "0" + } +} + +func (x *genRunner) genMethodNameT(t reflect.Type) (s string) { + return genMethodNameT(t, x.tc) +} + +func (x *genRunner) selfer(encode bool) { + t := x.tc + t0 := t + // always make decode use a pointer receiver, + // and structs always use a ptr receiver (encode|decode) + isptr := !encode || t.Kind() == reflect.Struct + fnSigPfx := "func (x " + if isptr { + fnSigPfx += "*" + } + fnSigPfx += x.genTypeName(t) + + x.out(fnSigPfx) + if isptr { + t = reflect.PtrTo(t) + } + if encode { + x.line(") CodecEncodeSelf(e *" + x.cpfx + "Encoder) {") + x.genRequiredMethodVars(true) + // x.enc(genTopLevelVarName, t) + x.encVar(genTopLevelVarName, t) + } else { + x.line(") CodecDecodeSelf(d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + // do not use decVar, as there is no need to check TryDecodeAsNil + // or way to elegantly handle that, and also setting it to a + // non-nil value doesn't affect the pointer passed. + // x.decVar(genTopLevelVarName, t, false) + x.dec(genTopLevelVarName, t0) + } + x.line("}") + x.line("") + + if encode || t0.Kind() != reflect.Struct { + return + } + + // write is containerMap + if genUseOneFunctionForDecStructMap { + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMap(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, 0) + x.line("}") + x.line("") + } else { + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMapLenPrefix(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, 1) + x.line("}") + x.line("") + + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMapCheckBreak(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, 2) + x.line("}") + x.line("") + } + + // write containerArray + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromArray(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructArray(genTopLevelVarName, "l", "return", reflect.ValueOf(t0).Pointer(), t0) + x.line("}") + x.line("") + +} + +// used for chan, array, slice, map +func (x *genRunner) xtraSM(varname string, encode bool, t reflect.Type) { + if encode { + x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), varname) + // x.line("h.enc" + x.genMethodNameT(t) + "(" + x.genTypeName(t) + "(" + varname + "), e)") + } else { + x.linef("h.dec%s((*%s)(%s), d)", x.genMethodNameT(t), x.genTypeName(t), varname) + // x.line("h.dec" + x.genMethodNameT(t) + "((*" + x.genTypeName(t) + ")(" + varname + "), d)") + } + if _, ok := x.tm[t]; !ok { + x.tm[t] = struct{}{} + x.ts = append(x.ts, t) + } +} + +// encVar will encode a variable. +// The parameter, t, is the reflect.Type of the variable itself +func (x *genRunner) encVar(varname string, t reflect.Type) { + // fmt.Printf(">>>>>> varname: %s, t: %v\n", varname, t) + var checkNil bool + switch t.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan: + checkNil = true + } + if checkNil { + x.linef("if %s == nil { r.EncodeNil() } else { ", varname) + } + switch t.Kind() { + case reflect.Ptr: + switch t.Elem().Kind() { + case reflect.Struct, reflect.Array: + x.enc(varname, genNonPtr(t)) + default: + i := x.varsfx() + x.line(genTempVarPfx + i + " := *" + varname) + x.enc(genTempVarPfx+i, genNonPtr(t)) + } + case reflect.Struct, reflect.Array: + i := x.varsfx() + x.line(genTempVarPfx + i + " := &" + varname) + x.enc(genTempVarPfx+i, t) + default: + x.enc(varname, t) + } + + if checkNil { + x.line("}") + } + +} + +// enc will encode a variable (varname) of type T, +// except t is of kind reflect.Struct or reflect.Array, wherein varname is of type *T (to prevent copying) +func (x *genRunner) enc(varname string, t reflect.Type) { + // varName here must be to a pointer to a struct/array, or to a value directly. + rtid := reflect.ValueOf(t).Pointer() + // We call CodecEncodeSelf if one of the following are honored: + // - the type already implements Selfer, call that + // - the type has a Selfer implementation just created, use that + // - the type is in the list of the ones we will generate for, but it is not currently being generated + + tptr := reflect.PtrTo(t) + tk := t.Kind() + if x.checkForSelfer(t, varname) { + if t.Implements(selferTyp) || (tptr.Implements(selferTyp) && (tk == reflect.Array || tk == reflect.Struct)) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + + if _, ok := x.te[rtid]; ok { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + } + + inlist := false + for _, t0 := range x.t { + if t == t0 { + inlist = true + if x.checkForSelfer(t, varname) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + break + } + } + + var rtidAdded bool + if t == x.tc { + x.te[rtid] = true + rtidAdded = true + } + + // check if + // - type is RawExt + // - the type implements (Text|JSON|Binary)(Unm|M)arshal + mi := x.varsfx() + x.linef("%sm%s := z.EncBinary()", genTempVarPfx, mi) + x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block + defer func() { x.line("}") }() //end if block + + if t == rawExtTyp { + x.linef("} else { r.EncodeRawExt(%v, e)", varname) + return + } + // HACK: Support for Builtins. + // Currently, only Binc supports builtins, and the only builtin type is time.Time. + // Have a method that returns the rtid for time.Time if Handle is Binc. + if t == timeTyp { + vrtid := genTempVarPfx + "m" + x.varsfx() + x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) + x.linef("r.EncodeBuiltin(%s, %s)", vrtid, varname) + } + // only check for extensions if the type is named, and has a packagePath. + if t.PkgPath() != "" && t.Name() != "" { + // first check if extensions are configued, before doing the interface conversion + x.linef("} else if z.HasExtensions() && z.EncExt(%s) {", varname) + } + if t.Implements(binaryMarshalerTyp) || tptr.Implements(binaryMarshalerTyp) { + x.linef("} else if %sm%s { z.EncBinaryMarshal(%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonMarshalerTyp) || tptr.Implements(jsonMarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", genTempVarPfx, mi, varname) + } else if t.Implements(textMarshalerTyp) || tptr.Implements(textMarshalerTyp) { + x.linef("} else if !%sm%s { z.EncTextMarshal(%v) ", genTempVarPfx, mi, varname) + } + + x.line("} else {") + + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x.line("r.EncodeInt(int64(" + varname + "))") + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + x.line("r.EncodeUint(uint64(" + varname + "))") + case reflect.Float32: + x.line("r.EncodeFloat32(float32(" + varname + "))") + case reflect.Float64: + x.line("r.EncodeFloat64(float64(" + varname + "))") + case reflect.Bool: + x.line("r.EncodeBool(bool(" + varname + "))") + case reflect.String: + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(" + varname + "))") + case reflect.Chan: + x.xtraSM(varname, true, t) + // x.encListFallback(varname, rtid, t) + case reflect.Array: + x.xtraSM(varname, true, t) + case reflect.Slice: + // if nil, call dedicated function + // if a []uint8, call dedicated function + // if a known fastpath slice, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if rtid == uint8SliceTypId { + x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))") + } else if fastpathAV.index(rtid) != -1 { + g := genV{Slice: true, Elem: x.genTypeName(t.Elem())} + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + } else { + x.xtraSM(varname, true, t) + // x.encListFallback(varname, rtid, t) + } + case reflect.Map: + // if nil, call dedicated function + // if a known fastpath map, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + // x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ") + if fastpathAV.index(rtid) != -1 { + g := genV{Slice: false, + Elem: x.genTypeName(t.Elem()), + MapKey: x.genTypeName(t.Key())} + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + } else { + x.xtraSM(varname, true, t) + // x.encMapFallback(varname, rtid, t) + } + case reflect.Struct: + if !inlist { + delete(x.te, rtid) + x.line("z.EncFallback(" + varname + ")") + break + } + x.encStruct(varname, rtid, t) + default: + if rtidAdded { + delete(x.te, rtid) + } + x.line("z.EncFallback(" + varname + ")") + } +} + +func (x *genRunner) encZero(t reflect.Type) { + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x.line("r.EncodeInt(0)") + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + x.line("r.EncodeUint(0)") + case reflect.Float32: + x.line("r.EncodeFloat32(0)") + case reflect.Float64: + x.line("r.EncodeFloat64(0)") + case reflect.Bool: + x.line("r.EncodeBool(false)") + case reflect.String: + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + `, "")`) + default: + x.line("r.EncodeNil()") + } +} + +func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { + // Use knowledge from structfieldinfo (mbs, encodable fields. Ignore omitempty. ) + // replicate code in kStruct i.e. for each field, deref type to non-pointer, and call x.enc on it + + // if t === type currently running selfer on, do for all + ti := getTypeInfo(rtid, t) + i := x.varsfx() + sepVarname := genTempVarPfx + "sep" + i + numfieldsvar := genTempVarPfx + "q" + i + ti2arrayvar := genTempVarPfx + "r" + i + struct2arrvar := genTempVarPfx + "2arr" + i + + x.line(sepVarname + " := !z.EncBinary()") + x.linef("%s := z.EncBasicHandle().StructToArray", struct2arrvar) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + // due to omitEmpty, we need to calculate the + // number of non-empty things we write out first. + // This is required as we need to pre-determine the size of the container, + // to support length-prefixing. + x.linef("var %s [%v]bool", numfieldsvar, len(tisfi)) + x.linef("_, _, _ = %s, %s, %s", sepVarname, numfieldsvar, struct2arrvar) + x.linef("const %s bool = %v", ti2arrayvar, ti.toArray) + nn := 0 + for j, si := range tisfi { + if !si.omitEmpty { + nn++ + continue + } + var t2 reflect.StructField + var omitline string + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + omitline += varname3 + " != nil && " + } + } + } + // never check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc. + // also, for maps/slices/arrays, check if len ! 0 (not if == zero value) + switch t2.Type.Kind() { + case reflect.Struct: + omitline += " true" + case reflect.Map, reflect.Slice, reflect.Array, reflect.Chan: + omitline += "len(" + varname + "." + t2.Name + ") != 0" + default: + omitline += varname + "." + t2.Name + " != " + x.genZeroValueR(t2.Type) + } + x.linef("%s[%v] = %s", numfieldsvar, j, omitline) + } + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { + x.line("r.EncodeArrayStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.linef("} else {") // if not ti.toArray + x.linef("var %snn%s int = %v", genTempVarPfx, i, nn) + x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) + x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) + // x.line("r.EncodeMapStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.line("}") // close if not StructToArray + + for j, si := range tisfi { + i := x.varsfx() + isNilVarName := genTempVarPfx + "n" + i + var labelUsed bool + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2typ := t + varname3 := varname + for _, ix := range si.is { + // fmt.Printf("%%%% %v, ix: %v\n", t2typ, ix) + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + if !labelUsed { + x.line("var " + isNilVarName + " bool") + } + x.line("if " + varname3 + " == nil { " + isNilVarName + " = true ") + x.line("goto LABEL" + i) + x.line("}") + labelUsed = true + // "varname3 = new(" + x.genTypeName(t3.Elem()) + ") }") + } + } + // t2 = t.FieldByIndex(si.is) + } + if labelUsed { + x.line("LABEL" + i + ":") + } + // if the type of the field is a Selfer, or one of the ones + + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray + if labelUsed { + x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + } + if si.omitEmpty { + x.linef("if %s[%v] {", numfieldsvar, j) + // omitEmptyVarNameX := genTempVarPfx + "ov" + i + // x.line("var " + omitEmptyVarNameX + " " + x.genTypeName(t2.Type)) + // x.encVar(omitEmptyVarNameX, t2.Type) + } + x.encVar(varname+"."+t2.Name, t2.Type) + if si.omitEmpty { + x.linef("} else {") + x.encZero(t2.Type) + x.linef("}") + } + if labelUsed { + x.line("}") + } + x.linef("} else {") // if not ti.toArray + // omitEmptyVar := genTempVarPfx + "x" + i + t2.Name + // x.line("const " + omitEmptyVar + " bool = " + strconv.FormatBool(si.omitEmpty)) + // doOmitEmpty := si.omitEmpty && t2.Type.Kind() != reflect.Struct + if si.omitEmpty { + x.linef("if %s[%v] {", numfieldsvar, j) + // x.linef(`println("Encoding field: %v")`, j) + // x.out("if ") + // if labelUsed { + // x.out("!" + isNilVarName + " && ") + // } + // x.line(varname + "." + t2.Name + " != " + genZeroValueR(t2.Type, x.tc) + " {") + } + // x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + t2.Name + "\"))") + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))") + if labelUsed { + x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + x.encVar(varname+"."+t2.Name, t2.Type) + x.line("}") + } else { + x.encVar(varname+"."+t2.Name, t2.Type) + } + if si.omitEmpty { + x.line("}") + } + x.linef("} ") // end if/else ti.toArray + } + x.line("if " + sepVarname + " {") + x.line("r.EncodeEnd()") + x.line("}") +} + +func (x *genRunner) encListFallback(varname string, t reflect.Type) { + i := x.varsfx() + g := genTempVarPfx + x.line("r.EncodeArrayStart(len(" + varname + "))") + if t.Kind() == reflect.Chan { + x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i) + x.linef("%sv%s := <-%s", g, i, varname) + } else { + // x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) + x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) + } + x.encVar(genTempVarPfx+"v"+i, t.Elem()) + x.line("}") + x.line("r.EncodeEnd()") +} + +func (x *genRunner) encMapFallback(varname string, t reflect.Type) { + i := x.varsfx() + x.line("r.EncodeMapStart(len(" + varname + "))") + x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) + // x.line("for " + genTempVarPfx + "k" + i + ", " + genTempVarPfx + "v" + i + " := range " + varname + " {") + x.encVar(genTempVarPfx+"k"+i, t.Key()) + x.encVar(genTempVarPfx+"v"+i, t.Elem()) + x.line("}") + x.line("r.EncodeEnd()") +} + +func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { + // We only encode as nil if a nillable value. + // This removes some of the wasted checks for TryDecodeAsNil. + // We need to think about this more, to see what happens if omitempty, etc + // cause a nil value to be stored when something is expected. + // This could happen when decoding from a struct encoded as an array. + // For that, decVar should be called with canNil=true, to force true as its value. + i := x.varsfx() + if !canBeNil { + canBeNil = genAnythingCanBeNil || !genIsImmutable(t) + } + if canBeNil { + x.line("if r.TryDecodeAsNil() {") + if t.Kind() == reflect.Ptr { + x.line("if " + varname + " != nil { ") + // x.line("var " + genTempVarPfx + i + " " + x.genTypeName(t.Elem())) + // x.line("*" + varname + " = " + genTempVarPfx + i) + + // if varname is a field of a struct (has a dot in it), + // then just set it to nil + if strings.IndexByte(varname, '.') != -1 { + x.line(varname + " = nil") + } else { + x.line("*" + varname + " = " + x.genZeroValueR(t.Elem())) + } + // x.line("*" + varname + " = nil") + x.line("}") + + } else { + // x.line("var " + genTempVarPfx + i + " " + x.genTypeName(t)) + // x.line(varname + " = " + genTempVarPfx + i) + x.line(varname + " = " + x.genZeroValueR(t)) + } + x.line("} else {") + } else { + x.line("// cannot be nil") + } + if t.Kind() != reflect.Ptr { + if x.decTryAssignPrimitive(varname, t) { + x.line(genTempVarPfx + "v" + i + " := &" + varname) + x.dec(genTempVarPfx+"v"+i, t) + } + } else { + x.linef("if %s == nil { %s = new(%s) }", varname, varname, x.genTypeName(t.Elem())) + // Ensure we set underlying ptr to a non-nil value (so we can deref to it later). + // There's a chance of a **T in here which is nil. + var ptrPfx string + for t = t.Elem(); t.Kind() == reflect.Ptr; t = t.Elem() { + ptrPfx += "*" + x.linef("if %s%s == nil { %s%s = new(%s)}", + ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) + } + // if varname has [ in it, then create temp variable for this ptr thingie + if strings.Index(varname, "[") >= 0 { + varname2 := genTempVarPfx + "w" + i + x.line(varname2 + " := " + varname) + varname = varname2 + } + + if ptrPfx == "" { + x.dec(varname, t) + } else { + x.line(genTempVarPfx + "z" + i + " := " + ptrPfx + varname) + x.dec(genTempVarPfx+"z"+i, t) + } + + } + + if canBeNil { + x.line("} ") + } +} + +func (x *genRunner) dec(varname string, t reflect.Type) { + // assumptions: + // - the varname is to a pointer already. No need to take address of it + // - t is always a baseType T (not a *T, etc). + rtid := reflect.ValueOf(t).Pointer() + tptr := reflect.PtrTo(t) + if x.checkForSelfer(t, varname) { + if t.Implements(selferTyp) || tptr.Implements(selferTyp) { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + if _, ok := x.td[rtid]; ok { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + } + + inlist := false + for _, t0 := range x.t { + if t == t0 { + inlist = true + if x.checkForSelfer(t, varname) { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + break + } + } + + var rtidAdded bool + if t == x.tc { + x.td[rtid] = true + rtidAdded = true + } + + // check if + // - type is RawExt + // - the type implements (Text|JSON|Binary)(Unm|M)arshal + mi := x.varsfx() + x.linef("%sm%s := z.DecBinary()", genTempVarPfx, mi) + x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block + defer func() { x.line("}") }() //end if block + + if t == rawExtTyp { + x.linef("} else { r.DecodeExt(%v, 0, nil)", varname) + return + } + + // HACK: Support for Builtins. + // Currently, only Binc supports builtins, and the only builtin type is time.Time. + // Have a method that returns the rtid for time.Time if Handle is Binc. + if t == timeTyp { + vrtid := genTempVarPfx + "m" + x.varsfx() + x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) + x.linef("r.DecodeBuiltin(%s, %s)", vrtid, varname) + } + // only check for extensions if the type is named, and has a packagePath. + if t.PkgPath() != "" && t.Name() != "" { + // first check if extensions are configued, before doing the interface conversion + x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) + } + + if t.Implements(binaryUnmarshalerTyp) || tptr.Implements(binaryUnmarshalerTyp) { + x.linef("} else if %sm%s { z.DecBinaryUnmarshal(%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonUnmarshalerTyp) || tptr.Implements(jsonUnmarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.DecJSONUnmarshal(%v)", genTempVarPfx, mi, varname) + } else if t.Implements(textUnmarshalerTyp) || tptr.Implements(textUnmarshalerTyp) { + x.linef("} else if !%sm%s { z.DecTextUnmarshal(%v)", genTempVarPfx, mi, varname) + } + + x.line("} else {") + + // Since these are pointers, we cannot share, and have to use them one by one + switch t.Kind() { + case reflect.Int: + x.line("*((*int)(" + varname + ")) = int(r.DecodeInt(codecSelferBitsize" + x.xs + "))") + // x.line("z.DecInt((*int)(" + varname + "))") + case reflect.Int8: + x.line("*((*int8)(" + varname + ")) = int8(r.DecodeInt(8))") + // x.line("z.DecInt8((*int8)(" + varname + "))") + case reflect.Int16: + x.line("*((*int16)(" + varname + ")) = int16(r.DecodeInt(16))") + // x.line("z.DecInt16((*int16)(" + varname + "))") + case reflect.Int32: + x.line("*((*int32)(" + varname + ")) = int32(r.DecodeInt(32))") + // x.line("z.DecInt32((*int32)(" + varname + "))") + case reflect.Int64: + x.line("*((*int64)(" + varname + ")) = int64(r.DecodeInt(64))") + // x.line("z.DecInt64((*int64)(" + varname + "))") + + case reflect.Uint: + x.line("*((*uint)(" + varname + ")) = uint(r.DecodeUint(codecSelferBitsize" + x.xs + "))") + // x.line("z.DecUint((*uint)(" + varname + "))") + case reflect.Uint8: + x.line("*((*uint8)(" + varname + ")) = uint8(r.DecodeUint(8))") + // x.line("z.DecUint8((*uint8)(" + varname + "))") + case reflect.Uint16: + x.line("*((*uint16)(" + varname + ")) = uint16(r.DecodeUint(16))") + //x.line("z.DecUint16((*uint16)(" + varname + "))") + case reflect.Uint32: + x.line("*((*uint32)(" + varname + ")) = uint32(r.DecodeUint(32))") + //x.line("z.DecUint32((*uint32)(" + varname + "))") + case reflect.Uint64: + x.line("*((*uint64)(" + varname + ")) = uint64(r.DecodeUint(64))") + //x.line("z.DecUint64((*uint64)(" + varname + "))") + case reflect.Uintptr: + x.line("*((*uintptr)(" + varname + ")) = uintptr(r.DecodeUint(codecSelferBitsize" + x.xs + "))") + + case reflect.Float32: + x.line("*((*float32)(" + varname + ")) = float32(r.DecodeFloat(true))") + //x.line("z.DecFloat32((*float32)(" + varname + "))") + case reflect.Float64: + x.line("*((*float64)(" + varname + ")) = float64(r.DecodeFloat(false))") + // x.line("z.DecFloat64((*float64)(" + varname + "))") + + case reflect.Bool: + x.line("*((*bool)(" + varname + ")) = r.DecodeBool()") + // x.line("z.DecBool((*bool)(" + varname + "))") + case reflect.String: + x.line("*((*string)(" + varname + ")) = r.DecodeString()") + // x.line("z.DecString((*string)(" + varname + "))") + case reflect.Array, reflect.Chan: + x.xtraSM(varname, false, t) + // x.decListFallback(varname, rtid, true, t) + case reflect.Slice: + // if a []uint8, call dedicated function + // if a known fastpath slice, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if rtid == uint8SliceTypId { + x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false, false)") + } else if fastpathAV.index(rtid) != -1 { + g := genV{Slice: true, Elem: x.genTypeName(t.Elem())} + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + // x.line("z." + g.MethodNamePfx("Dec", false) + "(" + varname + ")") + // x.line(g.FastpathName(false) + "(" + varname + ", d)") + } else { + x.xtraSM(varname, false, t) + // x.decListFallback(varname, rtid, false, t) + } + case reflect.Map: + // if a known fastpath map, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if fastpathAV.index(rtid) != -1 { + g := genV{Slice: false, Elem: x.genTypeName(t.Elem()), MapKey: x.genTypeName(t.Key())} + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + // x.line("z." + g.MethodNamePfx("Dec", false) + "(" + varname + ")") + // x.line(g.FastpathName(false) + "(" + varname + ", d)") + } else { + x.xtraSM(varname, false, t) + // x.decMapFallback(varname, rtid, t) + } + case reflect.Struct: + if inlist { + x.decStruct(varname, rtid, t) + } else { + // delete(x.td, rtid) + x.line("z.DecFallback(" + varname + ", false)") + } + default: + if rtidAdded { + delete(x.te, rtid) + } + x.line("z.DecFallback(" + varname + ", true)") + } +} + +func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type) (tryAsPtr bool) { + // We have to use the actual type name when doing a direct assignment. + // We don't have the luxury of casting the pointer to the underlying type. + // + // Consequently, in the situation of a + // type Message int32 + // var x Message + // var i int32 = 32 + // x = i // this will bomb + // x = Message(i) // this will work + // *((*int32)(&x)) = i // this will work + // + // Consequently, we replace: + // case reflect.Uint32: x.line(varname + " = uint32(r.DecodeUint(32))") + // with: + // case reflect.Uint32: x.line(varname + " = " + genTypeNamePrim(t, x.tc) + "(r.DecodeUint(32))") + + xfn := func(t reflect.Type) string { + return x.genTypeNamePrim(t) + } + switch t.Kind() { + case reflect.Int: + x.linef("%s = %s(r.DecodeInt(codecSelferBitsize%s))", varname, xfn(t), x.xs) + case reflect.Int8: + x.linef("%s = %s(r.DecodeInt(8))", varname, xfn(t)) + case reflect.Int16: + x.linef("%s = %s(r.DecodeInt(16))", varname, xfn(t)) + case reflect.Int32: + x.linef("%s = %s(r.DecodeInt(32))", varname, xfn(t)) + case reflect.Int64: + x.linef("%s = %s(r.DecodeInt(64))", varname, xfn(t)) + + case reflect.Uint: + x.linef("%s = %s(r.DecodeUint(codecSelferBitsize%s))", varname, xfn(t), x.xs) + case reflect.Uint8: + x.linef("%s = %s(r.DecodeUint(8))", varname, xfn(t)) + case reflect.Uint16: + x.linef("%s = %s(r.DecodeUint(16))", varname, xfn(t)) + case reflect.Uint32: + x.linef("%s = %s(r.DecodeUint(32))", varname, xfn(t)) + case reflect.Uint64: + x.linef("%s = %s(r.DecodeUint(64))", varname, xfn(t)) + case reflect.Uintptr: + x.linef("%s = %s(r.DecodeUint(codecSelferBitsize%s))", varname, xfn(t), x.xs) + + case reflect.Float32: + x.linef("%s = %s(r.DecodeFloat(true))", varname, xfn(t)) + case reflect.Float64: + x.linef("%s = %s(r.DecodeFloat(false))", varname, xfn(t)) + + case reflect.Bool: + x.linef("%s = %s(r.DecodeBool())", varname, xfn(t)) + case reflect.String: + x.linef("%s = %s(r.DecodeString())", varname, xfn(t)) + default: + tryAsPtr = true + } + return +} + +func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type) { + type tstruc struct { + TempVar string + Rand string + Varname string + CTyp string + Typ string + Immutable bool + } + telem := t.Elem() + ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem)} + + funcs := make(template.FuncMap) + funcs["decLineVar"] = func(varname string) string { + x.decVar(varname, telem, false) + return "" + } + funcs["decLine"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + return "" + } + funcs["var"] = func(s string) string { + return ts.TempVar + s + ts.Rand + } + funcs["zero"] = func() string { + return x.genZeroValueR(telem) + } + funcs["isArray"] = func() bool { + return t.Kind() == reflect.Array + } + funcs["isSlice"] = func() bool { + return t.Kind() == reflect.Slice + } + funcs["isChan"] = func() bool { + return t.Kind() == reflect.Chan + } + tm, err := template.New("").Funcs(funcs).Parse(genDecListTmpl) + if err != nil { + panic(err) + } + if err = tm.Execute(x.w, &ts); err != nil { + panic(err) + } +} + +func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) { + type tstruc struct { + TempVar string + Rand string + Varname string + KTyp string + Typ string + } + telem := t.Elem() + tkey := t.Key() + ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(tkey), x.genTypeName(telem)} + funcs := make(template.FuncMap) + funcs["decLineVarK"] = func(varname string) string { + x.decVar(varname, tkey, false) + return "" + } + funcs["decLineVar"] = func(varname string) string { + x.decVar(varname, telem, false) + return "" + } + funcs["decLineK"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(tkey), false) + return "" + } + funcs["decLine"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + return "" + } + funcs["var"] = func(s string) string { + return ts.TempVar + s + ts.Rand + } + + tm, err := template.New("").Funcs(funcs).Parse(genDecMapTmpl) + if err != nil { + panic(err) + } + if err = tm.Execute(x.w, &ts); err != nil { + panic(err) + } +} + +func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintptr, t reflect.Type) { + ti := getTypeInfo(rtid, t) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.line("switch (" + kName + ") {") + for _, si := range tisfi { + x.line("case \"" + si.encName + "\":") + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + x.line("if " + varname3 + " == nil {" + + varname3 + " = new(" + x.genTypeName(t2typ.Elem()) + ") }") + } + } + } + x.decVar(varname+"."+t2.Name, t2.Type, false) + } + x.line("default:") + // pass the slice here, so that the string will not escape, and maybe save allocation + x.line("z.DecStructFieldNotFound(-1, " + kName + ")") + // x.line("z.DecStructFieldNotFoundB(" + kName + "Slc)") + x.line("} // end switch " + kName) +} + +func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style uint8) { + tpfx := genTempVarPfx + i := x.varsfx() + kName := tpfx + "s" + i + + // We thought to use ReadStringAsBytes, as go compiler might optimize the copy out. + // However, using that was more expensive, as it seems that the switch expression + // is evaluated each time. + // + // We could depend on decodeString using a temporary/shared buffer internally. + // However, this model of creating a byte array, and using explicitly is faster, + // and allows optional use of unsafe []byte->string conversion without alloc. + + // Also, ensure that the slice array doesn't escape. + // That will help escape analysis prevent allocation when it gets better. + + // x.line("var " + kName + "Arr = [32]byte{} // default string to decode into") + // x.line("var " + kName + "Slc = " + kName + "Arr[:] // default slice to decode into") + // use the scratch buffer to avoid allocation (most field names are < 32). + + x.line("var " + kName + "Slc = z.DecScratchBuffer() // default slice to decode into") + + // x.line("var " + kName + " string // default string to decode into") + // x.line("_ = " + kName) + x.line("_ = " + kName + "Slc") + // x.linef("var %sb%s bool", tpfx, i) // break + switch style { + case 1: + x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i) + case 2: + x.linef("for %sj%s := 0; !r.CheckBreak(); %sj%s++ {", tpfx, i, tpfx, i) + default: // 0, otherwise. + x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + x.linef("for %sj%s := 0; ; %sj%s++ {", tpfx, i, tpfx, i) + x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) + x.line("} else { if r.CheckBreak() { break }; }") + } + // x.line(kName + " = z.ReadStringAsBytes(" + kName + ")") + // x.line(kName + " = z.ReadString()") + x.line(kName + "Slc = r.DecodeBytes(" + kName + "Slc, true, true)") + // let string be scoped to this loop alone, so it doesn't escape. + // x.line(kName + " := " + x.cpfx + "GenBytesToStringRO(" + kName + "Slc)") + if x.unsafe { + x.line(kName + "SlcHdr := codecSelferUnsafeString" + x.xs + "{uintptr(unsafe.Pointer(&" + + kName + "Slc[0])), len(" + kName + "Slc)}") + x.line(kName + " := *(*string)(unsafe.Pointer(&" + kName + "SlcHdr))") + } else { + x.line(kName + " := string(" + kName + "Slc)") + } + x.decStructMapSwitch(kName, varname, rtid, t) + + x.line("} // end for " + tpfx + "j" + i) + switch style { + case 1: + case 2: + x.line("r.ReadEnd()") + default: + x.linef("if !%shl%s { r.ReadEnd() }", tpfx, i) + } +} + +func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { + tpfx := genTempVarPfx + i := x.varsfx() + ti := getTypeInfo(rtid, t) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.linef("var %sj%s int", tpfx, i) + x.linef("var %sb%s bool", tpfx, i) // break + // x.linef("var %sl%s := r.ReadArrayStart()", tpfx, i) + x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + for _, si := range tisfi { + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2 = t.FieldByIndex(si.is) + } + + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + // x.line("if " + tpfx + "j" + i + "++; " + tpfx + "j" + + // i + " <= " + tpfx + "l" + i + " {") + x.linef("if %sb%s { r.ReadEnd(); %s }", tpfx, i, breakString) + x.decVar(varname+"."+t2.Name, t2.Type, true) + // x.line("} // end if " + tpfx + "j" + i + " <= " + tpfx + "l" + i) + } + // read remaining values and throw away. + x.line("for {") + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + x.linef("if %sb%s { break }", tpfx, i) + x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) + x.line("}") + x.line("r.ReadEnd()") +} + +func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { + // if container is map + // x.line("if z.DecContainerIsMap() { ") + i := x.varsfx() + x.line("if r.IsContainerType(codecSelverValueTypeMap" + x.xs + ") {") + x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") + x.linef("if %sl%s == 0 {", genTempVarPfx, i) + x.line("r.ReadEnd()") + if genUseOneFunctionForDecStructMap { + x.line("} else { ") + x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i) + } else { + x.line("} else if " + genTempVarPfx + "l" + i + " > 0 { ") + x.line("x.codecDecodeSelfFromMapLenPrefix(" + genTempVarPfx + "l" + i + ", d)") + x.line("} else {") + x.line("x.codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)") + } + x.line("}") + + // else if container is array + // x.line("} else if z.DecContainerIsArray() { ") + x.line("} else if r.IsContainerType(codecSelverValueTypeArray" + x.xs + ") {") + x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") + x.linef("if %sl%s == 0 {", genTempVarPfx, i) + x.line("r.ReadEnd()") + x.line("} else { ") + x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i) + x.line("}") + // else panic + x.line("} else { ") + x.line("panic(codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + ")") + // x.line("panic(`only encoded map or array can be decoded into a struct`)") + x.line("} ") +} + +// -------- + +type genV struct { + // genV is either a primitive (Primitive != "") or a slice (Slice = true) or a map. + Slice bool + MapKey string + Elem string + Primitive string +} + +func (x *genV) MethodNamePfx(prefix string, prim bool) string { + var name []byte + if prefix != "" { + name = append(name, prefix...) + } + if prim { + name = append(name, genTitleCaseName(x.Primitive)...) + } else { + if x.Slice { + name = append(name, "Slice"...) + } else { + name = append(name, "Map"...) + name = append(name, genTitleCaseName(x.MapKey)...) + } + name = append(name, genTitleCaseName(x.Elem)...) + } + return string(name) + +} + +func genNonPtr(t reflect.Type) reflect.Type { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t +} + +func genTitleCaseName(s string) string { + switch s { + case "interface{}": + return "Intf" + default: + return strings.ToUpper(s[0:1]) + s[1:] + } +} + +func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) { + var ptrPfx string + for t.Kind() == reflect.Ptr { + ptrPfx += "Ptrto" + t = t.Elem() + } + tstr := t.String() + if tn := t.Name(); tn != "" { + if tRef != nil && t.PkgPath() == tRef.PkgPath() { + return ptrPfx + tn + } else { + if genQNameRegex.MatchString(tstr) { + return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } + } + switch t.Kind() { + case reflect.Map: + return ptrPfx + "Map" + genMethodNameT(t.Key(), tRef) + genMethodNameT(t.Elem(), tRef) + case reflect.Slice: + return ptrPfx + "Slice" + genMethodNameT(t.Elem(), tRef) + case reflect.Array: + return ptrPfx + "Array" + strconv.FormatInt(int64(t.Len()), 10) + genMethodNameT(t.Elem(), tRef) + case reflect.Chan: + var cx string + switch t.ChanDir() { + case reflect.SendDir: + cx = "ChanSend" + case reflect.RecvDir: + cx = "ChanRecv" + default: + cx = "Chan" + } + return ptrPfx + cx + genMethodNameT(t.Elem(), tRef) + default: + if t == intfTyp { + return ptrPfx + "Interface" + } else { + if tRef != nil && t.PkgPath() == tRef.PkgPath() { + if t.Name() != "" { + return ptrPfx + t.Name() + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } else { + // best way to get the package name inclusive + // return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + // return ptrPfx + genBase64enc.EncodeToString([]byte(tstr)) + if t.Name() != "" && genQNameRegex.MatchString(tstr) { + return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } + } + } +} + +// genCustomNameForType base64encodes the t.String() value in such a way +// that it can be used within a function name. +func genCustomTypeName(tstr string) string { + len2 := genBase64enc.EncodedLen(len(tstr)) + bufx := make([]byte, len2) + genBase64enc.Encode(bufx, []byte(tstr)) + for i := len2 - 1; i >= 0; i-- { + if bufx[i] == '=' { + len2-- + } else { + break + } + } + return string(bufx[:len2]) +} + +func genIsImmutable(t reflect.Type) (v bool) { + return isMutableKind(t.Kind()) +} + +type genInternal struct { + Values []genV + Unsafe bool +} + +func (x genInternal) FastpathLen() (l int) { + for _, v := range x.Values { + if v.Primitive == "" { + l++ + } + } + return +} + +func genInternalZeroValue(s string) string { + switch s { + case "interface{}": + return "nil" + case "bool": + return "false" + case "string": + return `""` + default: + return "0" + } +} + +func genInternalEncCommandAsString(s string, vname string) string { + switch s { + case "uint", "uint8", "uint16", "uint32", "uint64": + return "ee.EncodeUint(uint64(" + vname + "))" + case "int", "int8", "int16", "int32", "int64": + return "ee.EncodeInt(int64(" + vname + "))" + case "string": + return "ee.EncodeString(c_UTF8, " + vname + ")" + case "float32": + return "ee.EncodeFloat32(" + vname + ")" + case "float64": + return "ee.EncodeFloat64(" + vname + ")" + case "bool": + return "ee.EncodeBool(" + vname + ")" + case "symbol": + return "ee.EncodeSymbol(" + vname + ")" + default: + return "e.encode(" + vname + ")" + } +} + +func genInternalDecCommandAsString(s string) string { + switch s { + case "uint": + return "uint(dd.DecodeUint(uintBitsize))" + case "uint8": + return "uint8(dd.DecodeUint(8))" + case "uint16": + return "uint16(dd.DecodeUint(16))" + case "uint32": + return "uint32(dd.DecodeUint(32))" + case "uint64": + return "dd.DecodeUint(64)" + case "int": + return "int(dd.DecodeInt(intBitsize))" + case "int8": + return "int8(dd.DecodeInt(8))" + case "int16": + return "int16(dd.DecodeInt(16))" + case "int32": + return "int32(dd.DecodeInt(32))" + case "int64": + return "dd.DecodeInt(64)" + + case "string": + return "dd.DecodeString()" + case "float32": + return "float32(dd.DecodeFloat(true))" + case "float64": + return "dd.DecodeFloat(false)" + case "bool": + return "dd.DecodeBool()" + default: + panic(errors.New("unknown type for decode: " + s)) + } + +} + +// var genInternalMu sync.Mutex +var genInternalV genInternal +var genInternalTmplFuncs template.FuncMap +var genInternalOnce sync.Once + +func genInternalInit() { + types := [...]string{ + "interface{}", + "string", + "float32", + "float64", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "int", + "int8", + "int16", + "int32", + "int64", + "bool", + } + // keep as slice, so it is in specific iteration order. + // Initial order was uint64, string, interface{}, int, int64 + mapvaltypes := [...]string{ + "interface{}", + "string", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "int", + "int8", + "int16", + "int32", + "int64", + "float32", + "float64", + "bool", + } + mapvaltypes2 := make(map[string]bool) + for _, s := range mapvaltypes { + mapvaltypes2[s] = true + } + var gt genInternal + + // For each slice or map type, there must be a (symetrical) Encode and Decode fast-path function + for _, s := range types { + gt.Values = append(gt.Values, genV{false, "", "", s}) + if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. + gt.Values = append(gt.Values, genV{true, "", s, ""}) + } + if !mapvaltypes2[s] { + gt.Values = append(gt.Values, genV{false, s, s, ""}) + } + for _, ms := range mapvaltypes { + gt.Values = append(gt.Values, genV{false, s, ms, ""}) + } + } + + funcs := make(template.FuncMap) + // funcs["haspfx"] = strings.HasPrefix + funcs["encmd"] = genInternalEncCommandAsString + funcs["decmd"] = genInternalDecCommandAsString + funcs["zerocmd"] = genInternalZeroValue + + genInternalV = gt + genInternalTmplFuncs = funcs +} + +// GenInternalGoFile is used to generate source files from templates. +// It is run by the program author alone. +// Unfortunately, it has to be exported so that it can be called from a command line tool. +// *** DO NOT USE *** +func GenInternalGoFile(r io.Reader, w io.Writer, safe bool) (err error) { + genInternalOnce.Do(genInternalInit) + + gt := genInternalV + gt.Unsafe = !safe + + t := template.New("").Funcs(genInternalTmplFuncs) + + tmplstr, err := ioutil.ReadAll(r) + if err != nil { + return + } + + if t, err = t.Parse(string(tmplstr)); err != nil { + return + } + + var out bytes.Buffer + err = t.Execute(&out, gt) + if err != nil { + return + } + + bout, err := format.Source(out.Bytes()) + if err != nil { + w.Write(out.Bytes()) // write out if error, so we can still see. + // w.Write(bout) // write out if error, as much as possible, so we can still see. + return + } + w.Write(bout) + return +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go new file mode 100644 index 0000000..8b76e8e --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go @@ -0,0 +1,894 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// Contains code shared by both encode and decode. + +// Some shared ideas around encoding/decoding +// ------------------------------------------ +// +// If an interface{} is passed, we first do a type assertion to see if it is +// a primitive type or a map/slice of primitive types, and use a fastpath to handle it. +// +// If we start with a reflect.Value, we are already in reflect.Value land and +// will try to grab the function for the underlying Type and directly call that function. +// This is more performant than calling reflect.Value.Interface(). +// +// This still helps us bypass many layers of reflection, and give best performance. +// +// Containers +// ------------ +// Containers in the stream are either associative arrays (key-value pairs) or +// regular arrays (indexed by incrementing integers). +// +// Some streams support indefinite-length containers, and use a breaking +// byte-sequence to denote that the container has come to an end. +// +// Some streams also are text-based, and use explicit separators to denote the +// end/beginning of different values. +// +// During encode, we use a high-level condition to determine how to iterate through +// the container. That decision is based on whether the container is text-based (with +// separators) or binary (without separators). If binary, we do not even call the +// encoding of separators. +// +// During decode, we use a different high-level condition to determine how to iterate +// through the containers. That decision is based on whether the stream contained +// a length prefix, or if it used explicit breaks. If length-prefixed, we assume that +// it has to be binary, and we do not even try to read separators. +// +// The only codec that may suffer (slightly) is cbor, and only when decoding indefinite-length. +// It may suffer because we treat it like a text-based codec, and read separators. +// However, this read is a no-op and the cost is insignificant. +// +// Philosophy +// ------------ +// On decode, this codec will update containers appropriately: +// - If struct, update fields from stream into fields of struct. +// If field in stream not found in struct, handle appropriately (based on option). +// If a struct field has no corresponding value in the stream, leave it AS IS. +// If nil in stream, set value to nil/zero value. +// - If map, update map from stream. +// If the stream value is NIL, set the map to nil. +// - if slice, try to update up to length of array in stream. +// if container len is less than stream array length, +// and container cannot be expanded, handled (based on option). +// This means you can decode 4-element stream array into 1-element array. +// +// ------------------------------------ +// On encode, user can specify omitEmpty. This means that the value will be omitted +// if the zero value. The problem may occur during decode, where omitted values do not affect +// the value being decoded into. This means that if decoding into a struct with an +// int field with current value=5, and the field is omitted in the stream, then after +// decoding, the value will still be 5 (not 0). +// omitEmpty only works if you guarantee that you always decode into zero-values. +// +// ------------------------------------ +// We could have truncated a map to remove keys not available in the stream, +// or set values in the struct which are not in the stream to their zero values. +// We decided against it because there is no efficient way to do it. +// We may introduce it as an option later. +// However, that will require enabling it for both runtime and code generation modes. +// +// To support truncate, we need to do 2 passes over the container: +// map +// - first collect all keys (e.g. in k1) +// - for each key in stream, mark k1 that the key should not be removed +// - after updating map, do second pass and call delete for all keys in k1 which are not marked +// struct: +// - for each field, track the *typeInfo s1 +// - iterate through all s1, and for each one not marked, set value to zero +// - this involves checking the possible anonymous fields which are nil ptrs. +// too much work. +// +// ------------------------------------------ +// Error Handling is done within the library using panic. +// +// This way, the code doesn't have to keep checking if an error has happened, +// and we don't have to keep sending the error value along with each call +// or storing it in the En|Decoder and checking it constantly along the way. +// +// The disadvantage is that small functions which use panics cannot be inlined. +// The code accounts for that by only using panics behind an interface; +// since interface calls cannot be inlined, this is irrelevant. +// +// We considered storing the error is En|Decoder. +// - once it has its err field set, it cannot be used again. +// - panicing will be optional, controlled by const flag. +// - code should always check error first and return early. +// We eventually decided against it as it makes the code clumsier to always +// check for these error conditions. + +import ( + "encoding" + "encoding/binary" + "errors" + "fmt" + "math" + "reflect" + "sort" + "strings" + "sync" + "time" + "unicode" + "unicode/utf8" +) + +const ( + scratchByteArrayLen = 32 + + // Support encoding.(Binary|Text)(Unm|M)arshaler. + // This constant flag will enable or disable it. + supportMarshalInterfaces = true + + // Each Encoder or Decoder uses a cache of functions based on conditionals, + // so that the conditionals are not run every time. + // + // Either a map or a slice is used to keep track of the functions. + // The map is more natural, but has a higher cost than a slice/array. + // This flag (useMapForCodecCache) controls which is used. + // + // From benchmarks, slices with linear search perform better with < 32 entries. + // We have typically seen a high threshold of about 24 entries. + useMapForCodecCache = false + + // for debugging, set this to false, to catch panic traces. + // Note that this will always cause rpc tests to fail, since they need io.EOF sent via panic. + recoverPanicToErr = true + + // Fast path functions try to create a fast path encode or decode implementation + // for common maps and slices, by by-passing reflection altogether. + fastpathEnabled = true + + // if checkStructForEmptyValue, check structs fields to see if an empty value. + // This could be an expensive call, so possibly disable it. + checkStructForEmptyValue = false + + // if derefForIsEmptyValue, deref pointers and interfaces when checking isEmptyValue + derefForIsEmptyValue = false +) + +var oneByteArr = [1]byte{0} +var zeroByteSlice = oneByteArr[:0:0] + +type charEncoding uint8 + +const ( + c_RAW charEncoding = iota + c_UTF8 + c_UTF16LE + c_UTF16BE + c_UTF32LE + c_UTF32BE +) + +// valueType is the stream type +type valueType uint8 + +const ( + valueTypeUnset valueType = iota + valueTypeNil + valueTypeInt + valueTypeUint + valueTypeFloat + valueTypeBool + valueTypeString + valueTypeSymbol + valueTypeBytes + valueTypeMap + valueTypeArray + valueTypeTimestamp + valueTypeExt + + // valueTypeInvalid = 0xff +) + +type seqType uint8 + +// mirror json.Marshaler and json.Unmarshaler here, so we don't import the encoding/json package +type jsonMarshaler interface { + MarshalJSON() ([]byte, error) +} +type jsonUnmarshaler interface { + UnmarshalJSON([]byte) error +} + +const ( + _ seqType = iota + seqTypeArray + seqTypeSlice + seqTypeChan +) + +var ( + bigen = binary.BigEndian + structInfoFieldName = "_struct" + + cachedTypeInfo = make(map[uintptr]*typeInfo, 64) + cachedTypeInfoMutex sync.RWMutex + + // mapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) + intfSliceTyp = reflect.TypeOf([]interface{}(nil)) + intfTyp = intfSliceTyp.Elem() + + stringTyp = reflect.TypeOf("") + timeTyp = reflect.TypeOf(time.Time{}) + rawExtTyp = reflect.TypeOf(RawExt{}) + uint8SliceTyp = reflect.TypeOf([]uint8(nil)) + + mapBySliceTyp = reflect.TypeOf((*MapBySlice)(nil)).Elem() + + binaryMarshalerTyp = reflect.TypeOf((*encoding.BinaryMarshaler)(nil)).Elem() + binaryUnmarshalerTyp = reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem() + + textMarshalerTyp = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + textUnmarshalerTyp = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() + + jsonMarshalerTyp = reflect.TypeOf((*jsonMarshaler)(nil)).Elem() + jsonUnmarshalerTyp = reflect.TypeOf((*jsonUnmarshaler)(nil)).Elem() + + selferTyp = reflect.TypeOf((*Selfer)(nil)).Elem() + + uint8SliceTypId = reflect.ValueOf(uint8SliceTyp).Pointer() + rawExtTypId = reflect.ValueOf(rawExtTyp).Pointer() + intfTypId = reflect.ValueOf(intfTyp).Pointer() + timeTypId = reflect.ValueOf(timeTyp).Pointer() + stringTypId = reflect.ValueOf(stringTyp).Pointer() + + // mapBySliceTypId = reflect.ValueOf(mapBySliceTyp).Pointer() + + intBitsize uint8 = uint8(reflect.TypeOf(int(0)).Bits()) + uintBitsize uint8 = uint8(reflect.TypeOf(uint(0)).Bits()) + + bsAll0x00 = []byte{0, 0, 0, 0, 0, 0, 0, 0} + bsAll0xff = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} + + chkOvf checkOverflow + + noFieldNameToStructFieldInfoErr = errors.New("no field name passed to parseStructFieldInfo") +) + +// Selfer defines methods by which a value can encode or decode itself. +// +// Any type which implements Selfer will be able to encode or decode itself. +// Consequently, during (en|de)code, this takes precedence over +// (text|binary)(M|Unm)arshal or extension support. +type Selfer interface { + CodecEncodeSelf(*Encoder) + CodecDecodeSelf(*Decoder) +} + +// MapBySlice represents a slice which should be encoded as a map in the stream. +// The slice contains a sequence of key-value pairs. +// This affords storing a map in a specific sequence in the stream. +// +// The support of MapBySlice affords the following: +// - A slice type which implements MapBySlice will be encoded as a map +// - A slice can be decoded from a map in the stream +type MapBySlice interface { + MapBySlice() +} + +// WARNING: DO NOT USE DIRECTLY. EXPORTED FOR GODOC BENEFIT. WILL BE REMOVED. +// +// BasicHandle encapsulates the common options and extension functions. +type BasicHandle struct { + extHandle + EncodeOptions + DecodeOptions +} + +func (x *BasicHandle) getBasicHandle() *BasicHandle { + return x +} + +// Handle is the interface for a specific encoding format. +// +// Typically, a Handle is pre-configured before first time use, +// and not modified while in use. Such a pre-configured Handle +// is safe for concurrent access. +type Handle interface { + getBasicHandle() *BasicHandle + newEncDriver(w *Encoder) encDriver + newDecDriver(r *Decoder) decDriver + isBinary() bool +} + +// RawExt represents raw unprocessed extension data. +// Some codecs will decode extension data as a *RawExt if there is no registered extension for the tag. +// +// Only one of Data or Value is nil. If Data is nil, then the content of the RawExt is in the Value. +type RawExt struct { + Tag uint64 + // Data is the []byte which represents the raw ext. If Data is nil, ext is exposed in Value. + // Data is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types + Data []byte + // Value represents the extension, if Data is nil. + // Value is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. + Value interface{} +} + +// Ext handles custom (de)serialization of custom types / extensions. +type Ext interface { + // WriteExt converts a value to a []byte. + // It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. + WriteExt(v interface{}) []byte + + // ReadExt updates a value from a []byte. + // It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. + ReadExt(dst interface{}, src []byte) + + // ConvertExt converts a value into a simpler interface for easy encoding e.g. convert time.Time to int64. + // It is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. + ConvertExt(v interface{}) interface{} + + // UpdateExt updates a value from a simpler interface for easy decoding e.g. convert int64 to time.Time. + // It is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. + UpdateExt(dst interface{}, src interface{}) +} + +// bytesExt is a wrapper implementation to support former AddExt exported method. +type bytesExt struct { + encFn func(reflect.Value) ([]byte, error) + decFn func(reflect.Value, []byte) error +} + +func (x bytesExt) WriteExt(v interface{}) []byte { + // fmt.Printf(">>>>>>>>>> WriteExt: %T, %v\n", v, v) + bs, err := x.encFn(reflect.ValueOf(v)) + if err != nil { + panic(err) + } + return bs +} + +func (x bytesExt) ReadExt(v interface{}, bs []byte) { + // fmt.Printf(">>>>>>>>>> ReadExt: %T, %v\n", v, v) + if err := x.decFn(reflect.ValueOf(v), bs); err != nil { + panic(err) + } +} + +func (x bytesExt) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} + +func (x bytesExt) UpdateExt(dest interface{}, v interface{}) { + x.ReadExt(dest, v.([]byte)) +} + +// type errorString string +// func (x errorString) Error() string { return string(x) } + +type binaryEncodingType struct{} + +func (_ binaryEncodingType) isBinary() bool { return true } + +type textEncodingType struct{} + +func (_ textEncodingType) isBinary() bool { return false } + +// noBuiltInTypes is embedded into many types which do not support builtins +// e.g. msgpack, simple, cbor. +type noBuiltInTypes struct{} + +func (_ noBuiltInTypes) IsBuiltinType(rt uintptr) bool { return false } +func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} +func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} + +type noStreamingCodec struct{} + +func (_ noStreamingCodec) CheckBreak() bool { return false } + +// bigenHelper. +// Users must already slice the x completely, because we will not reslice. +type bigenHelper struct { + x []byte // must be correctly sliced to appropriate len. slicing is a cost. + w encWriter +} + +func (z bigenHelper) writeUint16(v uint16) { + bigen.PutUint16(z.x, v) + z.w.writeb(z.x) +} + +func (z bigenHelper) writeUint32(v uint32) { + bigen.PutUint32(z.x, v) + z.w.writeb(z.x) +} + +func (z bigenHelper) writeUint64(v uint64) { + bigen.PutUint64(z.x, v) + z.w.writeb(z.x) +} + +type extTypeTagFn struct { + rtid uintptr + rt reflect.Type + tag uint64 + ext Ext +} + +type extHandle []*extTypeTagFn + +// DEPRECATED: AddExt is deprecated in favor of SetExt. It exists for compatibility only. +// +// AddExt registes an encode and decode function for a reflect.Type. +// AddExt internally calls SetExt. +// To deregister an Ext, call AddExt with nil encfn and/or nil decfn. +func (o *extHandle) AddExt( + rt reflect.Type, tag byte, + encfn func(reflect.Value) ([]byte, error), decfn func(reflect.Value, []byte) error, +) (err error) { + if encfn == nil || decfn == nil { + return o.SetExt(rt, uint64(tag), nil) + } + return o.SetExt(rt, uint64(tag), bytesExt{encfn, decfn}) +} + +// SetExt registers a tag and Ext for a reflect.Type. +// +// Note that the type must be a named type, and specifically not +// a pointer or Interface. An error is returned if that is not honored. +// +// To Deregister an ext, call SetExt with nil Ext +func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { + // o is a pointer, because we may need to initialize it + if rt.PkgPath() == "" || rt.Kind() == reflect.Interface { + err = fmt.Errorf("codec.Handle.AddExt: Takes named type, especially not a pointer or interface: %T", + reflect.Zero(rt).Interface()) + return + } + + rtid := reflect.ValueOf(rt).Pointer() + for _, v := range *o { + if v.rtid == rtid { + v.tag, v.ext = tag, ext + return + } + } + + *o = append(*o, &extTypeTagFn{rtid, rt, tag, ext}) + return +} + +func (o extHandle) getExt(rtid uintptr) *extTypeTagFn { + for _, v := range o { + if v.rtid == rtid { + return v + } + } + return nil +} + +func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn { + for _, v := range o { + if v.tag == tag { + return v + } + } + return nil +} + +type structFieldInfo struct { + encName string // encode name + + // only one of 'i' or 'is' can be set. If 'i' is -1, then 'is' has been set. + + is []int // (recursive/embedded) field index in struct + i int16 // field index in struct + omitEmpty bool + toArray bool // if field is _struct, is the toArray set? +} + +// func (si *structFieldInfo) isZero() bool { +// return si.encName == "" && len(si.is) == 0 && si.i == 0 && !si.omitEmpty && !si.toArray +// } + +// rv returns the field of the struct. +// If anonymous, it returns an Invalid +func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Value) { + if si.i != -1 { + v = v.Field(int(si.i)) + return v + } + // replicate FieldByIndex + for _, x := range si.is { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + if !update { + return + } + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + } + v = v.Field(x) + } + return v +} + +func (si *structFieldInfo) setToZeroValue(v reflect.Value) { + if si.i != -1 { + v = v.Field(int(si.i)) + v.Set(reflect.Zero(v.Type())) + // v.Set(reflect.New(v.Type()).Elem()) + // v.Set(reflect.New(v.Type())) + } else { + // replicate FieldByIndex + for _, x := range si.is { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + return + } + v = v.Elem() + } + v = v.Field(x) + } + v.Set(reflect.Zero(v.Type())) + } +} + +func parseStructFieldInfo(fname string, stag string) *structFieldInfo { + // if fname == "" { + // panic(noFieldNameToStructFieldInfoErr) + // } + si := structFieldInfo{ + encName: fname, + } + + if stag != "" { + for i, s := range strings.Split(stag, ",") { + if i == 0 { + if s != "" { + si.encName = s + } + } else { + if s == "omitempty" { + si.omitEmpty = true + } else if s == "toarray" { + si.toArray = true + } + } + } + } + // si.encNameBs = []byte(si.encName) + return &si +} + +type sfiSortedByEncName []*structFieldInfo + +func (p sfiSortedByEncName) Len() int { + return len(p) +} + +func (p sfiSortedByEncName) Less(i, j int) bool { + return p[i].encName < p[j].encName +} + +func (p sfiSortedByEncName) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +// typeInfo keeps information about each type referenced in the encode/decode sequence. +// +// During an encode/decode sequence, we work as below: +// - If base is a built in type, en/decode base value +// - If base is registered as an extension, en/decode base value +// - If type is binary(M/Unm)arshaler, call Binary(M/Unm)arshal method +// - If type is text(M/Unm)arshaler, call Text(M/Unm)arshal method +// - Else decode appropriately based on the reflect.Kind +type typeInfo struct { + sfi []*structFieldInfo // sorted. Used when enc/dec struct to map. + sfip []*structFieldInfo // unsorted. Used when enc/dec struct to array. + + rt reflect.Type + rtid uintptr + + // baseId gives pointer to the base reflect.Type, after deferencing + // the pointers. E.g. base type of ***time.Time is time.Time. + base reflect.Type + baseId uintptr + baseIndir int8 // number of indirections to get to base + + mbs bool // base type (T or *T) is a MapBySlice + + bm bool // base type (T or *T) is a binaryMarshaler + bunm bool // base type (T or *T) is a binaryUnmarshaler + bmIndir int8 // number of indirections to get to binaryMarshaler type + bunmIndir int8 // number of indirections to get to binaryUnmarshaler type + + tm bool // base type (T or *T) is a textMarshaler + tunm bool // base type (T or *T) is a textUnmarshaler + tmIndir int8 // number of indirections to get to textMarshaler type + tunmIndir int8 // number of indirections to get to textUnmarshaler type + + jm bool // base type (T or *T) is a jsonMarshaler + junm bool // base type (T or *T) is a jsonUnmarshaler + jmIndir int8 // number of indirections to get to jsonMarshaler type + junmIndir int8 // number of indirections to get to jsonUnmarshaler type + + cs bool // base type (T or *T) is a Selfer + csIndir int8 // number of indirections to get to Selfer type + + toArray bool // whether this (struct) type should be encoded as an array +} + +func (ti *typeInfo) indexForEncName(name string) int { + //tisfi := ti.sfi + const binarySearchThreshold = 16 + if sfilen := len(ti.sfi); sfilen < binarySearchThreshold { + // linear search. faster than binary search in my testing up to 16-field structs. + for i, si := range ti.sfi { + if si.encName == name { + return i + } + } + } else { + // binary search. adapted from sort/search.go. + h, i, j := 0, 0, sfilen + for i < j { + h = i + (j-i)/2 + if ti.sfi[h].encName < name { + i = h + 1 + } else { + j = h + } + } + if i < sfilen && ti.sfi[i].encName == name { + return i + } + } + return -1 +} + +func getStructTag(t reflect.StructTag) (s string) { + // check for tags: codec, json, in that order. + // this allows seamless support for many configured structs. + s = t.Get("codec") + if s == "" { + s = t.Get("json") + } + return +} + +func getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) { + var ok bool + cachedTypeInfoMutex.RLock() + pti, ok = cachedTypeInfo[rtid] + cachedTypeInfoMutex.RUnlock() + if ok { + return + } + + cachedTypeInfoMutex.Lock() + defer cachedTypeInfoMutex.Unlock() + if pti, ok = cachedTypeInfo[rtid]; ok { + return + } + + ti := typeInfo{rt: rt, rtid: rtid} + pti = &ti + + var indir int8 + if ok, indir = implementsIntf(rt, binaryMarshalerTyp); ok { + ti.bm, ti.bmIndir = true, indir + } + if ok, indir = implementsIntf(rt, binaryUnmarshalerTyp); ok { + ti.bunm, ti.bunmIndir = true, indir + } + if ok, indir = implementsIntf(rt, textMarshalerTyp); ok { + ti.tm, ti.tmIndir = true, indir + } + if ok, indir = implementsIntf(rt, textUnmarshalerTyp); ok { + ti.tunm, ti.tunmIndir = true, indir + } + if ok, indir = implementsIntf(rt, jsonMarshalerTyp); ok { + ti.jm, ti.jmIndir = true, indir + } + if ok, indir = implementsIntf(rt, jsonUnmarshalerTyp); ok { + ti.junm, ti.junmIndir = true, indir + } + if ok, indir = implementsIntf(rt, selferTyp); ok { + ti.cs, ti.csIndir = true, indir + } + if ok, _ = implementsIntf(rt, mapBySliceTyp); ok { + ti.mbs = true + } + + pt := rt + var ptIndir int8 + // for ; pt.Kind() == reflect.Ptr; pt, ptIndir = pt.Elem(), ptIndir+1 { } + for pt.Kind() == reflect.Ptr { + pt = pt.Elem() + ptIndir++ + } + if ptIndir == 0 { + ti.base = rt + ti.baseId = rtid + } else { + ti.base = pt + ti.baseId = reflect.ValueOf(pt).Pointer() + ti.baseIndir = ptIndir + } + + if rt.Kind() == reflect.Struct { + var siInfo *structFieldInfo + if f, ok := rt.FieldByName(structInfoFieldName); ok { + siInfo = parseStructFieldInfo(structInfoFieldName, getStructTag(f.Tag)) + ti.toArray = siInfo.toArray + } + sfip := make([]*structFieldInfo, 0, rt.NumField()) + rgetTypeInfo(rt, nil, make(map[string]bool, 16), &sfip, siInfo) + + ti.sfip = make([]*structFieldInfo, len(sfip)) + ti.sfi = make([]*structFieldInfo, len(sfip)) + copy(ti.sfip, sfip) + sort.Sort(sfiSortedByEncName(sfip)) + copy(ti.sfi, sfip) + } + // sfi = sfip + cachedTypeInfo[rtid] = pti + return +} + +func rgetTypeInfo(rt reflect.Type, indexstack []int, fnameToHastag map[string]bool, + sfi *[]*structFieldInfo, siInfo *structFieldInfo, +) { + for j := 0; j < rt.NumField(); j++ { + f := rt.Field(j) + // func types are skipped. + if tk := f.Type.Kind(); tk == reflect.Func { + continue + } + stag := getStructTag(f.Tag) + if stag == "-" { + continue + } + if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) { + continue + } + var si *structFieldInfo + // if anonymous and there is no struct tag (or it's blank) + // and its a struct (or pointer to struct), inline it. + var doInline bool + if f.Anonymous && f.Type.Kind() != reflect.Interface { + doInline = stag == "" + if !doInline { + si = parseStructFieldInfo("", stag) + doInline = si.encName == "" + // doInline = si.isZero() + // fmt.Printf(">>>> doInline for si.isZero: %s: %v\n", f.Name, doInline) + } + } + + if doInline { + ft := f.Type + for ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if ft.Kind() == reflect.Struct { + indexstack2 := make([]int, len(indexstack)+1, len(indexstack)+4) + copy(indexstack2, indexstack) + indexstack2[len(indexstack)] = j + // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + rgetTypeInfo(ft, indexstack2, fnameToHastag, sfi, siInfo) + continue + } + } + // do not let fields with same name in embedded structs override field at higher level. + // this must be done after anonymous check, to allow anonymous field + // still include their child fields + if _, ok := fnameToHastag[f.Name]; ok { + continue + } + if f.Name == "" { + panic(noFieldNameToStructFieldInfoErr) + } + if si == nil { + si = parseStructFieldInfo(f.Name, stag) + } else if si.encName == "" { + si.encName = f.Name + } + // si.ikind = int(f.Type.Kind()) + if len(indexstack) == 0 { + si.i = int16(j) + } else { + si.i = -1 + si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + } + + if siInfo != nil { + if siInfo.omitEmpty { + si.omitEmpty = true + } + } + *sfi = append(*sfi, si) + fnameToHastag[f.Name] = stag != "" + } +} + +func panicToErr(err *error) { + if recoverPanicToErr { + if x := recover(); x != nil { + //debug.PrintStack() + panicValToErr(x, err) + } + } +} + +// func doPanic(tag string, format string, params ...interface{}) { +// params2 := make([]interface{}, len(params)+1) +// params2[0] = tag +// copy(params2[1:], params) +// panic(fmt.Errorf("%s: "+format, params2...)) +// } + +func isMutableKind(k reflect.Kind) (v bool) { + return false || + k == reflect.Int || + k == reflect.Int8 || + k == reflect.Int16 || + k == reflect.Int32 || + k == reflect.Int64 || + k == reflect.Uint || + k == reflect.Uint8 || + k == reflect.Uint16 || + k == reflect.Uint32 || + k == reflect.Uint64 || + k == reflect.Uintptr || + k == reflect.Float32 || + k == reflect.Float64 || + k == reflect.Bool || + k == reflect.String +} + +// these functions must be inlinable, and not call anybody +type checkOverflow struct{} + +func (_ checkOverflow) Float32(f float64) (overflow bool) { + if f < 0 { + f = -f + } + return math.MaxFloat32 < f && f <= math.MaxFloat64 +} + +func (_ checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) { + if bitsize == 0 || bitsize >= 64 || v == 0 { + return + } + if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc { + overflow = true + } + return +} + +func (_ checkOverflow) Int(v int64, bitsize uint8) (overflow bool) { + if bitsize == 0 || bitsize >= 64 || v == 0 { + return + } + if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc { + overflow = true + } + return +} + +func (_ checkOverflow) SignedInt(v uint64) (i int64, overflow bool) { + //e.g. -127 to 128 for int8 + pos := (v >> 63) == 0 + ui2 := v & 0x7fffffffffffffff + if pos { + if ui2 > math.MaxInt64 { + overflow = true + return + } + } else { + if ui2 > math.MaxInt64-1 { + overflow = true + return + } + } + i = int64(v) + return +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go new file mode 100644 index 0000000..c865246 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go @@ -0,0 +1,151 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// All non-std package dependencies live in this file, +// so porting to different environment is easy (just update functions). + +import ( + "errors" + "fmt" + "math" + "reflect" +) + +func panicValToErr(panicVal interface{}, err *error) { + if panicVal == nil { + return + } + // case nil + switch xerr := panicVal.(type) { + case error: + *err = xerr + case string: + *err = errors.New(xerr) + default: + *err = fmt.Errorf("%v", panicVal) + } + return +} + +func hIsEmptyValue(v reflect.Value, deref, checkStruct bool) bool { + switch v.Kind() { + case reflect.Invalid: + return true + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + if deref { + if v.IsNil() { + return true + } + return hIsEmptyValue(v.Elem(), deref, checkStruct) + } else { + return v.IsNil() + } + case reflect.Struct: + if !checkStruct { + return false + } + // return true if all fields are empty. else return false. + // we cannot use equality check, because some fields may be maps/slices/etc + // and consequently the structs are not comparable. + // return v.Interface() == reflect.Zero(v.Type()).Interface() + for i, n := 0, v.NumField(); i < n; i++ { + if !hIsEmptyValue(v.Field(i), deref, checkStruct) { + return false + } + } + return true + } + return false +} + +func isEmptyValue(v reflect.Value) bool { + return hIsEmptyValue(v, derefForIsEmptyValue, checkStructForEmptyValue) +} + +func pruneSignExt(v []byte, pos bool) (n int) { + if len(v) < 2 { + } else if pos && v[0] == 0 { + for ; v[n] == 0 && n+1 < len(v) && (v[n+1]&(1<<7) == 0); n++ { + } + } else if !pos && v[0] == 0xff { + for ; v[n] == 0xff && n+1 < len(v) && (v[n+1]&(1<<7) != 0); n++ { + } + } + return +} + +func implementsIntf(typ, iTyp reflect.Type) (success bool, indir int8) { + if typ == nil { + return + } + rt := typ + // The type might be a pointer and we need to keep + // dereferencing to the base type until we find an implementation. + for { + if rt.Implements(iTyp) { + return true, indir + } + if p := rt; p.Kind() == reflect.Ptr { + indir++ + if indir >= math.MaxInt8 { // insane number of indirections + return false, 0 + } + rt = p.Elem() + continue + } + break + } + // No luck yet, but if this is a base type (non-pointer), the pointer might satisfy. + if typ.Kind() != reflect.Ptr { + // Not a pointer, but does the pointer work? + if reflect.PtrTo(typ).Implements(iTyp) { + return true, -1 + } + } + return false, 0 +} + +// validate that this function is correct ... +// culled from OGRE (Object-Oriented Graphics Rendering Engine) +// function: halfToFloatI (http://stderr.org/doc/ogre-doc/api/OgreBitwise_8h-source.html) +func halfFloatToFloatBits(yy uint16) (d uint32) { + y := uint32(yy) + s := (y >> 15) & 0x01 + e := (y >> 10) & 0x1f + m := y & 0x03ff + + if e == 0 { + if m == 0 { // plu or minus 0 + return s << 31 + } else { // Denormalized number -- renormalize it + for (m & 0x00000400) == 0 { + m <<= 1 + e -= 1 + } + e += 1 + const zz uint32 = 0x0400 + m &= ^zz + } + } else if e == 31 { + if m == 0 { // Inf + return (s << 31) | 0x7f800000 + } else { // NaN + return (s << 31) | 0x7f800000 | (m << 13) + } + } + e = e + (127 - 15) + m = m << 13 + return (s << 31) | (e << 23) | m +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go new file mode 100644 index 0000000..7c2ffc0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go @@ -0,0 +1,20 @@ +//+build !unsafe + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// stringView returns a view of the []byte as a string. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func stringView(v []byte) string { + return string(v) +} + +// bytesView returns a view of the string as a []byte. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func bytesView(v string) []byte { + return []byte(v) +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go new file mode 100644 index 0000000..685c576 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go @@ -0,0 +1,155 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// All non-std package dependencies related to testing live in this file, +// so porting to different environment is easy (just update functions). +// +// This file sets up the variables used, including testInitFns. +// Each file should add initialization that should be performed +// after flags are parsed. +// +// init is a multi-step process: +// - setup vars (handled by init functions in each file) +// - parse flags +// - setup derived vars (handled by pre-init registered functions - registered in init function) +// - post init (handled by post-init registered functions - registered in init function) +// This way, no one has to manage carefully control the initialization +// using file names, etc. +// +// Tests which require external dependencies need the -tag=x parameter. +// They should be run as: +// go test -tags=x -run=. +// Benchmarks should also take this parameter, to include the sereal, xdr, etc. +// To run against codecgen, etc, make sure you pass extra parameters. +// Example usage: +// go test "-tags=x codecgen unsafe" -bench=. +// +// To fully test everything: +// go test -tags=x -benchtime=100ms -tv -bg -bi -brw -bu -v -run=. -bench=. + +import ( + "errors" + "flag" + "fmt" + "reflect" + "sync" + "testing" +) + +const ( + testLogToT = true + failNowOnFail = true +) + +var ( + testNoopH = NoopHandle(8) + testMsgpackH = &MsgpackHandle{} + testBincH = &BincHandle{} + testBincHNoSym = &BincHandle{} + testBincHSym = &BincHandle{} + testSimpleH = &SimpleHandle{} + testCborH = &CborHandle{} + testJsonH = &JsonHandle{} + + testPreInitFns []func() + testPostInitFns []func() + + testOnce sync.Once +) + +func init() { + testBincHSym.AsSymbols = AsSymbolAll + testBincHNoSym.AsSymbols = AsSymbolNone +} + +func testInitAll() { + flag.Parse() + for _, f := range testPreInitFns { + f() + } + for _, f := range testPostInitFns { + f() + } +} + +func logT(x interface{}, format string, args ...interface{}) { + if t, ok := x.(*testing.T); ok && t != nil && testLogToT { + if testVerbose { + t.Logf(format, args...) + } + } else if b, ok := x.(*testing.B); ok && b != nil && testLogToT { + b.Logf(format, args...) + } else { + if len(format) == 0 || format[len(format)-1] != '\n' { + format = format + "\n" + } + fmt.Printf(format, args...) + } +} + +func approxDataSize(rv reflect.Value) (sum int) { + switch rk := rv.Kind(); rk { + case reflect.Invalid: + case reflect.Ptr, reflect.Interface: + sum += int(rv.Type().Size()) + sum += approxDataSize(rv.Elem()) + case reflect.Slice: + sum += int(rv.Type().Size()) + for j := 0; j < rv.Len(); j++ { + sum += approxDataSize(rv.Index(j)) + } + case reflect.String: + sum += int(rv.Type().Size()) + sum += rv.Len() + case reflect.Map: + sum += int(rv.Type().Size()) + for _, mk := range rv.MapKeys() { + sum += approxDataSize(mk) + sum += approxDataSize(rv.MapIndex(mk)) + } + case reflect.Struct: + //struct size already includes the full data size. + //sum += int(rv.Type().Size()) + for j := 0; j < rv.NumField(); j++ { + sum += approxDataSize(rv.Field(j)) + } + default: + //pure value types + sum += int(rv.Type().Size()) + } + return +} + +// ----- functions below are used only by tests (not benchmarks) + +func checkErrT(t *testing.T, err error) { + if err != nil { + logT(t, err.Error()) + failT(t) + } +} + +func checkEqualT(t *testing.T, v1 interface{}, v2 interface{}, desc string) (err error) { + if err = deepEqual(v1, v2); err != nil { + logT(t, "Not Equal: %s: %v. v1: %v, v2: %v", desc, err, v1, v2) + failT(t) + } + return +} + +func failT(t *testing.T) { + if failNowOnFail { + t.FailNow() + } else { + t.Fail() + } +} + +func deepEqual(v1, v2 interface{}) (err error) { + if !reflect.DeepEqual(v1, v2) { + err = errors.New("Not Match") + } + return +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go new file mode 100644 index 0000000..d799496 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go @@ -0,0 +1,39 @@ +//+build unsafe + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "unsafe" +) + +// This file has unsafe variants of some helper methods. + +type unsafeString struct { + Data uintptr + Len int +} + +type unsafeBytes struct { + Data uintptr + Len int + Cap int +} + +// stringView returns a view of the []byte as a string. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func stringView(v []byte) string { + x := unsafeString{uintptr(unsafe.Pointer(&v[0])), len(v)} + return *(*string)(unsafe.Pointer(&x)) +} + +// bytesView returns a view of the string as a []byte. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func bytesView(v string) []byte { + x := unsafeBytes{uintptr(unsafe.Pointer(&v)), len(v), len(v)} + return *(*[]byte)(unsafe.Pointer(&x)) +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go new file mode 100644 index 0000000..f2f7bce --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go @@ -0,0 +1,1090 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// This json support uses base64 encoding for bytes, because you cannot +// store and read any arbitrary string in json (only unicode). +// +// This library specifically supports UTF-8 for encoding and decoding only. +// +// Note that the library will happily encode/decode things which are not valid +// json e.g. a map[int64]string. We do it for consistency. With valid json, +// we will encode and decode appropriately. +// Users can specify their map type if necessary to force it. +// +// Note: +// - we cannot use strconv.Quote and strconv.Unquote because json quotes/unquotes differently. +// We implement it here. +// - Also, strconv.ParseXXX for floats and integers +// - only works on strings resulting in unnecessary allocation and []byte-string conversion. +// - it does a lot of redundant checks, because json numbers are simpler that what it supports. +// - We parse numbers (floats and integers) directly here. +// We only delegate parsing floats if it is a hairy float which could cause a loss of precision. +// In that case, we delegate to strconv.ParseFloat. +// +// Note: +// - encode does not beautify. There is no whitespace when encoding. +// - rpc calls which take single integer arguments or write single numeric arguments will need care. + +// Top-level methods of json(End|Dec)Driver (which are implementations of (en|de)cDriver +// MUST not call one-another. +// They all must call sep(), and sep() MUST NOT be called more than once for each read. +// If sep() is called and read is not done, you MUST call retryRead so separator wouldn't be read/written twice. + +import ( + "bytes" + "encoding/base64" + "fmt" + "strconv" + "unicode/utf16" + "unicode/utf8" +) + +//-------------------------------- + +var jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} + +var jsonFloat64Pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, +} + +var jsonUint64Pow10 = [...]uint64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, +} + +const ( + // if jsonTrackSkipWhitespace, we track Whitespace and reduce the number of redundant checks. + // Make it a const flag, so that it can be elided during linking if false. + // + // It is not a clear win, because we continually set a flag behind a pointer + // and then check it each time, as opposed to just 4 conditionals on a stack variable. + jsonTrackSkipWhitespace = true + + // If !jsonValidateSymbols, decoding will be faster, by skipping some checks: + // - If we see first character of null, false or true, + // do not validate subsequent characters. + // - e.g. if we see a n, assume null and skip next 3 characters, + // and do not validate they are ull. + // P.S. Do not expect a significant decoding boost from this. + jsonValidateSymbols = true + + // if jsonTruncateMantissa, truncate mantissa if trailing 0's. + // This is important because it could allow some floats to be decoded without + // deferring to strconv.ParseFloat. + jsonTruncateMantissa = true + + // if mantissa >= jsonNumUintCutoff before multiplying by 10, this is an overflow + jsonNumUintCutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) + + // if mantissa >= jsonNumUintMaxVal, this is an overflow + jsonNumUintMaxVal = 1<= slen { + e.bs = e.bs[:slen] + } else { + e.bs = make([]byte, slen) + } + base64.StdEncoding.Encode(e.bs, v) + e.w.writen1('"') + e.w.writeb(e.bs) + e.w.writen1('"') + } else { + // e.EncodeString(c, string(v)) + e.quoteStr(stringView(v)) + } +} + +func (e *jsonEncDriver) EncodeAsis(v []byte) { + if c := e.s.sc.sep(); c != 0 { + e.w.writen1(c) + } + e.w.writeb(v) +} + +func (e *jsonEncDriver) quoteStr(s string) { + // adapted from std pkg encoding/json + const hex = "0123456789abcdef" + w := e.w + w.writen1('"') + start := 0 + for i := 0; i < len(s); { + if b := s[i]; b < utf8.RuneSelf { + if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { + i++ + continue + } + if start < i { + w.writestr(s[start:i]) + } + switch b { + case '\\', '"': + w.writen2('\\', b) + case '\n': + w.writen2('\\', 'n') + case '\r': + w.writen2('\\', 'r') + case '\b': + w.writen2('\\', 'b') + case '\f': + w.writen2('\\', 'f') + case '\t': + w.writen2('\\', 't') + default: + // encode all bytes < 0x20 (except \r, \n). + // also encode < > & to prevent security holes when served to some browsers. + w.writestr(`\u00`) + w.writen2(hex[b>>4], hex[b&0xF]) + } + i++ + start = i + continue + } + c, size := utf8.DecodeRuneInString(s[i:]) + if c == utf8.RuneError && size == 1 { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\ufffd`) + i += size + start = i + continue + } + // U+2028 is LINE SEPARATOR. U+2029 is PARAGRAPH SEPARATOR. + // Both technically valid JSON, but bomb on JSONP, so fix here. + if c == '\u2028' || c == '\u2029' { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\u202`) + w.writen1(hex[c&0xF]) + i += size + start = i + continue + } + i += size + } + if start < len(s) { + w.writestr(s[start:]) + } + w.writen1('"') +} + +//-------------------------------- + +type jsonNum struct { + bytes []byte // may have [+-.eE0-9] + mantissa uint64 // where mantissa ends, and maybe dot begins. + exponent int16 // exponent value. + manOverflow bool + neg bool // started with -. No initial sign in the bytes above. + dot bool // has dot + explicitExponent bool // explicit exponent +} + +func (x *jsonNum) reset() { + x.bytes = x.bytes[:0] + x.manOverflow = false + x.neg = false + x.dot = false + x.explicitExponent = false + x.mantissa = 0 + x.exponent = 0 +} + +// uintExp is called only if exponent > 0. +func (x *jsonNum) uintExp() (n uint64, overflow bool) { + n = x.mantissa + e := x.exponent + if e >= int16(len(jsonUint64Pow10)) { + overflow = true + return + } + n *= jsonUint64Pow10[e] + if n < x.mantissa || n > jsonNumUintMaxVal { + overflow = true + return + } + return + // for i := int16(0); i < e; i++ { + // if n >= jsonNumUintCutoff { + // overflow = true + // return + // } + // n *= 10 + // } + // return +} + +func (x *jsonNum) floatVal() (f float64) { + // We do not want to lose precision. + // Consequently, we will delegate to strconv.ParseFloat if any of the following happen: + // - There are more digits than in math.MaxUint64: 18446744073709551615 (20 digits) + // We expect up to 99.... (19 digits) + // - The mantissa cannot fit into a 52 bits of uint64 + // - The exponent is beyond our scope ie beyong 22. + const uint64MantissaBits = 52 + const maxExponent = int16(len(jsonFloat64Pow10)) - 1 + + parseUsingStrConv := x.manOverflow || + x.exponent > maxExponent || + (x.exponent < 0 && -(x.exponent) > maxExponent) || + x.mantissa>>uint64MantissaBits != 0 + if parseUsingStrConv { + var err error + if f, err = strconv.ParseFloat(stringView(x.bytes), 64); err != nil { + panic(fmt.Errorf("parse float: %s, %v", x.bytes, err)) + return + } + if x.neg { + f = -f + } + return + } + + // all good. so handle parse here. + f = float64(x.mantissa) + // fmt.Printf(".Float: uint64 value: %v, float: %v\n", m, f) + if x.neg { + f = -f + } + if x.exponent > 0 { + f *= jsonFloat64Pow10[x.exponent] + } else if x.exponent < 0 { + f /= jsonFloat64Pow10[-x.exponent] + } + return +} + +type jsonDecDriver struct { + d *Decoder + h *JsonHandle + r decReader // *bytesDecReader decReader + ct valueType // container type. one of unset, array or map. + bstr [8]byte // scratch used for string \UXXX parsing + b [64]byte // scratch + + wsSkipped bool // whitespace skipped + + s jsonStack + + n jsonNum + noBuiltInTypes +} + +// This will skip whitespace characters and return the next byte to read. +// The next byte determines what the value will be one of. +func (d *jsonDecDriver) skipWhitespace(unread bool) (b byte) { + // as initReadNext is not called all the time, we set ct to unSet whenever + // we skipwhitespace, as this is the signal that something new is about to be read. + d.ct = valueTypeUnset + b = d.r.readn1() + if !jsonTrackSkipWhitespace || !d.wsSkipped { + for ; b == ' ' || b == '\t' || b == '\r' || b == '\n'; b = d.r.readn1() { + } + if jsonTrackSkipWhitespace { + d.wsSkipped = true + } + } + if unread { + d.r.unreadn1() + } + return b +} + +func (d *jsonDecDriver) CheckBreak() bool { + b := d.skipWhitespace(true) + return b == '}' || b == ']' +} + +func (d *jsonDecDriver) readStrIdx(fromIdx, toIdx uint8) { + bs := d.r.readx(int(toIdx - fromIdx)) + if jsonValidateSymbols { + if !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) { + d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs) + return + } + } + if jsonTrackSkipWhitespace { + d.wsSkipped = false + } +} + +func (d *jsonDecDriver) TryDecodeAsNil() bool { + // we mustn't consume the state here, and end up trying to read separator twice. + // Instead, we keep track of the state and restore it if we couldn't decode as nil. + + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + b := d.skipWhitespace(false) + if b == 'n' { + d.readStrIdx(10, 13) // ull + d.ct = valueTypeNil + return true + } + d.r.unreadn1() + d.s.sc.retryRead() + return false +} + +func (d *jsonDecDriver) DecodeBool() bool { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + b := d.skipWhitespace(false) + if b == 'f' { + d.readStrIdx(5, 9) // alse + return false + } + if b == 't' { + d.readStrIdx(1, 4) // rue + return true + } + d.d.errorf("json: decode bool: got first char %c", b) + return false // "unreachable" +} + +func (d *jsonDecDriver) ReadMapStart() int { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + d.s.start('}') + d.expectChar('{') + d.ct = valueTypeMap + return -1 +} + +func (d *jsonDecDriver) ReadArrayStart() int { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + d.s.start(']') + d.expectChar('[') + d.ct = valueTypeArray + return -1 +} + +func (d *jsonDecDriver) ReadEnd() { + b := d.s.sc.st + d.s.end() + d.expectChar(b) +} + +func (d *jsonDecDriver) expectChar(c uint8) { + b := d.skipWhitespace(false) + if b != c { + d.d.errorf("json: expect char '%c' but got char '%c'", c, b) + return + } + if jsonTrackSkipWhitespace { + d.wsSkipped = false + } +} + +// func (d *jsonDecDriver) maybeChar(c uint8) { +// b := d.skipWhitespace(false) +// if b != c { +// d.r.unreadn1() +// return +// } +// if jsonTrackSkipWhitespace { +// d.wsSkipped = false +// } +// } + +func (d *jsonDecDriver) IsContainerType(vt valueType) bool { + // check container type by checking the first char + if d.ct == valueTypeUnset { + b := d.skipWhitespace(true) + if b == '{' { + d.ct = valueTypeMap + } else if b == '[' { + d.ct = valueTypeArray + } else if b == 'n' { + d.ct = valueTypeNil + } else if b == '"' { + d.ct = valueTypeString + } + } + if vt == valueTypeNil || vt == valueTypeBytes || vt == valueTypeString || + vt == valueTypeArray || vt == valueTypeMap { + return d.ct == vt + } + // ugorji: made switch into conditionals, so that IsContainerType can be inlined. + // switch vt { + // case valueTypeNil, valueTypeBytes, valueTypeString, valueTypeArray, valueTypeMap: + // return d.ct == vt + // } + d.d.errorf("isContainerType: unsupported parameter: %v", vt) + return false // "unreachable" +} + +func (d *jsonDecDriver) decNum(storeBytes bool) { + // storeBytes = true // TODO: remove. + + // If it is has a . or an e|E, decode as a float; else decode as an int. + b := d.skipWhitespace(false) + if !(b == '+' || b == '-' || b == '.' || (b >= '0' && b <= '9')) { + d.d.errorf("json: decNum: got first char '%c'", b) + return + } + + const cutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) + const jsonNumUintMaxVal = 1<= jsonNumUintCutoff { + n.manOverflow = true + break + } + v := uint64(b - '0') + n.mantissa *= 10 + if v != 0 { + n1 := n.mantissa + v + if n1 < n.mantissa || n1 > jsonNumUintMaxVal { + n.manOverflow = true // n+v overflows + break + } + n.mantissa = n1 + } + case 6: + state = 7 + fallthrough + case 7: + if !(b == '0' && e == 0) { + e = e*10 + int16(b-'0') + } + default: + break LOOP + } + default: + break LOOP + } + if storeBytes { + n.bytes = append(n.bytes, b) + } + b, eof = d.r.readn1eof() + } + + if jsonTruncateMantissa && n.mantissa != 0 { + for n.mantissa%10 == 0 { + n.mantissa /= 10 + n.exponent++ + } + } + + if e != 0 { + if eNeg { + n.exponent -= e + } else { + n.exponent += e + } + } + + // d.n = n + + if !eof { + d.r.unreadn1() + } + if jsonTrackSkipWhitespace { + d.wsSkipped = false + } + // fmt.Printf("1: n: bytes: %s, neg: %v, dot: %v, exponent: %v, mantissaEndIndex: %v\n", + // n.bytes, n.neg, n.dot, n.exponent, n.mantissaEndIndex) + return +} + +func (d *jsonDecDriver) DecodeInt(bitsize uint8) (i int64) { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + d.decNum(false) + n := &d.n + if n.manOverflow { + d.d.errorf("json: overflow integer after: %v", n.mantissa) + return + } + var u uint64 + if n.exponent == 0 { + u = n.mantissa + } else if n.exponent < 0 { + d.d.errorf("json: fractional integer") + return + } else if n.exponent > 0 { + var overflow bool + if u, overflow = n.uintExp(); overflow { + d.d.errorf("json: overflow integer") + return + } + } + i = int64(u) + if n.neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("json: overflow %v bits: %s", bitsize, n.bytes) + return + } + // fmt.Printf("DecodeInt: %v\n", i) + return +} + +func (d *jsonDecDriver) DecodeUint(bitsize uint8) (u uint64) { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + d.decNum(false) + n := &d.n + if n.neg { + d.d.errorf("json: unsigned integer cannot be negative") + return + } + if n.manOverflow { + d.d.errorf("json: overflow integer after: %v", n.mantissa) + return + } + if n.exponent == 0 { + u = n.mantissa + } else if n.exponent < 0 { + d.d.errorf("json: fractional integer") + return + } else if n.exponent > 0 { + var overflow bool + if u, overflow = n.uintExp(); overflow { + d.d.errorf("json: overflow integer") + return + } + } + if chkOvf.Uint(u, bitsize) { + d.d.errorf("json: overflow %v bits: %s", bitsize, n.bytes) + return + } + // fmt.Printf("DecodeUint: %v\n", u) + return +} + +func (d *jsonDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + d.decNum(true) + n := &d.n + f = n.floatVal() + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("json: overflow float32: %v, %s", f, n.bytes) + return + } + return +} + +func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + // No need to call sep here, as d.d.decode() handles it + // if c := d.s.sc.sep(); c != 0 { + // d.expectChar(c) + // } + if ext == nil { + re := rv.(*RawExt) + re.Tag = xtag + d.d.decode(&re.Value) + } else { + var v interface{} + d.d.decode(&v) + ext.UpdateExt(rv, v) + } + return +} + +func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + // zerocopy doesn't matter for json, as the bytes must be parsed. + bs0 := d.appendStringAsBytes(d.b[:0]) + if isstring { + return bs0 + } + slen := base64.StdEncoding.DecodedLen(len(bs0)) + if cap(bs) >= slen { + bsOut = bs[:slen] + } else { + bsOut = make([]byte, slen) + } + slen2, err := base64.StdEncoding.Decode(bsOut, bs0) + if err != nil { + d.d.errorf("json: error decoding base64 binary '%s': %v", bs0, err) + return nil + } + if slen != slen2 { + bsOut = bsOut[:slen2] + } + return +} + +func (d *jsonDecDriver) DecodeString() (s string) { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + return string(d.appendStringAsBytes(d.b[:0])) +} + +func (d *jsonDecDriver) appendStringAsBytes(v []byte) []byte { + d.expectChar('"') + for { + c := d.r.readn1() + if c == '"' { + break + } else if c == '\\' { + c = d.r.readn1() + switch c { + case '"', '\\', '/', '\'': + v = append(v, c) + case 'b': + v = append(v, '\b') + case 'f': + v = append(v, '\f') + case 'n': + v = append(v, '\n') + case 'r': + v = append(v, '\r') + case 't': + v = append(v, '\t') + case 'u': + rr := d.jsonU4(false) + // fmt.Printf("$$$$$$$$$: is surrogate: %v\n", utf16.IsSurrogate(rr)) + if utf16.IsSurrogate(rr) { + rr = utf16.DecodeRune(rr, d.jsonU4(true)) + } + w2 := utf8.EncodeRune(d.bstr[:], rr) + v = append(v, d.bstr[:w2]...) + default: + d.d.errorf("json: unsupported escaped value: %c", c) + return nil + } + } else { + v = append(v, c) + } + } + if jsonTrackSkipWhitespace { + d.wsSkipped = false + } + return v +} + +func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune { + if checkSlashU && !(d.r.readn1() == '\\' && d.r.readn1() == 'u') { + d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`) + return 0 + } + // u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64) + var u uint32 + for i := 0; i < 4; i++ { + v := d.r.readn1() + if '0' <= v && v <= '9' { + v = v - '0' + } else if 'a' <= v && v <= 'z' { + v = v - 'a' + 10 + } else if 'A' <= v && v <= 'Z' { + v = v - 'A' + 10 + } else { + d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, v) + return 0 + } + u = u*16 + uint32(v) + } + return rune(u) +} + +func (d *jsonDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { + if c := d.s.sc.sep(); c != 0 { + d.expectChar(c) + } + n := d.skipWhitespace(true) + switch n { + case 'n': + d.readStrIdx(9, 13) // null + vt = valueTypeNil + case 'f': + d.readStrIdx(4, 9) // false + vt = valueTypeBool + v = false + case 't': + d.readStrIdx(0, 4) // true + vt = valueTypeBool + v = true + case '{': + vt = valueTypeMap + decodeFurther = true + case '[': + vt = valueTypeArray + decodeFurther = true + case '"': + vt = valueTypeString + v = string(d.appendStringAsBytes(d.b[:0])) // same as d.DecodeString(), but skipping sep() call. + default: // number + d.decNum(true) + n := &d.n + // if the string had a any of [.eE], then decode as float. + switch { + case n.explicitExponent, n.dot, n.exponent < 0, n.manOverflow: + vt = valueTypeFloat + v = n.floatVal() + case n.exponent == 0: + u := n.mantissa + switch { + case n.neg: + vt = valueTypeInt + v = -int64(u) + case d.h.SignedInteger: + vt = valueTypeInt + v = int64(u) + default: + vt = valueTypeUint + v = u + } + default: + u, overflow := n.uintExp() + switch { + case overflow: + vt = valueTypeFloat + v = n.floatVal() + case n.neg: + vt = valueTypeInt + v = -int64(u) + case d.h.SignedInteger: + vt = valueTypeInt + v = int64(u) + default: + vt = valueTypeUint + v = u + } + } + // fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v) + } + if decodeFurther { + d.s.sc.retryRead() + } + return +} + +//---------------------- + +// JsonHandle is a handle for JSON encoding format. +// +// Json is comprehensively supported: +// - decodes numbers into interface{} as int, uint or float64 +// - encodes and decodes []byte using base64 Std Encoding +// - UTF-8 support for encoding and decoding +// +// It has better performance than the json library in the standard library, +// by leveraging the performance improvements of the codec library and +// minimizing allocations. +// +// In addition, it doesn't read more bytes than necessary during a decode, which allows +// reading multiple values from a stream containing json and non-json content. +// For example, a user can read a json value, then a cbor value, then a msgpack value, +// all from the same stream in sequence. +type JsonHandle struct { + BasicHandle + textEncodingType +} + +func (h *JsonHandle) newEncDriver(e *Encoder) encDriver { + return &jsonEncDriver{e: e, w: e.w, h: h} +} + +func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { + // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} + hd := jsonDecDriver{d: d, r: d.r, h: h} + hd.n.bytes = d.b[:] + return &hd +} + +var jsonEncodeTerminate = []byte{' '} + +func (h *JsonHandle) rpcEncodeTerminate() []byte { + return jsonEncodeTerminate +} + +var _ decDriver = (*jsonDecDriver)(nil) +var _ encDriver = (*jsonEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go new file mode 100644 index 0000000..7c9f8e6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go @@ -0,0 +1,839 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +MSGPACK + +Msgpack-c implementation powers the c, c++, python, ruby, etc libraries. +We need to maintain compatibility with it and how it encodes integer values +without caring about the type. + +For compatibility with behaviour of msgpack-c reference implementation: + - Go intX (>0) and uintX + IS ENCODED AS + msgpack +ve fixnum, unsigned + - Go intX (<0) + IS ENCODED AS + msgpack -ve fixnum, signed + +*/ +package codec + +import ( + "fmt" + "io" + "math" + "net/rpc" +) + +const ( + mpPosFixNumMin byte = 0x00 + mpPosFixNumMax = 0x7f + mpFixMapMin = 0x80 + mpFixMapMax = 0x8f + mpFixArrayMin = 0x90 + mpFixArrayMax = 0x9f + mpFixStrMin = 0xa0 + mpFixStrMax = 0xbf + mpNil = 0xc0 + _ = 0xc1 + mpFalse = 0xc2 + mpTrue = 0xc3 + mpFloat = 0xca + mpDouble = 0xcb + mpUint8 = 0xcc + mpUint16 = 0xcd + mpUint32 = 0xce + mpUint64 = 0xcf + mpInt8 = 0xd0 + mpInt16 = 0xd1 + mpInt32 = 0xd2 + mpInt64 = 0xd3 + + // extensions below + mpBin8 = 0xc4 + mpBin16 = 0xc5 + mpBin32 = 0xc6 + mpExt8 = 0xc7 + mpExt16 = 0xc8 + mpExt32 = 0xc9 + mpFixExt1 = 0xd4 + mpFixExt2 = 0xd5 + mpFixExt4 = 0xd6 + mpFixExt8 = 0xd7 + mpFixExt16 = 0xd8 + + mpStr8 = 0xd9 // new + mpStr16 = 0xda + mpStr32 = 0xdb + + mpArray16 = 0xdc + mpArray32 = 0xdd + + mpMap16 = 0xde + mpMap32 = 0xdf + + mpNegFixNumMin = 0xe0 + mpNegFixNumMax = 0xff +) + +// MsgpackSpecRpcMultiArgs is a special type which signifies to the MsgpackSpecRpcCodec +// that the backend RPC service takes multiple arguments, which have been arranged +// in sequence in the slice. +// +// The Codec then passes it AS-IS to the rpc service (without wrapping it in an +// array of 1 element). +type MsgpackSpecRpcMultiArgs []interface{} + +// A MsgpackContainer type specifies the different types of msgpackContainers. +type msgpackContainerType struct { + fixCutoff int + bFixMin, b8, b16, b32 byte + hasFixMin, has8, has8Always bool +} + +var ( + msgpackContainerStr = msgpackContainerType{32, mpFixStrMin, mpStr8, mpStr16, mpStr32, true, true, false} + msgpackContainerBin = msgpackContainerType{0, 0, mpBin8, mpBin16, mpBin32, false, true, true} + msgpackContainerList = msgpackContainerType{16, mpFixArrayMin, 0, mpArray16, mpArray32, true, false, false} + msgpackContainerMap = msgpackContainerType{16, mpFixMapMin, 0, mpMap16, mpMap32, true, false, false} +) + +//--------------------------------------------- + +type msgpackEncDriver struct { + e *Encoder + w encWriter + h *MsgpackHandle + noBuiltInTypes + encNoSeparator + x [8]byte +} + +func (e *msgpackEncDriver) EncodeNil() { + e.w.writen1(mpNil) +} + +func (e *msgpackEncDriver) EncodeInt(i int64) { + if i >= 0 { + e.EncodeUint(uint64(i)) + } else if i >= -32 { + e.w.writen1(byte(i)) + } else if i >= math.MinInt8 { + e.w.writen2(mpInt8, byte(i)) + } else if i >= math.MinInt16 { + e.w.writen1(mpInt16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + } else if i >= math.MinInt32 { + e.w.writen1(mpInt32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + } else { + e.w.writen1(mpInt64) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + } +} + +func (e *msgpackEncDriver) EncodeUint(i uint64) { + if i <= math.MaxInt8 { + e.w.writen1(byte(i)) + } else if i <= math.MaxUint8 { + e.w.writen2(mpUint8, byte(i)) + } else if i <= math.MaxUint16 { + e.w.writen1(mpUint16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + } else if i <= math.MaxUint32 { + e.w.writen1(mpUint32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + } else { + e.w.writen1(mpUint64) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + } +} + +func (e *msgpackEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(mpTrue) + } else { + e.w.writen1(mpFalse) + } +} + +func (e *msgpackEncDriver) EncodeFloat32(f float32) { + e.w.writen1(mpFloat) + bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *msgpackEncDriver) EncodeFloat64(f float64) { + e.w.writen1(mpDouble) + bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(v) + if bs == nil { + e.EncodeNil() + return + } + if e.h.WriteExt { + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) + } else { + e.EncodeStringBytes(c_RAW, bs) + } +} + +func (e *msgpackEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *msgpackEncDriver) encodeExtPreamble(xtag byte, l int) { + if l == 1 { + e.w.writen2(mpFixExt1, xtag) + } else if l == 2 { + e.w.writen2(mpFixExt2, xtag) + } else if l == 4 { + e.w.writen2(mpFixExt4, xtag) + } else if l == 8 { + e.w.writen2(mpFixExt8, xtag) + } else if l == 16 { + e.w.writen2(mpFixExt16, xtag) + } else if l < 256 { + e.w.writen2(mpExt8, byte(l)) + e.w.writen1(xtag) + } else if l < 65536 { + e.w.writen1(mpExt16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + e.w.writen1(xtag) + } else { + e.w.writen1(mpExt32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + e.w.writen1(xtag) + } +} + +func (e *msgpackEncDriver) EncodeArrayStart(length int) { + e.writeContainerLen(msgpackContainerList, length) +} + +func (e *msgpackEncDriver) EncodeMapStart(length int) { + e.writeContainerLen(msgpackContainerMap, length) +} + +func (e *msgpackEncDriver) EncodeString(c charEncoding, s string) { + if c == c_RAW && e.h.WriteExt { + e.writeContainerLen(msgpackContainerBin, len(s)) + } else { + e.writeContainerLen(msgpackContainerStr, len(s)) + } + if len(s) > 0 { + e.w.writestr(s) + } +} + +func (e *msgpackEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *msgpackEncDriver) EncodeStringBytes(c charEncoding, bs []byte) { + if c == c_RAW && e.h.WriteExt { + e.writeContainerLen(msgpackContainerBin, len(bs)) + } else { + e.writeContainerLen(msgpackContainerStr, len(bs)) + } + if len(bs) > 0 { + e.w.writeb(bs) + } +} + +func (e *msgpackEncDriver) writeContainerLen(ct msgpackContainerType, l int) { + if ct.hasFixMin && l < ct.fixCutoff { + e.w.writen1(ct.bFixMin | byte(l)) + } else if ct.has8 && l < 256 && (ct.has8Always || e.h.WriteExt) { + e.w.writen2(ct.b8, uint8(l)) + } else if l < 65536 { + e.w.writen1(ct.b16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + } else { + e.w.writen1(ct.b32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + } +} + +//--------------------------------------------- + +type msgpackDecDriver struct { + d *Decoder + r decReader // *Decoder decReader decReaderT + h *MsgpackHandle + b [scratchByteArrayLen]byte + bd byte + bdRead bool + br bool // bytes reader + bdType valueType + noBuiltInTypes + noStreamingCodec + decNoSeparator +} + +// Note: This returns either a primitive (int, bool, etc) for non-containers, +// or a containerType, or a specific type denoting nil or extension. +// It is called when a nil interface{} is passed, leaving it up to the DecDriver +// to introspect the stream and decide how best to decode. +// It deciphers the value by looking at the stream first. +func (d *msgpackDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { + if !d.bdRead { + d.readNextBd() + } + bd := d.bd + + switch bd { + case mpNil: + vt = valueTypeNil + d.bdRead = false + case mpFalse: + vt = valueTypeBool + v = false + case mpTrue: + vt = valueTypeBool + v = true + + case mpFloat: + vt = valueTypeFloat + v = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + case mpDouble: + vt = valueTypeFloat + v = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + + case mpUint8: + vt = valueTypeUint + v = uint64(d.r.readn1()) + case mpUint16: + vt = valueTypeUint + v = uint64(bigen.Uint16(d.r.readx(2))) + case mpUint32: + vt = valueTypeUint + v = uint64(bigen.Uint32(d.r.readx(4))) + case mpUint64: + vt = valueTypeUint + v = uint64(bigen.Uint64(d.r.readx(8))) + + case mpInt8: + vt = valueTypeInt + v = int64(int8(d.r.readn1())) + case mpInt16: + vt = valueTypeInt + v = int64(int16(bigen.Uint16(d.r.readx(2)))) + case mpInt32: + vt = valueTypeInt + v = int64(int32(bigen.Uint32(d.r.readx(4)))) + case mpInt64: + vt = valueTypeInt + v = int64(int64(bigen.Uint64(d.r.readx(8)))) + + default: + switch { + case bd >= mpPosFixNumMin && bd <= mpPosFixNumMax: + // positive fixnum (always signed) + vt = valueTypeInt + v = int64(int8(bd)) + case bd >= mpNegFixNumMin && bd <= mpNegFixNumMax: + // negative fixnum + vt = valueTypeInt + v = int64(int8(bd)) + case bd == mpStr8, bd == mpStr16, bd == mpStr32, bd >= mpFixStrMin && bd <= mpFixStrMax: + if d.h.RawToString { + var rvm string + vt = valueTypeString + v = &rvm + } else { + var rvm = zeroByteSlice + vt = valueTypeBytes + v = &rvm + } + decodeFurther = true + case bd == mpBin8, bd == mpBin16, bd == mpBin32: + var rvm = zeroByteSlice + vt = valueTypeBytes + v = &rvm + decodeFurther = true + case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax: + vt = valueTypeArray + decodeFurther = true + case bd == mpMap16, bd == mpMap32, bd >= mpFixMapMin && bd <= mpFixMapMax: + vt = valueTypeMap + decodeFurther = true + case bd >= mpFixExt1 && bd <= mpFixExt16, bd >= mpExt8 && bd <= mpExt32: + clen := d.readExtLen() + var re RawExt + re.Tag = uint64(d.r.readn1()) + re.Data = d.r.readx(clen) + v = &re + vt = valueTypeExt + default: + d.d.errorf("Nil-Deciphered DecodeValue: %s: hex: %x, dec: %d", msgBadDesc, bd, bd) + return + } + } + if !decodeFurther { + d.bdRead = false + } + if vt == valueTypeUint && d.h.SignedInteger { + d.bdType = valueTypeInt + v = int64(v.(uint64)) + } + return +} + +// int can be decoded from msgpack type: intXXX or uintXXX +func (d *msgpackDecDriver) DecodeInt(bitsize uint8) (i int64) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case mpUint8: + i = int64(uint64(d.r.readn1())) + case mpUint16: + i = int64(uint64(bigen.Uint16(d.r.readx(2)))) + case mpUint32: + i = int64(uint64(bigen.Uint32(d.r.readx(4)))) + case mpUint64: + i = int64(bigen.Uint64(d.r.readx(8))) + case mpInt8: + i = int64(int8(d.r.readn1())) + case mpInt16: + i = int64(int16(bigen.Uint16(d.r.readx(2)))) + case mpInt32: + i = int64(int32(bigen.Uint32(d.r.readx(4)))) + case mpInt64: + i = int64(bigen.Uint64(d.r.readx(8))) + default: + switch { + case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: + i = int64(int8(d.bd)) + case d.bd >= mpNegFixNumMin && d.bd <= mpNegFixNumMax: + i = int64(int8(d.bd)) + default: + d.d.errorf("Unhandled single-byte unsigned integer value: %s: %x", msgBadDesc, d.bd) + return + } + } + // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() + if bitsize > 0 { + if trunc := (i << (64 - bitsize)) >> (64 - bitsize); i != trunc { + d.d.errorf("Overflow int value: %v", i) + return + } + } + d.bdRead = false + return +} + +// uint can be decoded from msgpack type: intXXX or uintXXX +func (d *msgpackDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case mpUint8: + ui = uint64(d.r.readn1()) + case mpUint16: + ui = uint64(bigen.Uint16(d.r.readx(2))) + case mpUint32: + ui = uint64(bigen.Uint32(d.r.readx(4))) + case mpUint64: + ui = bigen.Uint64(d.r.readx(8)) + case mpInt8: + if i := int64(int8(d.r.readn1())); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt16: + if i := int64(int16(bigen.Uint16(d.r.readx(2)))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt32: + if i := int64(int32(bigen.Uint32(d.r.readx(4)))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt64: + if i := int64(bigen.Uint64(d.r.readx(8))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + default: + switch { + case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: + ui = uint64(d.bd) + case d.bd >= mpNegFixNumMin && d.bd <= mpNegFixNumMax: + d.d.errorf("Assigning negative signed value: %v, to unsigned type", int(d.bd)) + return + default: + d.d.errorf("Unhandled single-byte unsigned integer value: %s: %x", msgBadDesc, d.bd) + return + } + } + // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() + if bitsize > 0 { + if trunc := (ui << (64 - bitsize)) >> (64 - bitsize); ui != trunc { + d.d.errorf("Overflow uint value: %v", ui) + return + } + } + d.bdRead = false + return +} + +// float can either be decoded from msgpack type: float, double or intX +func (d *msgpackDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpFloat { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if d.bd == mpDouble { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else { + f = float64(d.DecodeInt(0)) + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("msgpack: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool, fixnum 0 or 1. +func (d *msgpackDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpFalse || d.bd == 0 { + // b = false + } else if d.bd == mpTrue || d.bd == 1 { + b = true + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + var clen int + // ignore isstring. Expect that the bytes may be found from msgpackContainerStr or msgpackContainerBin + if bd := d.bd; bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { + clen = d.readContainerLen(msgpackContainerBin) + } else { + clen = d.readContainerLen(msgpackContainerStr) + } + // println("DecodeBytes: clen: ", clen) + d.bdRead = false + // bytes may be nil, so handle it. if nil, clen=-1. + if clen < 0 { + return nil + } + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *msgpackDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *msgpackDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true + d.bdType = valueTypeUnset +} + +func (d *msgpackDecDriver) IsContainerType(vt valueType) bool { + bd := d.bd + switch vt { + case valueTypeNil: + return bd == mpNil + case valueTypeBytes: + return bd == mpBin8 || bd == mpBin16 || bd == mpBin32 || + (!d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax))) + case valueTypeString: + return d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax)) + case valueTypeArray: + return bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) + case valueTypeMap: + return bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) + } + d.d.errorf("isContainerType: unsupported parameter: %v", vt) + return false // "unreachable" +} + +func (d *msgpackDecDriver) TryDecodeAsNil() (v bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpNil { + d.bdRead = false + v = true + } + return +} + +func (d *msgpackDecDriver) readContainerLen(ct msgpackContainerType) (clen int) { + bd := d.bd + if bd == mpNil { + clen = -1 // to represent nil + } else if bd == ct.b8 { + clen = int(d.r.readn1()) + } else if bd == ct.b16 { + clen = int(bigen.Uint16(d.r.readx(2))) + } else if bd == ct.b32 { + clen = int(bigen.Uint32(d.r.readx(4))) + } else if (ct.bFixMin & bd) == ct.bFixMin { + clen = int(ct.bFixMin ^ bd) + } else { + d.d.errorf("readContainerLen: %s: hex: %x, decimal: %d", msgBadDesc, bd, bd) + return + } + d.bdRead = false + return +} + +func (d *msgpackDecDriver) ReadMapStart() int { + return d.readContainerLen(msgpackContainerMap) +} + +func (d *msgpackDecDriver) ReadArrayStart() int { + return d.readContainerLen(msgpackContainerList) +} + +func (d *msgpackDecDriver) readExtLen() (clen int) { + switch d.bd { + case mpNil: + clen = -1 // to represent nil + case mpFixExt1: + clen = 1 + case mpFixExt2: + clen = 2 + case mpFixExt4: + clen = 4 + case mpFixExt8: + clen = 8 + case mpFixExt16: + clen = 16 + case mpExt8: + clen = int(d.r.readn1()) + case mpExt16: + clen = int(bigen.Uint16(d.r.readx(2))) + case mpExt32: + clen = int(bigen.Uint32(d.r.readx(4))) + default: + d.d.errorf("decoding ext bytes: found unexpected byte: %x", d.bd) + return + } + return +} + +func (d *msgpackDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + xbd := d.bd + if xbd == mpBin8 || xbd == mpBin16 || xbd == mpBin32 { + xbs = d.DecodeBytes(nil, false, true) + } else if xbd == mpStr8 || xbd == mpStr16 || xbd == mpStr32 || + (xbd >= mpFixStrMin && xbd <= mpFixStrMax) { + xbs = d.DecodeBytes(nil, true, true) + } else { + clen := d.readExtLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(clen) + } + d.bdRead = false + return +} + +//-------------------------------------------------- + +//MsgpackHandle is a Handle for the Msgpack Schema-Free Encoding Format. +type MsgpackHandle struct { + BasicHandle + binaryEncodingType + + // RawToString controls how raw bytes are decoded into a nil interface{}. + RawToString bool + + // WriteExt flag supports encoding configured extensions with extension tags. + // It also controls whether other elements of the new spec are encoded (ie Str8). + // + // With WriteExt=false, configured extensions are serialized as raw bytes + // and Str8 is not encoded. + // + // A stream can still be decoded into a typed value, provided an appropriate value + // is provided, but the type cannot be inferred from the stream. If no appropriate + // type is provided (e.g. decoding into a nil interface{}), you get back + // a []byte or string based on the setting of RawToString. + WriteExt bool +} + +func (h *MsgpackHandle) newEncDriver(e *Encoder) encDriver { + return &msgpackEncDriver{e: e, w: e.w, h: h} +} + +func (h *MsgpackHandle) newDecDriver(d *Decoder) decDriver { + return &msgpackDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +//-------------------------------------------------- + +type msgpackSpecRpcCodec struct { + rpcCodec +} + +// /////////////// Spec RPC Codec /////////////////// +func (c *msgpackSpecRpcCodec) WriteRequest(r *rpc.Request, body interface{}) error { + // WriteRequest can write to both a Go service, and other services that do + // not abide by the 1 argument rule of a Go service. + // We discriminate based on if the body is a MsgpackSpecRpcMultiArgs + var bodyArr []interface{} + if m, ok := body.(MsgpackSpecRpcMultiArgs); ok { + bodyArr = ([]interface{})(m) + } else { + bodyArr = []interface{}{body} + } + r2 := []interface{}{0, uint32(r.Seq), r.ServiceMethod, bodyArr} + return c.write(r2, nil, false, true) +} + +func (c *msgpackSpecRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error { + var moe interface{} + if r.Error != "" { + moe = r.Error + } + if moe != nil && body != nil { + body = nil + } + r2 := []interface{}{1, uint32(r.Seq), moe, body} + return c.write(r2, nil, false, true) +} + +func (c *msgpackSpecRpcCodec) ReadResponseHeader(r *rpc.Response) error { + return c.parseCustomHeader(1, &r.Seq, &r.Error) +} + +func (c *msgpackSpecRpcCodec) ReadRequestHeader(r *rpc.Request) error { + return c.parseCustomHeader(0, &r.Seq, &r.ServiceMethod) +} + +func (c *msgpackSpecRpcCodec) ReadRequestBody(body interface{}) error { + if body == nil { // read and discard + return c.read(nil) + } + bodyArr := []interface{}{body} + return c.read(&bodyArr) +} + +func (c *msgpackSpecRpcCodec) parseCustomHeader(expectTypeByte byte, msgid *uint64, methodOrError *string) (err error) { + + if c.isClosed() { + return io.EOF + } + + // We read the response header by hand + // so that the body can be decoded on its own from the stream at a later time. + + const fia byte = 0x94 //four item array descriptor value + // Not sure why the panic of EOF is swallowed above. + // if bs1 := c.dec.r.readn1(); bs1 != fia { + // err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, bs1) + // return + // } + var b byte + b, err = c.br.ReadByte() + if err != nil { + return + } + if b != fia { + err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, b) + return + } + + if err = c.read(&b); err != nil { + return + } + if b != expectTypeByte { + err = fmt.Errorf("Unexpected byte descriptor in header. Expecting %v. Received %v", expectTypeByte, b) + return + } + if err = c.read(msgid); err != nil { + return + } + if err = c.read(methodOrError); err != nil { + return + } + return +} + +//-------------------------------------------------- + +// msgpackSpecRpc is the implementation of Rpc that uses custom communication protocol +// as defined in the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md +type msgpackSpecRpc struct{} + +// MsgpackSpecRpc implements Rpc using the communication protocol defined in +// the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md . +// Its methods (ServerCodec and ClientCodec) return values that implement RpcCodecBuffered. +var MsgpackSpecRpc msgpackSpecRpc + +func (x msgpackSpecRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { + return &msgpackSpecRpcCodec{newRPCCodec(conn, h)} +} + +func (x msgpackSpecRpc) ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec { + return &msgpackSpecRpcCodec{newRPCCodec(conn, h)} +} + +var _ decDriver = (*msgpackDecDriver)(nil) +var _ encDriver = (*msgpackEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go new file mode 100644 index 0000000..bcfe60e --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go @@ -0,0 +1,163 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math/rand" + "time" +) + +// NoopHandle returns a no-op handle. It basically does nothing. +// It is only useful for benchmarking, as it gives an idea of the +// overhead from the codec framework. +// +// LIBRARY USERS: *** DO NOT USE *** +func NoopHandle(slen int) *noopHandle { + h := noopHandle{} + h.rand = rand.New(rand.NewSource(time.Now().UnixNano())) + h.B = make([][]byte, slen) + h.S = make([]string, slen) + for i := 0; i < len(h.S); i++ { + b := make([]byte, i+1) + for j := 0; j < len(b); j++ { + b[j] = 'a' + byte(i) + } + h.B[i] = b + h.S[i] = string(b) + } + return &h +} + +// noopHandle does nothing. +// It is used to simulate the overhead of the codec framework. +type noopHandle struct { + BasicHandle + binaryEncodingType + noopDrv // noopDrv is unexported here, so we can get a copy of it when needed. +} + +type noopDrv struct { + i int + S []string + B [][]byte + mks []bool // stack. if map (true), else if array (false) + mk bool // top of stack. what container are we on? map or array? + ct valueType // last request for IsContainerType. + cb bool // last response for IsContainerType. + rand *rand.Rand +} + +func (h *noopDrv) r(v int) int { return h.rand.Intn(v) } +func (h *noopDrv) m(v int) int { h.i++; return h.i % v } + +func (h *noopDrv) newEncDriver(_ *Encoder) encDriver { return h } +func (h *noopDrv) newDecDriver(_ *Decoder) decDriver { return h } + +// --- encDriver + +// stack functions (for map and array) +func (h *noopDrv) start(b bool) { h.mks = append(h.mks, b); h.mk = b } +func (h *noopDrv) end() { h.mks = h.mks[:len(h.mks)-1]; h.mk = h.mks[len(h.mks)-1] } + +func (h *noopDrv) EncodeBuiltin(rt uintptr, v interface{}) {} +func (h *noopDrv) EncodeNil() {} +func (h *noopDrv) EncodeInt(i int64) {} +func (h *noopDrv) EncodeUint(i uint64) {} +func (h *noopDrv) EncodeBool(b bool) {} +func (h *noopDrv) EncodeFloat32(f float32) {} +func (h *noopDrv) EncodeFloat64(f float64) {} +func (h *noopDrv) EncodeRawExt(re *RawExt, e *Encoder) {} +func (h *noopDrv) EncodeArrayStart(length int) { h.start(true) } +func (h *noopDrv) EncodeMapStart(length int) { h.start(false) } +func (h *noopDrv) EncodeEnd() { h.end() } + +func (h *noopDrv) EncodeString(c charEncoding, v string) {} +func (h *noopDrv) EncodeSymbol(v string) {} +func (h *noopDrv) EncodeStringBytes(c charEncoding, v []byte) {} + +func (h *noopDrv) EncodeExt(rv interface{}, xtag uint64, ext Ext, e *Encoder) {} + +// ---- decDriver +func (h *noopDrv) initReadNext() {} +func (h *noopDrv) CheckBreak() bool { return false } +func (h *noopDrv) IsBuiltinType(rt uintptr) bool { return false } +func (h *noopDrv) DecodeBuiltin(rt uintptr, v interface{}) {} +func (h *noopDrv) DecodeInt(bitsize uint8) (i int64) { return int64(h.m(15)) } +func (h *noopDrv) DecodeUint(bitsize uint8) (ui uint64) { return uint64(h.m(35)) } +func (h *noopDrv) DecodeFloat(chkOverflow32 bool) (f float64) { return float64(h.m(95)) } +func (h *noopDrv) DecodeBool() (b bool) { return h.m(2) == 0 } +func (h *noopDrv) DecodeString() (s string) { return h.S[h.m(8)] } + +// func (h *noopDrv) DecodeStringAsBytes(bs []byte) []byte { return h.DecodeBytes(bs) } + +func (h *noopDrv) DecodeBytes(bs []byte, isstring, zerocopy bool) []byte { return h.B[h.m(len(h.B))] } + +func (h *noopDrv) ReadEnd() { h.start(true) } + +// toggle map/slice +func (h *noopDrv) ReadMapStart() int { h.start(true); return h.m(10) } +func (h *noopDrv) ReadArrayStart() int { h.start(false); return h.m(10) } + +func (h *noopDrv) IsContainerType(vt valueType) bool { + // return h.m(2) == 0 + // handle kStruct + if h.ct == valueTypeMap && vt == valueTypeArray || h.ct == valueTypeArray && vt == valueTypeMap { + h.cb = !h.cb + h.ct = vt + return h.cb + } + // go in a loop and check it. + h.ct = vt + h.cb = h.m(7) == 0 + return h.cb +} +func (h *noopDrv) TryDecodeAsNil() bool { + if h.mk { + return false + } else { + return h.m(8) == 0 + } +} +func (h *noopDrv) DecodeExt(rv interface{}, xtag uint64, ext Ext) uint64 { + return 0 +} + +func (h *noopDrv) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { + // use h.r (random) not h.m() because h.m() could cause the same value to be given. + var sk int + if h.mk { + // if mapkey, do not support values of nil OR bytes, array, map or rawext + sk = h.r(7) + 1 + } else { + sk = h.r(12) + } + switch sk { + case 0: + vt = valueTypeNil + case 1: + vt, v = valueTypeBool, false + case 2: + vt, v = valueTypeBool, true + case 3: + vt, v = valueTypeInt, h.DecodeInt(64) + case 4: + vt, v = valueTypeUint, h.DecodeUint(64) + case 5: + vt, v = valueTypeFloat, h.DecodeFloat(true) + case 6: + vt, v = valueTypeFloat, h.DecodeFloat(false) + case 7: + vt, v = valueTypeString, h.DecodeString() + case 8: + vt, v = valueTypeBytes, h.B[h.m(len(h.B))] + case 9: + vt, decodeFurther = valueTypeArray, true + case 10: + vt, decodeFurther = valueTypeMap, true + default: + vt, v = valueTypeExt, &RawExt{Tag: h.DecodeUint(64), Data: h.B[h.m(len(h.B))]} + } + h.ct = vt + return +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go new file mode 100644 index 0000000..2353263 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go @@ -0,0 +1,3 @@ +package codec + +//go:generate bash prebuild.sh diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh b/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh new file mode 100644 index 0000000..c58f178 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh @@ -0,0 +1,193 @@ +#!/bin/bash + +# _needgen is a helper function to tell if we need to generate files for msgp, codecgen. +_needgen() { + local a="$1" + zneedgen=0 + if [[ ! -e "$a" ]] + then + zneedgen=1 + echo 1 + return 0 + fi + for i in `ls -1 *.go.tmpl gen.go values_test.go` + do + if [[ "$a" -ot "$i" ]] + then + zneedgen=1 + echo 1 + return 0 + fi + done + echo 0 +} + +# _build generates fast-path.go and gen-helper.go. +# +# It is needed because there is some dependency between the generated code +# and the other classes. Consequently, we have to totally remove the +# generated files and put stubs in place, before calling "go run" again +# to recreate them. +_build() { + if ! [[ "${zforce}" == "1" || + "1" == $( _needgen "fast-path.generated.go" ) || + "1" == $( _needgen "gen-helper.generated.go" ) || + "1" == $( _needgen "gen.generated.go" ) || + 1 == 0 ]] + then + return 0 + fi + + # echo "Running prebuild" + if [ "${zbak}" == "1" ] + then + # echo "Backing up old generated files" + _zts=`date '+%m%d%Y_%H%M%S'` + _gg=".generated.go" + [ -e "gen-helper${_gg}" ] && mv gen-helper${_gg} gen-helper${_gg}__${_zts}.bak + [ -e "fast-path${_gg}" ] && mv fast-path${_gg} fast-path${_gg}__${_zts}.bak + # [ -e "safe${_gg}" ] && mv safe${_gg} safe${_gg}__${_zts}.bak + # [ -e "unsafe${_gg}" ] && mv unsafe${_gg} unsafe${_gg}__${_zts}.bak + else + rm -f fast-path.generated.go gen.generated.go gen-helper.generated.go *safe.generated.go *_generated_test.go *.generated_ffjson_expose.go + fi + + cat > gen.generated.go <> gen.generated.go < gen-dec-map.go.tmpl + + cat >> gen.generated.go <> gen.generated.go < gen-dec-array.go.tmpl + + cat >> gen.generated.go < fast-path.generated.go < gen-from-tmpl.generated.go < math.MaxInt64 { + // d.d.errorf("decIntAny: Integer out of range for signed int64: %v", ui) + // return + // } + return +} + +func (d *simpleDecDriver) DecodeInt(bitsize uint8) (i int64) { + ui, neg := d.decCheckInteger() + i, overflow := chkOvf.SignedInt(ui) + if overflow { + d.d.errorf("simple: overflow converting %v to signed integer", ui) + return + } + if neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("simple: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + ui, neg := d.decCheckInteger() + if neg { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdFloat32 { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if d.bd == simpleVdFloat64 { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else { + if d.bd >= simpleVdPosInt && d.bd <= simpleVdNegInt+3 { + f = float64(d.DecodeInt(64)) + } else { + d.d.errorf("Float only valid from float32/64: Invalid descriptor: %v", d.bd) + return + } + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("msgpack: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *simpleDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdTrue { + b = true + } else if d.bd == simpleVdFalse { + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) ReadMapStart() (length int) { + d.bdRead = false + return d.decLen() +} + +func (d *simpleDecDriver) ReadArrayStart() (length int) { + d.bdRead = false + return d.decLen() +} + +func (d *simpleDecDriver) decLen() int { + switch d.bd % 8 { + case 0: + return 0 + case 1: + return int(d.r.readn1()) + case 2: + return int(bigen.Uint16(d.r.readx(2))) + case 3: + ui := uint64(bigen.Uint32(d.r.readx(4))) + if chkOvf.Uint(ui, intBitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return 0 + } + return int(ui) + case 4: + ui := bigen.Uint64(d.r.readx(8)) + if chkOvf.Uint(ui, intBitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return 0 + } + return int(ui) + } + d.d.errorf("decLen: Cannot read length: bd%8 must be in range 0..4. Got: %d", d.bd%8) + return -1 +} + +func (d *simpleDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *simpleDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdNil { + d.bdRead = false + return + } + clen := d.decLen() + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *simpleDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: + l := d.decLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(l) + case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + xbs = d.DecodeBytes(nil, false, true) + default: + d.d.errorf("Invalid d.bd for extensions (Expecting extensions or byte array). Got: 0x%x", d.bd) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { + if !d.bdRead { + d.readNextBd() + } + + switch d.bd { + case simpleVdNil: + vt = valueTypeNil + case simpleVdFalse: + vt = valueTypeBool + v = false + case simpleVdTrue: + vt = valueTypeBool + v = true + case simpleVdPosInt, simpleVdPosInt + 1, simpleVdPosInt + 2, simpleVdPosInt + 3: + if d.h.SignedInteger { + vt = valueTypeInt + v = d.DecodeInt(64) + } else { + vt = valueTypeUint + v = d.DecodeUint(64) + } + case simpleVdNegInt, simpleVdNegInt + 1, simpleVdNegInt + 2, simpleVdNegInt + 3: + vt = valueTypeInt + v = d.DecodeInt(64) + case simpleVdFloat32: + vt = valueTypeFloat + v = d.DecodeFloat(true) + case simpleVdFloat64: + vt = valueTypeFloat + v = d.DecodeFloat(false) + case simpleVdString, simpleVdString + 1, simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: + vt = valueTypeString + v = d.DecodeString() + case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + vt = valueTypeBytes + v = d.DecodeBytes(nil, false, false) + case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: + vt = valueTypeExt + l := d.decLen() + var re RawExt + re.Tag = uint64(d.r.readn1()) + re.Data = d.r.readx(l) + v = &re + case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2, simpleVdArray + 3, simpleVdArray + 4: + vt = valueTypeArray + decodeFurther = true + case simpleVdMap, simpleVdMap + 1, simpleVdMap + 2, simpleVdMap + 3, simpleVdMap + 4: + vt = valueTypeMap + decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) + return + } + + if !decodeFurther { + d.bdRead = false + } + return +} + +//------------------------------------ + +// SimpleHandle is a Handle for a very simple encoding format. +// +// simple is a simplistic codec similar to binc, but not as compact. +// - Encoding of a value is always preceeded by the descriptor byte (bd) +// - True, false, nil are encoded fully in 1 byte (the descriptor) +// - Integers (intXXX, uintXXX) are encoded in 1, 2, 4 or 8 bytes (plus a descriptor byte). +// There are positive (uintXXX and intXXX >= 0) and negative (intXXX < 0) integers. +// - Floats are encoded in 4 or 8 bytes (plus a descriptor byte) +// - Lenght of containers (strings, bytes, array, map, extensions) +// are encoded in 0, 1, 2, 4 or 8 bytes. +// Zero-length containers have no length encoded. +// For others, the number of bytes is given by pow(2, bd%3) +// - maps are encoded as [bd] [length] [[key][value]]... +// - arrays are encoded as [bd] [length] [value]... +// - extensions are encoded as [bd] [length] [tag] [byte]... +// - strings/bytearrays are encoded as [bd] [length] [byte]... +// +// The full spec will be published soon. +type SimpleHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *SimpleHandle) newEncDriver(e *Encoder) encDriver { + return &simpleEncDriver{e: e, w: e.w, h: h} +} + +func (h *SimpleHandle) newDecDriver(d *Decoder) decDriver { + return &simpleDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +var _ decDriver = (*simpleDecDriver)(nil) +var _ encDriver = (*simpleEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json b/Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json new file mode 100644 index 0000000..9028586 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json @@ -0,0 +1,639 @@ +[ + { + "cbor": "AA==", + "hex": "00", + "roundtrip": true, + "decoded": 0 + }, + { + "cbor": "AQ==", + "hex": "01", + "roundtrip": true, + "decoded": 1 + }, + { + "cbor": "Cg==", + "hex": "0a", + "roundtrip": true, + "decoded": 10 + }, + { + "cbor": "Fw==", + "hex": "17", + "roundtrip": true, + "decoded": 23 + }, + { + "cbor": "GBg=", + "hex": "1818", + "roundtrip": true, + "decoded": 24 + }, + { + "cbor": "GBk=", + "hex": "1819", + "roundtrip": true, + "decoded": 25 + }, + { + "cbor": "GGQ=", + "hex": "1864", + "roundtrip": true, + "decoded": 100 + }, + { + "cbor": "GQPo", + "hex": "1903e8", + "roundtrip": true, + "decoded": 1000 + }, + { + "cbor": "GgAPQkA=", + "hex": "1a000f4240", + "roundtrip": true, + "decoded": 1000000 + }, + { + "cbor": "GwAAAOjUpRAA", + "hex": "1b000000e8d4a51000", + "roundtrip": true, + "decoded": 1000000000000 + }, + { + "cbor": "G///////////", + "hex": "1bffffffffffffffff", + "roundtrip": true, + "decoded": 18446744073709551615 + }, + { + "cbor": "wkkBAAAAAAAAAAA=", + "hex": "c249010000000000000000", + "roundtrip": true, + "decoded": 18446744073709551616 + }, + { + "cbor": "O///////////", + "hex": "3bffffffffffffffff", + "roundtrip": true, + "decoded": -18446744073709551616, + "skip": true + }, + { + "cbor": "w0kBAAAAAAAAAAA=", + "hex": "c349010000000000000000", + "roundtrip": true, + "decoded": -18446744073709551617 + }, + { + "cbor": "IA==", + "hex": "20", + "roundtrip": true, + "decoded": -1 + }, + { + "cbor": "KQ==", + "hex": "29", + "roundtrip": true, + "decoded": -10 + }, + { + "cbor": "OGM=", + "hex": "3863", + "roundtrip": true, + "decoded": -100 + }, + { + "cbor": "OQPn", + "hex": "3903e7", + "roundtrip": true, + "decoded": -1000 + }, + { + "cbor": "+QAA", + "hex": "f90000", + "roundtrip": true, + "decoded": 0.0 + }, + { + "cbor": "+YAA", + "hex": "f98000", + "roundtrip": true, + "decoded": -0.0 + }, + { + "cbor": "+TwA", + "hex": "f93c00", + "roundtrip": true, + "decoded": 1.0 + }, + { + "cbor": "+z/xmZmZmZma", + "hex": "fb3ff199999999999a", + "roundtrip": true, + "decoded": 1.1 + }, + { + "cbor": "+T4A", + "hex": "f93e00", + "roundtrip": true, + "decoded": 1.5 + }, + { + "cbor": "+Xv/", + "hex": "f97bff", + "roundtrip": true, + "decoded": 65504.0 + }, + { + "cbor": "+kfDUAA=", + "hex": "fa47c35000", + "roundtrip": true, + "decoded": 100000.0 + }, + { + "cbor": "+n9///8=", + "hex": "fa7f7fffff", + "roundtrip": true, + "decoded": 3.4028234663852886e+38 + }, + { + "cbor": "+3435DyIAHWc", + "hex": "fb7e37e43c8800759c", + "roundtrip": true, + "decoded": 1.0e+300 + }, + { + "cbor": "+QAB", + "hex": "f90001", + "roundtrip": true, + "decoded": 5.960464477539063e-08 + }, + { + "cbor": "+QQA", + "hex": "f90400", + "roundtrip": true, + "decoded": 6.103515625e-05 + }, + { + "cbor": "+cQA", + "hex": "f9c400", + "roundtrip": true, + "decoded": -4.0 + }, + { + "cbor": "+8AQZmZmZmZm", + "hex": "fbc010666666666666", + "roundtrip": true, + "decoded": -4.1 + }, + { + "cbor": "+XwA", + "hex": "f97c00", + "roundtrip": true, + "diagnostic": "Infinity" + }, + { + "cbor": "+X4A", + "hex": "f97e00", + "roundtrip": true, + "diagnostic": "NaN" + }, + { + "cbor": "+fwA", + "hex": "f9fc00", + "roundtrip": true, + "diagnostic": "-Infinity" + }, + { + "cbor": "+n+AAAA=", + "hex": "fa7f800000", + "roundtrip": false, + "diagnostic": "Infinity" + }, + { + "cbor": "+n/AAAA=", + "hex": "fa7fc00000", + "roundtrip": false, + "diagnostic": "NaN" + }, + { + "cbor": "+v+AAAA=", + "hex": "faff800000", + "roundtrip": false, + "diagnostic": "-Infinity" + }, + { + "cbor": "+3/wAAAAAAAA", + "hex": "fb7ff0000000000000", + "roundtrip": false, + "diagnostic": "Infinity" + }, + { + "cbor": "+3/4AAAAAAAA", + "hex": "fb7ff8000000000000", + "roundtrip": false, + "diagnostic": "NaN" + }, + { + "cbor": "+//wAAAAAAAA", + "hex": "fbfff0000000000000", + "roundtrip": false, + "diagnostic": "-Infinity" + }, + { + "cbor": "9A==", + "hex": "f4", + "roundtrip": true, + "decoded": false + }, + { + "cbor": "9Q==", + "hex": "f5", + "roundtrip": true, + "decoded": true + }, + { + "cbor": "9g==", + "hex": "f6", + "roundtrip": true, + "decoded": null + }, + { + "cbor": "9w==", + "hex": "f7", + "roundtrip": true, + "diagnostic": "undefined" + }, + { + "cbor": "8A==", + "hex": "f0", + "roundtrip": true, + "diagnostic": "simple(16)" + }, + { + "cbor": "+Bg=", + "hex": "f818", + "roundtrip": true, + "diagnostic": "simple(24)" + }, + { + "cbor": "+P8=", + "hex": "f8ff", + "roundtrip": true, + "diagnostic": "simple(255)" + }, + { + "cbor": "wHQyMDEzLTAzLTIxVDIwOjA0OjAwWg==", + "hex": "c074323031332d30332d32315432303a30343a30305a", + "roundtrip": true, + "diagnostic": "0(\"2013-03-21T20:04:00Z\")" + }, + { + "cbor": "wRpRS2ew", + "hex": "c11a514b67b0", + "roundtrip": true, + "diagnostic": "1(1363896240)" + }, + { + "cbor": "wftB1FLZ7CAAAA==", + "hex": "c1fb41d452d9ec200000", + "roundtrip": true, + "diagnostic": "1(1363896240.5)" + }, + { + "cbor": "10QBAgME", + "hex": "d74401020304", + "roundtrip": true, + "diagnostic": "23(h'01020304')" + }, + { + "cbor": "2BhFZElFVEY=", + "hex": "d818456449455446", + "roundtrip": true, + "diagnostic": "24(h'6449455446')" + }, + { + "cbor": "2CB2aHR0cDovL3d3dy5leGFtcGxlLmNvbQ==", + "hex": "d82076687474703a2f2f7777772e6578616d706c652e636f6d", + "roundtrip": true, + "diagnostic": "32(\"http://www.example.com\")" + }, + { + "cbor": "QA==", + "hex": "40", + "roundtrip": true, + "diagnostic": "h''" + }, + { + "cbor": "RAECAwQ=", + "hex": "4401020304", + "roundtrip": true, + "diagnostic": "h'01020304'" + }, + { + "cbor": "YA==", + "hex": "60", + "roundtrip": true, + "decoded": "" + }, + { + "cbor": "YWE=", + "hex": "6161", + "roundtrip": true, + "decoded": "a" + }, + { + "cbor": "ZElFVEY=", + "hex": "6449455446", + "roundtrip": true, + "decoded": "IETF" + }, + { + "cbor": "YiJc", + "hex": "62225c", + "roundtrip": true, + "decoded": "\"\\" + }, + { + "cbor": "YsO8", + "hex": "62c3bc", + "roundtrip": true, + "decoded": "ü" + }, + { + "cbor": "Y+awtA==", + "hex": "63e6b0b4", + "roundtrip": true, + "decoded": "水" + }, + { + "cbor": "ZPCQhZE=", + "hex": "64f0908591", + "roundtrip": true, + "decoded": "𐅑" + }, + { + "cbor": "gA==", + "hex": "80", + "roundtrip": true, + "decoded": [ + + ] + }, + { + "cbor": "gwECAw==", + "hex": "83010203", + "roundtrip": true, + "decoded": [ + 1, + 2, + 3 + ] + }, + { + "cbor": "gwGCAgOCBAU=", + "hex": "8301820203820405", + "roundtrip": true, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "mBkBAgMEBQYHCAkKCwwNDg8QERITFBUWFxgYGBk=", + "hex": "98190102030405060708090a0b0c0d0e0f101112131415161718181819", + "roundtrip": true, + "decoded": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ] + }, + { + "cbor": "oA==", + "hex": "a0", + "roundtrip": true, + "decoded": { + } + }, + { + "cbor": "ogECAwQ=", + "hex": "a201020304", + "roundtrip": true, + "skip": true, + "diagnostic": "{1: 2, 3: 4}" + }, + { + "cbor": "omFhAWFiggID", + "hex": "a26161016162820203", + "roundtrip": true, + "decoded": { + "a": 1, + "b": [ + 2, + 3 + ] + } + }, + { + "cbor": "gmFhoWFiYWM=", + "hex": "826161a161626163", + "roundtrip": true, + "decoded": [ + "a", + { + "b": "c" + } + ] + }, + { + "cbor": "pWFhYUFhYmFCYWNhQ2FkYURhZWFF", + "hex": "a56161614161626142616361436164614461656145", + "roundtrip": true, + "decoded": { + "a": "A", + "b": "B", + "c": "C", + "d": "D", + "e": "E" + } + }, + { + "cbor": "X0IBAkMDBAX/", + "hex": "5f42010243030405ff", + "roundtrip": false, + "skip": true, + "diagnostic": "(_ h'0102', h'030405')" + }, + { + "cbor": "f2VzdHJlYWRtaW5n/w==", + "hex": "7f657374726561646d696e67ff", + "roundtrip": false, + "decoded": "streaming" + }, + { + "cbor": "n/8=", + "hex": "9fff", + "roundtrip": false, + "decoded": [ + + ] + }, + { + "cbor": "nwGCAgOfBAX//w==", + "hex": "9f018202039f0405ffff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "nwGCAgOCBAX/", + "hex": "9f01820203820405ff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "gwGCAgOfBAX/", + "hex": "83018202039f0405ff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "gwGfAgP/ggQF", + "hex": "83019f0203ff820405", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "nwECAwQFBgcICQoLDA0ODxAREhMUFRYXGBgYGf8=", + "hex": "9f0102030405060708090a0b0c0d0e0f101112131415161718181819ff", + "roundtrip": false, + "decoded": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ] + }, + { + "cbor": "v2FhAWFinwID//8=", + "hex": "bf61610161629f0203ffff", + "roundtrip": false, + "decoded": { + "a": 1, + "b": [ + 2, + 3 + ] + } + }, + { + "cbor": "gmFhv2FiYWP/", + "hex": "826161bf61626163ff", + "roundtrip": false, + "decoded": [ + "a", + { + "b": "c" + } + ] + }, + { + "cbor": "v2NGdW71Y0FtdCH/", + "hex": "bf6346756ef563416d7421ff", + "roundtrip": false, + "decoded": { + "Fun": true, + "Amt": -2 + } + } +] diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py b/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py new file mode 100644 index 0000000..dfe3b0c --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python + +# This will create golden files in a directory passed to it. +# A Test calls this internally to create the golden files +# So it can process them (so we don't have to checkin the files). + +# Ensure msgpack-python and cbor are installed first, using: +# sudo apt-get install python-dev +# sudo apt-get install python-pip +# pip install --user msgpack-python msgpack-rpc-python cbor + +import cbor, msgpack, msgpackrpc, sys, os, threading + +def get_test_data_list(): + # get list with all primitive types, and a combo type + l0 = [ + -8, + -1616, + -32323232, + -6464646464646464, + 192, + 1616, + 32323232, + 6464646464646464, + 192, + -3232.0, + -6464646464.0, + 3232.0, + 6464646464.0, + False, + True, + None, + u"someday", + u"", + u"bytestring", + 1328176922000002000, + -2206187877999998000, + 270, + -2013855847999995777, + #-6795364578871345152, + ] + l1 = [ + { "true": True, + "false": False }, + { "true": "True", + "false": False, + "uint16(1616)": 1616 }, + { "list": [1616, 32323232, True, -3232.0, {"TRUE":True, "FALSE":False}, [True, False] ], + "int32":32323232, "bool": True, + "LONG STRING": "123456789012345678901234567890123456789012345678901234567890", + "SHORT STRING": "1234567890" }, + { True: "true", 8: False, "false": 0 } + ] + + l = [] + l.extend(l0) + l.append(l0) + l.extend(l1) + return l + +def build_test_data(destdir): + l = get_test_data_list() + for i in range(len(l)): + # packer = msgpack.Packer() + serialized = msgpack.dumps(l[i]) + f = open(os.path.join(destdir, str(i) + '.msgpack.golden'), 'wb') + f.write(serialized) + f.close() + serialized = cbor.dumps(l[i]) + f = open(os.path.join(destdir, str(i) + '.cbor.golden'), 'wb') + f.write(serialized) + f.close() + +def doRpcServer(port, stopTimeSec): + class EchoHandler(object): + def Echo123(self, msg1, msg2, msg3): + return ("1:%s 2:%s 3:%s" % (msg1, msg2, msg3)) + def EchoStruct(self, msg): + return ("%s" % msg) + + addr = msgpackrpc.Address('localhost', port) + server = msgpackrpc.Server(EchoHandler()) + server.listen(addr) + # run thread to stop it after stopTimeSec seconds if > 0 + if stopTimeSec > 0: + def myStopRpcServer(): + server.stop() + t = threading.Timer(stopTimeSec, myStopRpcServer) + t.start() + server.start() + +def doRpcClientToPythonSvc(port): + address = msgpackrpc.Address('localhost', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("Echo123", "A1", "B2", "C3") + print client.call("EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doRpcClientToGoSvc(port): + # print ">>>> port: ", port, " <<<<<" + address = msgpackrpc.Address('localhost', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("TestRpcInt.Echo123", ["A1", "B2", "C3"]) + print client.call("TestRpcInt.EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doMain(args): + if len(args) == 2 and args[0] == "testdata": + build_test_data(args[1]) + elif len(args) == 3 and args[0] == "rpc-server": + doRpcServer(int(args[1]), int(args[2])) + elif len(args) == 2 and args[0] == "rpc-client-python-service": + doRpcClientToPythonSvc(int(args[1])) + elif len(args) == 2 and args[0] == "rpc-client-go-service": + doRpcClientToGoSvc(int(args[1])) + else: + print("Usage: test.py " + + "[testdata|rpc-server|rpc-client-python-service|rpc-client-go-service] ...") + +if __name__ == "__main__": + doMain(sys.argv[1:]) + diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh b/Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh new file mode 100644 index 0000000..f14a4be --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# Run all the different permutations of all the tests. +# This helps ensure that nothing gets broken. + +_run() { + # 1. VARIATIONS: regular (t), canonical (c), IO R/W (i), binc-nosymbols (n), struct2array (s) + # 2. MODE: reflection (r), codecgen (x), codecgen+unsafe (u) + # + # Typically, you would run a combination of one value from a and b. + + ztags="" + local OPTIND + OPTIND=1 + while getopts "xurtcinsvg" flag + do + case "x$flag" in + 'xr') ;; + 'xg') ztags="$ztags codecgen" ;; + 'xx') ztags="$ztags x" ;; + 'xu') ztags="$ztags unsafe" ;; + 'xv') zverbose="-tv" ;; + *) ;; + esac + done + # shift $((OPTIND-1)) + echo ">>>>>>> tags: $ztags" + + OPTIND=1 + while getopts "xurtcinsvg" flag + do + case "x$flag" in + 'xt') echo ">>>>>>> REGULAR "; go test "-tags=$ztags" "$zverbose" ; sleep 2 ;; + 'xc') echo ">>>>>>> CANONICAL "; go test "-tags=$ztags" "$zverbose" -tc; sleep 2 ;; + 'xi') echo ">>>>>>> I/O "; go test "-tags=$ztags" "$zverbose" -ti; sleep 2 ;; + 'xn') echo ">>>>>>> NO_SYMBOLS "; go test "-tags=$ztags" "$zverbose" -tn; sleep 2 ;; + 'xs') echo ">>>>>>> TO_ARRAY "; go test "-tags=$ztags" "$zverbose" -ts; sleep 2 ;; + *) ;; + esac + done + shift $((OPTIND-1)) + + OPTIND=1 +} + +echo ">>>>>>> RUNNING VARIATIONS OF TESTS" +if [[ "x$@" = x ]]; then + # r, x, g, gu + _run "-rtcins" + _run "-xtcins" + _run "-gtcins" + _run "-gutcins" +else + _run "$@" +fi diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go new file mode 100644 index 0000000..733fc3f --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go @@ -0,0 +1,193 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "time" +) + +var ( + timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} +) + +// EncodeTime encodes a time.Time as a []byte, including +// information on the instant in time and UTC offset. +// +// Format Description +// +// A timestamp is composed of 3 components: +// +// - secs: signed integer representing seconds since unix epoch +// - nsces: unsigned integer representing fractional seconds as a +// nanosecond offset within secs, in the range 0 <= nsecs < 1e9 +// - tz: signed integer representing timezone offset in minutes east of UTC, +// and a dst (daylight savings time) flag +// +// When encoding a timestamp, the first byte is the descriptor, which +// defines which components are encoded and how many bytes are used to +// encode secs and nsecs components. *If secs/nsecs is 0 or tz is UTC, it +// is not encoded in the byte array explicitly*. +// +// Descriptor 8 bits are of the form `A B C DDD EE`: +// A: Is secs component encoded? 1 = true +// B: Is nsecs component encoded? 1 = true +// C: Is tz component encoded? 1 = true +// DDD: Number of extra bytes for secs (range 0-7). +// If A = 1, secs encoded in DDD+1 bytes. +// If A = 0, secs is not encoded, and is assumed to be 0. +// If A = 1, then we need at least 1 byte to encode secs. +// DDD says the number of extra bytes beyond that 1. +// E.g. if DDD=0, then secs is represented in 1 byte. +// if DDD=2, then secs is represented in 3 bytes. +// EE: Number of extra bytes for nsecs (range 0-3). +// If B = 1, nsecs encoded in EE+1 bytes (similar to secs/DDD above) +// +// Following the descriptor bytes, subsequent bytes are: +// +// secs component encoded in `DDD + 1` bytes (if A == 1) +// nsecs component encoded in `EE + 1` bytes (if B == 1) +// tz component encoded in 2 bytes (if C == 1) +// +// secs and nsecs components are integers encoded in a BigEndian +// 2-complement encoding format. +// +// tz component is encoded as 2 bytes (16 bits). Most significant bit 15 to +// Least significant bit 0 are described below: +// +// Timezone offset has a range of -12:00 to +14:00 (ie -720 to +840 minutes). +// Bit 15 = have\_dst: set to 1 if we set the dst flag. +// Bit 14 = dst\_on: set to 1 if dst is in effect at the time, or 0 if not. +// Bits 13..0 = timezone offset in minutes. It is a signed integer in Big Endian format. +// +func encodeTime(t time.Time) []byte { + //t := rv.Interface().(time.Time) + tsecs, tnsecs := t.Unix(), t.Nanosecond() + var ( + bd byte + btmp [8]byte + bs [16]byte + i int = 1 + ) + l := t.Location() + if l == time.UTC { + l = nil + } + if tsecs != 0 { + bd = bd | 0x80 + bigen.PutUint64(btmp[:], uint64(tsecs)) + f := pruneSignExt(btmp[:], tsecs >= 0) + bd = bd | (byte(7-f) << 2) + copy(bs[i:], btmp[f:]) + i = i + (8 - f) + } + if tnsecs != 0 { + bd = bd | 0x40 + bigen.PutUint32(btmp[:4], uint32(tnsecs)) + f := pruneSignExt(btmp[:4], true) + bd = bd | byte(3-f) + copy(bs[i:], btmp[f:4]) + i = i + (4 - f) + } + if l != nil { + bd = bd | 0x20 + // Note that Go Libs do not give access to dst flag. + _, zoneOffset := t.Zone() + //zoneName, zoneOffset := t.Zone() + zoneOffset /= 60 + z := uint16(zoneOffset) + bigen.PutUint16(btmp[:2], z) + // clear dst flags + bs[i] = btmp[0] & 0x3f + bs[i+1] = btmp[1] + i = i + 2 + } + bs[0] = bd + return bs[0:i] +} + +// DecodeTime decodes a []byte into a time.Time. +func decodeTime(bs []byte) (tt time.Time, err error) { + bd := bs[0] + var ( + tsec int64 + tnsec uint32 + tz uint16 + i byte = 1 + i2 byte + n byte + ) + if bd&(1<<7) != 0 { + var btmp [8]byte + n = ((bd >> 2) & 0x7) + 1 + i2 = i + n + copy(btmp[8-n:], bs[i:i2]) + //if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) + if bs[i]&(1<<7) != 0 { + copy(btmp[0:8-n], bsAll0xff) + //for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } + } + i = i2 + tsec = int64(bigen.Uint64(btmp[:])) + } + if bd&(1<<6) != 0 { + var btmp [4]byte + n = (bd & 0x3) + 1 + i2 = i + n + copy(btmp[4-n:], bs[i:i2]) + i = i2 + tnsec = bigen.Uint32(btmp[:]) + } + if bd&(1<<5) == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + return + } + // In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name. + // However, we need name here, so it can be shown when time is printed. + // Zone name is in form: UTC-08:00. + // Note that Go Libs do not give access to dst flag, so we ignore dst bits + + i2 = i + 2 + tz = bigen.Uint16(bs[i:i2]) + i = i2 + // sign extend sign bit into top 2 MSB (which were dst bits): + if tz&(1<<13) == 0 { // positive + tz = tz & 0x3fff //clear 2 MSBs: dst bits + } else { // negative + tz = tz | 0xc000 //set 2 MSBs: dst bits + //tzname[3] = '-' (TODO: verify. this works here) + } + tzint := int16(tz) + if tzint == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + } else { + // For Go Time, do not use a descriptive timezone. + // It's unnecessary, and makes it harder to do a reflect.DeepEqual. + // The Offset already tells what the offset should be, if not on UTC and unknown zone name. + // var zoneName = timeLocUTCName(tzint) + tt = time.Unix(tsec, int64(tnsec)).In(time.FixedZone("", int(tzint)*60)) + } + return +} + +func timeLocUTCName(tzint int16) string { + if tzint == 0 { + return "UTC" + } + var tzname = []byte("UTC+00:00") + //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below. + //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first + var tzhr, tzmin int16 + if tzint < 0 { + tzname[3] = '-' // (TODO: verify. this works here) + tzhr, tzmin = -tzint/60, (-tzint)%60 + } else { + tzhr, tzmin = tzint/60, tzint%60 + } + tzname[4] = timeDigits[tzhr/10] + tzname[5] = timeDigits[tzhr%10] + tzname[7] = timeDigits[tzmin/10] + tzname[8] = timeDigits[tzmin%10] + return string(tzname) + //return time.FixedZone(string(tzname), int(tzint)*60) +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go new file mode 100644 index 0000000..4ec28e1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go @@ -0,0 +1,203 @@ +// // +build testing + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// This file contains values used by tests and benchmarks. +// JSON/BSON do not like maps with keys that are not strings, +// so we only use maps with string keys here. + +import ( + "math" + "time" +) + +var testStrucTime = time.Date(2012, 2, 2, 2, 2, 2, 2000, time.UTC).UTC() + +type AnonInTestStruc struct { + AS string + AI64 int64 + AI16 int16 + AUi64 uint64 + ASslice []string + AI64slice []int64 + AF64slice []float64 + // AMI32U32 map[int32]uint32 + // AMU32F64 map[uint32]float64 // json/bson do not like it + AMSU16 map[string]uint16 +} + +type AnonInTestStrucIntf struct { + Islice []interface{} + Ms map[string]interface{} + Nintf interface{} //don't set this, so we can test for nil + T time.Time +} + +type TestStruc struct { + _struct struct{} `codec:",omitempty"` //set omitempty for every field + + S string + I64 int64 + I16 int16 + Ui64 uint64 + Ui8 uint8 + B bool + By uint8 // byte: msgp doesn't like byte + + Sslice []string + I64slice []int64 + I16slice []int16 + Ui64slice []uint64 + Ui8slice []uint8 + Bslice []bool + Byslice []byte + + Iptrslice []*int64 + + // TODO: test these separately, specifically for reflection and codecgen. + // Unfortunately, ffjson doesn't support these. Its compilation even fails. + // Ui64array [4]uint64 + // Ui64slicearray [][4]uint64 + + AnonInTestStruc + + //M map[interface{}]interface{} `json:"-",bson:"-"` + Msi64 map[string]int64 + + // make this a ptr, so that it could be set or not. + // for comparison (e.g. with msgp), give it a struct tag (so it is not inlined), + // make this one omitempty (so it is included if nil). + *AnonInTestStrucIntf `codec:",omitempty"` + + Nmap map[string]bool //don't set this, so we can test for nil + Nslice []byte //don't set this, so we can test for nil + Nint64 *int64 //don't set this, so we can test for nil + Mtsptr map[string]*TestStruc + Mts map[string]TestStruc + Its []*TestStruc + Nteststruc *TestStruc +} + +// small struct for testing that codecgen works for unexported types +type tLowerFirstLetter struct { + I int + u uint64 + S string + b []byte +} + +func newTestStruc(depth int, bench bool, useInterface, useStringKeyOnly bool) (ts *TestStruc) { + var i64a, i64b, i64c, i64d int64 = 64, 6464, 646464, 64646464 + + ts = &TestStruc{ + S: "some string", + I64: math.MaxInt64 * 2 / 3, // 64, + I16: 1616, + Ui64: uint64(int64(math.MaxInt64 * 2 / 3)), // 64, //don't use MaxUint64, as bson can't write it + Ui8: 160, + B: true, + By: 5, + + Sslice: []string{"one", "two", "three"}, + I64slice: []int64{1111, 2222, 3333}, + I16slice: []int16{44, 55, 66}, + Ui64slice: []uint64{12121212, 34343434, 56565656}, + Ui8slice: []uint8{210, 211, 212}, + Bslice: []bool{true, false, true, false}, + Byslice: []byte{13, 14, 15}, + + Msi64: map[string]int64{ + "one": 1, + "two": 2, + }, + AnonInTestStruc: AnonInTestStruc{ + // There's more leeway in altering this. + AS: "A-String", + AI64: -64646464, + AI16: 1616, + AUi64: 64646464, + // (U+1D11E)G-clef character may be represented in json as "\uD834\uDD1E". + // single reverse solidus character may be represented in json as "\u005C". + // include these in ASslice below. + ASslice: []string{"Aone", "Atwo", "Athree", + "Afour.reverse_solidus.\u005c", "Afive.Gclef.\U0001d11E"}, + AI64slice: []int64{1, -22, 333, -4444, 55555, -666666}, + AMSU16: map[string]uint16{"1": 1, "22": 2, "333": 3, "4444": 4}, + AF64slice: []float64{11.11e-11, 22.22E+22, 33.33E-33, 44.44e+44, 555.55E-6, 666.66E6}, + }, + } + if useInterface { + ts.AnonInTestStrucIntf = &AnonInTestStrucIntf{ + Islice: []interface{}{"true", true, "no", false, uint64(288), float64(0.4)}, + Ms: map[string]interface{}{ + "true": "true", + "int64(9)": false, + }, + T: testStrucTime, + } + } + + //For benchmarks, some things will not work. + if !bench { + //json and bson require string keys in maps + //ts.M = map[interface{}]interface{}{ + // true: "true", + // int8(9): false, + //} + //gob cannot encode nil in element in array (encodeArray: nil element) + ts.Iptrslice = []*int64{nil, &i64a, nil, &i64b, nil, &i64c, nil, &i64d, nil} + // ts.Iptrslice = nil + } + if !useStringKeyOnly { + // ts.AnonInTestStruc.AMU32F64 = map[uint32]float64{1: 1, 2: 2, 3: 3} // Json/Bson barf + } + if depth > 0 { + depth-- + if ts.Mtsptr == nil { + ts.Mtsptr = make(map[string]*TestStruc) + } + if ts.Mts == nil { + ts.Mts = make(map[string]TestStruc) + } + ts.Mtsptr["0"] = newTestStruc(depth, bench, useInterface, useStringKeyOnly) + ts.Mts["0"] = *(ts.Mtsptr["0"]) + ts.Its = append(ts.Its, ts.Mtsptr["0"]) + } + return +} + +// Some other types + +type Sstring string +type Bbool bool +type Sstructsmall struct { + A int +} + +type Sstructbig struct { + A int + B bool + c string + // Sval Sstruct + Ssmallptr *Sstructsmall + Ssmall *Sstructsmall + Sptr *Sstructbig +} + +type SstructbigMapBySlice struct { + _struct struct{} `codec:",toarray"` + A int + B bool + c string + // Sval Sstruct + Ssmallptr *Sstructsmall + Ssmall *Sstructsmall + Sptr *Sstructbig +} + +type Sinterface interface { + Noop() +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context.go b/Godeps/_workspace/src/golang.org/x/net/context/context.go new file mode 100644 index 0000000..ef2f3e8 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/context.go @@ -0,0 +1,447 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out <-chan Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it's is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, &c) + return &c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) cancelCtx { + return cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return &c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context_test.go b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go new file mode 100644 index 0000000..e64afa6 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go @@ -0,0 +1,575 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context + +import ( + "fmt" + "math/rand" + "runtime" + "strings" + "sync" + "testing" + "time" +) + +// otherContext is a Context that's not one of the types defined in context.go. +// This lets us test code paths that differ based on the underlying type of the +// Context. +type otherContext struct { + Context +} + +func TestBackground(t *testing.T) { + c := Background() + if c == nil { + t.Fatalf("Background returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.Background"; got != want { + t.Errorf("Background().String() = %q want %q", got, want) + } +} + +func TestTODO(t *testing.T) { + c := TODO() + if c == nil { + t.Fatalf("TODO returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.TODO"; got != want { + t.Errorf("TODO().String() = %q want %q", got, want) + } +} + +func TestWithCancel(t *testing.T) { + c1, cancel := WithCancel(Background()) + + if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { + t.Errorf("c1.String() = %q want %q", got, want) + } + + o := otherContext{c1} + c2, _ := WithCancel(o) + contexts := []Context{c1, o, c2} + + for i, c := range contexts { + if d := c.Done(); d == nil { + t.Errorf("c[%d].Done() == %v want non-nil", i, d) + } + if e := c.Err(); e != nil { + t.Errorf("c[%d].Err() == %v want nil", i, e) + } + + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + } + + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + + for i, c := range contexts { + select { + case <-c.Done(): + default: + t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) + } + if e := c.Err(); e != Canceled { + t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) + } + } +} + +func TestParentFinishesChild(t *testing.T) { + // Context tree: + // parent -> cancelChild + // parent -> valueChild -> timerChild + parent, cancel := WithCancel(Background()) + cancelChild, stop := WithCancel(parent) + defer stop() + valueChild := WithValue(parent, "key", "value") + timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) + defer stop() + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-cancelChild.Done(): + t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) + case x := <-timerChild.Done(): + t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) + case x := <-valueChild.Done(): + t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) + default: + } + + // The parent's children should contain the two cancelable children. + pc := parent.(*cancelCtx) + cc := cancelChild.(*cancelCtx) + tc := timerChild.(*timerCtx) + pc.mu.Lock() + if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { + t.Errorf("bad linkage: pc.children = %v, want %v and %v", + pc.children, cc, tc) + } + pc.mu.Unlock() + + if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) + } + if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) + } + + cancel() + + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) + } + pc.mu.Unlock() + + // parent and children should all be finished. + check := func(ctx Context, name string) { + select { + case <-ctx.Done(): + default: + t.Errorf("<-%s.Done() blocked, but shouldn't have", name) + } + if e := ctx.Err(); e != Canceled { + t.Errorf("%s.Err() == %v want %v", name, e, Canceled) + } + } + check(parent, "parent") + check(cancelChild, "cancelChild") + check(valueChild, "valueChild") + check(timerChild, "timerChild") + + // WithCancel should return a canceled context on a canceled parent. + precanceledChild := WithValue(parent, "key", "value") + select { + case <-precanceledChild.Done(): + default: + t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") + } + if e := precanceledChild.Err(); e != Canceled { + t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) + } +} + +func TestChildFinishesFirst(t *testing.T) { + cancelable, stop := WithCancel(Background()) + defer stop() + for _, parent := range []Context{Background(), cancelable} { + child, cancel := WithCancel(parent) + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-child.Done(): + t.Errorf("<-child.Done() == %v want nothing (it should block)", x) + default: + } + + cc := child.(*cancelCtx) + pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() + if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { + t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) + } + + if pcok { + pc.mu.Lock() + if len(pc.children) != 1 || !pc.children[cc] { + t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) + } + pc.mu.Unlock() + } + + cancel() + + if pcok { + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) + } + pc.mu.Unlock() + } + + // child should be finished. + select { + case <-child.Done(): + default: + t.Errorf("<-child.Done() blocked, but shouldn't have") + } + if e := child.Err(); e != Canceled { + t.Errorf("child.Err() == %v want %v", e, Canceled) + } + + // parent should not be finished. + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + default: + } + if e := parent.Err(); e != nil { + t.Errorf("parent.Err() == %v want nil", e) + } + } +} + +func testDeadline(c Context, wait time.Duration, t *testing.T) { + select { + case <-time.After(wait): + t.Fatalf("context should have timed out") + case <-c.Done(): + } + if e := c.Err(); e != DeadlineExceeded { + t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) + } +} + +func TestDeadline(t *testing.T) { + c, _ := WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 200*time.Millisecond, t) + + c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + o := otherContext{c} + testDeadline(o, 200*time.Millisecond, t) + + c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + o = otherContext{c} + c, _ = WithDeadline(o, time.Now().Add(300*time.Millisecond)) + testDeadline(c, 200*time.Millisecond, t) +} + +func TestTimeout(t *testing.T) { + c, _ := WithTimeout(Background(), 100*time.Millisecond) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 200*time.Millisecond, t) + + c, _ = WithTimeout(Background(), 100*time.Millisecond) + o := otherContext{c} + testDeadline(o, 200*time.Millisecond, t) + + c, _ = WithTimeout(Background(), 100*time.Millisecond) + o = otherContext{c} + c, _ = WithTimeout(o, 300*time.Millisecond) + testDeadline(c, 200*time.Millisecond, t) +} + +func TestCanceledTimeout(t *testing.T) { + c, _ := WithTimeout(Background(), 200*time.Millisecond) + o := otherContext{c} + c, cancel := WithTimeout(o, 400*time.Millisecond) + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + select { + case <-c.Done(): + default: + t.Errorf("<-c.Done() blocked, but shouldn't have") + } + if e := c.Err(); e != Canceled { + t.Errorf("c.Err() == %v want %v", e, Canceled) + } +} + +type key1 int +type key2 int + +var k1 = key1(1) +var k2 = key2(1) // same int as k1, different type +var k3 = key2(3) // same type as k2, different int + +func TestValues(t *testing.T) { + check := func(c Context, nm, v1, v2, v3 string) { + if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { + t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) + } + if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { + t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) + } + if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { + t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) + } + } + + c0 := Background() + check(c0, "c0", "", "", "") + + c1 := WithValue(Background(), k1, "c1k1") + check(c1, "c1", "c1k1", "", "") + + if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { + t.Errorf("c.String() = %q want %q", got, want) + } + + c2 := WithValue(c1, k2, "c2k2") + check(c2, "c2", "c1k1", "c2k2", "") + + c3 := WithValue(c2, k3, "c3k3") + check(c3, "c2", "c1k1", "c2k2", "c3k3") + + c4 := WithValue(c3, k1, nil) + check(c4, "c4", "", "c2k2", "c3k3") + + o0 := otherContext{Background()} + check(o0, "o0", "", "", "") + + o1 := otherContext{WithValue(Background(), k1, "c1k1")} + check(o1, "o1", "c1k1", "", "") + + o2 := WithValue(o1, k2, "o2k2") + check(o2, "o2", "c1k1", "o2k2", "") + + o3 := otherContext{c4} + check(o3, "o3", "", "c2k2", "c3k3") + + o4 := WithValue(o3, k3, nil) + check(o4, "o4", "", "c2k2", "") +} + +func TestAllocs(t *testing.T) { + bg := Background() + for _, test := range []struct { + desc string + f func() + limit float64 + gccgoLimit float64 + }{ + { + desc: "Background()", + f: func() { Background() }, + limit: 0, + gccgoLimit: 0, + }, + { + desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), + f: func() { + c := WithValue(bg, k1, nil) + c.Value(k1) + }, + limit: 3, + gccgoLimit: 3, + }, + { + desc: "WithTimeout(bg, 15*time.Millisecond)", + f: func() { + c, _ := WithTimeout(bg, 15*time.Millisecond) + <-c.Done() + }, + limit: 8, + gccgoLimit: 15, + }, + { + desc: "WithCancel(bg)", + f: func() { + c, cancel := WithCancel(bg) + cancel() + <-c.Done() + }, + limit: 5, + gccgoLimit: 8, + }, + { + desc: "WithTimeout(bg, 100*time.Millisecond)", + f: func() { + c, cancel := WithTimeout(bg, 100*time.Millisecond) + cancel() + <-c.Done() + }, + limit: 8, + gccgoLimit: 25, + }, + } { + limit := test.limit + if runtime.Compiler == "gccgo" { + // gccgo does not yet do escape analysis. + // TOOD(iant): Remove this when gccgo does do escape analysis. + limit = test.gccgoLimit + } + if n := testing.AllocsPerRun(100, test.f); n > limit { + t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) + } + } +} + +func TestSimultaneousCancels(t *testing.T) { + root, cancel := WithCancel(Background()) + m := map[Context]CancelFunc{root: cancel} + q := []Context{root} + // Create a tree of contexts. + for len(q) != 0 && len(m) < 100 { + parent := q[0] + q = q[1:] + for i := 0; i < 4; i++ { + ctx, cancel := WithCancel(parent) + m[ctx] = cancel + q = append(q, ctx) + } + } + // Start all the cancels in a random order. + var wg sync.WaitGroup + wg.Add(len(m)) + for _, cancel := range m { + go func(cancel CancelFunc) { + cancel() + wg.Done() + }(cancel) + } + // Wait on all the contexts in a random order. + for ctx := range m { + select { + case <-ctx.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) + } + } + // Wait for all the cancel functions to return. + done := make(chan struct{}) + go func() { + wg.Wait() + close(done) + }() + select { + case <-done: + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) + } +} + +func TestInterlockedCancels(t *testing.T) { + parent, cancelParent := WithCancel(Background()) + child, cancelChild := WithCancel(parent) + go func() { + parent.Done() + cancelChild() + }() + cancelParent() + select { + case <-child.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) + } +} + +func TestLayersCancel(t *testing.T) { + testLayers(t, time.Now().UnixNano(), false) +} + +func TestLayersTimeout(t *testing.T) { + testLayers(t, time.Now().UnixNano(), true) +} + +func testLayers(t *testing.T, seed int64, testTimeout bool) { + rand.Seed(seed) + errorf := func(format string, a ...interface{}) { + t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) + } + const ( + timeout = 200 * time.Millisecond + minLayers = 30 + ) + type value int + var ( + vals []*value + cancels []CancelFunc + numTimers int + ctx = Background() + ) + for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { + switch rand.Intn(3) { + case 0: + v := new(value) + ctx = WithValue(ctx, v, v) + vals = append(vals, v) + case 1: + var cancel CancelFunc + ctx, cancel = WithCancel(ctx) + cancels = append(cancels, cancel) + case 2: + var cancel CancelFunc + ctx, cancel = WithTimeout(ctx, timeout) + cancels = append(cancels, cancel) + numTimers++ + } + } + checkValues := func(when string) { + for _, key := range vals { + if val := ctx.Value(key).(*value); key != val { + errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) + } + } + } + select { + case <-ctx.Done(): + errorf("ctx should not be canceled yet") + default: + } + if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { + t.Errorf("ctx.String() = %q want prefix %q", s, prefix) + } + t.Log(ctx) + checkValues("before cancel") + if testTimeout { + select { + case <-ctx.Done(): + case <-time.After(timeout + timeout/10): + errorf("ctx should have timed out") + } + checkValues("after timeout") + } else { + cancel := cancels[rand.Intn(len(cancels))] + cancel() + select { + case <-ctx.Done(): + default: + errorf("ctx should be canceled") + } + checkValues("after cancel") + } +} + +func TestCancelRemoves(t *testing.T) { + checkChildren := func(when string, ctx Context, want int) { + if got := len(ctx.(*cancelCtx).children); got != want { + t.Errorf("%s: context has %d children, want %d", when, got, want) + } + } + + ctx, _ := WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel := WithCancel(ctx) + checkChildren("with WithCancel child ", ctx, 1) + cancel() + checkChildren("after cancelling WithCancel child", ctx, 0) + + ctx, _ = WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel = WithTimeout(ctx, 60*time.Minute) + checkChildren("with WithTimeout child ", ctx, 1) + cancel() + checkChildren("after cancelling WithTimeout child", ctx, 0) +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go new file mode 100644 index 0000000..48610e3 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go @@ -0,0 +1,18 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.5 + +package ctxhttp + +import "net/http" + +func canceler(client *http.Client, req *http.Request) func() { + ch := make(chan struct{}) + req.Cancel = ch + + return func() { + close(ch) + } +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go new file mode 100644 index 0000000..56bcbad --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go @@ -0,0 +1,23 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.5 + +package ctxhttp + +import "net/http" + +type requestCanceler interface { + CancelRequest(*http.Request) +} + +func canceler(client *http.Client, req *http.Request) func() { + rc, ok := client.Transport.(requestCanceler) + if !ok { + return func() {} + } + return func() { + rc.CancelRequest(req) + } +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go new file mode 100644 index 0000000..9f34888 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go @@ -0,0 +1,79 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ctxhttp provides helper functions for performing context-aware HTTP requests. +package ctxhttp + +import ( + "io" + "net/http" + "net/url" + "strings" + + "golang.org/x/net/context" +) + +// Do sends an HTTP request with the provided http.Client and returns an HTTP response. +// If the client is nil, http.DefaultClient is used. +// If the context is canceled or times out, ctx.Err() will be returned. +func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { + if client == nil { + client = http.DefaultClient + } + + // Request cancelation changed in Go 1.5, see cancelreq.go and cancelreq_go14.go. + cancel := canceler(client, req) + + type responseAndError struct { + resp *http.Response + err error + } + result := make(chan responseAndError, 1) + + go func() { + resp, err := client.Do(req) + result <- responseAndError{resp, err} + }() + + select { + case <-ctx.Done(): + cancel() + return nil, ctx.Err() + case r := <-result: + return r.resp, r.err + } +} + +// Get issues a GET request via the Do function. +func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return nil, err + } + return Do(ctx, client, req) +} + +// Head issues a HEAD request via the Do function. +func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { + req, err := http.NewRequest("HEAD", url, nil) + if err != nil { + return nil, err + } + return Do(ctx, client, req) +} + +// Post issues a POST request via the Do function. +func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { + req, err := http.NewRequest("POST", url, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", bodyType) + return Do(ctx, client, req) +} + +// PostForm issues a POST request via the Do function. +func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { + return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go new file mode 100644 index 0000000..47b53d7 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go @@ -0,0 +1,72 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ctxhttp + +import ( + "io/ioutil" + "net/http" + "net/http/httptest" + "testing" + "time" + + "golang.org/x/net/context" +) + +const ( + requestDuration = 100 * time.Millisecond + requestBody = "ok" +) + +func TestNoTimeout(t *testing.T) { + ctx := context.Background() + resp, err := doRequest(ctx) + + if resp == nil || err != nil { + t.Fatalf("error received from client: %v %v", err, resp) + } +} +func TestCancel(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + go func() { + time.Sleep(requestDuration / 2) + cancel() + }() + + resp, err := doRequest(ctx) + + if resp != nil || err == nil { + t.Fatalf("expected error, didn't get one. resp: %v", resp) + } + if err != ctx.Err() { + t.Fatalf("expected error from context but got: %v", err) + } +} + +func TestCancelAfterRequest(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + + resp, err := doRequest(ctx) + + // Cancel before reading the body. + // Request.Body should still be readable after the context is canceled. + cancel() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil || string(b) != requestBody { + t.Fatalf("could not read body: %q %v", b, err) + } +} + +func doRequest(ctx context.Context) (*http.Response, error) { + var okHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(requestDuration) + w.Write([]byte(requestBody)) + }) + + serv := httptest.NewServer(okHandler) + defer serv.Close() + + return Get(ctx, nil, serv.URL) +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go new file mode 100644 index 0000000..a6754dc --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go @@ -0,0 +1,26 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + "fmt" + "time" + + "golang.org/x/net/context" +) + +func ExampleWithTimeout() { + // Pass a context with a timeout to tell a blocking function that it + // should abandon its work after the timeout elapses. + ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) + select { + case <-time.After(200 * time.Millisecond): + fmt.Println("overslept") + case <-ctx.Done(): + fmt.Println(ctx.Err()) // prints "context deadline exceeded" + } + // Output: + // context deadline exceeded +} diff --git a/commands/update.go b/commands/update.go index e9f80fe..c919e12 100644 --- a/commands/update.go +++ b/commands/update.go @@ -3,8 +3,12 @@ package commands import ( "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" + "os" ) func update(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).Update() + err := work.LoadEnv(env).LoadService(service).Update() + if err != nil { + os.Exit(1) + } } diff --git a/spec/service.go b/spec/service.go index f7317a1..aa276b7 100644 --- a/spec/service.go +++ b/spec/service.go @@ -25,4 +25,5 @@ type ServiceManifest struct { type Service interface { GetEnv() Env GetLog() logrus.Entry + GetFleetUnitContent(unit string) (string, error) } diff --git a/work/env/service-generate-units.go b/work/env/service-generate.go similarity index 98% rename from work/env/service-generate-units.go rename to work/env/service-generate.go index d03d545..820c72b 100644 --- a/work/env/service-generate-units.go +++ b/work/env/service-generate.go @@ -176,6 +176,9 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { logAci.WithError(err).Fatal("pod discovery failed") } + if len(endpoint.ACIEndpoints) == 0 { + s.log.Panic("Discovery does not contain a url") + } url := endpoint.ACIEndpoints[0].ACI url = strings.Replace(url, "=aci", "=pod", 1) // TODO this is nexus specific diff --git a/work/env/service.go b/work/env/service.go index 6c1dbe5..7aee10a 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -1,6 +1,8 @@ package env import ( + "bufio" + "fmt" "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" @@ -9,10 +11,12 @@ import ( "github.com/blablacar/green-garden/work/env/service" "github.com/coreos/etcd/client" "github.com/juju/errors" + "github.com/mgutz/ansi" "golang.org/x/net/context" "gopkg.in/yaml.v2" "io/ioutil" "os" + "strings" "time" ) @@ -89,7 +93,6 @@ func (s *Service) Check() { logUnit.WithField("source", "file").Debug(localContent) } } - } func (s *Service) GetFleetUnitContent(unit string) (string, error) { @@ -97,14 +100,14 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { } func (s *Service) Unlock() { - s.log.Info("Unlock") + s.log.Info("Unlocking") kapi := s.env.EtcdClient() kapi.Delete(context.Background(), s.lockPath, nil) } func (s *Service) Lock(ttl time.Duration, message string) { - s.log.WithField("ttl", ttl).WithField("message", message).Info("lock") + s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) @@ -122,32 +125,119 @@ func (s *Service) Lock(ttl time.Duration, message string) { } } -func (s *Service) Update() { +func (s *Service) Update() error { s.log.Info("Updating service") s.GenerateUnits(nil) hostname, _ := os.Hostname() s.Lock(time.Hour*1, "["+os.Getenv("USER")+"@"+hostname+"] Updating") - for _, unit := range s.ListUnits() { - s.LoadUnit(unit).Destroy() + lock := true + defer func() { + if lock { + s.log.WithField("service", s.name).Warn("!! Leaving but Service is still lock !!") + } + }() +units: + for i, unit := range s.ListUnits() { + u := s.LoadUnit(unit) + + ask: + for { + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Warn("Cannot compare local and remote service") + } + if same { + u.Log.Warn("Remote service is already up to date") + } + action := s.askToProcessService(i, u) + switch action { + case ACTION_DIFF: + u.DisplayDiff() + case ACTION_QUIT: + u.Log.Info("User want to quit") + if i == 0 { + s.Unlock() + lock = false + } + return errors.New("User want to quit") + case ACTION_SKIP: + u.Log.Info("User skip this service") + continue units + case ACTION_YES: + break ask + default: + u.Log.Fatal("Should not be here") + } + } + + u.Destroy() + time.Sleep(time.Second * 2) + err := u.Start() + if err != nil { + log.WithError(err).Error("Failed to start service. Keeping lock") + return err + } time.Sleep(time.Second * 2) - err := s.LoadUnit(unit).Start() + _, err = u.Status() if err != nil { - log.WithError(err).Fatal("Failed to start service. Keeping lock") + log.WithError(err).Error("Unit failed just after start") + return err } + + s.checkServiceRunning() + + // TODO ask deploy pod version () + // TODO YES/NO + // TODO check running tmux + // TODO running as root ?? + // TODO notify slack + // TODO store old version + // TODO !!!!! check that service is running well before going to next server !!! + } s.Unlock() + lock = false + return nil +} - // TODO - // check running tmux - // running as root ?? - // notify slack - // store old version - // !!!!! check that service is running well before going to next server !!! +///////////////////////////////////////////////// + +type Action int + +const ( + ACTION_YES Action = iota + ACTION_SKIP + ACTION_DIFF + ACTION_QUIT +) +func (s *Service) askToProcessService(index int, unit *service.Unit) Action { + reader := bufio.NewReader(os.Stdin) + for { + fmt.Print("Update unit " + ansi.LightGreen + unit.Name + ansi.Reset + " ? : (yes,skip,diff,quit) ") + text, _ := reader.ReadString('\n') + t := strings.ToLower(strings.Trim(text, " \n")) + if t == "o" || t == "y" || t == "ok" || t == "yes" { + return ACTION_YES + } + if t == "s" || t == "skip" { + return ACTION_SKIP + } + if t == "d" || t == "diff" { + return ACTION_DIFF + } + if t == "q" || t == "quit" { + return ACTION_QUIT + } + continue + } + return ACTION_QUIT } -///////////////////////////////////////////////// +func (s *Service) checkServiceRunning() { + +} func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index a474e4b..414491a 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -2,16 +2,20 @@ package service import ( "bufio" + "errors" "github.com/Sirupsen/logrus" + "github.com/blablacar/cnt/utils" "github.com/blablacar/green-garden/spec" + "github.com/coreos/fleet/unit" "io/ioutil" + "os" "strings" ) type Unit struct { - log logrus.Entry + Log logrus.Entry path string - name string + Name string unitPath string service spec.Service } @@ -19,10 +23,10 @@ type Unit struct { func NewUnit(path string, name string, service spec.Service) *Unit { l := service.GetLog() unit := &Unit{ - log: *l.WithField("unit", name), + Log: *l.WithField("unit", name), service: service, path: path, - name: name, + Name: name, unitPath: path + "/" + name, } return unit @@ -33,11 +37,57 @@ func (u Unit) GetUnitContentAsFleeted() (string, error) { if err != nil { return "", err } - return convertMultilineUnitToString(unitFileContent), nil + + fleetunit, err := unit.NewUnitFile(string(unitFileContent)) + if err != nil { + return "", err + } + return fleetunit.String(), nil + // return convertMultilineUnitToString(unitFileContent), nil +} + +func (u Unit) DisplayDiff() error { + u.Log.Info("Diff") + + local, remote, err := u.serviceLocalAndRemoteContent() + if err != nil { + return err + } + + ioutil.WriteFile("/tmp/ggn-local", []byte(local), 0644) + defer os.Remove("/tmp/ggn-local") + ioutil.WriteFile("/tmp/ggn-remote", []byte(remote), 0644) + defer os.Remove("/tmp/ggn-remote") + utils.ExecCmd("git", "diff", "/tmp/ggn-local", "/tmp/ggn-remote") + return nil +} + +func (u Unit) IsLocalContentSameAsRemote() (bool, error) { + local, remote, err := u.serviceLocalAndRemoteContent() + if err != nil { + return false, err + } + return local == remote, nil +} + +func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { + localContent, err := u.GetUnitContentAsFleeted() + if err != nil { + u.Log.WithError(err).Error("Cannot read unit file") + return "", "", err + } + + remoteContent, err := u.service.GetFleetUnitContent(u.Name) + remoteContent += "\n" + if err != nil { + u.Log.WithError(err).Error("Cannot read unit file") + return "", "", err + } + return localContent, remoteContent, nil } func (u Unit) Start() error { - u.log.Info("Starting") + u.Log.Info("Starting") _, err := u.service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) if err != nil { logrus.WithError(err).Error("Cannot start unit") @@ -47,8 +97,8 @@ func (u Unit) Start() error { } func (u Unit) Destroy() error { - u.log.Info("Destroying") // todo check that service exists before destroy - _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.name) + u.Log.Info("Destroying") // todo check that service exists before destroy + _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") return err @@ -56,13 +106,23 @@ func (u Unit) Destroy() error { return nil } +func (u Unit) Status() (string, error) { + content, err := u.service.GetEnv().RunFleetCmdGetOutput("status", u.Name) + if err != nil { + return content, err + } + + if !strings.Contains(content, "Active: active (running)") { // Active: failed + return content, errors.New("unit is not in running state") + } + + return content, err +} + //func (u Unit) Stop() { // u.service.GetEnv().RunFleetCmdGetOutput("stop", u.name) //} // -//func (u Unit) Status() { -// u.service.GetEnv().RunFleetCmdGetOutput("status ", u.name) -//} // //func (u Unit) Cat() { // u.service.GetEnv().RunFleetCmdGetOutput("cat ", u.name) From c1110fd14cfa2069a1a5ea88c07a083168d1a119 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 12 Nov 2015 14:29:03 +0100 Subject: [PATCH 020/163] update ugorji/go --- Godeps/Godeps.json | 14 +- .../src/github.com/coreos/fleet/pkg/set.go | 4 +- .../src/github.com/coreos/fleet/unit/fake.go | 2 +- .../github.com/coreos/fleet/unit/fake_test.go | 2 +- .../coreos/fleet/unit/generator_test.go | 4 +- .../go-systemd/unit/deserialize_test.go | 56 +- .../coreos/go-systemd/unit/serialize_test.go | 38 +- .../src/github.com/ugorji/go/LICENSE | 22 + .../src/github.com/ugorji/go/codec/0doc.go | 71 +- .../src/github.com/ugorji/go/codec/binc.go | 145 +- .../src/github.com/ugorji/go/codec/cbor.go | 131 +- .../github.com/ugorji/go/codec/cbor_test.go | 205 - .../github.com/ugorji/go/codec/codec_test.go | 1175 - .../ugorji/go/codec/codecgen/gen.go | 22 +- .../ugorji/go/codec/codecgen_test.go | 22 - .../src/github.com/ugorji/go/codec/decode.go | 1222 +- .../src/github.com/ugorji/go/codec/encode.go | 826 +- .../ugorji/go/codec/fast-path.generated.go | 30700 ++++++++++++---- .../ugorji/go/codec/fast-path.go.tmpl | 280 +- .../ugorji/go/codec/fast-path.not.go | 32 + .../ugorji/go/codec/gen-dec-array.go.tmpl | 134 +- .../ugorji/go/codec/gen-dec-map.go.tmpl | 56 +- .../ugorji/go/codec/gen-helper.generated.go | 28 +- .../ugorji/go/codec/gen-helper.go.tmpl | 25 +- .../ugorji/go/codec/gen.generated.go | 191 +- .../src/github.com/ugorji/go/codec/gen.go | 341 +- .../src/github.com/ugorji/go/codec/helper.go | 579 +- .../ugorji/go/codec/helper_internal.go | 91 + .../github.com/ugorji/go/codec/helper_test.go | 155 - .../ugorji/go/codec/helper_unsafe.go | 6 + .../src/github.com/ugorji/go/codec/json.go | 793 +- .../src/github.com/ugorji/go/codec/msgpack.go | 156 +- .../src/github.com/ugorji/go/codec/noop.go | 114 +- .../github.com/ugorji/go/codec/prebuild.sh | 72 +- .../src/github.com/ugorji/go/codec/py_test.go | 30 - .../src/github.com/ugorji/go/codec/simple.go | 120 +- .../src/github.com/ugorji/go/codec/tests.sh | 63 +- .../src/github.com/ugorji/go/codec/time.go | 42 +- .../github.com/ugorji/go/codec/values_test.go | 203 - 39 files changed, 26440 insertions(+), 11732 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go create mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/py_test.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 34a4dcb..cf55a61 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,18 +24,18 @@ }, { "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "44-3-g34eae88", - "Rev": "34eae883aa77ba620a9d9f9ec7e93f1077afbd28" + "Comment": "44-4-g391f15a", + "Rev": "391f15a12d3723708f03fda1923732dfc60cce4a" }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "44-3-g34eae88", - "Rev": "34eae883aa77ba620a9d9f9ec7e93f1077afbd28" + "Comment": "44-4-g391f15a", + "Rev": "391f15a12d3723708f03fda1923732dfc60cce4a" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "44-3-g34eae88", - "Rev": "34eae883aa77ba620a9d9f9ec7e93f1077afbd28" + "Comment": "44-4-g391f15a", + "Rev": "391f15a12d3723708f03fda1923732dfc60cce4a" }, { "ImportPath": "github.com/coreos/etcd/client", @@ -119,7 +119,7 @@ }, { "ImportPath": "github.com/ugorji/go/codec", - "Rev": "1d5269ed4e89d423d40362a0914e1c99adb13cc8" + "Rev": "8bb56663530600b54f72c79871451ea5725b6763" }, { "ImportPath": "golang.org/x/net/context", diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go index f05cdee..6b8ceca 100644 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go +++ b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go @@ -81,7 +81,7 @@ func (us *unsafeSet) Length() int { // Values returns the values of the Set in an unspecified order. func (us *unsafeSet) Values() (values []string) { values = make([]string, 0) - for val, _ := range us.d { + for val := range us.d { values = append(values, val) } return @@ -90,7 +90,7 @@ func (us *unsafeSet) Values() (values []string) { // Copy creates a new Set containing the values of the first func (us *unsafeSet) Copy() Set { cp := NewUnsafeSet() - for val, _ := range us.d { + for val := range us.d { cp.Add(val) } diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go index bc82352..2ecf970 100644 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go @@ -56,7 +56,7 @@ func (fum *FakeUnitManager) Units() ([]string, error) { defer fum.RUnlock() lst := make([]string, 0, len(fum.u)) - for name, _ := range fum.u { + for name := range fum.u { lst = append(lst, name) } return lst, nil diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go index 3b616f2..74adfe0 100644 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go @@ -100,7 +100,7 @@ func TestFakeUnitManagerGetUnitStates(t *testing.T) { } expectStates := map[string]*UnitState{ - "hello.service": &UnitState{ + "hello.service": { LoadState: "loaded", ActiveState: "active", SubState: "running", diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go index bd3fe80..b8dab18 100644 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go +++ b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go @@ -49,7 +49,7 @@ func TestUnitStateGeneratorSubscribeLifecycle(t *testing.T) { // subscribed to foo.service so we should get a heartbeat expect := []UnitStateHeartbeat{ - UnitStateHeartbeat{Name: "foo.service", State: &UnitState{"loaded", "active", "running", "", "", "foo.service"}}, + {Name: "foo.service", State: &UnitState{"loaded", "active", "running", "", "", "foo.service"}}, } assertGenerateUnitStateHeartbeats(t, um, gen, expect) @@ -57,7 +57,7 @@ func TestUnitStateGeneratorSubscribeLifecycle(t *testing.T) { // heartbeat for foo.service should have nil State since we have not called Generate since Unsubscribe expect = []UnitStateHeartbeat{ - UnitStateHeartbeat{Name: "foo.service", State: nil}, + {Name: "foo.service", State: nil}, } assertGenerateUnitStateHeartbeats(t, um, gen, expect) diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go index 84b7169..b1f40e8 100644 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go @@ -35,10 +35,10 @@ Requires=baz.service After=baz.service `), []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Unit", "Description", "Bar"}, - &UnitOption{"Unit", "Requires", "baz.service"}, - &UnitOption{"Unit", "After", "baz.service"}, + {"Unit", "Description", "Foo"}, + {"Unit", "Description", "Bar"}, + {"Unit", "Requires", "baz.service"}, + {"Unit", "After", "baz.service"}, }, }, @@ -55,9 +55,9 @@ Pants=on `), []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, - &UnitOption{"X-Third-Party", "Pants", "on"}, + {"Unit", "Description", "Foo"}, + {"Service", "ExecStart", "/usr/bin/sleep infinity"}, + {"X-Third-Party", "Pants", "on"}, }, }, @@ -76,7 +76,7 @@ Pants=on Environment= "FOO=BAR" "BAZ=QUX" `), []*UnitOption{ - &UnitOption{"Service", "Environment", "\"FOO=BAR\" \"BAZ=QUX\""}, + {"Service", "Environment", "\"FOO=BAR\" \"BAZ=QUX\""}, }, }, @@ -87,7 +87,7 @@ Description= Unnecessarily wrapped \ words here `), []*UnitOption{ - &UnitOption{"Unit", "Description", `Unnecessarily wrapped \ + {"Unit", "Description", `Unnecessarily wrapped \ words here`}, }, }, @@ -105,7 +105,7 @@ Description=Bar # comment foxtrot `), []*UnitOption{ - &UnitOption{"Unit", "Description", "Bar"}, + {"Unit", "Description", "Bar"}, }, }, @@ -120,8 +120,8 @@ Description=Bar\ Baz `), []*UnitOption{ - &UnitOption{"Unit", "Description", "Bar\\\n# comment alpha"}, - &UnitOption{"Unit", "Description", "Bar\\\n# comment bravo \\\nBaz"}, + {"Unit", "Description", "Bar\\\n# comment alpha"}, + {"Unit", "Description", "Bar\\\n# comment bravo \\\nBaz"}, }, }, @@ -132,7 +132,7 @@ Baz Description=Bar `), []*UnitOption{ - &UnitOption{"Unit", "Description", "Bar"}, + {"Unit", "Description", "Bar"}, }, }, @@ -143,7 +143,7 @@ Description=Bar Description=Bar `), []*UnitOption{ - &UnitOption{"Unit", "Description", "Bar"}, + {"Unit", "Description", "Bar"}, }, }, @@ -153,7 +153,7 @@ Description=Bar <<<<<<<<=Bar `), []*UnitOption{ - &UnitOption{"Unit", "<<<<<<<<", "Bar"}, + {"Unit", "<<<<<<<<", "Bar"}, }, }, @@ -163,7 +163,7 @@ Description=Bar Some Thing = Bar `), []*UnitOption{ - &UnitOption{"Unit", "Some Thing", "Bar"}, + {"Unit", "Some Thing", "Bar"}, }, }, @@ -172,7 +172,7 @@ Some Thing = Bar []byte(`[Unit] Description=Bar`), []*UnitOption{ - &UnitOption{"Unit", "Description", "Bar"}, + {"Unit", "Description", "Bar"}, }, }, @@ -181,7 +181,7 @@ Description=Bar`), []byte(`[Unit] Description=Bar \`), []*UnitOption{ - &UnitOption{"Unit", "Description", "Bar \\"}, + {"Unit", "Description", "Bar \\"}, }, }, @@ -190,7 +190,7 @@ Description=Bar \`), []byte(`[©] µ☃=ÇôrèÕ$`), []*UnitOption{ - &UnitOption{"©", "µ☃", "ÇôrèÕ$"}, + {"©", "µ☃", "ÇôrèÕ$"}, }, }, @@ -200,7 +200,7 @@ Description=Bar \`), Description =words here `), []*UnitOption{ - &UnitOption{"Unit", "Description", "words here"}, + {"Unit", "Description", "words here"}, }, }, @@ -209,7 +209,7 @@ Description=Bar \`), []byte(`[Unit] Description= words here `), []*UnitOption{ - &UnitOption{"Unit", "Description", "words here"}, + {"Unit", "Description", "words here"}, }, }, @@ -219,7 +219,7 @@ Description= words here `), Description= words here \ `), []*UnitOption{ - &UnitOption{"Unit", "Description", "words here \\\n"}, + {"Unit", "Description", "words here \\\n"}, }, }, @@ -229,7 +229,7 @@ Description= words here \ ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" `), []*UnitOption{ - &UnitOption{"Service", "ExecStart", `/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"`}, + {"Service", "ExecStart", `/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"`}, }, }, @@ -238,7 +238,7 @@ ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" []byte(`[Service] ExecStart=/bin/bash echo poof \ `), []*UnitOption{ - &UnitOption{"Service", "ExecStart", `/bin/bash echo poof \`}, + {"Service", "ExecStart", `/bin/bash echo poof \`}, }, }, // a long unit file line that's just equal to the maximum permitted length @@ -246,7 +246,7 @@ ExecStart=/bin/bash echo poof \ `), []byte(`[Service] ExecStart=/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`), []*UnitOption{ - &UnitOption{"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, + {"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, }, }, // the same, but with a trailing newline @@ -256,8 +256,8 @@ ExecStart=/bin/bash -c "echo ................................................... Option=value `), []*UnitOption{ - &UnitOption{"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, - &UnitOption{"Service", "Option", "value"}, + {"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, + {"Service", "Option", "value"}, }, }, } @@ -267,7 +267,7 @@ Option=value return fmt.Errorf("expected %d items, got %d", len(expect), len(output)) } - for i, _ := range expect { + for i := range expect { if !reflect.DeepEqual(expect[i], output[i]) { return fmt.Errorf("item %d: expected %v, got %v", i, expect[i], output[i]) } diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go index bd492b0..76bf394 100644 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go @@ -33,8 +33,8 @@ func TestSerialize(t *testing.T) { // options with same section share the header { []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Unit", "BindsTo", "bar.service"}, + {"Unit", "Description", "Foo"}, + {"Unit", "BindsTo", "bar.service"}, }, `[Unit] Description=Foo @@ -45,8 +45,8 @@ BindsTo=bar.service // options with same name are not combined { []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Unit", "Description", "Bar"}, + {"Unit", "Description", "Foo"}, + {"Unit", "Description", "Bar"}, }, `[Unit] Description=Foo @@ -57,8 +57,8 @@ Description=Bar // multiple options printed under different section headers { []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, + {"Unit", "Description", "Foo"}, + {"Service", "ExecStart", "/usr/bin/sleep infinity"}, }, `[Unit] Description=Foo @@ -71,9 +71,9 @@ ExecStart=/usr/bin/sleep infinity // options are grouped into sections { []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, - &UnitOption{"Unit", "BindsTo", "bar.service"}, + {"Unit", "Description", "Foo"}, + {"Service", "ExecStart", "/usr/bin/sleep infinity"}, + {"Unit", "BindsTo", "bar.service"}, }, `[Unit] Description=Foo @@ -87,12 +87,12 @@ ExecStart=/usr/bin/sleep infinity // options are ordered within groups, and sections are ordered in the order in which they were first seen { []*UnitOption{ - &UnitOption{"Unit", "Description", "Foo"}, - &UnitOption{"Service", "ExecStart", "/usr/bin/sleep infinity"}, - &UnitOption{"Unit", "BindsTo", "bar.service"}, - &UnitOption{"X-Foo", "Bar", "baz"}, - &UnitOption{"Service", "ExecStop", "/usr/bin/sleep 1"}, - &UnitOption{"Unit", "Documentation", "https://foo.com"}, + {"Unit", "Description", "Foo"}, + {"Service", "ExecStart", "/usr/bin/sleep infinity"}, + {"Unit", "BindsTo", "bar.service"}, + {"X-Foo", "Bar", "baz"}, + {"Service", "ExecStop", "/usr/bin/sleep 1"}, + {"Unit", "Documentation", "https://foo.com"}, }, `[Unit] Description=Foo @@ -111,7 +111,7 @@ Bar=baz // utf8 characters are not a problem { []*UnitOption{ - &UnitOption{"©", "µ☃", "ÇôrèÕ$"}, + {"©", "µ☃", "ÇôrèÕ$"}, }, `[©] µ☃=ÇôrèÕ$ @@ -121,7 +121,7 @@ Bar=baz // no verification is done on section names { []*UnitOption{ - &UnitOption{"Un\nit", "Description", "Foo"}, + {"Un\nit", "Description", "Foo"}, }, `[Un it] @@ -132,7 +132,7 @@ Description=Foo // no verification is done on option names { []*UnitOption{ - &UnitOption{"Unit", "Desc\nription", "Foo"}, + {"Unit", "Desc\nription", "Foo"}, }, `[Unit] Desc @@ -143,7 +143,7 @@ ription=Foo // no verification is done on option values { []*UnitOption{ - &UnitOption{"Unit", "Description", "Fo\no"}, + {"Unit", "Description", "Fo\no"}, }, `[Unit] Description=Fo diff --git a/Godeps/_workspace/src/github.com/ugorji/go/LICENSE b/Godeps/_workspace/src/github.com/ugorji/go/LICENSE new file mode 100644 index 0000000..95a0f05 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012-2015 Ugorji Nwoke. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go index dd8b589..14ea964 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT license found in the LICENSE file. /* -High Performance, Feature-Rich Idiomatic Go codec/encoding library for +High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json. Supported Serialization formats are: @@ -11,7 +11,7 @@ Supported Serialization formats are: - binc: http://github.com/ugorji/binc - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 - json: http://json.org http://tools.ietf.org/html/rfc7159 - - simple: + - simple: To install: @@ -19,7 +19,7 @@ To install: This package understands the 'unsafe' tag, to allow using unsafe semantics: - - When decoding into a struct, you need to read the field name as a string + - When decoding into a struct, you need to read the field name as a string so you can find the struct field it is mapped to. Using `unsafe` will bypass the allocation and copying overhead of []byte->string conversion. @@ -38,9 +38,9 @@ Rich Feature Set includes: - Very High Performance. Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. - Multiple conversions: - Package coerces types where appropriate + Package coerces types where appropriate e.g. decode an int in the stream into a float, etc. - - Corner Cases: + - Corner Cases: Overflows, nil maps/slices, nil values in streams are handled correctly - Standard field renaming via tags - Support for omitting empty fields during an encoding @@ -56,7 +56,7 @@ Rich Feature Set includes: - Fast (no-reflection) encoding/decoding of common maps and slices - Code-generation for faster performance. - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats - - Support indefinite-length formats to enable true streaming + - Support indefinite-length formats to enable true streaming (for formats which support it e.g. json, cbor) - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. This mostly applies to maps, where iteration order is non-deterministic. @@ -64,15 +64,16 @@ Rich Feature Set includes: - Never silently skip data when decoding. User decides whether to return an error or silently skip data when keys or indexes in the data stream do not map to fields in the struct. + - Detect and error when encoding a cyclic reference (instead of stack overflow shutdown) - Encode/Decode from/to chan types (for iterative streaming support) - Drop-in replacement for encoding/json. `json:` key in struct tag supported. - Provides a RPC Server and Client Codec for net/rpc communication protocol. - - Handle unique idiosynchracies of codecs e.g. - - For messagepack, configure how ambiguities in handling raw bytes are resolved - - For messagepack, provide rpc server/client codec to support + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support msgpack-rpc protocol defined at: https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md - + Extension Support Users can register a function to handle the encoding or decoding of @@ -98,7 +99,21 @@ with the standard net/rpc package. Usage -Typical usage model: +The Handle is SAFE for concurrent READ, but NOT SAFE for concurrent modification. + +The Encoder and Decoder are NOT safe for concurrent use. + +Consequently, the usage model is basically: + + - Create and initialize the Handle before any use. + Once created, DO NOT modify it. + - Multiple Encoders or Decoders can now use the Handle concurrently. + They only read information off the Handle (never write). + - However, each Encoder or Decoder MUST not be used concurrently + - To re-use an Encoder/Decoder, call Reset(...) on it first. + This allows you use state maintained on the Encoder/Decoder. + +Sample usage model: // create and configure Handle var ( @@ -148,3 +163,37 @@ Typical usage model: */ package codec +// Benefits of go-codec: +// +// - encoding/json always reads whole file into memory first. +// This makes it unsuitable for parsing very large files. +// - encoding/xml cannot parse into a map[string]interface{} +// I found this out on reading https://github.com/clbanning/mxj + +// TODO: +// +// - optimization for codecgen: +// if len of entity is <= 3 words, then support a value receiver for encode. +// - (En|De)coder should store an error when it occurs. +// Until reset, subsequent calls return that error that was stored. +// This means that free panics must go away. +// All errors must be raised through errorf method. +// - Decoding using a chan is good, but incurs concurrency costs. +// This is because there's no fast way to use a channel without it +// having to switch goroutines constantly. +// Callback pattern is still the best. Maybe cnsider supporting something like: +// type X struct { +// Name string +// Ys []Y +// Ys chan <- Y +// Ys func(interface{}) -> call this interface for each entry in there. +// } +// - Consider adding a isZeroer interface { isZero() bool } +// It is used within isEmpty, for omitEmpty support. +// - Consider making Handle used AS-IS within the encoding/decoding session. +// This means that we don't cache Handle information within the (En|De)coder, +// except we really need it at Reset(...) +// - Consider adding math/big support +// - Consider reducing the size of the generated functions: +// Maybe use one loop, and put the conditionals in the loop. +// for ... { if cLen > 0 { if j == cLen { break } } else if dd.CheckBreak() { break } } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go index 251609e..766d26c 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go @@ -5,6 +5,7 @@ package codec import ( "math" + "reflect" "time" ) @@ -58,8 +59,8 @@ type bincEncDriver struct { e *Encoder w encWriter m map[string]uint16 // symbols - s uint16 // symbols sequencer b [scratchByteArrayLen]byte + s uint16 // symbols sequencer encNoSeparator } @@ -317,9 +318,9 @@ func (e *bincEncDriver) encLenNumber(bd byte, v uint64) { //------------------------------------ type bincDecSymbol struct { - i uint16 s string b []byte + i uint16 } type bincDecDriver struct { @@ -328,7 +329,6 @@ type bincDecDriver struct { r decReader br bool // bytes reader bdRead bool - bdType valueType bd byte vd byte vs byte @@ -346,24 +346,23 @@ func (d *bincDecDriver) readNextBd() { d.vd = d.bd >> 4 d.vs = d.bd & 0x0f d.bdRead = true - d.bdType = valueTypeUnset } -func (d *bincDecDriver) IsContainerType(vt valueType) (b bool) { - switch vt { - case valueTypeNil: - return d.vd == bincVdSpecial && d.vs == bincSpNil - case valueTypeBytes: - return d.vd == bincVdByteArray - case valueTypeString: - return d.vd == bincVdString - case valueTypeArray: - return d.vd == bincVdArray - case valueTypeMap: - return d.vd == bincVdMap +func (d *bincDecDriver) ContainerType() (vt valueType) { + if d.vd == bincVdSpecial && d.vs == bincSpNil { + return valueTypeNil + } else if d.vd == bincVdByteArray { + return valueTypeBytes + } else if d.vd == bincVdString { + return valueTypeString + } else if d.vd == bincVdArray { + return valueTypeArray + } else if d.vd == bincVdMap { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) } - d.d.errorf("isContainerType: unsupported parameter: %v", vt) - return // "unreachable" + return valueTypeUnset } func (d *bincDecDriver) TryDecodeAsNil() bool { @@ -694,7 +693,7 @@ func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) if withString { s = string(bs2) } - d.s = append(d.s, bincDecSymbol{symbol, s, bs2}) + d.s = append(d.s, bincDecSymbol{i: symbol, s: s, b: bs2}) } default: d.d.errorf("Invalid d.vd. Expecting string:0x%x, bytearray:0x%x or symbol: 0x%x. Got: 0x%x", @@ -783,97 +782,95 @@ func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []b return } -func (d *bincDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { +func (d *bincDecDriver) DecodeNaked() { if !d.bdRead { d.readNextBd() } + n := &d.d.n + var decodeFurther bool + switch d.vd { case bincVdSpecial: switch d.vs { case bincSpNil: - vt = valueTypeNil + n.v = valueTypeNil case bincSpFalse: - vt = valueTypeBool - v = false + n.v = valueTypeBool + n.b = false case bincSpTrue: - vt = valueTypeBool - v = true + n.v = valueTypeBool + n.b = true case bincSpNan: - vt = valueTypeFloat - v = math.NaN() + n.v = valueTypeFloat + n.f = math.NaN() case bincSpPosInf: - vt = valueTypeFloat - v = math.Inf(1) + n.v = valueTypeFloat + n.f = math.Inf(1) case bincSpNegInf: - vt = valueTypeFloat - v = math.Inf(-1) + n.v = valueTypeFloat + n.f = math.Inf(-1) case bincSpZeroFloat: - vt = valueTypeFloat - v = float64(0) + n.v = valueTypeFloat + n.f = float64(0) case bincSpZero: - vt = valueTypeUint - v = uint64(0) // int8(0) + n.v = valueTypeUint + n.u = uint64(0) // int8(0) case bincSpNegOne: - vt = valueTypeInt - v = int64(-1) // int8(-1) + n.v = valueTypeInt + n.i = int64(-1) // int8(-1) default: d.d.errorf("decodeNaked: Unrecognized special value 0x%x", d.vs) - return } case bincVdSmallInt: - vt = valueTypeUint - v = uint64(int8(d.vs)) + 1 // int8(d.vs) + 1 + n.v = valueTypeUint + n.u = uint64(int8(d.vs)) + 1 // int8(d.vs) + 1 case bincVdPosInt: - vt = valueTypeUint - v = d.decUint() + n.v = valueTypeUint + n.u = d.decUint() case bincVdNegInt: - vt = valueTypeInt - v = -(int64(d.decUint())) + n.v = valueTypeInt + n.i = -(int64(d.decUint())) case bincVdFloat: - vt = valueTypeFloat - v = d.decFloat() + n.v = valueTypeFloat + n.f = d.decFloat() case bincVdSymbol: - vt = valueTypeSymbol - v = d.DecodeString() + n.v = valueTypeSymbol + n.s = d.DecodeString() case bincVdString: - vt = valueTypeString - v = d.DecodeString() + n.v = valueTypeString + n.s = d.DecodeString() case bincVdByteArray: - vt = valueTypeBytes - v = d.DecodeBytes(nil, false, false) + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) case bincVdTimestamp: - vt = valueTypeTimestamp + n.v = valueTypeTimestamp tt, err := decodeTime(d.r.readx(int(d.vs))) if err != nil { panic(err) } - v = tt + n.t = tt case bincVdCustomExt: - vt = valueTypeExt + n.v = valueTypeExt l := d.decLen() - var re RawExt - re.Tag = uint64(d.r.readn1()) - re.Data = d.r.readx(l) - v = &re - vt = valueTypeExt + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(l) case bincVdArray: - vt = valueTypeArray + n.v = valueTypeArray decodeFurther = true case bincVdMap: - vt = valueTypeMap + n.v = valueTypeMap decodeFurther = true default: d.d.errorf("decodeNaked: Unrecognized d.vd: 0x%x", d.vd) - return } if !decodeFurther { d.bdRead = false } - if vt == valueTypeUint && d.h.SignedInteger { - d.bdType = valueTypeInt - v = int64(v.(uint64)) + if n.v == valueTypeUint && d.h.SignedInteger { + n.v = valueTypeInt + n.i = int64(n.u) } return } @@ -897,6 +894,10 @@ type BincHandle struct { binaryEncodingType } +func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + func (h *BincHandle) newEncDriver(e *Encoder) encDriver { return &bincEncDriver{e: e, w: e.w} } @@ -905,5 +906,17 @@ func (h *BincHandle) newDecDriver(d *Decoder) decDriver { return &bincDecDriver{d: d, r: d.r, h: h, br: d.bytes} } +func (e *bincEncDriver) reset() { + e.w = e.e.w + e.s = 0 + e.m = nil +} + +func (d *bincDecDriver) reset() { + d.r = d.d.r + d.s = nil + d.bd, d.bdRead, d.vd, d.vs = 0, false, 0, 0 +} + var _ decDriver = (*bincDecDriver)(nil) var _ encDriver = (*bincEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go index c3b88da..cfd89b7 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go @@ -3,7 +3,10 @@ package codec -import "math" +import ( + "math" + "reflect" +) const ( cborMajorUint byte = iota @@ -57,11 +60,11 @@ const ( // ------------------- type cborEncDriver struct { + noBuiltInTypes + encNoSeparator e *Encoder w encWriter h *CborHandle - noBuiltInTypes - encNoSeparator x [8]byte } @@ -158,7 +161,11 @@ func (e *cborEncDriver) EncodeSymbol(v string) { } func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) { - e.encLen(cborBaseBytes, len(v)) + if c == c_RAW { + e.encLen(cborBaseBytes, len(v)) + } else { + e.encLen(cborBaseString, len(v)) + } e.w.writeb(v) } @@ -168,11 +175,10 @@ type cborDecDriver struct { d *Decoder h *CborHandle r decReader + b [scratchByteArrayLen]byte br bool // bytes reader bdRead bool - bdType valueType bd byte - b [scratchByteArrayLen]byte noBuiltInTypes decNoSeparator } @@ -180,24 +186,23 @@ type cborDecDriver struct { func (d *cborDecDriver) readNextBd() { d.bd = d.r.readn1() d.bdRead = true - d.bdType = valueTypeUnset } -func (d *cborDecDriver) IsContainerType(vt valueType) (bv bool) { - switch vt { - case valueTypeNil: - return d.bd == cborBdNil - case valueTypeBytes: - return d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) - case valueTypeString: - return d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) - case valueTypeArray: - return d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) - case valueTypeMap: - return d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) +func (d *cborDecDriver) ContainerType() (vt valueType) { + if d.bd == cborBdNil { + return valueTypeNil + } else if d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) { + return valueTypeBytes + } else if d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) { + return valueTypeString + } else if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) { + return valueTypeArray + } else if d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) } - d.d.errorf("isContainerType: unsupported parameter: %v", vt) - return // "unreachable" + return valueTypeUnset } func (d *cborDecDriver) TryDecodeAsNil() bool { @@ -439,71 +444,72 @@ func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxta return } -func (d *cborDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { +func (d *cborDecDriver) DecodeNaked() { if !d.bdRead { d.readNextBd() } + n := &d.d.n + var decodeFurther bool + switch d.bd { case cborBdNil: - vt = valueTypeNil + n.v = valueTypeNil case cborBdFalse: - vt = valueTypeBool - v = false + n.v = valueTypeBool + n.b = false case cborBdTrue: - vt = valueTypeBool - v = true + n.v = valueTypeBool + n.b = true case cborBdFloat16, cborBdFloat32: - vt = valueTypeFloat - v = d.DecodeFloat(true) + n.v = valueTypeFloat + n.f = d.DecodeFloat(true) case cborBdFloat64: - vt = valueTypeFloat - v = d.DecodeFloat(false) + n.v = valueTypeFloat + n.f = d.DecodeFloat(false) case cborBdIndefiniteBytes: - vt = valueTypeBytes - v = d.DecodeBytes(nil, false, false) + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) case cborBdIndefiniteString: - vt = valueTypeString - v = d.DecodeString() + n.v = valueTypeString + n.s = d.DecodeString() case cborBdIndefiniteArray: - vt = valueTypeArray + n.v = valueTypeArray decodeFurther = true case cborBdIndefiniteMap: - vt = valueTypeMap + n.v = valueTypeMap decodeFurther = true default: switch { case d.bd >= cborBaseUint && d.bd < cborBaseNegInt: if d.h.SignedInteger { - vt = valueTypeInt - v = d.DecodeInt(64) + n.v = valueTypeInt + n.i = d.DecodeInt(64) } else { - vt = valueTypeUint - v = d.DecodeUint(64) + n.v = valueTypeUint + n.u = d.DecodeUint(64) } case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: - vt = valueTypeInt - v = d.DecodeInt(64) + n.v = valueTypeInt + n.i = d.DecodeInt(64) case d.bd >= cborBaseBytes && d.bd < cborBaseString: - vt = valueTypeBytes - v = d.DecodeBytes(nil, false, false) + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) case d.bd >= cborBaseString && d.bd < cborBaseArray: - vt = valueTypeString - v = d.DecodeString() + n.v = valueTypeString + n.s = d.DecodeString() case d.bd >= cborBaseArray && d.bd < cborBaseMap: - vt = valueTypeArray + n.v = valueTypeArray decodeFurther = true case d.bd >= cborBaseMap && d.bd < cborBaseTag: - vt = valueTypeMap + n.v = valueTypeMap decodeFurther = true case d.bd >= cborBaseTag && d.bd < cborBaseSimple: - vt = valueTypeExt - var re RawExt - ui := d.decUint() + n.v = valueTypeExt + n.u = d.decUint() + n.l = nil d.bdRead = false - re.Tag = ui - d.d.decode(&re.Value) - v = &re + // d.d.decode(&re.Value) // handled by decode itself. // decodeFurther = true default: d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) @@ -550,8 +556,12 @@ func (d *cborDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurthe // // Now, vv contains the same string "one-byte" // type CborHandle struct { - BasicHandle binaryEncodingType + BasicHandle +} + +func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{i: ext}) } func (h *CborHandle) newEncDriver(e *Encoder) encDriver { @@ -562,5 +572,14 @@ func (h *CborHandle) newDecDriver(d *Decoder) decDriver { return &cborDecDriver{d: d, r: d.r, h: h, br: d.bytes} } +func (e *cborEncDriver) reset() { + e.w = e.e.w +} + +func (d *cborDecDriver) reset() { + d.r = d.d.r + d.bd, d.bdRead = 0, false +} + var _ decDriver = (*cborDecDriver)(nil) var _ encDriver = (*cborEncDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go deleted file mode 100644 index 205dffa..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor_test.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -import ( - "bufio" - "bytes" - "encoding/hex" - "math" - "os" - "regexp" - "strings" - "testing" -) - -func TestCborIndefiniteLength(t *testing.T) { - oldMapType := testCborH.MapType - defer func() { - testCborH.MapType = oldMapType - }() - testCborH.MapType = testMapStrIntfTyp - // var ( - // M1 map[string][]byte - // M2 map[uint64]bool - // L1 []interface{} - // S1 []string - // B1 []byte - // ) - var v, vv interface{} - // define it (v), encode it using indefinite lengths, decode it (vv), compare v to vv - v = map[string]interface{}{ - "one-byte-key": []byte{1, 2, 3, 4, 5, 6}, - "two-string-key": "two-value", - "three-list-key": []interface{}{true, false, uint64(1), int64(-1)}, - } - var buf bytes.Buffer - // buf.Reset() - e := NewEncoder(&buf, testCborH) - buf.WriteByte(cborBdIndefiniteMap) - //---- - buf.WriteByte(cborBdIndefiniteString) - e.MustEncode("one-") - e.MustEncode("byte-") - e.MustEncode("key") - buf.WriteByte(cborBdBreak) - - buf.WriteByte(cborBdIndefiniteBytes) - e.MustEncode([]byte{1, 2, 3}) - e.MustEncode([]byte{4, 5, 6}) - buf.WriteByte(cborBdBreak) - - //---- - buf.WriteByte(cborBdIndefiniteString) - e.MustEncode("two-") - e.MustEncode("string-") - e.MustEncode("key") - buf.WriteByte(cborBdBreak) - - buf.WriteByte(cborBdIndefiniteString) - e.MustEncode([]byte("two-")) // encode as bytes, to check robustness of code - e.MustEncode([]byte("value")) - buf.WriteByte(cborBdBreak) - - //---- - buf.WriteByte(cborBdIndefiniteString) - e.MustEncode("three-") - e.MustEncode("list-") - e.MustEncode("key") - buf.WriteByte(cborBdBreak) - - buf.WriteByte(cborBdIndefiniteArray) - e.MustEncode(true) - e.MustEncode(false) - e.MustEncode(uint64(1)) - e.MustEncode(int64(-1)) - buf.WriteByte(cborBdBreak) - - buf.WriteByte(cborBdBreak) // close map - - NewDecoderBytes(buf.Bytes(), testCborH).MustDecode(&vv) - if err := deepEqual(v, vv); err != nil { - logT(t, "-------- Before and After marshal do not match: Error: %v", err) - logT(t, " ....... GOLDEN: (%T) %#v", v, v) - logT(t, " ....... DECODED: (%T) %#v", vv, vv) - failT(t) - } -} - -type testCborGolden struct { - Base64 string `codec:"cbor"` - Hex string `codec:"hex"` - Roundtrip bool `codec:"roundtrip"` - Decoded interface{} `codec:"decoded"` - Diagnostic string `codec:"diagnostic"` - Skip bool `codec:"skip"` -} - -// Some tests are skipped because they include numbers outside the range of int64/uint64 -func doTestCborGoldens(t *testing.T) { - oldMapType := testCborH.MapType - defer func() { - testCborH.MapType = oldMapType - }() - testCborH.MapType = testMapStrIntfTyp - // decode test-cbor-goldens.json into a list of []*testCborGolden - // for each one, - // - decode hex into []byte bs - // - decode bs into interface{} v - // - compare both using deepequal - // - for any miss, record it - var gs []*testCborGolden - f, err := os.Open("test-cbor-goldens.json") - if err != nil { - logT(t, "error opening test-cbor-goldens.json: %v", err) - failT(t) - } - defer f.Close() - jh := new(JsonHandle) - jh.MapType = testMapStrIntfTyp - // d := NewDecoder(f, jh) - d := NewDecoder(bufio.NewReader(f), jh) - // err = d.Decode(&gs) - d.MustDecode(&gs) - if err != nil { - logT(t, "error json decoding test-cbor-goldens.json: %v", err) - failT(t) - } - - tagregex := regexp.MustCompile(`[\d]+\(.+?\)`) - hexregex := regexp.MustCompile(`h'([0-9a-fA-F]*)'`) - for i, g := range gs { - // fmt.Printf("%v, skip: %v, isTag: %v, %s\n", i, g.Skip, tagregex.MatchString(g.Diagnostic), g.Diagnostic) - // skip tags or simple or those with prefix, as we can't verify them. - if g.Skip || strings.HasPrefix(g.Diagnostic, "simple(") || tagregex.MatchString(g.Diagnostic) { - // fmt.Printf("%v: skipped\n", i) - logT(t, "[%v] skipping because skip=true OR unsupported simple value or Tag Value", i) - continue - } - // println("++++++++++++", i, "g.Diagnostic", g.Diagnostic) - if hexregex.MatchString(g.Diagnostic) { - // println(i, "g.Diagnostic matched hex") - if s2 := g.Diagnostic[2 : len(g.Diagnostic)-1]; s2 == "" { - g.Decoded = zeroByteSlice - } else if bs2, err2 := hex.DecodeString(s2); err2 == nil { - g.Decoded = bs2 - } - // fmt.Printf("%v: hex: %v\n", i, g.Decoded) - } - bs, err := hex.DecodeString(g.Hex) - if err != nil { - logT(t, "[%v] error hex decoding %s [%v]: %v", i, g.Hex, err) - failT(t) - } - var v interface{} - NewDecoderBytes(bs, testCborH).MustDecode(&v) - if _, ok := v.(RawExt); ok { - continue - } - // check the diagnostics to compare - switch g.Diagnostic { - case "Infinity": - b := math.IsInf(v.(float64), 1) - testCborError(t, i, math.Inf(1), v, nil, &b) - case "-Infinity": - b := math.IsInf(v.(float64), -1) - testCborError(t, i, math.Inf(-1), v, nil, &b) - case "NaN": - // println(i, "checking NaN") - b := math.IsNaN(v.(float64)) - testCborError(t, i, math.NaN(), v, nil, &b) - case "undefined": - b := v == nil - testCborError(t, i, nil, v, nil, &b) - default: - v0 := g.Decoded - // testCborCoerceJsonNumber(reflect.ValueOf(&v0)) - testCborError(t, i, v0, v, deepEqual(v0, v), nil) - } - } -} - -func testCborError(t *testing.T, i int, v0, v1 interface{}, err error, equal *bool) { - if err == nil && equal == nil { - // fmt.Printf("%v testCborError passed (err and equal nil)\n", i) - return - } - if err != nil { - logT(t, "[%v] deepEqual error: %v", i, err) - logT(t, " ....... GOLDEN: (%T) %#v", v0, v0) - logT(t, " ....... DECODED: (%T) %#v", v1, v1) - failT(t) - } - if equal != nil && !*equal { - logT(t, "[%v] values not equal", i) - logT(t, " ....... GOLDEN: (%T) %#v", v0, v0) - logT(t, " ....... DECODED: (%T) %#v", v1, v1) - failT(t) - } - // fmt.Printf("%v testCborError passed (checks passed)\n", i) -} - -func TestCborGoldens(t *testing.T) { - doTestCborGoldens(t) -} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go deleted file mode 100644 index d9583a9..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/codec_test.go +++ /dev/null @@ -1,1175 +0,0 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -// Test works by using a slice of interfaces. -// It can test for encoding/decoding into/from a nil interface{} -// or passing the object to encode/decode into. -// -// There are basically 2 main tests here. -// First test internally encodes and decodes things and verifies that -// the artifact was as expected. -// Second test will use python msgpack to create a bunch of golden files, -// read those files, and compare them to what it should be. It then -// writes those files back out and compares the byte streams. -// -// Taken together, the tests are pretty extensive. -// -// The following manual tests must be done: -// - TestCodecUnderlyingType -// - Set fastpathEnabled to false and run tests (to ensure that regular reflection works). -// We don't want to use a variable there so that code is ellided. - -import ( - "bytes" - "encoding/gob" - "flag" - "fmt" - "io/ioutil" - "math" - "net" - "net/rpc" - "os" - "os/exec" - "path/filepath" - "reflect" - "runtime" - "strconv" - "sync/atomic" - "testing" - "time" -) - -func init() { - testInitFlags() - testPreInitFns = append(testPreInitFns, testInit) -} - -type testVerifyArg int - -const ( - testVerifyMapTypeSame testVerifyArg = iota - testVerifyMapTypeStrIntf - testVerifyMapTypeIntfIntf - // testVerifySliceIntf - testVerifyForPython -) - -const testSkipRPCTests = false - -var ( - testVerbose bool - testInitDebug bool - testUseIoEncDec bool - testStructToArray bool - testCanonical bool - testWriteNoSymbols bool - testSkipIntf bool - - skipVerifyVal interface{} = &(struct{}{}) - - testMapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) - - // For Go Time, do not use a descriptive timezone. - // It's unnecessary, and makes it harder to do a reflect.DeepEqual. - // The Offset already tells what the offset should be, if not on UTC and unknown zone name. - timeLoc = time.FixedZone("", -8*60*60) // UTC-08:00 //time.UTC-8 - timeToCompare1 = time.Date(2012, 2, 2, 2, 2, 2, 2000, timeLoc).UTC() - timeToCompare2 = time.Date(1900, 2, 2, 2, 2, 2, 2000, timeLoc).UTC() - timeToCompare3 = time.Unix(0, 270).UTC() // use value that must be encoded as uint64 for nanoseconds (for cbor/msgpack comparison) - //timeToCompare4 = time.Time{}.UTC() // does not work well with simple cbor time encoding (overflow) - timeToCompare4 = time.Unix(-2013855848, 4223).UTC() - - table []interface{} // main items we encode - tableVerify []interface{} // we verify encoded things against this after decode - tableTestNilVerify []interface{} // for nil interface, use this to verify (rules are different) - tablePythonVerify []interface{} // for verifying for python, since Python sometimes - // will encode a float32 as float64, or large int as uint - testRpcInt = new(TestRpcInt) -) - -func testInitFlags() { - // delete(testDecOpts.ExtFuncs, timeTyp) - flag.BoolVar(&testVerbose, "tv", false, "Test Verbose") - flag.BoolVar(&testInitDebug, "tg", false, "Test Init Debug") - flag.BoolVar(&testUseIoEncDec, "ti", false, "Use IO Reader/Writer for Marshal/Unmarshal") - flag.BoolVar(&testStructToArray, "ts", false, "Set StructToArray option") - flag.BoolVar(&testWriteNoSymbols, "tn", false, "Set NoSymbols option") - flag.BoolVar(&testCanonical, "tc", false, "Set Canonical option") - flag.BoolVar(&testSkipIntf, "tf", false, "Skip Interfaces") -} - -type TestABC struct { - A, B, C string -} - -type TestRpcInt struct { - i int -} - -func (r *TestRpcInt) Update(n int, res *int) error { r.i = n; *res = r.i; return nil } -func (r *TestRpcInt) Square(ignore int, res *int) error { *res = r.i * r.i; return nil } -func (r *TestRpcInt) Mult(n int, res *int) error { *res = r.i * n; return nil } -func (r *TestRpcInt) EchoStruct(arg TestABC, res *string) error { - *res = fmt.Sprintf("%#v", arg) - return nil -} -func (r *TestRpcInt) Echo123(args []string, res *string) error { - *res = fmt.Sprintf("%#v", args) - return nil -} - -type testUnixNanoTimeExt struct{} - -func (x testUnixNanoTimeExt) WriteExt(interface{}) []byte { panic("unsupported") } -func (x testUnixNanoTimeExt) ReadExt(interface{}, []byte) { panic("unsupported") } -func (x testUnixNanoTimeExt) ConvertExt(v interface{}) interface{} { - switch v2 := v.(type) { - case time.Time: - return v2.UTC().UnixNano() - case *time.Time: - return v2.UTC().UnixNano() - default: - panic(fmt.Sprintf("unsupported format for time conversion: expecting time.Time; got %T", v)) - } -} -func (x testUnixNanoTimeExt) UpdateExt(dest interface{}, v interface{}) { - // fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v\n", v) - tt := dest.(*time.Time) - switch v2 := v.(type) { - case int64: - *tt = time.Unix(0, v2).UTC() - case uint64: - *tt = time.Unix(0, int64(v2)).UTC() - //case float64: - //case string: - default: - panic(fmt.Sprintf("unsupported format for time conversion: expecting int64/uint64; got %T", v)) - } - // fmt.Printf("testUnixNanoTimeExt.UpdateExt: v: %v, tt: %#v\n", v, tt) -} - -func testVerifyVal(v interface{}, arg testVerifyArg) (v2 interface{}) { - //for python msgpack, - // - all positive integers are unsigned 64-bit ints - // - all floats are float64 - switch iv := v.(type) { - case int8: - if iv >= 0 { - v2 = uint64(iv) - } else { - v2 = int64(iv) - } - case int16: - if iv >= 0 { - v2 = uint64(iv) - } else { - v2 = int64(iv) - } - case int32: - if iv >= 0 { - v2 = uint64(iv) - } else { - v2 = int64(iv) - } - case int64: - if iv >= 0 { - v2 = uint64(iv) - } else { - v2 = int64(iv) - } - case uint8: - v2 = uint64(iv) - case uint16: - v2 = uint64(iv) - case uint32: - v2 = uint64(iv) - case uint64: - v2 = uint64(iv) - case float32: - v2 = float64(iv) - case float64: - v2 = float64(iv) - case []interface{}: - m2 := make([]interface{}, len(iv)) - for j, vj := range iv { - m2[j] = testVerifyVal(vj, arg) - } - v2 = m2 - case map[string]bool: - switch arg { - case testVerifyMapTypeSame: - m2 := make(map[string]bool) - for kj, kv := range iv { - m2[kj] = kv - } - v2 = m2 - case testVerifyMapTypeStrIntf, testVerifyForPython: - m2 := make(map[string]interface{}) - for kj, kv := range iv { - m2[kj] = kv - } - v2 = m2 - case testVerifyMapTypeIntfIntf: - m2 := make(map[interface{}]interface{}) - for kj, kv := range iv { - m2[kj] = kv - } - v2 = m2 - } - case map[string]interface{}: - switch arg { - case testVerifyMapTypeSame: - m2 := make(map[string]interface{}) - for kj, kv := range iv { - m2[kj] = testVerifyVal(kv, arg) - } - v2 = m2 - case testVerifyMapTypeStrIntf, testVerifyForPython: - m2 := make(map[string]interface{}) - for kj, kv := range iv { - m2[kj] = testVerifyVal(kv, arg) - } - v2 = m2 - case testVerifyMapTypeIntfIntf: - m2 := make(map[interface{}]interface{}) - for kj, kv := range iv { - m2[kj] = testVerifyVal(kv, arg) - } - v2 = m2 - } - case map[interface{}]interface{}: - m2 := make(map[interface{}]interface{}) - for kj, kv := range iv { - m2[testVerifyVal(kj, arg)] = testVerifyVal(kv, arg) - } - v2 = m2 - case time.Time: - switch arg { - case testVerifyForPython: - if iv2 := iv.UnixNano(); iv2 >= 0 { - v2 = uint64(iv2) - } else { - v2 = int64(iv2) - } - default: - v2 = v - } - default: - v2 = v - } - return -} - -func testInit() { - gob.Register(new(TestStruc)) - if testInitDebug { - ts0 := newTestStruc(2, false, !testSkipIntf, false) - fmt.Printf("====> depth: %v, ts: %#v\n", 2, ts0) - } - - testJsonH.Canonical = testCanonical - testCborH.Canonical = testCanonical - testSimpleH.Canonical = testCanonical - testBincH.Canonical = testCanonical - testMsgpackH.Canonical = testCanonical - - testJsonH.StructToArray = testStructToArray - testCborH.StructToArray = testStructToArray - testSimpleH.StructToArray = testStructToArray - testBincH.StructToArray = testStructToArray - testMsgpackH.StructToArray = testStructToArray - - testMsgpackH.RawToString = true - - if testWriteNoSymbols { - testBincH.AsSymbols = AsSymbolNone - } else { - testBincH.AsSymbols = AsSymbolAll - } - - // testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt) - // testMsgpackH.AddExt(timeTyp, 1, testMsgpackH.TimeEncodeExt, testMsgpackH.TimeDecodeExt) - timeEncExt := func(rv reflect.Value) (bs []byte, err error) { - switch v2 := rv.Interface().(type) { - case time.Time: - bs = encodeTime(v2) - case *time.Time: - bs = encodeTime(*v2) - default: - err = fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2) - } - return - } - timeDecExt := func(rv reflect.Value, bs []byte) (err error) { - tt, err := decodeTime(bs) - if err == nil { - *(rv.Interface().(*time.Time)) = tt - } - return - } - - // add extensions for msgpack, simple for time.Time, so we can encode/decode same way. - testMsgpackH.AddExt(timeTyp, 1, timeEncExt, timeDecExt) - testSimpleH.AddExt(timeTyp, 1, timeEncExt, timeDecExt) - testCborH.SetExt(timeTyp, 1, &testUnixNanoTimeExt{}) - testJsonH.SetExt(timeTyp, 1, &testUnixNanoTimeExt{}) - - primitives := []interface{}{ - int8(-8), - int16(-1616), - int32(-32323232), - int64(-6464646464646464), - uint8(192), - uint16(1616), - uint32(32323232), - uint64(6464646464646464), - byte(192), - float32(-3232.0), - float64(-6464646464.0), - float32(3232.0), - float64(6464646464.0), - false, - true, - nil, - "someday", - "", - "bytestring", - timeToCompare1, - timeToCompare2, - timeToCompare3, - timeToCompare4, - } - mapsAndStrucs := []interface{}{ - map[string]bool{ - "true": true, - "false": false, - }, - map[string]interface{}{ - "true": "True", - "false": false, - "uint16(1616)": uint16(1616), - }, - //add a complex combo map in here. (map has list which has map) - //note that after the first thing, everything else should be generic. - map[string]interface{}{ - "list": []interface{}{ - int16(1616), - int32(32323232), - true, - float32(-3232.0), - map[string]interface{}{ - "TRUE": true, - "FALSE": false, - }, - []interface{}{true, false}, - }, - "int32": int32(32323232), - "bool": true, - "LONG STRING": "123456789012345678901234567890123456789012345678901234567890", - "SHORT STRING": "1234567890", - }, - map[interface{}]interface{}{ - true: "true", - uint8(138): false, - "false": uint8(200), - }, - newTestStruc(0, false, !testSkipIntf, false), - } - - table = []interface{}{} - table = append(table, primitives...) //0-19 are primitives - table = append(table, primitives) //20 is a list of primitives - table = append(table, mapsAndStrucs...) //21-24 are maps. 25 is a *struct - - tableVerify = make([]interface{}, len(table)) - tableTestNilVerify = make([]interface{}, len(table)) - tablePythonVerify = make([]interface{}, len(table)) - - lp := len(primitives) - av := tableVerify - for i, v := range table { - if i == lp+3 { - av[i] = skipVerifyVal - continue - } - //av[i] = testVerifyVal(v, testVerifyMapTypeSame) - switch v.(type) { - case []interface{}: - av[i] = testVerifyVal(v, testVerifyMapTypeSame) - case map[string]interface{}: - av[i] = testVerifyVal(v, testVerifyMapTypeSame) - case map[interface{}]interface{}: - av[i] = testVerifyVal(v, testVerifyMapTypeSame) - default: - av[i] = v - } - } - - av = tableTestNilVerify - for i, v := range table { - if i > lp+3 { - av[i] = skipVerifyVal - continue - } - av[i] = testVerifyVal(v, testVerifyMapTypeStrIntf) - } - - av = tablePythonVerify - for i, v := range table { - if i > lp+3 { - av[i] = skipVerifyVal - continue - } - av[i] = testVerifyVal(v, testVerifyForPython) - } - - tablePythonVerify = tablePythonVerify[:24] -} - -func testUnmarshal(v interface{}, data []byte, h Handle) (err error) { - if testUseIoEncDec { - NewDecoder(bytes.NewBuffer(data), h).MustDecode(v) - } else { - NewDecoderBytes(data, h).MustDecode(v) - } - return -} - -func testMarshal(v interface{}, h Handle) (bs []byte, err error) { - if testUseIoEncDec { - var buf bytes.Buffer - NewEncoder(&buf, h).MustEncode(v) - bs = buf.Bytes() - return - } - NewEncoderBytes(&bs, h).MustEncode(v) - return -} - -func testMarshalErr(v interface{}, h Handle, t *testing.T, name string) (bs []byte, err error) { - if bs, err = testMarshal(v, h); err != nil { - logT(t, "Error encoding %s: %v, Err: %v", name, v, err) - t.FailNow() - } - return -} - -func testUnmarshalErr(v interface{}, data []byte, h Handle, t *testing.T, name string) (err error) { - if err = testUnmarshal(v, data, h); err != nil { - logT(t, "Error Decoding into %s: %v, Err: %v", name, v, err) - t.FailNow() - } - return -} - -// doTestCodecTableOne allows us test for different variations based on arguments passed. -func doTestCodecTableOne(t *testing.T, testNil bool, h Handle, - vs []interface{}, vsVerify []interface{}) { - //if testNil, then just test for when a pointer to a nil interface{} is passed. It should work. - //Current setup allows us test (at least manually) the nil interface or typed interface. - logT(t, "================ TestNil: %v ================\n", testNil) - for i, v0 := range vs { - logT(t, "..............................................") - logT(t, " Testing: #%d:, %T, %#v\n", i, v0, v0) - b0, err := testMarshalErr(v0, h, t, "v0") - if err != nil { - continue - } - if h.isBinary() { - logT(t, " Encoded bytes: len: %v, %v\n", len(b0), b0) - } else { - logT(t, " Encoded string: len: %v, %v\n", len(string(b0)), string(b0)) - // println("########### encoded string: " + string(b0)) - } - var v1 interface{} - - if testNil { - err = testUnmarshal(&v1, b0, h) - } else { - if v0 != nil { - v0rt := reflect.TypeOf(v0) // ptr - rv1 := reflect.New(v0rt) - err = testUnmarshal(rv1.Interface(), b0, h) - v1 = rv1.Elem().Interface() - // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() - } - } - - logT(t, " v1 returned: %T, %#v", v1, v1) - // if v1 != nil { - // logT(t, " v1 returned: %T, %#v", v1, v1) - // //we always indirect, because ptr to typed value may be passed (if not testNil) - // v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() - // } - if err != nil { - logT(t, "-------- Error: %v. Partial return: %v", err, v1) - failT(t) - continue - } - v0check := vsVerify[i] - if v0check == skipVerifyVal { - logT(t, " Nil Check skipped: Decoded: %T, %#v\n", v1, v1) - continue - } - - if err = deepEqual(v0check, v1); err == nil { - logT(t, "++++++++ Before and After marshal matched\n") - } else { - // logT(t, "-------- Before and After marshal do not match: Error: %v"+ - // " ====> GOLDEN: (%T) %#v, DECODED: (%T) %#v\n", err, v0check, v0check, v1, v1) - logT(t, "-------- Before and After marshal do not match: Error: %v", err) - logT(t, " ....... GOLDEN: (%T) %#v", v0check, v0check) - logT(t, " ....... DECODED: (%T) %#v", v1, v1) - failT(t) - } - } -} - -func testCodecTableOne(t *testing.T, h Handle) { - testOnce.Do(testInitAll) - // func TestMsgpackAllExperimental(t *testing.T) { - // dopts := testDecOpts(nil, nil, false, true, true), - - idxTime, numPrim, numMap := 19, 23, 4 - //println("#################") - switch v := h.(type) { - case *MsgpackHandle: - var oldWriteExt, oldRawToString bool - oldWriteExt, v.WriteExt = v.WriteExt, true - oldRawToString, v.RawToString = v.RawToString, true - doTestCodecTableOne(t, false, h, table, tableVerify) - v.WriteExt, v.RawToString = oldWriteExt, oldRawToString - case *JsonHandle: - //skip []interface{} containing time.Time, as it encodes as a number, but cannot decode back to time.Time. - //As there is no real support for extension tags in json, this must be skipped. - doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim]) - doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:]) - default: - doTestCodecTableOne(t, false, h, table, tableVerify) - } - // func TestMsgpackAll(t *testing.T) { - - // //skip []interface{} containing time.Time - // doTestCodecTableOne(t, false, h, table[:numPrim], tableVerify[:numPrim]) - // doTestCodecTableOne(t, false, h, table[numPrim+1:], tableVerify[numPrim+1:]) - // func TestMsgpackNilStringMap(t *testing.T) { - var oldMapType reflect.Type - v := h.getBasicHandle() - - oldMapType, v.MapType = v.MapType, testMapStrIntfTyp - - //skip time.Time, []interface{} containing time.Time, last map, and newStruc - doTestCodecTableOne(t, true, h, table[:idxTime], tableTestNilVerify[:idxTime]) - doTestCodecTableOne(t, true, h, table[numPrim+1:numPrim+numMap], tableTestNilVerify[numPrim+1:numPrim+numMap]) - - v.MapType = oldMapType - - // func TestMsgpackNilIntf(t *testing.T) { - - //do newTestStruc and last element of map - doTestCodecTableOne(t, true, h, table[numPrim+numMap:], tableTestNilVerify[numPrim+numMap:]) - //TODO? What is this one? - //doTestCodecTableOne(t, true, h, table[17:18], tableTestNilVerify[17:18]) -} - -func testCodecMiscOne(t *testing.T, h Handle) { - testOnce.Do(testInitAll) - b, err := testMarshalErr(32, h, t, "32") - // Cannot do this nil one, because faster type assertion decoding will panic - // var i *int32 - // if err = testUnmarshal(b, i, nil); err == nil { - // logT(t, "------- Expecting error because we cannot unmarshal to int32 nil ptr") - // t.FailNow() - // } - var i2 int32 = 0 - err = testUnmarshalErr(&i2, b, h, t, "int32-ptr") - if i2 != int32(32) { - logT(t, "------- didn't unmarshal to 32: Received: %d", i2) - t.FailNow() - } - - // func TestMsgpackDecodePtr(t *testing.T) { - ts := newTestStruc(0, false, !testSkipIntf, false) - b, err = testMarshalErr(ts, h, t, "pointer-to-struct") - if len(b) < 40 { - logT(t, "------- Size must be > 40. Size: %d", len(b)) - t.FailNow() - } - if h.isBinary() { - logT(t, "------- b: %v", b) - } else { - logT(t, "------- b: %s", b) - } - ts2 := new(TestStruc) - err = testUnmarshalErr(ts2, b, h, t, "pointer-to-struct") - if ts2.I64 != math.MaxInt64*2/3 { - logT(t, "------- Unmarshal wrong. Expect I64 = 64. Got: %v", ts2.I64) - t.FailNow() - } - - // func TestMsgpackIntfDecode(t *testing.T) { - m := map[string]int{"A": 2, "B": 3} - p := []interface{}{m} - bs, err := testMarshalErr(p, h, t, "p") - - m2 := map[string]int{} - p2 := []interface{}{m2} - err = testUnmarshalErr(&p2, bs, h, t, "&p2") - - if m2["A"] != 2 || m2["B"] != 3 { - logT(t, "m2 not as expected: expecting: %v, got: %v", m, m2) - t.FailNow() - } - // log("m: %v, m2: %v, p: %v, p2: %v", m, m2, p, p2) - checkEqualT(t, p, p2, "p=p2") - checkEqualT(t, m, m2, "m=m2") - if err = deepEqual(p, p2); err == nil { - logT(t, "p and p2 match") - } else { - logT(t, "Not Equal: %v. p: %v, p2: %v", err, p, p2) - t.FailNow() - } - if err = deepEqual(m, m2); err == nil { - logT(t, "m and m2 match") - } else { - logT(t, "Not Equal: %v. m: %v, m2: %v", err, m, m2) - t.FailNow() - } - - // func TestMsgpackDecodeStructSubset(t *testing.T) { - // test that we can decode a subset of the stream - mm := map[string]interface{}{"A": 5, "B": 99, "C": 333} - bs, err = testMarshalErr(mm, h, t, "mm") - type ttt struct { - A uint8 - C int32 - } - var t2 ttt - testUnmarshalErr(&t2, bs, h, t, "t2") - t3 := ttt{5, 333} - checkEqualT(t, t2, t3, "t2=t3") - - // println(">>>>>") - // test simple arrays, non-addressable arrays, slices - type tarr struct { - A int64 - B [3]int64 - C []byte - D [3]byte - } - var tarr0 = tarr{1, [3]int64{2, 3, 4}, []byte{4, 5, 6}, [3]byte{7, 8, 9}} - // test both pointer and non-pointer (value) - for _, tarr1 := range []interface{}{tarr0, &tarr0} { - bs, err = testMarshalErr(tarr1, h, t, "tarr1") - var tarr2 tarr - testUnmarshalErr(&tarr2, bs, h, t, "tarr2") - checkEqualT(t, tarr0, tarr2, "tarr0=tarr2") - // fmt.Printf(">>>> err: %v. tarr1: %v, tarr2: %v\n", err, tarr0, tarr2) - } - - // test byte array, even if empty (msgpack only) - if h == testMsgpackH { - type ystruct struct { - Anarray []byte - } - var ya = ystruct{} - testUnmarshalErr(&ya, []byte{0x91, 0x90}, h, t, "ya") - } -} - -func testCodecEmbeddedPointer(t *testing.T, h Handle) { - testOnce.Do(testInitAll) - type Z int - type A struct { - AnInt int - } - type B struct { - *Z - *A - MoreInt int - } - var z Z = 4 - x1 := &B{&z, &A{5}, 6} - bs, err := testMarshalErr(x1, h, t, "x1") - // fmt.Printf("buf: len(%v): %x\n", buf.Len(), buf.Bytes()) - var x2 = new(B) - err = testUnmarshalErr(x2, bs, h, t, "x2") - err = checkEqualT(t, x1, x2, "x1=x2") - _ = err -} - -func testCodecUnderlyingType(t *testing.T, h Handle) { - testOnce.Do(testInitAll) - // Manual Test. - // Run by hand, with accompanying print statements in fast-path.go - // to ensure that the fast functions are called. - type T1 map[string]string - v := T1{"1": "1s", "2": "2s"} - var bs []byte - var err error - NewEncoderBytes(&bs, h).MustEncode(v) - if err != nil { - logT(t, "Error during encode: %v", err) - failT(t) - } - var v2 T1 - NewDecoderBytes(bs, h).MustDecode(&v2) - if err != nil { - logT(t, "Error during decode: %v", err) - failT(t) - } -} - -func testCodecChan(t *testing.T, h Handle) { - // - send a slice []*int64 (sl1) into an chan (ch1) with cap > len(s1) - // - encode ch1 as a stream array - // - decode a chan (ch2), with cap > len(s1) from the stream array - // - receive from ch2 into slice sl2 - // - compare sl1 and sl2 - // - do this for codecs: json, cbor (covers all types) - sl1 := make([]*int64, 4) - for i := range sl1 { - var j int64 = int64(i) - sl1[i] = &j - } - ch1 := make(chan *int64, 4) - for _, j := range sl1 { - ch1 <- j - } - var bs []byte - NewEncoderBytes(&bs, h).MustEncode(ch1) - // if !h.isBinary() { - // fmt.Printf("before: len(ch1): %v, bs: %s\n", len(ch1), bs) - // } - // var ch2 chan *int64 // this will block if json, etc. - ch2 := make(chan *int64, 8) - NewDecoderBytes(bs, h).MustDecode(&ch2) - // logT(t, "Len(ch2): %v", len(ch2)) - // fmt.Printf("after: len(ch2): %v, ch2: %v\n", len(ch2), ch2) - close(ch2) - var sl2 []*int64 - for j := range ch2 { - sl2 = append(sl2, j) - } - if err := deepEqual(sl1, sl2); err != nil { - logT(t, "Not Match: %v; len: %v, %v", err, len(sl1), len(sl2)) - failT(t) - } -} - -func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs time.Duration, -) (port int) { - testOnce.Do(testInitAll) - if testSkipRPCTests { - return - } - // rpc needs EOF, which is sent via a panic, and so must be recovered. - if !recoverPanicToErr { - logT(t, "EXPECTED. set recoverPanicToErr=true, since rpc needs EOF") - t.FailNow() - } - srv := rpc.NewServer() - srv.Register(testRpcInt) - ln, err := net.Listen("tcp", "127.0.0.1:0") - // log("listener: %v", ln.Addr()) - checkErrT(t, err) - port = (ln.Addr().(*net.TCPAddr)).Port - // var opts *DecoderOptions - // opts := testDecOpts - // opts.MapType = mapStrIntfTyp - // opts.RawToString = false - serverExitChan := make(chan bool, 1) - var serverExitFlag uint64 = 0 - serverFn := func() { - for { - conn1, err1 := ln.Accept() - // if err1 != nil { - // //fmt.Printf("accept err1: %v\n", err1) - // continue - // } - if atomic.LoadUint64(&serverExitFlag) == 1 { - serverExitChan <- true - conn1.Close() - return // exit serverFn goroutine - } - if err1 == nil { - var sc rpc.ServerCodec = rr.ServerCodec(conn1, h) - srv.ServeCodec(sc) - } - } - } - - clientFn := func(cc rpc.ClientCodec) { - cl := rpc.NewClientWithCodec(cc) - defer cl.Close() - // defer func() { println("##### client closing"); cl.Close() }() - var up, sq, mult int - var rstr string - // log("Calling client") - checkErrT(t, cl.Call("TestRpcInt.Update", 5, &up)) - // log("Called TestRpcInt.Update") - checkEqualT(t, testRpcInt.i, 5, "testRpcInt.i=5") - checkEqualT(t, up, 5, "up=5") - checkErrT(t, cl.Call("TestRpcInt.Square", 1, &sq)) - checkEqualT(t, sq, 25, "sq=25") - checkErrT(t, cl.Call("TestRpcInt.Mult", 20, &mult)) - checkEqualT(t, mult, 100, "mult=100") - checkErrT(t, cl.Call("TestRpcInt.EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr)) - checkEqualT(t, rstr, fmt.Sprintf("%#v", TestABC{"Aa", "Bb", "Cc"}), "rstr=") - checkErrT(t, cl.Call("TestRpcInt.Echo123", []string{"A1", "B2", "C3"}, &rstr)) - checkEqualT(t, rstr, fmt.Sprintf("%#v", []string{"A1", "B2", "C3"}), "rstr=") - } - - connFn := func() (bs net.Conn) { - // log("calling f1") - bs, err2 := net.Dial(ln.Addr().Network(), ln.Addr().String()) - //fmt.Printf("f1. bs: %v, err2: %v\n", bs, err2) - checkErrT(t, err2) - return - } - - exitFn := func() { - atomic.StoreUint64(&serverExitFlag, 1) - bs := connFn() - <-serverExitChan - bs.Close() - // serverExitChan <- true - } - - go serverFn() - runtime.Gosched() - //time.Sleep(100 * time.Millisecond) - if exitSleepMs == 0 { - defer ln.Close() - defer exitFn() - } - if doRequest { - bs := connFn() - cc := rr.ClientCodec(bs, h) - clientFn(cc) - } - if exitSleepMs != 0 { - go func() { - defer ln.Close() - time.Sleep(exitSleepMs) - exitFn() - }() - } - return -} - -func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) { - v1 := map[string]interface{}{ - "a": 1, - "b": "hello", - "c": map[string]interface{}{ - "c/a": 1, - "c/b": "world", - "c/c": []int{1, 2, 3, 4}, - "c/d": map[string]interface{}{ - "c/d/a": "fdisajfoidsajfopdjsaopfjdsapofda", - "c/d/b": "fdsafjdposakfodpsakfopdsakfpodsakfpodksaopfkdsopafkdopsa", - "c/d/c": "poir02 ir30qif4p03qir0pogjfpoaerfgjp ofke[padfk[ewapf kdp[afep[aw", - "c/d/d": "fdsopafkd[sa f-32qor-=4qeof -afo-erfo r-eafo 4e- o r4-qwo ag", - "c/d/e": "kfep[a sfkr0[paf[a foe-[wq ewpfao-q ro3-q ro-4qof4-qor 3-e orfkropzjbvoisdb", - "c/d/f": "", - }, - "c/e": map[int]string{ - 1: "1", - 22: "22", - 333: "333", - 4444: "4444", - 55555: "55555", - }, - "c/f": map[string]int{ - "1": 1, - "22": 22, - "333": 333, - "4444": 4444, - "55555": 55555, - }, - }, - } - var v2 map[string]interface{} - var b1, b2 []byte - - // encode v1 into b1, decode b1 into v2, encode v2 into b2, compare b1 and b2 - - bh := h.getBasicHandle() - canonical0 := bh.Canonical - bh.Canonical = true - defer func() { bh.Canonical = canonical0 }() - - e1 := NewEncoderBytes(&b1, h) - e1.MustEncode(v1) - d1 := NewDecoderBytes(b1, h) - d1.MustDecode(&v2) - e2 := NewEncoderBytes(&b2, h) - e2.MustEncode(v2) - if !bytes.Equal(b1, b2) { - logT(t, "Unequal bytes: %v VS %v", b1, b2) - t.FailNow() - } -} - -// Comprehensive testing that generates data encoded from python handle (cbor, msgpack), -// and validates that our code can read and write it out accordingly. -// We keep this unexported here, and put actual test in ext_dep_test.go. -// This way, it can be excluded by excluding file completely. -func doTestPythonGenStreams(t *testing.T, name string, h Handle) { - logT(t, "TestPythonGenStreams-%v", name) - tmpdir, err := ioutil.TempDir("", "golang-"+name+"-test") - if err != nil { - logT(t, "-------- Unable to create temp directory\n") - t.FailNow() - } - defer os.RemoveAll(tmpdir) - logT(t, "tmpdir: %v", tmpdir) - cmd := exec.Command("python", "test.py", "testdata", tmpdir) - //cmd.Stdin = strings.NewReader("some input") - //cmd.Stdout = &out - var cmdout []byte - if cmdout, err = cmd.CombinedOutput(); err != nil { - logT(t, "-------- Error running test.py testdata. Err: %v", err) - logT(t, " %v", string(cmdout)) - t.FailNow() - } - - bh := h.getBasicHandle() - - oldMapType := bh.MapType - for i, v := range tablePythonVerify { - // if v == uint64(0) && h == testMsgpackH { - // v = int64(0) - // } - bh.MapType = oldMapType - //load up the golden file based on number - //decode it - //compare to in-mem object - //encode it again - //compare to output stream - logT(t, "..............................................") - logT(t, " Testing: #%d: %T, %#v\n", i, v, v) - var bss []byte - bss, err = ioutil.ReadFile(filepath.Join(tmpdir, strconv.Itoa(i)+"."+name+".golden")) - if err != nil { - logT(t, "-------- Error reading golden file: %d. Err: %v", i, err) - failT(t) - continue - } - bh.MapType = testMapStrIntfTyp - - var v1 interface{} - if err = testUnmarshal(&v1, bss, h); err != nil { - logT(t, "-------- Error decoding stream: %d: Err: %v", i, err) - failT(t) - continue - } - if v == skipVerifyVal { - continue - } - //no need to indirect, because we pass a nil ptr, so we already have the value - //if v1 != nil { v1 = reflect.Indirect(reflect.ValueOf(v1)).Interface() } - if err = deepEqual(v, v1); err == nil { - logT(t, "++++++++ Objects match: %T, %v", v, v) - } else { - logT(t, "-------- Objects do not match: %v. Source: %T. Decoded: %T", err, v, v1) - logT(t, "-------- GOLDEN: %#v", v) - // logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface()) - logT(t, "-------- DECODED: %#v <====> %#v", v1, reflect.Indirect(reflect.ValueOf(v1)).Interface()) - failT(t) - } - bsb, err := testMarshal(v1, h) - if err != nil { - logT(t, "Error encoding to stream: %d: Err: %v", i, err) - failT(t) - continue - } - if err = deepEqual(bsb, bss); err == nil { - logT(t, "++++++++ Bytes match") - } else { - logT(t, "???????? Bytes do not match. %v.", err) - xs := "--------" - if reflect.ValueOf(v).Kind() == reflect.Map { - xs = " " - logT(t, "%s It's a map. Ok that they don't match (dependent on ordering).", xs) - } else { - logT(t, "%s It's not a map. They should match.", xs) - failT(t) - } - logT(t, "%s FROM_FILE: %4d] %v", xs, len(bss), bss) - logT(t, "%s ENCODED: %4d] %v", xs, len(bsb), bsb) - } - } - bh.MapType = oldMapType -} - -// To test MsgpackSpecRpc, we test 3 scenarios: -// - Go Client to Go RPC Service (contained within TestMsgpackRpcSpec) -// - Go client to Python RPC Service (contained within doTestMsgpackRpcSpecGoClientToPythonSvc) -// - Python Client to Go RPC Service (contained within doTestMsgpackRpcSpecPythonClientToGoSvc) -// -// This allows us test the different calling conventions -// - Go Service requires only one argument -// - Python Service allows multiple arguments - -func doTestMsgpackRpcSpecGoClientToPythonSvc(t *testing.T) { - if testSkipRPCTests { - return - } - openPort := "6789" - cmd := exec.Command("python", "test.py", "rpc-server", openPort, "2") - checkErrT(t, cmd.Start()) - time.Sleep(100 * time.Millisecond) // time for python rpc server to start - bs, err2 := net.Dial("tcp", ":"+openPort) - checkErrT(t, err2) - cc := MsgpackSpecRpc.ClientCodec(bs, testMsgpackH) - cl := rpc.NewClientWithCodec(cc) - defer cl.Close() - var rstr string - checkErrT(t, cl.Call("EchoStruct", TestABC{"Aa", "Bb", "Cc"}, &rstr)) - //checkEqualT(t, rstr, "{'A': 'Aa', 'B': 'Bb', 'C': 'Cc'}") - var mArgs MsgpackSpecRpcMultiArgs = []interface{}{"A1", "B2", "C3"} - checkErrT(t, cl.Call("Echo123", mArgs, &rstr)) - checkEqualT(t, rstr, "1:A1 2:B2 3:C3", "rstr=") -} - -func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) { - if testSkipRPCTests { - return - } - port := testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, false, 1*time.Second) - //time.Sleep(1000 * time.Millisecond) - cmd := exec.Command("python", "test.py", "rpc-client-go-service", strconv.Itoa(port)) - var cmdout []byte - var err error - if cmdout, err = cmd.CombinedOutput(); err != nil { - logT(t, "-------- Error running test.py rpc-client-go-service. Err: %v", err) - logT(t, " %v", string(cmdout)) - t.FailNow() - } - checkEqualT(t, string(cmdout), - fmt.Sprintf("%#v\n%#v\n", []string{"A1", "B2", "C3"}, TestABC{"Aa", "Bb", "Cc"}), "cmdout=") -} - -func TestBincCodecsTable(t *testing.T) { - testCodecTableOne(t, testBincH) -} - -func TestBincCodecsMisc(t *testing.T) { - testCodecMiscOne(t, testBincH) -} - -func TestBincCodecsEmbeddedPointer(t *testing.T) { - testCodecEmbeddedPointer(t, testBincH) -} - -func TestSimpleCodecsTable(t *testing.T) { - testCodecTableOne(t, testSimpleH) -} - -func TestSimpleCodecsMisc(t *testing.T) { - testCodecMiscOne(t, testSimpleH) -} - -func TestSimpleCodecsEmbeddedPointer(t *testing.T) { - testCodecEmbeddedPointer(t, testSimpleH) -} - -func TestMsgpackCodecsTable(t *testing.T) { - testCodecTableOne(t, testMsgpackH) -} - -func TestMsgpackCodecsMisc(t *testing.T) { - testCodecMiscOne(t, testMsgpackH) -} - -func TestMsgpackCodecsEmbeddedPointer(t *testing.T) { - testCodecEmbeddedPointer(t, testMsgpackH) -} - -func TestCborCodecsTable(t *testing.T) { - testCodecTableOne(t, testCborH) -} - -func TestCborCodecsMisc(t *testing.T) { - testCodecMiscOne(t, testCborH) -} - -func TestCborCodecsEmbeddedPointer(t *testing.T) { - testCodecEmbeddedPointer(t, testCborH) -} - -func TestCborMapEncodeForCanonical(t *testing.T) { - doTestMapEncodeForCanonical(t, "cbor", testCborH) -} - -func TestJsonCodecsTable(t *testing.T) { - testCodecTableOne(t, testJsonH) -} - -func TestJsonCodecsMisc(t *testing.T) { - testCodecMiscOne(t, testJsonH) -} - -func TestJsonCodecsEmbeddedPointer(t *testing.T) { - testCodecEmbeddedPointer(t, testJsonH) -} - -func TestJsonCodecChan(t *testing.T) { - testCodecChan(t, testJsonH) -} - -func TestCborCodecChan(t *testing.T) { - testCodecChan(t, testCborH) -} - -// ----- RPC ----- - -func TestBincRpcGo(t *testing.T) { - testCodecRpcOne(t, GoRpc, testBincH, true, 0) -} - -func TestSimpleRpcGo(t *testing.T) { - testCodecRpcOne(t, GoRpc, testSimpleH, true, 0) -} - -func TestMsgpackRpcGo(t *testing.T) { - testCodecRpcOne(t, GoRpc, testMsgpackH, true, 0) -} - -func TestCborRpcGo(t *testing.T) { - testCodecRpcOne(t, GoRpc, testCborH, true, 0) -} - -func TestJsonRpcGo(t *testing.T) { - testCodecRpcOne(t, GoRpc, testJsonH, true, 0) -} - -func TestMsgpackRpcSpec(t *testing.T) { - testCodecRpcOne(t, MsgpackSpecRpc, testMsgpackH, true, 0) -} - -func TestBincUnderlyingType(t *testing.T) { - testCodecUnderlyingType(t, testBincH) -} - -// TODO: -// Add Tests for: -// - decoding empty list/map in stream into a nil slice/map -// - binary(M|Unm)arsher support for time.Time (e.g. cbor encoding) -// - text(M|Unm)arshaler support for time.Time (e.g. json encoding) -// - non fast-path scenarios e.g. map[string]uint16, []customStruct. -// Expand cbor to include indefinite length stuff for this non-fast-path types. -// This may not be necessary, since we have the manual tests (fastpathEnabled=false) to test/validate with. -// - CodecSelfer -// Ensure it is called when (en|de)coding interface{} or reflect.Value (2 different codepaths). -// - interfaces: textMarshaler, binaryMarshaler, codecSelfer -// - struct tags: -// on anonymous fields, _struct (all fields), etc -// - codecgen of struct containing channels. -// -// Cleanup tests: -// - The are brittle in their handling of validation and skipping diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go index 8f42643..f370b4c 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go @@ -41,24 +41,13 @@ package {{ $.PackageName }} import ( {{ if not .CodecPkgFiles }}{{ .CodecPkgName }} "{{ .CodecImportPath }}"{{ end }} -{{/* - {{ if .Types }}"{{ .ImportPath }}"{{ end }} - "io" -*/}} "os" "reflect" "bytes" + "strings" "go/format" ) -{{/* This is not used anymore. Remove it. -func write(w io.Writer, s string) { - if _, err := io.WriteString(w, s); err != nil { - panic(err) - } -} -*/}} - func CodecGenTempWrite{{ .RandString }}() { fout, err := os.Create("{{ .OutFile }}") if err != nil { @@ -72,7 +61,7 @@ func CodecGenTempWrite{{ .RandString }}() { var t{{ $index }} {{ . }} typs = append(typs, reflect.TypeOf(t{{ $index }})) {{ end }} - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .UseUnsafe }}, typs...) + {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .UseUnsafe }}, {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...) bout, err := format.Source(out.Bytes()) if err != nil { fout.Write(out.Bytes()) @@ -93,7 +82,7 @@ func CodecGenTempWrite{{ .RandString }}() { // fout contains Codec(En|De)codeSelf implementations for every type T. // func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, goRunTag string, - regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) { + st string, regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) { // For each file, grab AST, find each type, and write a call to it. if len(infiles) == 0 { return @@ -128,6 +117,7 @@ func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, PackageName string RandString string BuildTag string + StructTags string Types []string CodecPkgFiles bool UseUnsafe bool @@ -139,6 +129,7 @@ func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, BuildTag: buildTag, UseUnsafe: useUnsafe, RandString: strconv.FormatInt(uid, 10), + StructTags: st, } tv.ImportPath = pkg.ImportPath if tv.ImportPath == tv.CodecImportPath { @@ -269,11 +260,12 @@ func main() { t := flag.String("t", "", "build tag to put in file") r := flag.String("r", ".*", "regex for type name to match") rt := flag.String("rt", "", "tags for go run") + st := flag.String("st", "codec,json", "struct tag keys to introspect") x := flag.Bool("x", false, "keep temp file") u := flag.Bool("u", false, "Use unsafe, e.g. to avoid unnecessary allocation on []byte->string") d := flag.Int64("d", 0, "random identifier for use in generated code") flag.Parse() - if err := Generate(*o, *t, *c, *d, *u, *rt, + if err := Generate(*o, *t, *c, *d, *u, *rt, *st, regexp.MustCompile(*r), !*x, flag.Args()...); err != nil { fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err) os.Exit(1) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go deleted file mode 100644 index 2fdfd16..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen_test.go +++ /dev/null @@ -1,22 +0,0 @@ -//+build x,codecgen - -package codec - -import ( - "fmt" - "testing" -) - -func TestCodecgenJson1(t *testing.T) { - const callCodecgenDirect bool = true - v := newTestStruc(2, false, !testSkipIntf, false) - var bs []byte - e := NewEncoderBytes(&bs, testJsonH) - if callCodecgenDirect { - v.CodecEncodeSelf(e) - e.w.atEndOfEncode() - } else { - e.MustEncode(v) - } - fmt.Printf("%s\n", bs) -} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go index 34eacc6..d842a24 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "reflect" + "time" ) // Some tagging information for error messages. @@ -48,16 +49,23 @@ type decDriver interface { // this will check if the next token is a break. CheckBreak() bool TryDecodeAsNil() bool - // check if a container type: vt is one of: Bytes, String, Nil, Slice or Map. - // if vt param == valueTypeNil, and nil is seen in stream, consume the nil. - IsContainerType(vt valueType) bool + // vt is one of: Bytes, String, Nil, Slice or Map. Return unSet if not known. + ContainerType() (vt valueType) IsBuiltinType(rt uintptr) bool DecodeBuiltin(rt uintptr, v interface{}) - //decodeNaked: Numbers are decoded as int64, uint64, float64 only (no smaller sized number types). - //for extensions, decodeNaked must completely decode them as a *RawExt. - //extensions should also use readx to decode them, for efficiency. - //kInterface will extract the detached byte slice if it has to pass it outside its realm. - DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) + + // DecodeNaked will decode primitives (number, bool, string, []byte) and RawExt. + // For maps and arrays, it will not do the decoding in-band, but will signal + // the decoder, so that is done later, by setting the decNaked.valueType field. + // + // Note: Numbers are decoded as int64, uint64, float64 only (no smaller sized number types). + // for extensions, DecodeNaked must read the tag and the []byte if it exists. + // if the []byte is not read, then kInterfaceNaked will treat it as a Handle + // that stores the subsequent value in-band, and complete reading the RawExt. + // + // extensions should also use readx to decode them, for efficiency. + // kInterface will extract the detached byte slice if it has to pass it outside its realm. + DecodeNaked() DecodeInt(bitsize uint8) (i int64) DecodeUint(bitsize uint8) (ui uint64) DecodeFloat(chkOverflow32 bool) (f float64) @@ -78,13 +86,15 @@ type decDriver interface { // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) ReadMapStart() int ReadArrayStart() int - // ReadEnd registers the end of a map or array. - ReadEnd() + + reset() + uncacheRead() } type decNoSeparator struct{} -func (_ decNoSeparator) ReadEnd() {} +func (_ decNoSeparator) ReadEnd() {} +func (_ decNoSeparator) uncacheRead() {} type DecodeOptions struct { // MapType specifies type to use during schema-less decoding of a map in the stream. @@ -95,6 +105,14 @@ type DecodeOptions struct { // If nil, we use []interface{} SliceType reflect.Type + // MaxInitLen defines the initial length that we "make" a collection (slice, chan or map) with. + // If 0 or negative, we default to a sensible value based on the size of an element in the collection. + // + // For example, when decoding, a stream may say that it has MAX_UINT elements. + // We should not auto-matically provision a slice of that length, to prevent Out-Of-Memory crash. + // Instead, we provision up to MaxInitLen, fill that up, and start appending after that. + MaxInitLen int + // If ErrorIfNoField, return an error when decoding a map // from a codec stream into a struct, and no matching struct field is found. ErrorIfNoField bool @@ -106,6 +124,43 @@ type DecodeOptions struct { // If SignedInteger, use the int64 during schema-less decoding of unsigned values (not uint64). SignedInteger bool + + // MapValueReset controls how we decode into a map value. + // + // By default, we MAY retrieve the mapping for a key, and then decode into that. + // However, especially with big maps, that retrieval may be expensive and unnecessary + // if the stream already contains all that is necessary to recreate the value. + // + // If true, we will never retrieve the previous mapping, + // but rather decode into a new value and set that in the map. + // + // If false, we will retrieve the previous mapping if necessary e.g. + // the previous mapping is a pointer, or is a struct or array with pre-set state, + // or is an interface. + MapValueReset bool + + // InterfaceReset controls how we decode into an interface. + // + // By default, when we see a field that is an interface{...}, + // or a map with interface{...} value, we will attempt decoding into the + // "contained" value. + // + // However, this prevents us from reading a string into an interface{} + // that formerly contained a number. + // + // If true, we will decode into a new "blank" value, and set that in the interface. + // If false, we will decode into whatever is contained in the interface. + InterfaceReset bool + + // InternString controls interning of strings during decoding. + // + // Some handles, e.g. json, typically will read map keys as strings. + // If the set of keys are finite, it may help reduce allocation to + // look them up from a map (than to allocate them afresh). + // + // Note: Handles will be smart when using the intern functionality. + // So everything will not be interned. + InternString bool } // ------------------------------------ @@ -281,6 +336,13 @@ type bytesDecReader struct { t int // track start } +func (z *bytesDecReader) reset(in []byte) { + z.b = in + z.a = len(in) + z.c = 0 + z.t = 0 +} + func (z *bytesDecReader) numread() int { return z.c } @@ -348,7 +410,7 @@ func (z *bytesDecReader) stopTrack() (bs []byte) { // ------------------------------------ -type decFnInfoX struct { +type decFnInfo struct { d *Decoder ti *typeInfo xfFn Ext @@ -356,40 +418,26 @@ type decFnInfoX struct { seq seqType } -// decFnInfo has methods for handling decoding of a specific type -// based on some characteristics (builtin, extension, reflect Kind, etc) -type decFnInfo struct { - // use decFnInfo as a value receiver. - // keep most of it less-used variables accessible via a pointer (*decFnInfoX). - // As sweet spot for value-receiver is 3 words, keep everything except - // decDriver (which everyone needs) directly accessible. - // ensure decFnInfoX is set for everyone who needs it i.e. - // rawExt, ext, builtin, (selfer|binary|text)Marshal, kSlice, kStruct, kMap, kInterface, fastpath - - dd decDriver - *decFnInfoX -} - // ---------------------------------------- type decFn struct { i decFnInfo - f func(decFnInfo, reflect.Value) + f func(*decFnInfo, reflect.Value) } -func (f decFnInfo) builtin(rv reflect.Value) { - f.dd.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface()) +func (f *decFnInfo) builtin(rv reflect.Value) { + f.d.d.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface()) } -func (f decFnInfo) rawExt(rv reflect.Value) { - f.dd.DecodeExt(rv.Addr().Interface(), 0, nil) +func (f *decFnInfo) rawExt(rv reflect.Value) { + f.d.d.DecodeExt(rv.Addr().Interface(), 0, nil) } -func (f decFnInfo) ext(rv reflect.Value) { - f.dd.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn) +func (f *decFnInfo) ext(rv reflect.Value) { + f.d.d.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn) } -func (f decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { +func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { if indir == -1 { v = rv.Addr().Interface() } else if indir == 0 { @@ -406,105 +454,101 @@ func (f decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) ( return } -func (f decFnInfo) selferUnmarshal(rv reflect.Value) { +func (f *decFnInfo) selferUnmarshal(rv reflect.Value) { f.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(f.d) } -func (f decFnInfo) binaryUnmarshal(rv reflect.Value) { +func (f *decFnInfo) binaryUnmarshal(rv reflect.Value) { bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler) - xbs := f.dd.DecodeBytes(nil, false, true) + xbs := f.d.d.DecodeBytes(nil, false, true) if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { panic(fnerr) } } -func (f decFnInfo) textUnmarshal(rv reflect.Value) { +func (f *decFnInfo) textUnmarshal(rv reflect.Value) { tm := f.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler) - fnerr := tm.UnmarshalText(f.dd.DecodeBytes(f.d.b[:], true, true)) + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) if fnerr != nil { panic(fnerr) } } -func (f decFnInfo) jsonUnmarshal(rv reflect.Value) { +func (f *decFnInfo) jsonUnmarshal(rv reflect.Value) { tm := f.getValueForUnmarshalInterface(rv, f.ti.junmIndir).(jsonUnmarshaler) - // bs := f.dd.DecodeBytes(f.d.b[:], true, true) - // grab the bytes to be read, as UnmarshalJSON wants the full JSON to unmarshal it itself. - f.d.r.track() - f.d.swallow() - bs := f.d.r.stopTrack() - // fmt.Printf(">>>>>> REFLECTION JSON: %s\n", bs) - fnerr := tm.UnmarshalJSON(bs) + // bs := f.d.d.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) if fnerr != nil { panic(fnerr) } } -func (f decFnInfo) kErr(rv reflect.Value) { +func (f *decFnInfo) kErr(rv reflect.Value) { f.d.errorf("no decoding function defined for kind %v", rv.Kind()) } -func (f decFnInfo) kString(rv reflect.Value) { - rv.SetString(f.dd.DecodeString()) +func (f *decFnInfo) kString(rv reflect.Value) { + rv.SetString(f.d.d.DecodeString()) } -func (f decFnInfo) kBool(rv reflect.Value) { - rv.SetBool(f.dd.DecodeBool()) +func (f *decFnInfo) kBool(rv reflect.Value) { + rv.SetBool(f.d.d.DecodeBool()) } -func (f decFnInfo) kInt(rv reflect.Value) { - rv.SetInt(f.dd.DecodeInt(intBitsize)) +func (f *decFnInfo) kInt(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(intBitsize)) } -func (f decFnInfo) kInt64(rv reflect.Value) { - rv.SetInt(f.dd.DecodeInt(64)) +func (f *decFnInfo) kInt64(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(64)) } -func (f decFnInfo) kInt32(rv reflect.Value) { - rv.SetInt(f.dd.DecodeInt(32)) +func (f *decFnInfo) kInt32(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(32)) } -func (f decFnInfo) kInt8(rv reflect.Value) { - rv.SetInt(f.dd.DecodeInt(8)) +func (f *decFnInfo) kInt8(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(8)) } -func (f decFnInfo) kInt16(rv reflect.Value) { - rv.SetInt(f.dd.DecodeInt(16)) +func (f *decFnInfo) kInt16(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(16)) } -func (f decFnInfo) kFloat32(rv reflect.Value) { - rv.SetFloat(f.dd.DecodeFloat(true)) +func (f *decFnInfo) kFloat32(rv reflect.Value) { + rv.SetFloat(f.d.d.DecodeFloat(true)) } -func (f decFnInfo) kFloat64(rv reflect.Value) { - rv.SetFloat(f.dd.DecodeFloat(false)) +func (f *decFnInfo) kFloat64(rv reflect.Value) { + rv.SetFloat(f.d.d.DecodeFloat(false)) } -func (f decFnInfo) kUint8(rv reflect.Value) { - rv.SetUint(f.dd.DecodeUint(8)) +func (f *decFnInfo) kUint8(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(8)) } -func (f decFnInfo) kUint64(rv reflect.Value) { - rv.SetUint(f.dd.DecodeUint(64)) +func (f *decFnInfo) kUint64(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(64)) } -func (f decFnInfo) kUint(rv reflect.Value) { - rv.SetUint(f.dd.DecodeUint(uintBitsize)) +func (f *decFnInfo) kUint(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(uintBitsize)) } -func (f decFnInfo) kUintptr(rv reflect.Value) { - rv.SetUint(f.dd.DecodeUint(uintBitsize)) +func (f *decFnInfo) kUintptr(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(uintBitsize)) } -func (f decFnInfo) kUint32(rv reflect.Value) { - rv.SetUint(f.dd.DecodeUint(32)) +func (f *decFnInfo) kUint32(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(32)) } -func (f decFnInfo) kUint16(rv reflect.Value) { - rv.SetUint(f.dd.DecodeUint(16)) +func (f *decFnInfo) kUint16(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(16)) } -// func (f decFnInfo) kPtr(rv reflect.Value) { +// func (f *decFnInfo) kPtr(rv reflect.Value) { // debugf(">>>>>>> ??? decode kPtr called - shouldn't get called") // if rv.IsNil() { // rv.Set(reflect.New(rv.Type().Elem())) @@ -514,72 +558,105 @@ func (f decFnInfo) kUint16(rv reflect.Value) { // var kIntfCtr uint64 -func (f decFnInfo) kInterfaceNaked() (rvn reflect.Value) { +func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) { // nil interface: // use some hieristics to decode it appropriately // based on the detected next value in the stream. - v, vt, decodeFurther := f.dd.DecodeNaked() - if vt == valueTypeNil { + d := f.d + d.d.DecodeNaked() + n := &d.n + if n.v == valueTypeNil { return } // We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader). - if num := f.ti.rt.NumMethod(); num > 0 { - f.d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, num) + // if num := f.ti.rt.NumMethod(); num > 0 { + if f.ti.numMeth > 0 { + d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, f.ti.numMeth) return } - var useRvn bool - switch vt { + // var useRvn bool + switch n.v { case valueTypeMap: - if f.d.h.MapType == nil { - var m2 map[interface{}]interface{} - v = &m2 + // if d.h.MapType == nil || d.h.MapType == mapIntfIntfTyp { + // } else if d.h.MapType == mapStrIntfTyp { // for json performance + // } + if d.mtid == 0 || d.mtid == mapIntfIntfTypId { + l := len(n.ms) + n.ms = append(n.ms, nil) + d.decode(&n.ms[l]) + rvn = reflect.ValueOf(&n.ms[l]).Elem() + n.ms = n.ms[:l] + } else if d.mtid == mapStrIntfTypId { // for json performance + l := len(n.ns) + n.ns = append(n.ns, nil) + d.decode(&n.ns[l]) + rvn = reflect.ValueOf(&n.ns[l]).Elem() + n.ns = n.ns[:l] } else { - rvn = reflect.New(f.d.h.MapType).Elem() - useRvn = true + rvn = reflect.New(d.h.MapType).Elem() + d.decodeValue(rvn, nil) } case valueTypeArray: - if f.d.h.SliceType == nil { - var m2 []interface{} - v = &m2 + // if d.h.SliceType == nil || d.h.SliceType == intfSliceTyp { + if d.stid == 0 || d.stid == intfSliceTypId { + l := len(n.ss) + n.ss = append(n.ss, nil) + d.decode(&n.ss[l]) + rvn = reflect.ValueOf(&n.ss[l]).Elem() + n.ss = n.ss[:l] } else { - rvn = reflect.New(f.d.h.SliceType).Elem() - useRvn = true + rvn = reflect.New(d.h.SliceType).Elem() + d.decodeValue(rvn, nil) } case valueTypeExt: - re := v.(*RawExt) - bfn := f.d.h.getExtForTag(re.Tag) + var v interface{} + tag, bytes := n.u, n.l // calling decode below might taint the values + if bytes == nil { + l := len(n.is) + n.is = append(n.is, nil) + v2 := &n.is[l] + n.is = n.is[:l] + d.decode(v2) + v = *v2 + } + bfn := d.h.getExtForTag(tag) if bfn == nil { - re.Data = detachZeroCopyBytes(f.d.bytes, nil, re.Data) - rvn = reflect.ValueOf(*re) + var re RawExt + re.Tag = tag + re.Data = detachZeroCopyBytes(d.bytes, nil, bytes) + rvn = reflect.ValueOf(re) } else { rvnA := reflect.New(bfn.rt) rvn = rvnA.Elem() - if re.Data != nil { - bfn.ext.ReadExt(rvnA.Interface(), re.Data) + if bytes != nil { + bfn.ext.ReadExt(rvnA.Interface(), bytes) } else { - bfn.ext.UpdateExt(rvnA.Interface(), re.Value) + bfn.ext.UpdateExt(rvnA.Interface(), v) } } - return - } - if decodeFurther { - if useRvn { - f.d.decodeValue(rvn, decFn{}) - } else if v != nil { - // this v is a pointer, so we need to dereference it when done - f.d.decode(v) - rvn = reflect.ValueOf(v).Elem() - useRvn = true - } - } - - if !useRvn && v != nil { - rvn = reflect.ValueOf(v) + case valueTypeNil: + // no-op + case valueTypeInt: + rvn = reflect.ValueOf(&n.i).Elem() + case valueTypeUint: + rvn = reflect.ValueOf(&n.u).Elem() + case valueTypeFloat: + rvn = reflect.ValueOf(&n.f).Elem() + case valueTypeBool: + rvn = reflect.ValueOf(&n.b).Elem() + case valueTypeString, valueTypeSymbol: + rvn = reflect.ValueOf(&n.s).Elem() + case valueTypeBytes: + rvn = reflect.ValueOf(&n.l).Elem() + case valueTypeTimestamp: + rvn = reflect.ValueOf(&n.t).Elem() + default: + panic(fmt.Errorf("kInterfaceNaked: unexpected valueType: %d", n.v)) } return } -func (f decFnInfo) kInterface(rv reflect.Value) { +func (f *decFnInfo) kInterface(rv reflect.Value) { // debugf("\t===> kInterface") // Note: @@ -588,78 +665,108 @@ func (f decFnInfo) kInterface(rv reflect.Value) { // to decode into what was there before. // We do not replace with a generic value (as got from decodeNaked). + var rvn reflect.Value if rv.IsNil() { - rvn := f.kInterfaceNaked() + rvn = f.kInterfaceNaked() + if rvn.IsValid() { + rv.Set(rvn) + } + } else if f.d.h.InterfaceReset { + rvn = f.kInterfaceNaked() if rvn.IsValid() { rv.Set(rvn) + } else { + // reset to zero value based on current type in there. + rv.Set(reflect.Zero(rv.Elem().Type())) } } else { - rve := rv.Elem() + rvn = rv.Elem() // Note: interface{} is settable, but underlying type may not be. // Consequently, we have to set the reflect.Value directly. // if underlying type is settable (e.g. ptr or interface), // we just decode into it. // Else we create a settable value, decode into it, and set on the interface. - if rve.CanSet() { - f.d.decodeValue(rve, decFn{}) + if rvn.CanSet() { + f.d.decodeValue(rvn, nil) } else { - rve2 := reflect.New(rve.Type()).Elem() - rve2.Set(rve) - f.d.decodeValue(rve2, decFn{}) - rv.Set(rve2) + rvn2 := reflect.New(rvn.Type()).Elem() + rvn2.Set(rvn) + f.d.decodeValue(rvn2, nil) + rv.Set(rvn2) } } } -func (f decFnInfo) kStruct(rv reflect.Value) { +func (f *decFnInfo) kStruct(rv reflect.Value) { fti := f.ti d := f.d - if f.dd.IsContainerType(valueTypeMap) { - containerLen := f.dd.ReadMapStart() + dd := d.d + cr := d.cr + ctyp := dd.ContainerType() + if ctyp == valueTypeMap { + containerLen := dd.ReadMapStart() if containerLen == 0 { - f.dd.ReadEnd() + if cr != nil { + cr.sendContainerState(containerMapEnd) + } return } tisfi := fti.sfi hasLen := containerLen >= 0 if hasLen { for j := 0; j < containerLen; j++ { - // rvkencname := f.dd.DecodeString() - rvkencname := stringView(f.dd.DecodeBytes(f.d.b[:], true, true)) + // rvkencname := dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + rvkencname := stringView(dd.DecodeBytes(f.d.b[:], true, true)) // rvksi := ti.getForEncName(rvkencname) + if cr != nil { + cr.sendContainerState(containerMapValue) + } if k := fti.indexForEncName(rvkencname); k > -1 { si := tisfi[k] - if f.dd.TryDecodeAsNil() { + if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(si.field(rv, true), decFn{}) + d.decodeValue(si.field(rv, true), nil) } } else { d.structFieldNotFound(-1, rvkencname) } } } else { - for j := 0; !f.dd.CheckBreak(); j++ { - // rvkencname := f.dd.DecodeString() - rvkencname := stringView(f.dd.DecodeBytes(f.d.b[:], true, true)) + for j := 0; !dd.CheckBreak(); j++ { + // rvkencname := dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + rvkencname := stringView(dd.DecodeBytes(f.d.b[:], true, true)) // rvksi := ti.getForEncName(rvkencname) + if cr != nil { + cr.sendContainerState(containerMapValue) + } if k := fti.indexForEncName(rvkencname); k > -1 { si := tisfi[k] - if f.dd.TryDecodeAsNil() { + if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(si.field(rv, true), decFn{}) + d.decodeValue(si.field(rv, true), nil) } } else { d.structFieldNotFound(-1, rvkencname) } } - f.dd.ReadEnd() } - } else if f.dd.IsContainerType(valueTypeArray) { - containerLen := f.dd.ReadArrayStart() + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + } else if ctyp == valueTypeArray { + containerLen := dd.ReadArrayStart() if containerLen == 0 { - f.dd.ReadEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } return } // Not much gain from doing it two ways for array. @@ -670,126 +777,144 @@ func (f decFnInfo) kStruct(rv reflect.Value) { if j == containerLen { break } - } else if f.dd.CheckBreak() { + } else if dd.CheckBreak() { break } - if f.dd.TryDecodeAsNil() { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + if dd.TryDecodeAsNil() { si.setToZeroValue(rv) } else { - d.decodeValue(si.field(rv, true), decFn{}) + d.decodeValue(si.field(rv, true), nil) } } if containerLen > len(fti.sfip) { // read remaining values and throw away for j := len(fti.sfip); j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } d.structFieldNotFound(j, "") } } - f.dd.ReadEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } else { f.d.error(onlyMapOrArrayCanDecodeIntoStructErr) return } } -func (f decFnInfo) kSlice(rv reflect.Value) { +func (f *decFnInfo) kSlice(rv reflect.Value) { // A slice can be set from a map or array in stream. // This way, the order can be kept (as order is lost with map). ti := f.ti d := f.d - if f.dd.IsContainerType(valueTypeBytes) || f.dd.IsContainerType(valueTypeString) { - if ti.rtid == uint8SliceTypId || ti.rt.Elem().Kind() == reflect.Uint8 { - if f.seq == seqTypeChan { - bs2 := f.dd.DecodeBytes(nil, false, true) - ch := rv.Interface().(chan<- byte) - for _, b := range bs2 { - ch <- b - } - } else { - rvbs := rv.Bytes() - bs2 := f.dd.DecodeBytes(rvbs, false, false) - if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { - if rv.CanSet() { - rv.SetBytes(bs2) - } else { - copy(rvbs, bs2) - } + dd := d.d + rtelem0 := ti.rt.Elem() + ctyp := dd.ContainerType() + if ctyp == valueTypeBytes || ctyp == valueTypeString { + // you can only decode bytes or string in the stream into a slice or array of bytes + if !(ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { + f.d.errorf("bytes or string in the stream must be decoded into a slice or array of bytes, not %v", ti.rt) + } + if f.seq == seqTypeChan { + bs2 := dd.DecodeBytes(nil, false, true) + ch := rv.Interface().(chan<- byte) + for _, b := range bs2 { + ch <- b + } + } else { + rvbs := rv.Bytes() + bs2 := dd.DecodeBytes(rvbs, false, false) + if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + if rv.CanSet() { + rv.SetBytes(bs2) + } else { + copy(rvbs, bs2) } } - return } + return } // array := f.seq == seqTypeChan - slh, containerLenS := d.decSliceHelperStart() + slh, containerLenS := d.decSliceHelperStart() // only expects valueType(Array|Map) - // an array can never return a nil slice. so no need to check f.array here. - if rv.IsNil() { - // either chan or slice + // // an array can never return a nil slice. so no need to check f.array here. + if containerLenS == 0 { if f.seq == seqTypeSlice { - if containerLenS <= 0 { + if rv.IsNil() { rv.Set(reflect.MakeSlice(ti.rt, 0, 0)) } else { - rv.Set(reflect.MakeSlice(ti.rt, containerLenS, containerLenS)) + rv.SetLen(0) } } else if f.seq == seqTypeChan { - if containerLenS <= 0 { + if rv.IsNil() { rv.Set(reflect.MakeChan(ti.rt, 0)) - } else { - rv.Set(reflect.MakeChan(ti.rt, containerLenS)) } } - } - - rvlen := rv.Len() - if containerLenS == 0 { - if f.seq == seqTypeSlice && rvlen != 0 { - rv.SetLen(0) - } - // f.dd.ReadEnd() + slh.End() return } - rtelem0 := ti.rt.Elem() rtelem := rtelem0 for rtelem.Kind() == reflect.Ptr { rtelem = rtelem.Elem() } fn := d.getDecFn(rtelem, true, true) - rv0 := rv + var rv0, rv9 reflect.Value + rv0 = rv rvChanged := false - rvcap := rv.Cap() - // for j := 0; j < containerLenS; j++ { - - hasLen := containerLenS >= 0 - if hasLen { + var rvlen int + if containerLenS > 0 { // hasLen if f.seq == seqTypeChan { + if rv.IsNil() { + rvlen, _ = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + rv.Set(reflect.MakeChan(ti.rt, rvlen)) + } // handle chan specially: for j := 0; j < containerLenS; j++ { - rv0 := reflect.New(rtelem0).Elem() - d.decodeValue(rv0, fn) - rv.Send(rv0) + rv9 = reflect.New(rtelem0).Elem() + slh.ElemContainerState(j) + d.decodeValue(rv9, fn) + rv.Send(rv9) } - } else { - numToRead := containerLenS + } else { // slice or array + var truncated bool // says len of sequence is not same as expected number of elements + numToRead := containerLenS // if truncated, reset numToRead + + rvcap := rv.Cap() + rvlen = rv.Len() if containerLenS > rvcap { if f.seq == seqTypeArray { - d.arrayCannotExpand(rv.Len(), containerLenS) - numToRead = rvlen + d.arrayCannotExpand(rvlen, containerLenS) } else { - rv = reflect.MakeSlice(ti.rt, containerLenS, containerLenS) - if rvlen > 0 && !isMutableKind(ti.rt.Kind()) { - rv1 := rv0 - rv1.SetLen(rvcap) - reflect.Copy(rv, rv1) + oldRvlenGtZero := rvlen > 0 + rvlen, truncated = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + if truncated { + if rvlen <= rvcap { + rv.SetLen(rvlen) + } else { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true + } + } else { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true } - rvChanged = true - rvlen = containerLenS + if rvChanged && oldRvlenGtZero && !isImmutableKind(rtelem0.Kind()) { + reflect.Copy(rv, rv0) // only copy up to length NOT cap i.e. rv0.Slice(0, rvcap) + } + rvcap = rvlen } + numToRead = rvlen } else if containerLenS != rvlen { if f.seq == seqTypeSlice { rv.SetLen(containerLenS) @@ -797,71 +922,112 @@ func (f decFnInfo) kSlice(rv reflect.Value) { } } j := 0 + // we read up to the numToRead for ; j < numToRead; j++ { + slh.ElemContainerState(j) d.decodeValue(rv.Index(j), fn) } + + // if slice, expand and read up to containerLenS (or EOF) iff truncated + // if array, swallow all the rest. + if f.seq == seqTypeArray { for ; j < containerLenS; j++ { + slh.ElemContainerState(j) d.swallow() } + } else if truncated { // slice was truncated, as chan NOT in this block + for ; j < containerLenS; j++ { + rv = expandSliceValue(rv, 1) + rv9 = rv.Index(j) + if resetSliceElemToZeroValue { + rv9.Set(reflect.Zero(rtelem0)) + } + slh.ElemContainerState(j) + d.decodeValue(rv9, fn) + } } } } else { - for j := 0; !f.dd.CheckBreak(); j++ { - var decodeIntoBlank bool - // if indefinite, etc, then expand the slice if necessary - if j >= rvlen { - if f.seq == seqTypeArray { - d.arrayCannotExpand(rvlen, j+1) - decodeIntoBlank = true - } else if f.seq == seqTypeSlice { - rv = reflect.Append(rv, reflect.Zero(rtelem0)) - rvlen++ - rvChanged = true - } - } + rvlen = rv.Len() + j := 0 + for ; !dd.CheckBreak(); j++ { if f.seq == seqTypeChan { - rv0 := reflect.New(rtelem0).Elem() - d.decodeValue(rv0, fn) - rv.Send(rv0) - } else if decodeIntoBlank { - d.swallow() + slh.ElemContainerState(j) + rv9 = reflect.New(rtelem0).Elem() + d.decodeValue(rv9, fn) + rv.Send(rv9) } else { - d.decodeValue(rv.Index(j), fn) + // if indefinite, etc, then expand the slice if necessary + var decodeIntoBlank bool + if j >= rvlen { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, j+1) + decodeIntoBlank = true + } else { // if f.seq == seqTypeSlice + // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // uses append logic, plus varargs + rv = expandSliceValue(rv, 1) + rv9 = rv.Index(j) + // rv.Index(rv.Len() - 1).Set(reflect.Zero(rtelem0)) + if resetSliceElemToZeroValue { + rv9.Set(reflect.Zero(rtelem0)) + } + rvlen++ + rvChanged = true + } + } else { // slice or array + rv9 = rv.Index(j) + } + slh.ElemContainerState(j) + if decodeIntoBlank { + d.swallow() + } else { // seqTypeSlice + d.decodeValue(rv9, fn) + } + } + } + if f.seq == seqTypeSlice { + if j < rvlen { + rv.SetLen(j) + } else if j == 0 && rv.IsNil() { + rv = reflect.MakeSlice(ti.rt, 0, 0) + rvChanged = true } } - slh.End() } + slh.End() if rvChanged { rv0.Set(rv) } } -func (f decFnInfo) kArray(rv reflect.Value) { +func (f *decFnInfo) kArray(rv reflect.Value) { // f.d.decodeValue(rv.Slice(0, rv.Len())) f.kSlice(rv.Slice(0, rv.Len())) } -func (f decFnInfo) kMap(rv reflect.Value) { - containerLen := f.dd.ReadMapStart() - +func (f *decFnInfo) kMap(rv reflect.Value) { + d := f.d + dd := d.d + containerLen := dd.ReadMapStart() + cr := d.cr ti := f.ti if rv.IsNil() { rv.Set(reflect.MakeMap(ti.rt)) } if containerLen == 0 { - // It is not length-prefix style container. They have no End marker. - // f.dd.ReadMapEnd() + if cr != nil { + cr.sendContainerState(containerMapEnd) + } return } - d := f.d - ktype, vtype := ti.rt.Key(), ti.rt.Elem() ktypeId := reflect.ValueOf(ktype).Pointer() - var keyFn, valFn decFn + vtypeKind := vtype.Kind() + var keyFn, valFn *decFn var xtyp reflect.Type for xtyp = ktype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { } @@ -869,55 +1035,188 @@ func (f decFnInfo) kMap(rv reflect.Value) { for xtyp = vtype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { } valFn = d.getDecFn(xtyp, true, true) + var mapGet, mapSet bool + if !f.d.h.MapValueReset { + // if pointer, mapGet = true + // if interface, mapGet = true if !DecodeNakedAlways (else false) + // if builtin, mapGet = false + // else mapGet = true + if vtypeKind == reflect.Ptr { + mapGet = true + } else if vtypeKind == reflect.Interface { + if !f.d.h.InterfaceReset { + mapGet = true + } + } else if !isImmutableKind(vtypeKind) { + mapGet = true + } + } + + var rvk, rvv, rvz reflect.Value + // for j := 0; j < containerLen; j++ { if containerLen > 0 { for j := 0; j < containerLen; j++ { - rvk := reflect.New(ktype).Elem() + rvk = reflect.New(ktype).Elem() + if cr != nil { + cr.sendContainerState(containerMapKey) + } d.decodeValue(rvk, keyFn) // special case if a byte array. if ktypeId == intfTypId { rvk = rvk.Elem() if rvk.Type() == uint8SliceTyp { - rvk = reflect.ValueOf(string(rvk.Bytes())) + rvk = reflect.ValueOf(d.string(rvk.Bytes())) } } - rvv := rv.MapIndex(rvk) - // TODO: is !IsValid check required? - if !rvv.IsValid() { - rvv = reflect.New(vtype).Elem() + mapSet = true // set to false if u do a get, and its a pointer, and exists + if mapGet { + rvv = rv.MapIndex(rvk) + if rvv.IsValid() { + if vtypeKind == reflect.Ptr { + mapSet = false + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + if cr != nil { + cr.sendContainerState(containerMapValue) } d.decodeValue(rvv, valFn) - rv.SetMapIndex(rvk, rvv) + if mapSet { + rv.SetMapIndex(rvk, rvv) + } } } else { - for j := 0; !f.dd.CheckBreak(); j++ { - rvk := reflect.New(ktype).Elem() + for j := 0; !dd.CheckBreak(); j++ { + rvk = reflect.New(ktype).Elem() + if cr != nil { + cr.sendContainerState(containerMapKey) + } d.decodeValue(rvk, keyFn) // special case if a byte array. if ktypeId == intfTypId { rvk = rvk.Elem() if rvk.Type() == uint8SliceTyp { - rvk = reflect.ValueOf(string(rvk.Bytes())) + rvk = reflect.ValueOf(d.string(rvk.Bytes())) } } - rvv := rv.MapIndex(rvk) - if !rvv.IsValid() { - rvv = reflect.New(vtype).Elem() + mapSet = true // set to false if u do a get, and its a pointer, and exists + if mapGet { + rvv = rv.MapIndex(rvk) + if rvv.IsValid() { + if vtypeKind == reflect.Ptr { + mapSet = false + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + if cr != nil { + cr.sendContainerState(containerMapValue) } d.decodeValue(rvv, valFn) - rv.SetMapIndex(rvk, rvv) + if mapSet { + rv.SetMapIndex(rvk, rvv) + } } - f.dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } } -type rtidDecFn struct { +type decRtidFn struct { rtid uintptr fn decFn } +// decNaked is used to keep track of the primitives decoded. +// Without it, we would have to decode each primitive and wrap it +// in an interface{}, causing an allocation. +// In this model, the primitives are decoded in a "pseudo-atomic" fashion, +// so we can rest assured that no other decoding happens while these +// primitives are being decoded. +// +// maps and arrays are not handled by this mechanism. +// However, RawExt is, and we accomodate for extensions that decode +// RawExt from DecodeNaked, but need to decode the value subsequently. +// kInterfaceNaked and swallow, which call DecodeNaked, handle this caveat. +// +// However, decNaked also keeps some arrays of default maps and slices +// used in DecodeNaked. This way, we can get a pointer to it +// without causing a new heap allocation. +// +// kInterfaceNaked will ensure that there is no allocation for the common +// uses. +type decNaked struct { + // r RawExt // used for RawExt, uint, []byte. + u uint64 + i int64 + f float64 + l []byte + s string + t time.Time + b bool + v valueType + + // stacks for reducing allocation + is []interface{} + ms []map[interface{}]interface{} + ns []map[string]interface{} + ss [][]interface{} + // rs []RawExt + + // keep arrays at the bottom? Chance is that they are not used much. + ia [4]interface{} + ma [4]map[interface{}]interface{} + na [4]map[string]interface{} + sa [4][]interface{} + // ra [2]RawExt +} + +func (n *decNaked) reset() { + if n.ss != nil { + n.ss = n.ss[:0] + } + if n.is != nil { + n.is = n.is[:0] + } + if n.ms != nil { + n.ms = n.ms[:0] + } + if n.ns != nil { + n.ns = n.ns[:0] + } +} + // A Decoder reads and decodes an object from an input stream in the codec format. type Decoder struct { // hopefully, reduce derefencing cost by laying the decReader inside the Decoder. @@ -927,31 +1226,85 @@ type Decoder struct { // NOTE: Decoder shouldn't call it's read methods, // as the handler MAY need to do some coordination. r decReader - //sa [32]rtidDecFn - s []rtidDecFn - h *BasicHandle + // sa [initCollectionCap]decRtidFn + h *BasicHandle + hh Handle - rb bytesDecReader - hh Handle be bool // is binary encoding bytes bool // is bytes reader js bool // is json handle + rb bytesDecReader ri ioDecReader - f map[uintptr]decFn - _ uintptr // for alignment purposes, so next one starts from a cache line + cr containerStateRecv - b [scratchByteArrayLen]byte + s []decRtidFn + f map[uintptr]*decFn + + // _ uintptr // for alignment purposes, so next one starts from a cache line + + // cache the mapTypeId and sliceTypeId for faster comparisons + mtid uintptr + stid uintptr + + n decNaked + b [scratchByteArrayLen]byte + is map[string]string // used for interning strings } // NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. // // For efficiency, Users are encouraged to pass in a memory buffered reader // (eg bufio.Reader, bytes.Buffer). -func NewDecoder(r io.Reader, h Handle) (d *Decoder) { - d = &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} - //d.s = d.sa[:0] +func NewDecoder(r io.Reader, h Handle) *Decoder { + d := newDecoder(h) + d.Reset(r) + return d +} + +// NewDecoderBytes returns a Decoder which efficiently decodes directly +// from a byte slice with zero copying. +func NewDecoderBytes(in []byte, h Handle) *Decoder { + d := newDecoder(h) + d.ResetBytes(in) + return d +} + +func newDecoder(h Handle) *Decoder { + d := &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + n := &d.n + // n.rs = n.ra[:0] + n.ms = n.ma[:0] + n.is = n.ia[:0] + n.ns = n.na[:0] + n.ss = n.sa[:0] + _, d.js = h.(*JsonHandle) + if d.h.InternString { + d.is = make(map[string]string, 32) + } + d.d = h.newDecDriver(d) + d.cr, _ = d.d.(containerStateRecv) + // d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri}) + return d +} + +func (d *Decoder) resetCommon() { + d.n.reset() + d.d.reset() + // reset all things which were cached from the Handle, + // but could be changed. + d.mtid, d.stid = 0, 0 + if d.h.MapType != nil { + d.mtid = reflect.ValueOf(d.h.MapType).Pointer() + } + if d.h.SliceType != nil { + d.stid = reflect.ValueOf(d.h.SliceType).Pointer() + } +} + +func (d *Decoder) Reset(r io.Reader) { d.ri.x = &d.b + // d.s = d.sa[:0] d.ri.bs.r = r var ok bool d.ri.br, ok = r.(decReaderByteScanner) @@ -959,25 +1312,22 @@ func NewDecoder(r io.Reader, h Handle) (d *Decoder) { d.ri.br = &d.ri.bs } d.r = &d.ri - _, d.js = h.(*JsonHandle) - d.d = h.newDecDriver(d) - return + d.resetCommon() } -// NewDecoderBytes returns a Decoder which efficiently decodes directly -// from a byte slice with zero copying. -func NewDecoderBytes(in []byte, h Handle) (d *Decoder) { - d = &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary(), bytes: true} - //d.s = d.sa[:0] - d.rb.b = in - d.rb.a = len(in) +func (d *Decoder) ResetBytes(in []byte) { + // d.s = d.sa[:0] + d.rb.reset(in) d.r = &d.rb - _, d.js = h.(*JsonHandle) - d.d = h.newDecDriver(d) - // d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri}) - return + d.resetCommon() } +// func (d *Decoder) sendContainerState(c containerState) { +// if d.cr != nil { +// d.cr.sendContainerState(c) +// } +// } + // Decode decodes the stream from reader and stores the result in the // value pointed to by v. v cannot be a nil pointer. v can also be // a reflect.Value of a pointer. @@ -1037,15 +1387,18 @@ func (d *Decoder) Decode(v interface{}) (err error) { // this is not a smart swallow, as it allocates objects and does unnecessary work. func (d *Decoder) swallowViaHammer() { var blank interface{} - d.decodeValue(reflect.ValueOf(&blank).Elem(), decFn{}) + d.decodeValue(reflect.ValueOf(&blank).Elem(), nil) } func (d *Decoder) swallow() { // smarter decode that just swallows the content dd := d.d - switch { - case dd.TryDecodeAsNil(): - case dd.IsContainerType(valueTypeMap): + if dd.TryDecodeAsNil() { + return + } + cr := d.cr + switch dd.ContainerType() { + case valueTypeMap: containerLen := dd.ReadMapStart() clenGtEqualZero := containerLen >= 0 for j := 0; ; j++ { @@ -1056,11 +1409,19 @@ func (d *Decoder) swallow() { } else if dd.CheckBreak() { break } + if cr != nil { + cr.sendContainerState(containerMapKey) + } d.swallow() + if cr != nil { + cr.sendContainerState(containerMapValue) + } d.swallow() } - dd.ReadEnd() - case dd.IsContainerType(valueTypeArray): + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + case valueTypeArray: containerLenS := dd.ReadArrayStart() clenGtEqualZero := containerLenS >= 0 for j := 0; ; j++ { @@ -1071,17 +1432,30 @@ func (d *Decoder) swallow() { } else if dd.CheckBreak() { break } + if cr != nil { + cr.sendContainerState(containerArrayElem) + } d.swallow() } - dd.ReadEnd() - case dd.IsContainerType(valueTypeBytes): + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + case valueTypeBytes: dd.DecodeBytes(d.b[:], false, true) - case dd.IsContainerType(valueTypeString): + case valueTypeString: dd.DecodeBytes(d.b[:], true, true) // dd.DecodeStringAsBytes(d.b[:]) default: // these are all primitives, which we can get from decodeNaked + // if RawExt using Value, complete the processing. dd.DecodeNaked() + if n := &d.n; n.v == valueTypeExt && n.l == nil { + l := len(n.is) + n.is = append(n.is, nil) + v2 := &n.is[l] + n.is = n.is[:l] + d.decode(v2) + } } } @@ -1131,14 +1505,20 @@ func (d *Decoder) decode(iv interface{}) { case *[]uint8: *v = nil case reflect.Value: - d.chkPtrValue(v) + if v.Kind() != reflect.Ptr || v.IsNil() { + d.errNotValidPtrValue(v) + } + // d.chkPtrValue(v) v = v.Elem() if v.IsValid() { v.Set(reflect.Zero(v.Type())) } default: rv := reflect.ValueOf(iv) - d.chkPtrValue(rv) + if rv.Kind() != reflect.Ptr || rv.IsNil() { + d.errNotValidPtrValue(rv) + } + // d.chkPtrValue(rv) rv = rv.Elem() if rv.IsValid() { rv.Set(reflect.Zero(rv.Type())) @@ -1156,8 +1536,11 @@ func (d *Decoder) decode(iv interface{}) { v.CodecDecodeSelf(d) case reflect.Value: - d.chkPtrValue(v) - d.decodeValueNotNil(v.Elem(), decFn{}) + if v.Kind() != reflect.Ptr || v.IsNil() { + d.errNotValidPtrValue(v) + } + // d.chkPtrValue(v) + d.decodeValueNotNil(v.Elem(), nil) case *string: @@ -1192,7 +1575,7 @@ func (d *Decoder) decode(iv interface{}) { *v = d.d.DecodeBytes(*v, false, false) case *interface{}: - d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), decFn{}) + d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), nil) default: if !fastpathDecodeTypeSwitch(iv, d) { @@ -1226,34 +1609,37 @@ func (d *Decoder) preDecodeValue(rv reflect.Value, tryNil bool) (rv2 reflect.Val func (d *Decoder) decodeI(iv interface{}, checkPtr, tryNil, checkFastpath, checkCodecSelfer bool) { rv := reflect.ValueOf(iv) if checkPtr { - d.chkPtrValue(rv) + if rv.Kind() != reflect.Ptr || rv.IsNil() { + d.errNotValidPtrValue(rv) + } + // d.chkPtrValue(rv) } rv, proceed := d.preDecodeValue(rv, tryNil) if proceed { fn := d.getDecFn(rv.Type(), checkFastpath, checkCodecSelfer) - fn.f(fn.i, rv) + fn.f(&fn.i, rv) } } -func (d *Decoder) decodeValue(rv reflect.Value, fn decFn) { +func (d *Decoder) decodeValue(rv reflect.Value, fn *decFn) { if rv, proceed := d.preDecodeValue(rv, true); proceed { - if fn.f == nil { + if fn == nil { fn = d.getDecFn(rv.Type(), true, true) } - fn.f(fn.i, rv) + fn.f(&fn.i, rv) } } -func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn decFn) { +func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn *decFn) { if rv, proceed := d.preDecodeValue(rv, false); proceed { - if fn.f == nil { + if fn == nil { fn = d.getDecFn(rv.Type(), true, true) } - fn.f(fn.i, rv) + fn.f(&fn.i, rv) } } -func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn decFn) { +func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *decFn) { rtid := reflect.ValueOf(rt).Pointer() // retrieve or register a focus'ed function for this type @@ -1264,9 +1650,10 @@ func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool if useMapForCodecCache { fn, ok = d.f[rtid] } else { - for _, v := range d.s { + for i := range d.s { + v := &(d.s[i]) if v.rtid == rtid { - fn, ok = v.fn, true + fn, ok = &(v.fn), true break } } @@ -1275,11 +1662,25 @@ func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool return } + if useMapForCodecCache { + if d.f == nil { + d.f = make(map[uintptr]*decFn, initCollectionCap) + } + fn = new(decFn) + d.f[rtid] = fn + } else { + if d.s == nil { + d.s = make([]decRtidFn, 0, initCollectionCap) + } + d.s = append(d.s, decRtidFn{rtid: rtid}) + fn = &(d.s[len(d.s)-1]).fn + } + // debugf("\tCreating new dec fn for type: %v\n", rt) - ti := getTypeInfo(rtid, rt) - var fi decFnInfo - fi.dd = d.d - // fi.decFnInfoX = new(decFnInfoX) + ti := d.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.d = d + fi.ti = ti // An extension can be registered for any type, regardless of the Kind // (e.g. type BitSet int64, type MyStruct { / * unexported fields * / }, type X []int, etc. @@ -1291,35 +1692,26 @@ func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool // NOTE: if decoding into a nil interface{}, we return a non-nil // value except even if the container registers a length of 0. if checkCodecSelfer && ti.cs { - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).selferUnmarshal + fn.f = (*decFnInfo).selferUnmarshal } else if rtid == rawExtTypId { - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).rawExt + fn.f = (*decFnInfo).rawExt } else if d.d.IsBuiltinType(rtid) { - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).builtin + fn.f = (*decFnInfo).builtin } else if xfFn := d.h.getExt(rtid); xfFn != nil { - // fi.decFnInfoX = &decFnInfoX{xfTag: xfFn.tag, xfFn: xfFn.ext} - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext - fn.f = (decFnInfo).ext + fn.f = (*decFnInfo).ext } else if supportMarshalInterfaces && d.be && ti.bunm { - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).binaryUnmarshal + fn.f = (*decFnInfo).binaryUnmarshal } else if supportMarshalInterfaces && !d.be && d.js && ti.junm { //If JSON, we should check JSONUnmarshal before textUnmarshal - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).jsonUnmarshal + fn.f = (*decFnInfo).jsonUnmarshal } else if supportMarshalInterfaces && !d.be && ti.tunm { - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).textUnmarshal + fn.f = (*decFnInfo).textUnmarshal } else { rk := rt.Kind() if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { if rt.PkgPath() == "" { if idx := fastpathAV.index(rtid); idx != -1 { - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} fn.f = fastpathAV[idx].decfn } } else { @@ -1335,8 +1727,7 @@ func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool if idx := fastpathAV.index(rtuid); idx != -1 { xfnf := fastpathAV[idx].decfn xrt := fastpathAV[idx].rt - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = func(xf decFnInfo, xrv reflect.Value) { + fn.f = func(xf *decFnInfo, xrv reflect.Value) { // xfnf(xf, xrv.Convert(xrt)) xfnf(xf, xrv.Addr().Convert(reflect.PtrTo(xrt)).Elem()) } @@ -1346,74 +1737,58 @@ func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool if fn.f == nil { switch rk { case reflect.String: - fn.f = (decFnInfo).kString + fn.f = (*decFnInfo).kString case reflect.Bool: - fn.f = (decFnInfo).kBool + fn.f = (*decFnInfo).kBool case reflect.Int: - fn.f = (decFnInfo).kInt + fn.f = (*decFnInfo).kInt case reflect.Int64: - fn.f = (decFnInfo).kInt64 + fn.f = (*decFnInfo).kInt64 case reflect.Int32: - fn.f = (decFnInfo).kInt32 + fn.f = (*decFnInfo).kInt32 case reflect.Int8: - fn.f = (decFnInfo).kInt8 + fn.f = (*decFnInfo).kInt8 case reflect.Int16: - fn.f = (decFnInfo).kInt16 + fn.f = (*decFnInfo).kInt16 case reflect.Float32: - fn.f = (decFnInfo).kFloat32 + fn.f = (*decFnInfo).kFloat32 case reflect.Float64: - fn.f = (decFnInfo).kFloat64 + fn.f = (*decFnInfo).kFloat64 case reflect.Uint8: - fn.f = (decFnInfo).kUint8 + fn.f = (*decFnInfo).kUint8 case reflect.Uint64: - fn.f = (decFnInfo).kUint64 + fn.f = (*decFnInfo).kUint64 case reflect.Uint: - fn.f = (decFnInfo).kUint + fn.f = (*decFnInfo).kUint case reflect.Uint32: - fn.f = (decFnInfo).kUint32 + fn.f = (*decFnInfo).kUint32 case reflect.Uint16: - fn.f = (decFnInfo).kUint16 + fn.f = (*decFnInfo).kUint16 // case reflect.Ptr: - // fn.f = (decFnInfo).kPtr + // fn.f = (*decFnInfo).kPtr case reflect.Uintptr: - fn.f = (decFnInfo).kUintptr + fn.f = (*decFnInfo).kUintptr case reflect.Interface: - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).kInterface + fn.f = (*decFnInfo).kInterface case reflect.Struct: - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).kStruct + fn.f = (*decFnInfo).kStruct case reflect.Chan: - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeChan} - fn.f = (decFnInfo).kSlice + fi.seq = seqTypeChan + fn.f = (*decFnInfo).kSlice case reflect.Slice: - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeSlice} - fn.f = (decFnInfo).kSlice + fi.seq = seqTypeSlice + fn.f = (*decFnInfo).kSlice case reflect.Array: - // fi.decFnInfoX = &decFnInfoX{array: true} - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti, seq: seqTypeArray} - fn.f = (decFnInfo).kArray + fi.seq = seqTypeArray + fn.f = (*decFnInfo).kArray case reflect.Map: - fi.decFnInfoX = &decFnInfoX{d: d, ti: ti} - fn.f = (decFnInfo).kMap + fn.f = (*decFnInfo).kMap default: - fn.f = (decFnInfo).kErr + fn.f = (*decFnInfo).kErr } } } - fn.i = fi - if useMapForCodecCache { - if d.f == nil { - d.f = make(map[uintptr]decFn, 32) - } - d.f[rtid] = fn - } else { - if d.s == nil { - d.s = make([]rtidDecFn, 0, 32) - } - d.s = append(d.s, rtidDecFn{rtid, fn}) - } return } @@ -1441,6 +1816,10 @@ func (d *Decoder) chkPtrValue(rv reflect.Value) { if rv.Kind() == reflect.Ptr && !rv.IsNil() { return } + d.errNotValidPtrValue(rv) +} + +func (d *Decoder) errNotValidPtrValue(rv reflect.Value) { if !rv.IsValid() { d.error(cannotDecodeIntoNilErr) return @@ -1465,31 +1844,84 @@ func (d *Decoder) errorf(format string, params ...interface{}) { panic(err) } +func (d *Decoder) string(v []byte) (s string) { + if d.is != nil { + s, ok := d.is[string(v)] // no allocation here. + if !ok { + s = string(v) + d.is[s] = s + } + return s + } + return string(v) // don't return stringView, as we need a real string here. +} + +func (d *Decoder) intern(s string) { + if d.is != nil { + d.is[s] = s + } +} + +// nextValueBytes returns the next value in the stream as a set of bytes. +func (d *Decoder) nextValueBytes() []byte { + d.d.uncacheRead() + d.r.track() + d.swallow() + return d.r.stopTrack() +} + // -------------------------------------------------- // decSliceHelper assists when decoding into a slice, from a map or an array in the stream. // A slice can be set from a map or array in stream. This supports the MapBySlice interface. type decSliceHelper struct { - dd decDriver - ct valueType + d *Decoder + // ct valueType + array bool } func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { - x.dd = d.d - if x.dd.IsContainerType(valueTypeArray) { - x.ct = valueTypeArray - clen = x.dd.ReadArrayStart() - } else if x.dd.IsContainerType(valueTypeMap) { - x.ct = valueTypeMap - clen = x.dd.ReadMapStart() * 2 + dd := d.d + ctyp := dd.ContainerType() + if ctyp == valueTypeArray { + x.array = true + clen = dd.ReadArrayStart() + } else if ctyp == valueTypeMap { + clen = dd.ReadMapStart() * 2 } else { - d.errorf("only encoded map or array can be decoded into a slice") + d.errorf("only encoded map or array can be decoded into a slice (%d)", ctyp) } + // x.ct = ctyp + x.d = d return } func (x decSliceHelper) End() { - x.dd.ReadEnd() + cr := x.d.cr + if cr == nil { + return + } + if x.array { + cr.sendContainerState(containerArrayEnd) + } else { + cr.sendContainerState(containerMapEnd) + } +} + +func (x decSliceHelper) ElemContainerState(index int) { + cr := x.d.cr + if cr == nil { + return + } + if x.array { + cr.sendContainerState(containerArrayElem) + } else { + if index%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } } func decByteSlice(r decReader, clen int, bs []byte) (bsOut []byte) { @@ -1522,6 +1954,46 @@ func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte return in } +// decInferLen will infer a sensible length, given the following: +// - clen: length wanted. +// - maxlen: max length to be returned. +// if <= 0, it is unset, and we infer it based on the unit size +// - unit: number of bytes for each element of the collection +func decInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + // handle when maxlen is not set i.e. <= 0 + if clen <= 0 { + return + } + if maxlen <= 0 { + // no maxlen defined. Use maximum of 256K memory, with a floor of 4K items. + // maxlen = 256 * 1024 / unit + // if maxlen < (4 * 1024) { + // maxlen = 4 * 1024 + // } + if unit < (256 / 4) { + maxlen = 256 * 1024 / unit + } else { + maxlen = 4 * 1024 + } + } + if clen > maxlen { + rvlen = maxlen + truncated = true + } else { + rvlen = clen + } + return + // if clen <= 0 { + // rvlen = 0 + // } else if maxlen > 0 && clen > maxlen { + // rvlen = maxlen + // truncated = true + // } else { + // rvlen = clen + // } + // return +} + // // implement overall decReader wrapping both, for possible use inline: // type decReaderT struct { // bytes bool diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go index dbb9886..d7ad330 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go @@ -4,9 +4,7 @@ package codec import ( - "bytes" "encoding" - "errors" "fmt" "io" "reflect" @@ -64,13 +62,14 @@ type encDriver interface { EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) EncodeArrayStart(length int) EncodeMapStart(length int) - EncodeEnd() EncodeString(c charEncoding, v string) EncodeSymbol(v string) EncodeStringBytes(c charEncoding, v []byte) //TODO //encBignum(f *big.Int) //encStringRunes(c charEncoding, v []rune) + + reset() } type encDriverAsis interface { @@ -81,17 +80,6 @@ type encNoSeparator struct{} func (_ encNoSeparator) EncodeEnd() {} -type encStructFieldBytesV struct { - b []byte - v reflect.Value -} - -type encStructFieldBytesVslice []encStructFieldBytesV - -func (p encStructFieldBytesVslice) Len() int { return len(p) } -func (p encStructFieldBytesVslice) Less(i, j int) bool { return bytes.Compare(p[i].b, p[j].b) == -1 } -func (p encStructFieldBytesVslice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - type ioEncWriterWriter interface { WriteByte(c byte) error WriteString(s string) (n int, err error) @@ -110,10 +98,27 @@ type EncodeOptions struct { // sequence of bytes. // // This only affects maps, as the iteration order for maps is random. - // In this case, the map keys will first be encoded into []byte, and then sorted, - // before writing the sorted keys and the corresponding map values to the stream. + // + // The implementation MAY use the natural sort order for the map keys if possible: + // + // - If there is a natural sort order (ie for number, bool, string or []byte keys), + // then the map keys are first sorted in natural order and then written + // with corresponding map values to the strema. + // - If there is no natural sort order, then the map keys will first be + // encoded into []byte, and then sorted, + // before writing the sorted keys and the corresponding map values to the stream. + // Canonical bool + // CheckCircularRef controls whether we check for circular references + // and error fast during an encode. + // + // If enabled, an error is received if a pointer to a struct + // references itself either directly or through one of its fields (iteratively). + // + // This is opt-in, as there may be a performance hit to checking circular references. + CheckCircularRef bool + // AsSymbols defines what should be encoded as symbols. // // Encoding as symbols can reduce the encoded size significantly. @@ -163,6 +168,7 @@ func (o *simpleIoEncWriterWriter) Write(p []byte) (n int, err error) { // ioEncWriter implements encWriter and can write to an io.Writer implementation type ioEncWriter struct { w ioEncWriterWriter + s simpleIoEncWriterWriter // x [8]byte // temp byte array re-used internally for efficiency } @@ -246,10 +252,10 @@ func (z *bytesEncWriter) grow(n int) (oldcursor int) { z.c = oldcursor + n if z.c > len(z.b) { if z.c > cap(z.b) { - // Tried using appendslice logic: (if cap < 1024, *2, else *1.25). - // However, it was too expensive, causing too many iterations of copy. - // Using bytes.Buffer model was much better (2*cap + n) - bs := make([]byte, 2*cap(z.b)+n) + // appendslice logic (if cap < 1024, *2, else *1.25): more expensive. many copy calls. + // bytes.Buffer model (2*cap + n): much better + // bs := make([]byte, 2*cap(z.b)+n) + bs := make([]byte, growCap(cap(z.b), 1, n)) copy(bs, z.b[:oldcursor]) z.b = bs } else { @@ -261,7 +267,7 @@ func (z *bytesEncWriter) grow(n int) (oldcursor int) { // --------------------------------------------- -type encFnInfoX struct { +type encFnInfo struct { e *Encoder ti *typeInfo xfFn Ext @@ -269,25 +275,13 @@ type encFnInfoX struct { seq seqType } -type encFnInfo struct { - // use encFnInfo as a value receiver. - // keep most of it less-used variables accessible via a pointer (*encFnInfoX). - // As sweet spot for value-receiver is 3 words, keep everything except - // encDriver (which everyone needs) directly accessible. - // ensure encFnInfoX is set for everyone who needs it i.e. - // rawExt, ext, builtin, (selfer|binary|text)Marshal, kSlice, kStruct, kMap, kInterface, fastpath - - ee encDriver - *encFnInfoX -} - -func (f encFnInfo) builtin(rv reflect.Value) { - f.ee.EncodeBuiltin(f.ti.rtid, rv.Interface()) +func (f *encFnInfo) builtin(rv reflect.Value) { + f.e.e.EncodeBuiltin(f.ti.rtid, rv.Interface()) } -func (f encFnInfo) rawExt(rv reflect.Value) { +func (f *encFnInfo) rawExt(rv reflect.Value) { // rev := rv.Interface().(RawExt) - // f.ee.EncodeRawExt(&rev, f.e) + // f.e.e.EncodeRawExt(&rev, f.e) var re *RawExt if rv.CanAddr() { re = rv.Addr().Interface().(*RawExt) @@ -295,18 +289,18 @@ func (f encFnInfo) rawExt(rv reflect.Value) { rev := rv.Interface().(RawExt) re = &rev } - f.ee.EncodeRawExt(re, f.e) + f.e.e.EncodeRawExt(re, f.e) } -func (f encFnInfo) ext(rv reflect.Value) { +func (f *encFnInfo) ext(rv reflect.Value) { // if this is a struct|array and it was addressable, then pass the address directly (not the value) if k := rv.Kind(); (k == reflect.Struct || k == reflect.Array) && rv.CanAddr() { rv = rv.Addr() } - f.ee.EncodeExt(rv.Interface(), f.xfTag, f.xfFn, f.e) + f.e.e.EncodeExt(rv.Interface(), f.xfTag, f.xfFn, f.e) } -func (f encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { +func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { if indir == 0 { v = rv.Interface() } else if indir == -1 { @@ -323,7 +317,7 @@ func (f encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v } else { for j := int8(0); j < indir; j++ { if rv.IsNil() { - f.ee.EncodeNil() + f.e.e.EncodeNil() return } rv = rv.Elem() @@ -333,20 +327,20 @@ func (f encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v return v, true } -func (f encFnInfo) selferMarshal(rv reflect.Value) { +func (f *encFnInfo) selferMarshal(rv reflect.Value) { if v, proceed := f.getValueForMarshalInterface(rv, f.ti.csIndir); proceed { v.(Selfer).CodecEncodeSelf(f.e) } } -func (f encFnInfo) binaryMarshal(rv reflect.Value) { +func (f *encFnInfo) binaryMarshal(rv reflect.Value) { if v, proceed := f.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed { bs, fnerr := v.(encoding.BinaryMarshaler).MarshalBinary() f.e.marshal(bs, fnerr, false, c_RAW) } } -func (f encFnInfo) textMarshal(rv reflect.Value) { +func (f *encFnInfo) textMarshal(rv reflect.Value) { if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed { // debugf(">>>> encoding.TextMarshaler: %T", rv.Interface()) bs, fnerr := v.(encoding.TextMarshaler).MarshalText() @@ -354,75 +348,77 @@ func (f encFnInfo) textMarshal(rv reflect.Value) { } } -func (f encFnInfo) jsonMarshal(rv reflect.Value) { +func (f *encFnInfo) jsonMarshal(rv reflect.Value) { if v, proceed := f.getValueForMarshalInterface(rv, f.ti.jmIndir); proceed { bs, fnerr := v.(jsonMarshaler).MarshalJSON() f.e.marshal(bs, fnerr, true, c_UTF8) } } -func (f encFnInfo) kBool(rv reflect.Value) { - f.ee.EncodeBool(rv.Bool()) +func (f *encFnInfo) kBool(rv reflect.Value) { + f.e.e.EncodeBool(rv.Bool()) } -func (f encFnInfo) kString(rv reflect.Value) { - f.ee.EncodeString(c_UTF8, rv.String()) +func (f *encFnInfo) kString(rv reflect.Value) { + f.e.e.EncodeString(c_UTF8, rv.String()) } -func (f encFnInfo) kFloat64(rv reflect.Value) { - f.ee.EncodeFloat64(rv.Float()) +func (f *encFnInfo) kFloat64(rv reflect.Value) { + f.e.e.EncodeFloat64(rv.Float()) } -func (f encFnInfo) kFloat32(rv reflect.Value) { - f.ee.EncodeFloat32(float32(rv.Float())) +func (f *encFnInfo) kFloat32(rv reflect.Value) { + f.e.e.EncodeFloat32(float32(rv.Float())) } -func (f encFnInfo) kInt(rv reflect.Value) { - f.ee.EncodeInt(rv.Int()) +func (f *encFnInfo) kInt(rv reflect.Value) { + f.e.e.EncodeInt(rv.Int()) } -func (f encFnInfo) kUint(rv reflect.Value) { - f.ee.EncodeUint(rv.Uint()) +func (f *encFnInfo) kUint(rv reflect.Value) { + f.e.e.EncodeUint(rv.Uint()) } -func (f encFnInfo) kInvalid(rv reflect.Value) { - f.ee.EncodeNil() +func (f *encFnInfo) kInvalid(rv reflect.Value) { + f.e.e.EncodeNil() } -func (f encFnInfo) kErr(rv reflect.Value) { +func (f *encFnInfo) kErr(rv reflect.Value) { f.e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) } -func (f encFnInfo) kSlice(rv reflect.Value) { +func (f *encFnInfo) kSlice(rv reflect.Value) { ti := f.ti // array may be non-addressable, so we have to manage with care // (don't call rv.Bytes, rv.Slice, etc). // E.g. type struct S{B [2]byte}; // Encode(S{}) will bomb on "panic: slice of unaddressable array". + e := f.e if f.seq != seqTypeArray { if rv.IsNil() { - f.ee.EncodeNil() + e.e.EncodeNil() return } // If in this method, then there was no extension function defined. // So it's okay to treat as []byte. if ti.rtid == uint8SliceTypId { - f.ee.EncodeStringBytes(c_RAW, rv.Bytes()) + e.e.EncodeStringBytes(c_RAW, rv.Bytes()) return } } + cr := e.cr rtelem := ti.rt.Elem() l := rv.Len() - if rtelem.Kind() == reflect.Uint8 { + if ti.rtid == uint8SliceTypId || rtelem.Kind() == reflect.Uint8 { switch f.seq { case seqTypeArray: - // if l == 0 { f.ee.encodeStringBytes(c_RAW, nil) } else + // if l == 0 { e.e.encodeStringBytes(c_RAW, nil) } else if rv.CanAddr() { - f.ee.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) + e.e.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) } else { var bs []byte - if l <= cap(f.e.b) { - bs = f.e.b[:l] + if l <= cap(e.b) { + bs = e.b[:l] } else { bs = make([]byte, l) } @@ -431,12 +427,12 @@ func (f encFnInfo) kSlice(rv reflect.Value) { // for i := 0; i < l; i++ { // bs[i] = byte(rv.Index(i).Uint()) // } - f.ee.EncodeStringBytes(c_RAW, bs) + e.e.EncodeStringBytes(c_RAW, bs) } case seqTypeSlice: - f.ee.EncodeStringBytes(c_RAW, rv.Bytes()) + e.e.EncodeStringBytes(c_RAW, rv.Bytes()) case seqTypeChan: - bs := f.e.b[:0] + bs := e.b[:0] // do not use range, so that the number of elements encoded // does not change, and encoding does not hang waiting on someone to close chan. // for b := range rv.Interface().(<-chan byte) { @@ -446,22 +442,21 @@ func (f encFnInfo) kSlice(rv reflect.Value) { for i := 0; i < l; i++ { bs = append(bs, <-ch) } - f.ee.EncodeStringBytes(c_RAW, bs) + e.e.EncodeStringBytes(c_RAW, bs) } return } if ti.mbs { if l%2 == 1 { - f.e.errorf("mapBySlice requires even slice length, but got %v", l) + e.errorf("mapBySlice requires even slice length, but got %v", l) return } - f.ee.EncodeMapStart(l / 2) + e.e.EncodeMapStart(l / 2) } else { - f.ee.EncodeArrayStart(l) + e.e.EncodeArrayStart(l) } - e := f.e if l > 0 { for rtelem.Kind() == reflect.Ptr { rtelem = rtelem.Elem() @@ -469,86 +464,78 @@ func (f encFnInfo) kSlice(rv reflect.Value) { // if kind is reflect.Interface, do not pre-determine the // encoding type, because preEncodeValue may break it down to // a concrete type and kInterface will bomb. - var fn encFn + var fn *encFn if rtelem.Kind() != reflect.Interface { rtelemid := reflect.ValueOf(rtelem).Pointer() fn = e.getEncFn(rtelemid, rtelem, true, true) } // TODO: Consider perf implication of encoding odd index values as symbols if type is string for j := 0; j < l; j++ { + if cr != nil { + if ti.mbs { + if l%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } else { + cr.sendContainerState(containerArrayElem) + } + } if f.seq == seqTypeChan { if rv2, ok2 := rv.Recv(); ok2 { e.encodeValue(rv2, fn) + } else { + e.encode(nil) // WE HAVE TO DO SOMETHING, so nil if nothing received. } } else { e.encodeValue(rv.Index(j), fn) } } - } - f.ee.EncodeEnd() + if cr != nil { + if ti.mbs { + cr.sendContainerState(containerMapEnd) + } else { + cr.sendContainerState(containerArrayEnd) + } + } } -func (f encFnInfo) kStruct(rv reflect.Value) { +func (f *encFnInfo) kStruct(rv reflect.Value) { fti := f.ti e := f.e + cr := e.cr tisfi := fti.sfip toMap := !(fti.toArray || e.h.StructToArray) newlen := len(fti.sfi) + // Use sync.Pool to reduce allocating slices unnecessarily. - // The cost of the occasional locking is less than the cost of locking. - - var fkvs []encStructFieldKV - var pool *sync.Pool - var poolv interface{} - idxpool := newlen / 8 - if encStructPoolLen != 4 { - panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed - } - if idxpool < encStructPoolLen { - pool = &encStructPool[idxpool] - poolv = pool.Get() - switch vv := poolv.(type) { - case *[8]encStructFieldKV: - fkvs = vv[:newlen] - case *[16]encStructFieldKV: - fkvs = vv[:newlen] - case *[32]encStructFieldKV: - fkvs = vv[:newlen] - case *[64]encStructFieldKV: - fkvs = vv[:newlen] - } - } - if fkvs == nil { - fkvs = make([]encStructFieldKV, newlen) - } + // The cost of sync.Pool is less than the cost of new allocation. + pool, poolv, fkvs := encStructPoolGet(newlen) + // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) if toMap { tisfi = fti.sfi } newlen = 0 - var kv encStructFieldKV + var kv stringRv for _, si := range tisfi { - kv.v = si.field(rv, false) - // if si.i != -1 { - // rvals[newlen] = rv.Field(int(si.i)) - // } else { - // rvals[newlen] = rv.FieldByIndex(si.is) - // } + kv.r = si.field(rv, false) if toMap { - if si.omitEmpty && isEmptyValue(kv.v) { + if si.omitEmpty && isEmptyValue(kv.r) { continue } - kv.k = si.encName + kv.v = si.encName } else { // use the zero value. // if a reference or struct, set to nil (so you do not output too much) - if si.omitEmpty && isEmptyValue(kv.v) { - switch kv.v.Kind() { + if si.omitEmpty && isEmptyValue(kv.r) { + switch kv.r.Kind() { case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array, reflect.Map, reflect.Slice: - kv.v = reflect.Value{} //encode as nil + kv.r = reflect.Value{} //encode as nil } } } @@ -558,7 +545,7 @@ func (f encFnInfo) kStruct(rv reflect.Value) { // debugf(">>>> kStruct: newlen: %v", newlen) // sep := !e.be - ee := f.ee //don't dereference everytime + ee := e.e //don't dereference everytime if toMap { ee.EncodeMapStart(newlen) @@ -566,21 +553,35 @@ func (f encFnInfo) kStruct(rv reflect.Value) { asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 for j := 0; j < newlen; j++ { kv = fkvs[j] + if cr != nil { + cr.sendContainerState(containerMapKey) + } if asSymbols { - ee.EncodeSymbol(kv.k) + ee.EncodeSymbol(kv.v) } else { - ee.EncodeString(c_UTF8, kv.k) + ee.EncodeString(c_UTF8, kv.v) + } + if cr != nil { + cr.sendContainerState(containerMapValue) } - e.encodeValue(kv.v, encFn{}) + e.encodeValue(kv.r, nil) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } } else { ee.EncodeArrayStart(newlen) for j := 0; j < newlen; j++ { kv = fkvs[j] - e.encodeValue(kv.v, encFn{}) + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encodeValue(kv.r, nil) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) } } - ee.EncodeEnd() // do not use defer. Instead, use explicit pool return at end of function. // defer has a cost we are trying to avoid. @@ -590,34 +591,40 @@ func (f encFnInfo) kStruct(rv reflect.Value) { } } -// func (f encFnInfo) kPtr(rv reflect.Value) { +// func (f *encFnInfo) kPtr(rv reflect.Value) { // debugf(">>>>>>> ??? encode kPtr called - shouldn't get called") // if rv.IsNil() { -// f.ee.encodeNil() +// f.e.e.encodeNil() // return // } // f.e.encodeValue(rv.Elem()) // } -func (f encFnInfo) kInterface(rv reflect.Value) { - if rv.IsNil() { - f.ee.EncodeNil() - return - } - f.e.encodeValue(rv.Elem(), encFn{}) -} +// func (f *encFnInfo) kInterface(rv reflect.Value) { +// println("kInterface called") +// debug.PrintStack() +// if rv.IsNil() { +// f.e.e.EncodeNil() +// return +// } +// f.e.encodeValue(rv.Elem(), nil) +// } -func (f encFnInfo) kMap(rv reflect.Value) { +func (f *encFnInfo) kMap(rv reflect.Value) { + ee := f.e.e if rv.IsNil() { - f.ee.EncodeNil() + ee.EncodeNil() return } l := rv.Len() - f.ee.EncodeMapStart(l) + ee.EncodeMapStart(l) e := f.e + cr := e.cr if l == 0 { - f.ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerMapEnd) + } return } var asSymbols bool @@ -628,7 +635,7 @@ func (f encFnInfo) kMap(rv reflect.Value) { // However, if kind is reflect.Interface, do not pre-determine the // encoding type, because preEncodeValue may break it down to // a concrete type and kInterface will bomb. - var keyFn, valFn encFn + var keyFn, valFn *encFn ti := f.ti rtkey := ti.rt.Key() rtval := ti.rt.Elem() @@ -655,27 +662,14 @@ func (f encFnInfo) kMap(rv reflect.Value) { } mks := rv.MapKeys() // for j, lmks := 0, len(mks); j < lmks; j++ { - ee := f.ee //don't dereference everytime + if e.h.Canonical { - // first encode each key to a []byte first, then sort them, then record - // println(">>>>>>>> CANONICAL <<<<<<<<") - var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding - e2 := NewEncoderBytes(&mksv, e.hh) - mksbv := make([]encStructFieldBytesV, len(mks)) - for i, k := range mks { - l := len(mksv) - e2.MustEncode(k) - mksbv[i].v = k - mksbv[i].b = mksv[l:] - // fmt.Printf(">>>>> %s\n", mksv[l:]) - } - sort.Sort(encStructFieldBytesVslice(mksbv)) - for j := range mksbv { - e.asis(mksbv[j].b) - e.encodeValue(rv.MapIndex(mksbv[j].v), valFn) - } + e.kMapCanonical(rtkeyid, rtkey, rv, mks, valFn, asSymbols) } else { for j := range mks { + if cr != nil { + cr.sendContainerState(containerMapKey) + } if keyTypeIsString { if asSymbols { ee.EncodeSymbol(mks[j].String()) @@ -685,10 +679,182 @@ func (f encFnInfo) kMap(rv reflect.Value) { } else { e.encodeValue(mks[j], keyFn) } + if cr != nil { + cr.sendContainerState(containerMapValue) + } e.encodeValue(rv.MapIndex(mks[j]), valFn) } } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (e *Encoder) kMapCanonical(rtkeyid uintptr, rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *encFn, asSymbols bool) { + ee := e.e + cr := e.cr + // we previously did out-of-band if an extension was registered. + // This is not necessary, as the natural kind is sufficient for ordering. + + if rtkeyid == uint8SliceTypId { + mksv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Bytes() + } + sort.Sort(bytesRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeStringBytes(c_RAW, mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + } else { + switch rtkey.Kind() { + case reflect.Bool: + mksv := make([]boolRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Bool() + } + sort.Sort(boolRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.String: + mksv := make([]stringRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.String() + } + sort.Sort(stringRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(mksv[i].v) + } else { + ee.EncodeString(c_UTF8, mksv[i].v) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint, reflect.Uintptr: + mksv := make([]uintRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Uint() + } + sort.Sort(uintRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + mksv := make([]intRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Int() + } + sort.Sort(intRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Float32: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(mksv[i].v)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Float64: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + default: + // out-of-band + // first encode each key to a []byte first, then sort them, then record + var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + mksbv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksbv[i] + l := len(mksv) + e2.MustEncode(k) + v.r = k + v.v = mksv[l:] + // fmt.Printf(">>>>> %s\n", mksv[l:]) + } + sort.Sort(bytesRvSlice(mksbv)) + for j := range mksbv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(mksbv[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksbv[j].r), valFn) + } + } + } } // -------------------------------------------------- @@ -699,12 +865,12 @@ func (f encFnInfo) kMap(rv reflect.Value) { // instead of executing the checks every time. type encFn struct { i encFnInfo - f func(encFnInfo, reflect.Value) + f func(*encFnInfo, reflect.Value) } // -------------------------------------------------- -type rtidEncFn struct { +type encRtidFn struct { rtid uintptr fn encFn } @@ -716,18 +882,22 @@ type Encoder struct { // NOTE: Encoder shouldn't call it's write methods, // as the handler MAY need to do some coordination. w encWriter - s []rtidEncFn + s []encRtidFn + ci set be bool // is binary encoding js bool // is json handle wi ioEncWriter wb bytesEncWriter + h *BasicHandle + hh Handle + cr containerStateRecv as encDriverAsis - hh Handle - f map[uintptr]encFn - b [scratchByteArrayLen]byte + + f map[uintptr]*encFn + b [scratchByteArrayLen]byte } // NewEncoder returns an Encoder for encoding into an io.Writer. @@ -735,20 +905,8 @@ type Encoder struct { // For efficiency, Users are encouraged to pass in a memory buffered writer // (eg bufio.Writer, bytes.Buffer). func NewEncoder(w io.Writer, h Handle) *Encoder { - e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} - ww, ok := w.(ioEncWriterWriter) - if !ok { - sww := simpleIoEncWriterWriter{w: w} - sww.bw, _ = w.(io.ByteWriter) - sww.sw, _ = w.(ioEncStringWriter) - ww = &sww - //ww = bufio.NewWriterSize(w, defEncByteBufSize) - } - e.wi.w = ww - e.w = &e.wi - _, e.js = h.(*JsonHandle) - e.e = h.newEncDriver(e) - e.as, _ = e.e.(encDriverAsis) + e := newEncoder(h) + e.Reset(w) return e } @@ -758,19 +916,56 @@ func NewEncoder(w io.Writer, h Handle) *Encoder { // It will potentially replace the output byte slice pointed to. // After encoding, the out parameter contains the encoded contents. func NewEncoderBytes(out *[]byte, h Handle) *Encoder { + e := newEncoder(h) + e.ResetBytes(out) + return e +} + +func newEncoder(h Handle) *Encoder { e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + _, e.js = h.(*JsonHandle) + e.e = h.newEncDriver(e) + e.as, _ = e.e.(encDriverAsis) + e.cr, _ = e.e.(containerStateRecv) + return e +} + +// Reset the Encoder with a new output stream. +// +// This accomodates using the state of the Encoder, +// where it has "cached" information about sub-engines. +func (e *Encoder) Reset(w io.Writer) { + ww, ok := w.(ioEncWriterWriter) + if ok { + e.wi.w = ww + } else { + sww := &e.wi.s + sww.w = w + sww.bw, _ = w.(io.ByteWriter) + sww.sw, _ = w.(ioEncStringWriter) + e.wi.w = sww + //ww = bufio.NewWriterSize(w, defEncByteBufSize) + } + e.w = &e.wi + e.e.reset() +} + +func (e *Encoder) ResetBytes(out *[]byte) { in := *out if in == nil { in = make([]byte, defEncByteBufSize) } - e.wb.b, e.wb.out = in, out + e.wb.b, e.wb.out, e.wb.c = in, out, 0 e.w = &e.wb - _, e.js = h.(*JsonHandle) - e.e = h.newEncDriver(e) - e.as, _ = e.e.(encDriverAsis) - return e + e.e.reset() } +// func (e *Encoder) sendContainerState(c containerState) { +// if e.cr != nil { +// e.cr.sendContainerState(c) +// } +// } + // Encode writes an object into a stream. // // Encoding can be configured via the struct tag for the fields. @@ -871,7 +1066,7 @@ func (e *Encoder) encode(iv interface{}) { v.CodecEncodeSelf(e) case reflect.Value: - e.encodeValue(v, encFn{}) + e.encodeValue(v, nil) case string: e.e.EncodeString(c_UTF8, v) @@ -938,76 +1133,92 @@ func (e *Encoder) encode(iv interface{}) { e.e.EncodeStringBytes(c_RAW, *v) default: - // canonical mode is not supported for fastpath of maps (but is fine for slices) const checkCodecSelfer1 = true // in case T is passed, where *T is a Selfer, still checkCodecSelfer - if e.h.Canonical { - if !fastpathEncodeTypeSwitchSlice(iv, e) { - e.encodeI(iv, false, checkCodecSelfer1) - } - } else { - if !fastpathEncodeTypeSwitch(iv, e) { - e.encodeI(iv, false, checkCodecSelfer1) - } + if !fastpathEncodeTypeSwitch(iv, e) { + e.encodeI(iv, false, checkCodecSelfer1) } } } -func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { - if rv, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { - rt := rv.Type() - rtid := reflect.ValueOf(rt).Pointer() - fn := e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer) - fn.f(fn.i, rv) +func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, sptr uintptr, proceed bool) { + // use a goto statement instead of a recursive function for ptr/interface. +TOP: + switch rv.Kind() { + case reflect.Ptr: + if rv.IsNil() { + e.e.EncodeNil() + return + } + rv = rv.Elem() + if e.h.CheckCircularRef && rv.Kind() == reflect.Struct { + // TODO: Movable pointers will be an issue here. Future problem. + sptr = rv.UnsafeAddr() + break TOP + } + goto TOP + case reflect.Interface: + if rv.IsNil() { + e.e.EncodeNil() + return + } + rv = rv.Elem() + goto TOP + case reflect.Slice, reflect.Map: + if rv.IsNil() { + e.e.EncodeNil() + return + } + case reflect.Invalid, reflect.Func: + e.e.EncodeNil() + return } + + proceed = true + rv2 = rv + return } -func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, proceed bool) { -LOOP: - for { - switch rv.Kind() { - case reflect.Ptr, reflect.Interface: - if rv.IsNil() { - e.e.EncodeNil() - return - } - rv = rv.Elem() - continue LOOP - case reflect.Slice, reflect.Map: - if rv.IsNil() { - e.e.EncodeNil() - return - } - case reflect.Invalid, reflect.Func: - e.e.EncodeNil() - return +func (e *Encoder) doEncodeValue(rv reflect.Value, fn *encFn, sptr uintptr, + checkFastpath, checkCodecSelfer bool) { + if sptr != 0 { + if (&e.ci).add(sptr) { + e.errorf("circular reference found: # %d", sptr) } - break } + if fn == nil { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn = e.getEncFn(rtid, rt, true, true) + } + fn.f(&fn.i, rv) + if sptr != 0 { + (&e.ci).remove(sptr) + } +} - return rv, true +func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { + if rv, sptr, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { + e.doEncodeValue(rv, nil, sptr, checkFastpath, checkCodecSelfer) + } } -func (e *Encoder) encodeValue(rv reflect.Value, fn encFn) { +func (e *Encoder) encodeValue(rv reflect.Value, fn *encFn) { // if a valid fn is passed, it MUST BE for the dereferenced type of rv - if rv, proceed := e.preEncodeValue(rv); proceed { - if fn.f == nil { - rt := rv.Type() - rtid := reflect.ValueOf(rt).Pointer() - fn = e.getEncFn(rtid, rt, true, true) - } - fn.f(fn.i, rv) + if rv, sptr, proceed := e.preEncodeValue(rv); proceed { + e.doEncodeValue(rv, fn, sptr, true, true) } } -func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn encFn) { +func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *encFn) { // rtid := reflect.ValueOf(rt).Pointer() var ok bool if useMapForCodecCache { fn, ok = e.f[rtid] } else { - for _, v := range e.s { + for i := range e.s { + v := &(e.s[i]) if v.rtid == rtid { - fn, ok = v.fn, true + fn, ok = &(v.fn), true break } } @@ -1015,42 +1226,47 @@ func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCo if ok { return } - // fi.encFnInfoX = new(encFnInfoX) - ti := getTypeInfo(rtid, rt) - var fi encFnInfo - fi.ee = e.e + + if useMapForCodecCache { + if e.f == nil { + e.f = make(map[uintptr]*encFn, initCollectionCap) + } + fn = new(encFn) + e.f[rtid] = fn + } else { + if e.s == nil { + e.s = make([]encRtidFn, 0, initCollectionCap) + } + e.s = append(e.s, encRtidFn{rtid: rtid}) + fn = &(e.s[len(e.s)-1]).fn + } + + ti := e.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.e = e + fi.ti = ti if checkCodecSelfer && ti.cs { - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).selferMarshal + fn.f = (*encFnInfo).selferMarshal } else if rtid == rawExtTypId { - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).rawExt + fn.f = (*encFnInfo).rawExt } else if e.e.IsBuiltinType(rtid) { - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).builtin + fn.f = (*encFnInfo).builtin } else if xfFn := e.h.getExt(rtid); xfFn != nil { - // fi.encFnInfoX = new(encFnInfoX) - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext - fn.f = (encFnInfo).ext + fn.f = (*encFnInfo).ext } else if supportMarshalInterfaces && e.be && ti.bm { - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).binaryMarshal + fn.f = (*encFnInfo).binaryMarshal } else if supportMarshalInterfaces && !e.be && e.js && ti.jm { //If JSON, we should check JSONMarshal before textMarshal - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).jsonMarshal + fn.f = (*encFnInfo).jsonMarshal } else if supportMarshalInterfaces && !e.be && ti.tm { - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).textMarshal + fn.f = (*encFnInfo).textMarshal } else { rk := rt.Kind() - // if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { - if fastpathEnabled && checkFastpath && (rk == reflect.Slice || (rk == reflect.Map && !e.h.Canonical)) { + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { if rt.PkgPath() == "" { if idx := fastpathAV.index(rtid); idx != -1 { - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} fn.f = fastpathAV[idx].encfn } } else { @@ -1066,8 +1282,7 @@ func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCo if idx := fastpathAV.index(rtuid); idx != -1 { xfnf := fastpathAV[idx].encfn xrt := fastpathAV[idx].rt - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = func(xf encFnInfo, xrv reflect.Value) { + fn.f = func(xf *encFnInfo, xrv reflect.Value) { xfnf(xf, xrv.Convert(xrt)) } } @@ -1076,57 +1291,43 @@ func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCo if fn.f == nil { switch rk { case reflect.Bool: - fn.f = (encFnInfo).kBool + fn.f = (*encFnInfo).kBool case reflect.String: - fn.f = (encFnInfo).kString + fn.f = (*encFnInfo).kString case reflect.Float64: - fn.f = (encFnInfo).kFloat64 + fn.f = (*encFnInfo).kFloat64 case reflect.Float32: - fn.f = (encFnInfo).kFloat32 + fn.f = (*encFnInfo).kFloat32 case reflect.Int, reflect.Int8, reflect.Int64, reflect.Int32, reflect.Int16: - fn.f = (encFnInfo).kInt + fn.f = (*encFnInfo).kInt case reflect.Uint8, reflect.Uint64, reflect.Uint, reflect.Uint32, reflect.Uint16, reflect.Uintptr: - fn.f = (encFnInfo).kUint + fn.f = (*encFnInfo).kUint case reflect.Invalid: - fn.f = (encFnInfo).kInvalid + fn.f = (*encFnInfo).kInvalid case reflect.Chan: - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeChan} - fn.f = (encFnInfo).kSlice + fi.seq = seqTypeChan + fn.f = (*encFnInfo).kSlice case reflect.Slice: - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeSlice} - fn.f = (encFnInfo).kSlice + fi.seq = seqTypeSlice + fn.f = (*encFnInfo).kSlice case reflect.Array: - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti, seq: seqTypeArray} - fn.f = (encFnInfo).kSlice + fi.seq = seqTypeArray + fn.f = (*encFnInfo).kSlice case reflect.Struct: - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).kStruct + fn.f = (*encFnInfo).kStruct + // reflect.Ptr and reflect.Interface are handled already by preEncodeValue // case reflect.Ptr: - // fn.f = (encFnInfo).kPtr - case reflect.Interface: - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).kInterface + // fn.f = (*encFnInfo).kPtr + // case reflect.Interface: + // fn.f = (*encFnInfo).kInterface case reflect.Map: - fi.encFnInfoX = &encFnInfoX{e: e, ti: ti} - fn.f = (encFnInfo).kMap + fn.f = (*encFnInfo).kMap default: - fn.f = (encFnInfo).kErr + fn.f = (*encFnInfo).kErr } } } - fn.i = fi - if useMapForCodecCache { - if e.f == nil { - e.f = make(map[uintptr]encFn, 32) - } - e.f[rtid] = fn - } else { - if e.s == nil { - e.s = make([]rtidEncFn, 0, 32) - } - e.s = append(e.s, rtidEncFn{rtid, fn}) - } return } @@ -1158,12 +1359,7 @@ func (e *Encoder) errorf(format string, params ...interface{}) { // ---------------------------------------- -type encStructFieldKV struct { - k string - v reflect.Value -} - -const encStructPoolLen = 4 +const encStructPoolLen = 5 // encStructPool is an array of sync.Pool. // Each element of the array pools one of encStructPool(8|16|32|64). @@ -1177,10 +1373,42 @@ const encStructPoolLen = 4 var encStructPool [encStructPoolLen]sync.Pool func init() { - encStructPool[0].New = func() interface{} { return new([8]encStructFieldKV) } - encStructPool[1].New = func() interface{} { return new([16]encStructFieldKV) } - encStructPool[2].New = func() interface{} { return new([32]encStructFieldKV) } - encStructPool[3].New = func() interface{} { return new([64]encStructFieldKV) } + encStructPool[0].New = func() interface{} { return new([8]stringRv) } + encStructPool[1].New = func() interface{} { return new([16]stringRv) } + encStructPool[2].New = func() interface{} { return new([32]stringRv) } + encStructPool[3].New = func() interface{} { return new([64]stringRv) } + encStructPool[4].New = func() interface{} { return new([128]stringRv) } +} + +func encStructPoolGet(newlen int) (p *sync.Pool, v interface{}, s []stringRv) { + // if encStructPoolLen != 5 { // constant chec, so removed at build time. + // panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed + // } + // idxpool := newlen / 8 + if newlen <= 8 { + p = &encStructPool[0] + v = p.Get() + s = v.(*[8]stringRv)[:newlen] + } else if newlen <= 16 { + p = &encStructPool[1] + v = p.Get() + s = v.(*[16]stringRv)[:newlen] + } else if newlen <= 32 { + p = &encStructPool[2] + v = p.Get() + s = v.(*[32]stringRv)[:newlen] + } else if newlen <= 64 { + p = &encStructPool[3] + v = p.Get() + s = v.(*[64]stringRv)[:newlen] + } else if newlen <= 128 { + p = &encStructPool[4] + v = p.Get() + s = v.(*[128]stringRv)[:newlen] + } else { + s = make([]stringRv, newlen) + } + return } // ---------------------------------------- diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go index b395b0c..fd92fab 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go @@ -1,4 +1,4 @@ -// //+build ignore +// +build !notfastpath // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. @@ -48,15 +48,15 @@ var fastpathTV fastpathT type fastpathE struct { rtid uintptr rt reflect.Type - encfn func(encFnInfo, reflect.Value) - decfn func(decFnInfo, reflect.Value) + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) } -type fastpathA [239]fastpathE +type fastpathA [271]fastpathE func (x *fastpathA) index(rtid uintptr) int { // use binary search to grab the index (adapted from sort/search.go) - h, i, j := 0, 0, 239 // len(x) + h, i, j := 0, 0, 271 // len(x) for i < j { h = i + (j-i)/2 if x[h].rtid < rtid { @@ -65,7 +65,7 @@ func (x *fastpathA) index(rtid uintptr) int { j = h } } - if i < 239 && x[i].rtid == rtid { + if i < 271 && x[i].rtid == rtid { return i } return -1 @@ -85,7 +85,7 @@ func init() { return } i := 0 - fn := func(v interface{}, fe func(encFnInfo, reflect.Value), fd func(decFnInfo, reflect.Value)) (f fastpathE) { + fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { xrt := reflect.TypeOf(v) xptr := reflect.ValueOf(xrt).Pointer() fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} @@ -93,246 +93,278 @@ func init() { return } - fn([]interface{}(nil), (encFnInfo).fastpathEncSliceIntfR, (decFnInfo).fastpathDecSliceIntfR) - fn([]string(nil), (encFnInfo).fastpathEncSliceStringR, (decFnInfo).fastpathDecSliceStringR) - fn([]float32(nil), (encFnInfo).fastpathEncSliceFloat32R, (decFnInfo).fastpathDecSliceFloat32R) - fn([]float64(nil), (encFnInfo).fastpathEncSliceFloat64R, (decFnInfo).fastpathDecSliceFloat64R) - fn([]uint(nil), (encFnInfo).fastpathEncSliceUintR, (decFnInfo).fastpathDecSliceUintR) - fn([]uint16(nil), (encFnInfo).fastpathEncSliceUint16R, (decFnInfo).fastpathDecSliceUint16R) - fn([]uint32(nil), (encFnInfo).fastpathEncSliceUint32R, (decFnInfo).fastpathDecSliceUint32R) - fn([]uint64(nil), (encFnInfo).fastpathEncSliceUint64R, (decFnInfo).fastpathDecSliceUint64R) - fn([]int(nil), (encFnInfo).fastpathEncSliceIntR, (decFnInfo).fastpathDecSliceIntR) - fn([]int8(nil), (encFnInfo).fastpathEncSliceInt8R, (decFnInfo).fastpathDecSliceInt8R) - fn([]int16(nil), (encFnInfo).fastpathEncSliceInt16R, (decFnInfo).fastpathDecSliceInt16R) - fn([]int32(nil), (encFnInfo).fastpathEncSliceInt32R, (decFnInfo).fastpathDecSliceInt32R) - fn([]int64(nil), (encFnInfo).fastpathEncSliceInt64R, (decFnInfo).fastpathDecSliceInt64R) - fn([]bool(nil), (encFnInfo).fastpathEncSliceBoolR, (decFnInfo).fastpathDecSliceBoolR) - - fn(map[interface{}]interface{}(nil), (encFnInfo).fastpathEncMapIntfIntfR, (decFnInfo).fastpathDecMapIntfIntfR) - fn(map[interface{}]string(nil), (encFnInfo).fastpathEncMapIntfStringR, (decFnInfo).fastpathDecMapIntfStringR) - fn(map[interface{}]uint(nil), (encFnInfo).fastpathEncMapIntfUintR, (decFnInfo).fastpathDecMapIntfUintR) - fn(map[interface{}]uint8(nil), (encFnInfo).fastpathEncMapIntfUint8R, (decFnInfo).fastpathDecMapIntfUint8R) - fn(map[interface{}]uint16(nil), (encFnInfo).fastpathEncMapIntfUint16R, (decFnInfo).fastpathDecMapIntfUint16R) - fn(map[interface{}]uint32(nil), (encFnInfo).fastpathEncMapIntfUint32R, (decFnInfo).fastpathDecMapIntfUint32R) - fn(map[interface{}]uint64(nil), (encFnInfo).fastpathEncMapIntfUint64R, (decFnInfo).fastpathDecMapIntfUint64R) - fn(map[interface{}]int(nil), (encFnInfo).fastpathEncMapIntfIntR, (decFnInfo).fastpathDecMapIntfIntR) - fn(map[interface{}]int8(nil), (encFnInfo).fastpathEncMapIntfInt8R, (decFnInfo).fastpathDecMapIntfInt8R) - fn(map[interface{}]int16(nil), (encFnInfo).fastpathEncMapIntfInt16R, (decFnInfo).fastpathDecMapIntfInt16R) - fn(map[interface{}]int32(nil), (encFnInfo).fastpathEncMapIntfInt32R, (decFnInfo).fastpathDecMapIntfInt32R) - fn(map[interface{}]int64(nil), (encFnInfo).fastpathEncMapIntfInt64R, (decFnInfo).fastpathDecMapIntfInt64R) - fn(map[interface{}]float32(nil), (encFnInfo).fastpathEncMapIntfFloat32R, (decFnInfo).fastpathDecMapIntfFloat32R) - fn(map[interface{}]float64(nil), (encFnInfo).fastpathEncMapIntfFloat64R, (decFnInfo).fastpathDecMapIntfFloat64R) - fn(map[interface{}]bool(nil), (encFnInfo).fastpathEncMapIntfBoolR, (decFnInfo).fastpathDecMapIntfBoolR) - fn(map[string]interface{}(nil), (encFnInfo).fastpathEncMapStringIntfR, (decFnInfo).fastpathDecMapStringIntfR) - fn(map[string]string(nil), (encFnInfo).fastpathEncMapStringStringR, (decFnInfo).fastpathDecMapStringStringR) - fn(map[string]uint(nil), (encFnInfo).fastpathEncMapStringUintR, (decFnInfo).fastpathDecMapStringUintR) - fn(map[string]uint8(nil), (encFnInfo).fastpathEncMapStringUint8R, (decFnInfo).fastpathDecMapStringUint8R) - fn(map[string]uint16(nil), (encFnInfo).fastpathEncMapStringUint16R, (decFnInfo).fastpathDecMapStringUint16R) - fn(map[string]uint32(nil), (encFnInfo).fastpathEncMapStringUint32R, (decFnInfo).fastpathDecMapStringUint32R) - fn(map[string]uint64(nil), (encFnInfo).fastpathEncMapStringUint64R, (decFnInfo).fastpathDecMapStringUint64R) - fn(map[string]int(nil), (encFnInfo).fastpathEncMapStringIntR, (decFnInfo).fastpathDecMapStringIntR) - fn(map[string]int8(nil), (encFnInfo).fastpathEncMapStringInt8R, (decFnInfo).fastpathDecMapStringInt8R) - fn(map[string]int16(nil), (encFnInfo).fastpathEncMapStringInt16R, (decFnInfo).fastpathDecMapStringInt16R) - fn(map[string]int32(nil), (encFnInfo).fastpathEncMapStringInt32R, (decFnInfo).fastpathDecMapStringInt32R) - fn(map[string]int64(nil), (encFnInfo).fastpathEncMapStringInt64R, (decFnInfo).fastpathDecMapStringInt64R) - fn(map[string]float32(nil), (encFnInfo).fastpathEncMapStringFloat32R, (decFnInfo).fastpathDecMapStringFloat32R) - fn(map[string]float64(nil), (encFnInfo).fastpathEncMapStringFloat64R, (decFnInfo).fastpathDecMapStringFloat64R) - fn(map[string]bool(nil), (encFnInfo).fastpathEncMapStringBoolR, (decFnInfo).fastpathDecMapStringBoolR) - fn(map[float32]interface{}(nil), (encFnInfo).fastpathEncMapFloat32IntfR, (decFnInfo).fastpathDecMapFloat32IntfR) - fn(map[float32]string(nil), (encFnInfo).fastpathEncMapFloat32StringR, (decFnInfo).fastpathDecMapFloat32StringR) - fn(map[float32]uint(nil), (encFnInfo).fastpathEncMapFloat32UintR, (decFnInfo).fastpathDecMapFloat32UintR) - fn(map[float32]uint8(nil), (encFnInfo).fastpathEncMapFloat32Uint8R, (decFnInfo).fastpathDecMapFloat32Uint8R) - fn(map[float32]uint16(nil), (encFnInfo).fastpathEncMapFloat32Uint16R, (decFnInfo).fastpathDecMapFloat32Uint16R) - fn(map[float32]uint32(nil), (encFnInfo).fastpathEncMapFloat32Uint32R, (decFnInfo).fastpathDecMapFloat32Uint32R) - fn(map[float32]uint64(nil), (encFnInfo).fastpathEncMapFloat32Uint64R, (decFnInfo).fastpathDecMapFloat32Uint64R) - fn(map[float32]int(nil), (encFnInfo).fastpathEncMapFloat32IntR, (decFnInfo).fastpathDecMapFloat32IntR) - fn(map[float32]int8(nil), (encFnInfo).fastpathEncMapFloat32Int8R, (decFnInfo).fastpathDecMapFloat32Int8R) - fn(map[float32]int16(nil), (encFnInfo).fastpathEncMapFloat32Int16R, (decFnInfo).fastpathDecMapFloat32Int16R) - fn(map[float32]int32(nil), (encFnInfo).fastpathEncMapFloat32Int32R, (decFnInfo).fastpathDecMapFloat32Int32R) - fn(map[float32]int64(nil), (encFnInfo).fastpathEncMapFloat32Int64R, (decFnInfo).fastpathDecMapFloat32Int64R) - fn(map[float32]float32(nil), (encFnInfo).fastpathEncMapFloat32Float32R, (decFnInfo).fastpathDecMapFloat32Float32R) - fn(map[float32]float64(nil), (encFnInfo).fastpathEncMapFloat32Float64R, (decFnInfo).fastpathDecMapFloat32Float64R) - fn(map[float32]bool(nil), (encFnInfo).fastpathEncMapFloat32BoolR, (decFnInfo).fastpathDecMapFloat32BoolR) - fn(map[float64]interface{}(nil), (encFnInfo).fastpathEncMapFloat64IntfR, (decFnInfo).fastpathDecMapFloat64IntfR) - fn(map[float64]string(nil), (encFnInfo).fastpathEncMapFloat64StringR, (decFnInfo).fastpathDecMapFloat64StringR) - fn(map[float64]uint(nil), (encFnInfo).fastpathEncMapFloat64UintR, (decFnInfo).fastpathDecMapFloat64UintR) - fn(map[float64]uint8(nil), (encFnInfo).fastpathEncMapFloat64Uint8R, (decFnInfo).fastpathDecMapFloat64Uint8R) - fn(map[float64]uint16(nil), (encFnInfo).fastpathEncMapFloat64Uint16R, (decFnInfo).fastpathDecMapFloat64Uint16R) - fn(map[float64]uint32(nil), (encFnInfo).fastpathEncMapFloat64Uint32R, (decFnInfo).fastpathDecMapFloat64Uint32R) - fn(map[float64]uint64(nil), (encFnInfo).fastpathEncMapFloat64Uint64R, (decFnInfo).fastpathDecMapFloat64Uint64R) - fn(map[float64]int(nil), (encFnInfo).fastpathEncMapFloat64IntR, (decFnInfo).fastpathDecMapFloat64IntR) - fn(map[float64]int8(nil), (encFnInfo).fastpathEncMapFloat64Int8R, (decFnInfo).fastpathDecMapFloat64Int8R) - fn(map[float64]int16(nil), (encFnInfo).fastpathEncMapFloat64Int16R, (decFnInfo).fastpathDecMapFloat64Int16R) - fn(map[float64]int32(nil), (encFnInfo).fastpathEncMapFloat64Int32R, (decFnInfo).fastpathDecMapFloat64Int32R) - fn(map[float64]int64(nil), (encFnInfo).fastpathEncMapFloat64Int64R, (decFnInfo).fastpathDecMapFloat64Int64R) - fn(map[float64]float32(nil), (encFnInfo).fastpathEncMapFloat64Float32R, (decFnInfo).fastpathDecMapFloat64Float32R) - fn(map[float64]float64(nil), (encFnInfo).fastpathEncMapFloat64Float64R, (decFnInfo).fastpathDecMapFloat64Float64R) - fn(map[float64]bool(nil), (encFnInfo).fastpathEncMapFloat64BoolR, (decFnInfo).fastpathDecMapFloat64BoolR) - fn(map[uint]interface{}(nil), (encFnInfo).fastpathEncMapUintIntfR, (decFnInfo).fastpathDecMapUintIntfR) - fn(map[uint]string(nil), (encFnInfo).fastpathEncMapUintStringR, (decFnInfo).fastpathDecMapUintStringR) - fn(map[uint]uint(nil), (encFnInfo).fastpathEncMapUintUintR, (decFnInfo).fastpathDecMapUintUintR) - fn(map[uint]uint8(nil), (encFnInfo).fastpathEncMapUintUint8R, (decFnInfo).fastpathDecMapUintUint8R) - fn(map[uint]uint16(nil), (encFnInfo).fastpathEncMapUintUint16R, (decFnInfo).fastpathDecMapUintUint16R) - fn(map[uint]uint32(nil), (encFnInfo).fastpathEncMapUintUint32R, (decFnInfo).fastpathDecMapUintUint32R) - fn(map[uint]uint64(nil), (encFnInfo).fastpathEncMapUintUint64R, (decFnInfo).fastpathDecMapUintUint64R) - fn(map[uint]int(nil), (encFnInfo).fastpathEncMapUintIntR, (decFnInfo).fastpathDecMapUintIntR) - fn(map[uint]int8(nil), (encFnInfo).fastpathEncMapUintInt8R, (decFnInfo).fastpathDecMapUintInt8R) - fn(map[uint]int16(nil), (encFnInfo).fastpathEncMapUintInt16R, (decFnInfo).fastpathDecMapUintInt16R) - fn(map[uint]int32(nil), (encFnInfo).fastpathEncMapUintInt32R, (decFnInfo).fastpathDecMapUintInt32R) - fn(map[uint]int64(nil), (encFnInfo).fastpathEncMapUintInt64R, (decFnInfo).fastpathDecMapUintInt64R) - fn(map[uint]float32(nil), (encFnInfo).fastpathEncMapUintFloat32R, (decFnInfo).fastpathDecMapUintFloat32R) - fn(map[uint]float64(nil), (encFnInfo).fastpathEncMapUintFloat64R, (decFnInfo).fastpathDecMapUintFloat64R) - fn(map[uint]bool(nil), (encFnInfo).fastpathEncMapUintBoolR, (decFnInfo).fastpathDecMapUintBoolR) - fn(map[uint8]interface{}(nil), (encFnInfo).fastpathEncMapUint8IntfR, (decFnInfo).fastpathDecMapUint8IntfR) - fn(map[uint8]string(nil), (encFnInfo).fastpathEncMapUint8StringR, (decFnInfo).fastpathDecMapUint8StringR) - fn(map[uint8]uint(nil), (encFnInfo).fastpathEncMapUint8UintR, (decFnInfo).fastpathDecMapUint8UintR) - fn(map[uint8]uint8(nil), (encFnInfo).fastpathEncMapUint8Uint8R, (decFnInfo).fastpathDecMapUint8Uint8R) - fn(map[uint8]uint16(nil), (encFnInfo).fastpathEncMapUint8Uint16R, (decFnInfo).fastpathDecMapUint8Uint16R) - fn(map[uint8]uint32(nil), (encFnInfo).fastpathEncMapUint8Uint32R, (decFnInfo).fastpathDecMapUint8Uint32R) - fn(map[uint8]uint64(nil), (encFnInfo).fastpathEncMapUint8Uint64R, (decFnInfo).fastpathDecMapUint8Uint64R) - fn(map[uint8]int(nil), (encFnInfo).fastpathEncMapUint8IntR, (decFnInfo).fastpathDecMapUint8IntR) - fn(map[uint8]int8(nil), (encFnInfo).fastpathEncMapUint8Int8R, (decFnInfo).fastpathDecMapUint8Int8R) - fn(map[uint8]int16(nil), (encFnInfo).fastpathEncMapUint8Int16R, (decFnInfo).fastpathDecMapUint8Int16R) - fn(map[uint8]int32(nil), (encFnInfo).fastpathEncMapUint8Int32R, (decFnInfo).fastpathDecMapUint8Int32R) - fn(map[uint8]int64(nil), (encFnInfo).fastpathEncMapUint8Int64R, (decFnInfo).fastpathDecMapUint8Int64R) - fn(map[uint8]float32(nil), (encFnInfo).fastpathEncMapUint8Float32R, (decFnInfo).fastpathDecMapUint8Float32R) - fn(map[uint8]float64(nil), (encFnInfo).fastpathEncMapUint8Float64R, (decFnInfo).fastpathDecMapUint8Float64R) - fn(map[uint8]bool(nil), (encFnInfo).fastpathEncMapUint8BoolR, (decFnInfo).fastpathDecMapUint8BoolR) - fn(map[uint16]interface{}(nil), (encFnInfo).fastpathEncMapUint16IntfR, (decFnInfo).fastpathDecMapUint16IntfR) - fn(map[uint16]string(nil), (encFnInfo).fastpathEncMapUint16StringR, (decFnInfo).fastpathDecMapUint16StringR) - fn(map[uint16]uint(nil), (encFnInfo).fastpathEncMapUint16UintR, (decFnInfo).fastpathDecMapUint16UintR) - fn(map[uint16]uint8(nil), (encFnInfo).fastpathEncMapUint16Uint8R, (decFnInfo).fastpathDecMapUint16Uint8R) - fn(map[uint16]uint16(nil), (encFnInfo).fastpathEncMapUint16Uint16R, (decFnInfo).fastpathDecMapUint16Uint16R) - fn(map[uint16]uint32(nil), (encFnInfo).fastpathEncMapUint16Uint32R, (decFnInfo).fastpathDecMapUint16Uint32R) - fn(map[uint16]uint64(nil), (encFnInfo).fastpathEncMapUint16Uint64R, (decFnInfo).fastpathDecMapUint16Uint64R) - fn(map[uint16]int(nil), (encFnInfo).fastpathEncMapUint16IntR, (decFnInfo).fastpathDecMapUint16IntR) - fn(map[uint16]int8(nil), (encFnInfo).fastpathEncMapUint16Int8R, (decFnInfo).fastpathDecMapUint16Int8R) - fn(map[uint16]int16(nil), (encFnInfo).fastpathEncMapUint16Int16R, (decFnInfo).fastpathDecMapUint16Int16R) - fn(map[uint16]int32(nil), (encFnInfo).fastpathEncMapUint16Int32R, (decFnInfo).fastpathDecMapUint16Int32R) - fn(map[uint16]int64(nil), (encFnInfo).fastpathEncMapUint16Int64R, (decFnInfo).fastpathDecMapUint16Int64R) - fn(map[uint16]float32(nil), (encFnInfo).fastpathEncMapUint16Float32R, (decFnInfo).fastpathDecMapUint16Float32R) - fn(map[uint16]float64(nil), (encFnInfo).fastpathEncMapUint16Float64R, (decFnInfo).fastpathDecMapUint16Float64R) - fn(map[uint16]bool(nil), (encFnInfo).fastpathEncMapUint16BoolR, (decFnInfo).fastpathDecMapUint16BoolR) - fn(map[uint32]interface{}(nil), (encFnInfo).fastpathEncMapUint32IntfR, (decFnInfo).fastpathDecMapUint32IntfR) - fn(map[uint32]string(nil), (encFnInfo).fastpathEncMapUint32StringR, (decFnInfo).fastpathDecMapUint32StringR) - fn(map[uint32]uint(nil), (encFnInfo).fastpathEncMapUint32UintR, (decFnInfo).fastpathDecMapUint32UintR) - fn(map[uint32]uint8(nil), (encFnInfo).fastpathEncMapUint32Uint8R, (decFnInfo).fastpathDecMapUint32Uint8R) - fn(map[uint32]uint16(nil), (encFnInfo).fastpathEncMapUint32Uint16R, (decFnInfo).fastpathDecMapUint32Uint16R) - fn(map[uint32]uint32(nil), (encFnInfo).fastpathEncMapUint32Uint32R, (decFnInfo).fastpathDecMapUint32Uint32R) - fn(map[uint32]uint64(nil), (encFnInfo).fastpathEncMapUint32Uint64R, (decFnInfo).fastpathDecMapUint32Uint64R) - fn(map[uint32]int(nil), (encFnInfo).fastpathEncMapUint32IntR, (decFnInfo).fastpathDecMapUint32IntR) - fn(map[uint32]int8(nil), (encFnInfo).fastpathEncMapUint32Int8R, (decFnInfo).fastpathDecMapUint32Int8R) - fn(map[uint32]int16(nil), (encFnInfo).fastpathEncMapUint32Int16R, (decFnInfo).fastpathDecMapUint32Int16R) - fn(map[uint32]int32(nil), (encFnInfo).fastpathEncMapUint32Int32R, (decFnInfo).fastpathDecMapUint32Int32R) - fn(map[uint32]int64(nil), (encFnInfo).fastpathEncMapUint32Int64R, (decFnInfo).fastpathDecMapUint32Int64R) - fn(map[uint32]float32(nil), (encFnInfo).fastpathEncMapUint32Float32R, (decFnInfo).fastpathDecMapUint32Float32R) - fn(map[uint32]float64(nil), (encFnInfo).fastpathEncMapUint32Float64R, (decFnInfo).fastpathDecMapUint32Float64R) - fn(map[uint32]bool(nil), (encFnInfo).fastpathEncMapUint32BoolR, (decFnInfo).fastpathDecMapUint32BoolR) - fn(map[uint64]interface{}(nil), (encFnInfo).fastpathEncMapUint64IntfR, (decFnInfo).fastpathDecMapUint64IntfR) - fn(map[uint64]string(nil), (encFnInfo).fastpathEncMapUint64StringR, (decFnInfo).fastpathDecMapUint64StringR) - fn(map[uint64]uint(nil), (encFnInfo).fastpathEncMapUint64UintR, (decFnInfo).fastpathDecMapUint64UintR) - fn(map[uint64]uint8(nil), (encFnInfo).fastpathEncMapUint64Uint8R, (decFnInfo).fastpathDecMapUint64Uint8R) - fn(map[uint64]uint16(nil), (encFnInfo).fastpathEncMapUint64Uint16R, (decFnInfo).fastpathDecMapUint64Uint16R) - fn(map[uint64]uint32(nil), (encFnInfo).fastpathEncMapUint64Uint32R, (decFnInfo).fastpathDecMapUint64Uint32R) - fn(map[uint64]uint64(nil), (encFnInfo).fastpathEncMapUint64Uint64R, (decFnInfo).fastpathDecMapUint64Uint64R) - fn(map[uint64]int(nil), (encFnInfo).fastpathEncMapUint64IntR, (decFnInfo).fastpathDecMapUint64IntR) - fn(map[uint64]int8(nil), (encFnInfo).fastpathEncMapUint64Int8R, (decFnInfo).fastpathDecMapUint64Int8R) - fn(map[uint64]int16(nil), (encFnInfo).fastpathEncMapUint64Int16R, (decFnInfo).fastpathDecMapUint64Int16R) - fn(map[uint64]int32(nil), (encFnInfo).fastpathEncMapUint64Int32R, (decFnInfo).fastpathDecMapUint64Int32R) - fn(map[uint64]int64(nil), (encFnInfo).fastpathEncMapUint64Int64R, (decFnInfo).fastpathDecMapUint64Int64R) - fn(map[uint64]float32(nil), (encFnInfo).fastpathEncMapUint64Float32R, (decFnInfo).fastpathDecMapUint64Float32R) - fn(map[uint64]float64(nil), (encFnInfo).fastpathEncMapUint64Float64R, (decFnInfo).fastpathDecMapUint64Float64R) - fn(map[uint64]bool(nil), (encFnInfo).fastpathEncMapUint64BoolR, (decFnInfo).fastpathDecMapUint64BoolR) - fn(map[int]interface{}(nil), (encFnInfo).fastpathEncMapIntIntfR, (decFnInfo).fastpathDecMapIntIntfR) - fn(map[int]string(nil), (encFnInfo).fastpathEncMapIntStringR, (decFnInfo).fastpathDecMapIntStringR) - fn(map[int]uint(nil), (encFnInfo).fastpathEncMapIntUintR, (decFnInfo).fastpathDecMapIntUintR) - fn(map[int]uint8(nil), (encFnInfo).fastpathEncMapIntUint8R, (decFnInfo).fastpathDecMapIntUint8R) - fn(map[int]uint16(nil), (encFnInfo).fastpathEncMapIntUint16R, (decFnInfo).fastpathDecMapIntUint16R) - fn(map[int]uint32(nil), (encFnInfo).fastpathEncMapIntUint32R, (decFnInfo).fastpathDecMapIntUint32R) - fn(map[int]uint64(nil), (encFnInfo).fastpathEncMapIntUint64R, (decFnInfo).fastpathDecMapIntUint64R) - fn(map[int]int(nil), (encFnInfo).fastpathEncMapIntIntR, (decFnInfo).fastpathDecMapIntIntR) - fn(map[int]int8(nil), (encFnInfo).fastpathEncMapIntInt8R, (decFnInfo).fastpathDecMapIntInt8R) - fn(map[int]int16(nil), (encFnInfo).fastpathEncMapIntInt16R, (decFnInfo).fastpathDecMapIntInt16R) - fn(map[int]int32(nil), (encFnInfo).fastpathEncMapIntInt32R, (decFnInfo).fastpathDecMapIntInt32R) - fn(map[int]int64(nil), (encFnInfo).fastpathEncMapIntInt64R, (decFnInfo).fastpathDecMapIntInt64R) - fn(map[int]float32(nil), (encFnInfo).fastpathEncMapIntFloat32R, (decFnInfo).fastpathDecMapIntFloat32R) - fn(map[int]float64(nil), (encFnInfo).fastpathEncMapIntFloat64R, (decFnInfo).fastpathDecMapIntFloat64R) - fn(map[int]bool(nil), (encFnInfo).fastpathEncMapIntBoolR, (decFnInfo).fastpathDecMapIntBoolR) - fn(map[int8]interface{}(nil), (encFnInfo).fastpathEncMapInt8IntfR, (decFnInfo).fastpathDecMapInt8IntfR) - fn(map[int8]string(nil), (encFnInfo).fastpathEncMapInt8StringR, (decFnInfo).fastpathDecMapInt8StringR) - fn(map[int8]uint(nil), (encFnInfo).fastpathEncMapInt8UintR, (decFnInfo).fastpathDecMapInt8UintR) - fn(map[int8]uint8(nil), (encFnInfo).fastpathEncMapInt8Uint8R, (decFnInfo).fastpathDecMapInt8Uint8R) - fn(map[int8]uint16(nil), (encFnInfo).fastpathEncMapInt8Uint16R, (decFnInfo).fastpathDecMapInt8Uint16R) - fn(map[int8]uint32(nil), (encFnInfo).fastpathEncMapInt8Uint32R, (decFnInfo).fastpathDecMapInt8Uint32R) - fn(map[int8]uint64(nil), (encFnInfo).fastpathEncMapInt8Uint64R, (decFnInfo).fastpathDecMapInt8Uint64R) - fn(map[int8]int(nil), (encFnInfo).fastpathEncMapInt8IntR, (decFnInfo).fastpathDecMapInt8IntR) - fn(map[int8]int8(nil), (encFnInfo).fastpathEncMapInt8Int8R, (decFnInfo).fastpathDecMapInt8Int8R) - fn(map[int8]int16(nil), (encFnInfo).fastpathEncMapInt8Int16R, (decFnInfo).fastpathDecMapInt8Int16R) - fn(map[int8]int32(nil), (encFnInfo).fastpathEncMapInt8Int32R, (decFnInfo).fastpathDecMapInt8Int32R) - fn(map[int8]int64(nil), (encFnInfo).fastpathEncMapInt8Int64R, (decFnInfo).fastpathDecMapInt8Int64R) - fn(map[int8]float32(nil), (encFnInfo).fastpathEncMapInt8Float32R, (decFnInfo).fastpathDecMapInt8Float32R) - fn(map[int8]float64(nil), (encFnInfo).fastpathEncMapInt8Float64R, (decFnInfo).fastpathDecMapInt8Float64R) - fn(map[int8]bool(nil), (encFnInfo).fastpathEncMapInt8BoolR, (decFnInfo).fastpathDecMapInt8BoolR) - fn(map[int16]interface{}(nil), (encFnInfo).fastpathEncMapInt16IntfR, (decFnInfo).fastpathDecMapInt16IntfR) - fn(map[int16]string(nil), (encFnInfo).fastpathEncMapInt16StringR, (decFnInfo).fastpathDecMapInt16StringR) - fn(map[int16]uint(nil), (encFnInfo).fastpathEncMapInt16UintR, (decFnInfo).fastpathDecMapInt16UintR) - fn(map[int16]uint8(nil), (encFnInfo).fastpathEncMapInt16Uint8R, (decFnInfo).fastpathDecMapInt16Uint8R) - fn(map[int16]uint16(nil), (encFnInfo).fastpathEncMapInt16Uint16R, (decFnInfo).fastpathDecMapInt16Uint16R) - fn(map[int16]uint32(nil), (encFnInfo).fastpathEncMapInt16Uint32R, (decFnInfo).fastpathDecMapInt16Uint32R) - fn(map[int16]uint64(nil), (encFnInfo).fastpathEncMapInt16Uint64R, (decFnInfo).fastpathDecMapInt16Uint64R) - fn(map[int16]int(nil), (encFnInfo).fastpathEncMapInt16IntR, (decFnInfo).fastpathDecMapInt16IntR) - fn(map[int16]int8(nil), (encFnInfo).fastpathEncMapInt16Int8R, (decFnInfo).fastpathDecMapInt16Int8R) - fn(map[int16]int16(nil), (encFnInfo).fastpathEncMapInt16Int16R, (decFnInfo).fastpathDecMapInt16Int16R) - fn(map[int16]int32(nil), (encFnInfo).fastpathEncMapInt16Int32R, (decFnInfo).fastpathDecMapInt16Int32R) - fn(map[int16]int64(nil), (encFnInfo).fastpathEncMapInt16Int64R, (decFnInfo).fastpathDecMapInt16Int64R) - fn(map[int16]float32(nil), (encFnInfo).fastpathEncMapInt16Float32R, (decFnInfo).fastpathDecMapInt16Float32R) - fn(map[int16]float64(nil), (encFnInfo).fastpathEncMapInt16Float64R, (decFnInfo).fastpathDecMapInt16Float64R) - fn(map[int16]bool(nil), (encFnInfo).fastpathEncMapInt16BoolR, (decFnInfo).fastpathDecMapInt16BoolR) - fn(map[int32]interface{}(nil), (encFnInfo).fastpathEncMapInt32IntfR, (decFnInfo).fastpathDecMapInt32IntfR) - fn(map[int32]string(nil), (encFnInfo).fastpathEncMapInt32StringR, (decFnInfo).fastpathDecMapInt32StringR) - fn(map[int32]uint(nil), (encFnInfo).fastpathEncMapInt32UintR, (decFnInfo).fastpathDecMapInt32UintR) - fn(map[int32]uint8(nil), (encFnInfo).fastpathEncMapInt32Uint8R, (decFnInfo).fastpathDecMapInt32Uint8R) - fn(map[int32]uint16(nil), (encFnInfo).fastpathEncMapInt32Uint16R, (decFnInfo).fastpathDecMapInt32Uint16R) - fn(map[int32]uint32(nil), (encFnInfo).fastpathEncMapInt32Uint32R, (decFnInfo).fastpathDecMapInt32Uint32R) - fn(map[int32]uint64(nil), (encFnInfo).fastpathEncMapInt32Uint64R, (decFnInfo).fastpathDecMapInt32Uint64R) - fn(map[int32]int(nil), (encFnInfo).fastpathEncMapInt32IntR, (decFnInfo).fastpathDecMapInt32IntR) - fn(map[int32]int8(nil), (encFnInfo).fastpathEncMapInt32Int8R, (decFnInfo).fastpathDecMapInt32Int8R) - fn(map[int32]int16(nil), (encFnInfo).fastpathEncMapInt32Int16R, (decFnInfo).fastpathDecMapInt32Int16R) - fn(map[int32]int32(nil), (encFnInfo).fastpathEncMapInt32Int32R, (decFnInfo).fastpathDecMapInt32Int32R) - fn(map[int32]int64(nil), (encFnInfo).fastpathEncMapInt32Int64R, (decFnInfo).fastpathDecMapInt32Int64R) - fn(map[int32]float32(nil), (encFnInfo).fastpathEncMapInt32Float32R, (decFnInfo).fastpathDecMapInt32Float32R) - fn(map[int32]float64(nil), (encFnInfo).fastpathEncMapInt32Float64R, (decFnInfo).fastpathDecMapInt32Float64R) - fn(map[int32]bool(nil), (encFnInfo).fastpathEncMapInt32BoolR, (decFnInfo).fastpathDecMapInt32BoolR) - fn(map[int64]interface{}(nil), (encFnInfo).fastpathEncMapInt64IntfR, (decFnInfo).fastpathDecMapInt64IntfR) - fn(map[int64]string(nil), (encFnInfo).fastpathEncMapInt64StringR, (decFnInfo).fastpathDecMapInt64StringR) - fn(map[int64]uint(nil), (encFnInfo).fastpathEncMapInt64UintR, (decFnInfo).fastpathDecMapInt64UintR) - fn(map[int64]uint8(nil), (encFnInfo).fastpathEncMapInt64Uint8R, (decFnInfo).fastpathDecMapInt64Uint8R) - fn(map[int64]uint16(nil), (encFnInfo).fastpathEncMapInt64Uint16R, (decFnInfo).fastpathDecMapInt64Uint16R) - fn(map[int64]uint32(nil), (encFnInfo).fastpathEncMapInt64Uint32R, (decFnInfo).fastpathDecMapInt64Uint32R) - fn(map[int64]uint64(nil), (encFnInfo).fastpathEncMapInt64Uint64R, (decFnInfo).fastpathDecMapInt64Uint64R) - fn(map[int64]int(nil), (encFnInfo).fastpathEncMapInt64IntR, (decFnInfo).fastpathDecMapInt64IntR) - fn(map[int64]int8(nil), (encFnInfo).fastpathEncMapInt64Int8R, (decFnInfo).fastpathDecMapInt64Int8R) - fn(map[int64]int16(nil), (encFnInfo).fastpathEncMapInt64Int16R, (decFnInfo).fastpathDecMapInt64Int16R) - fn(map[int64]int32(nil), (encFnInfo).fastpathEncMapInt64Int32R, (decFnInfo).fastpathDecMapInt64Int32R) - fn(map[int64]int64(nil), (encFnInfo).fastpathEncMapInt64Int64R, (decFnInfo).fastpathDecMapInt64Int64R) - fn(map[int64]float32(nil), (encFnInfo).fastpathEncMapInt64Float32R, (decFnInfo).fastpathDecMapInt64Float32R) - fn(map[int64]float64(nil), (encFnInfo).fastpathEncMapInt64Float64R, (decFnInfo).fastpathDecMapInt64Float64R) - fn(map[int64]bool(nil), (encFnInfo).fastpathEncMapInt64BoolR, (decFnInfo).fastpathDecMapInt64BoolR) - fn(map[bool]interface{}(nil), (encFnInfo).fastpathEncMapBoolIntfR, (decFnInfo).fastpathDecMapBoolIntfR) - fn(map[bool]string(nil), (encFnInfo).fastpathEncMapBoolStringR, (decFnInfo).fastpathDecMapBoolStringR) - fn(map[bool]uint(nil), (encFnInfo).fastpathEncMapBoolUintR, (decFnInfo).fastpathDecMapBoolUintR) - fn(map[bool]uint8(nil), (encFnInfo).fastpathEncMapBoolUint8R, (decFnInfo).fastpathDecMapBoolUint8R) - fn(map[bool]uint16(nil), (encFnInfo).fastpathEncMapBoolUint16R, (decFnInfo).fastpathDecMapBoolUint16R) - fn(map[bool]uint32(nil), (encFnInfo).fastpathEncMapBoolUint32R, (decFnInfo).fastpathDecMapBoolUint32R) - fn(map[bool]uint64(nil), (encFnInfo).fastpathEncMapBoolUint64R, (decFnInfo).fastpathDecMapBoolUint64R) - fn(map[bool]int(nil), (encFnInfo).fastpathEncMapBoolIntR, (decFnInfo).fastpathDecMapBoolIntR) - fn(map[bool]int8(nil), (encFnInfo).fastpathEncMapBoolInt8R, (decFnInfo).fastpathDecMapBoolInt8R) - fn(map[bool]int16(nil), (encFnInfo).fastpathEncMapBoolInt16R, (decFnInfo).fastpathDecMapBoolInt16R) - fn(map[bool]int32(nil), (encFnInfo).fastpathEncMapBoolInt32R, (decFnInfo).fastpathDecMapBoolInt32R) - fn(map[bool]int64(nil), (encFnInfo).fastpathEncMapBoolInt64R, (decFnInfo).fastpathDecMapBoolInt64R) - fn(map[bool]float32(nil), (encFnInfo).fastpathEncMapBoolFloat32R, (decFnInfo).fastpathDecMapBoolFloat32R) - fn(map[bool]float64(nil), (encFnInfo).fastpathEncMapBoolFloat64R, (decFnInfo).fastpathDecMapBoolFloat64R) - fn(map[bool]bool(nil), (encFnInfo).fastpathEncMapBoolBoolR, (decFnInfo).fastpathDecMapBoolBoolR) + fn([]interface{}(nil), (*encFnInfo).fastpathEncSliceIntfR, (*decFnInfo).fastpathDecSliceIntfR) + fn([]string(nil), (*encFnInfo).fastpathEncSliceStringR, (*decFnInfo).fastpathDecSliceStringR) + fn([]float32(nil), (*encFnInfo).fastpathEncSliceFloat32R, (*decFnInfo).fastpathDecSliceFloat32R) + fn([]float64(nil), (*encFnInfo).fastpathEncSliceFloat64R, (*decFnInfo).fastpathDecSliceFloat64R) + fn([]uint(nil), (*encFnInfo).fastpathEncSliceUintR, (*decFnInfo).fastpathDecSliceUintR) + fn([]uint16(nil), (*encFnInfo).fastpathEncSliceUint16R, (*decFnInfo).fastpathDecSliceUint16R) + fn([]uint32(nil), (*encFnInfo).fastpathEncSliceUint32R, (*decFnInfo).fastpathDecSliceUint32R) + fn([]uint64(nil), (*encFnInfo).fastpathEncSliceUint64R, (*decFnInfo).fastpathDecSliceUint64R) + fn([]uintptr(nil), (*encFnInfo).fastpathEncSliceUintptrR, (*decFnInfo).fastpathDecSliceUintptrR) + fn([]int(nil), (*encFnInfo).fastpathEncSliceIntR, (*decFnInfo).fastpathDecSliceIntR) + fn([]int8(nil), (*encFnInfo).fastpathEncSliceInt8R, (*decFnInfo).fastpathDecSliceInt8R) + fn([]int16(nil), (*encFnInfo).fastpathEncSliceInt16R, (*decFnInfo).fastpathDecSliceInt16R) + fn([]int32(nil), (*encFnInfo).fastpathEncSliceInt32R, (*decFnInfo).fastpathDecSliceInt32R) + fn([]int64(nil), (*encFnInfo).fastpathEncSliceInt64R, (*decFnInfo).fastpathDecSliceInt64R) + fn([]bool(nil), (*encFnInfo).fastpathEncSliceBoolR, (*decFnInfo).fastpathDecSliceBoolR) + + fn(map[interface{}]interface{}(nil), (*encFnInfo).fastpathEncMapIntfIntfR, (*decFnInfo).fastpathDecMapIntfIntfR) + fn(map[interface{}]string(nil), (*encFnInfo).fastpathEncMapIntfStringR, (*decFnInfo).fastpathDecMapIntfStringR) + fn(map[interface{}]uint(nil), (*encFnInfo).fastpathEncMapIntfUintR, (*decFnInfo).fastpathDecMapIntfUintR) + fn(map[interface{}]uint8(nil), (*encFnInfo).fastpathEncMapIntfUint8R, (*decFnInfo).fastpathDecMapIntfUint8R) + fn(map[interface{}]uint16(nil), (*encFnInfo).fastpathEncMapIntfUint16R, (*decFnInfo).fastpathDecMapIntfUint16R) + fn(map[interface{}]uint32(nil), (*encFnInfo).fastpathEncMapIntfUint32R, (*decFnInfo).fastpathDecMapIntfUint32R) + fn(map[interface{}]uint64(nil), (*encFnInfo).fastpathEncMapIntfUint64R, (*decFnInfo).fastpathDecMapIntfUint64R) + fn(map[interface{}]uintptr(nil), (*encFnInfo).fastpathEncMapIntfUintptrR, (*decFnInfo).fastpathDecMapIntfUintptrR) + fn(map[interface{}]int(nil), (*encFnInfo).fastpathEncMapIntfIntR, (*decFnInfo).fastpathDecMapIntfIntR) + fn(map[interface{}]int8(nil), (*encFnInfo).fastpathEncMapIntfInt8R, (*decFnInfo).fastpathDecMapIntfInt8R) + fn(map[interface{}]int16(nil), (*encFnInfo).fastpathEncMapIntfInt16R, (*decFnInfo).fastpathDecMapIntfInt16R) + fn(map[interface{}]int32(nil), (*encFnInfo).fastpathEncMapIntfInt32R, (*decFnInfo).fastpathDecMapIntfInt32R) + fn(map[interface{}]int64(nil), (*encFnInfo).fastpathEncMapIntfInt64R, (*decFnInfo).fastpathDecMapIntfInt64R) + fn(map[interface{}]float32(nil), (*encFnInfo).fastpathEncMapIntfFloat32R, (*decFnInfo).fastpathDecMapIntfFloat32R) + fn(map[interface{}]float64(nil), (*encFnInfo).fastpathEncMapIntfFloat64R, (*decFnInfo).fastpathDecMapIntfFloat64R) + fn(map[interface{}]bool(nil), (*encFnInfo).fastpathEncMapIntfBoolR, (*decFnInfo).fastpathDecMapIntfBoolR) + fn(map[string]interface{}(nil), (*encFnInfo).fastpathEncMapStringIntfR, (*decFnInfo).fastpathDecMapStringIntfR) + fn(map[string]string(nil), (*encFnInfo).fastpathEncMapStringStringR, (*decFnInfo).fastpathDecMapStringStringR) + fn(map[string]uint(nil), (*encFnInfo).fastpathEncMapStringUintR, (*decFnInfo).fastpathDecMapStringUintR) + fn(map[string]uint8(nil), (*encFnInfo).fastpathEncMapStringUint8R, (*decFnInfo).fastpathDecMapStringUint8R) + fn(map[string]uint16(nil), (*encFnInfo).fastpathEncMapStringUint16R, (*decFnInfo).fastpathDecMapStringUint16R) + fn(map[string]uint32(nil), (*encFnInfo).fastpathEncMapStringUint32R, (*decFnInfo).fastpathDecMapStringUint32R) + fn(map[string]uint64(nil), (*encFnInfo).fastpathEncMapStringUint64R, (*decFnInfo).fastpathDecMapStringUint64R) + fn(map[string]uintptr(nil), (*encFnInfo).fastpathEncMapStringUintptrR, (*decFnInfo).fastpathDecMapStringUintptrR) + fn(map[string]int(nil), (*encFnInfo).fastpathEncMapStringIntR, (*decFnInfo).fastpathDecMapStringIntR) + fn(map[string]int8(nil), (*encFnInfo).fastpathEncMapStringInt8R, (*decFnInfo).fastpathDecMapStringInt8R) + fn(map[string]int16(nil), (*encFnInfo).fastpathEncMapStringInt16R, (*decFnInfo).fastpathDecMapStringInt16R) + fn(map[string]int32(nil), (*encFnInfo).fastpathEncMapStringInt32R, (*decFnInfo).fastpathDecMapStringInt32R) + fn(map[string]int64(nil), (*encFnInfo).fastpathEncMapStringInt64R, (*decFnInfo).fastpathDecMapStringInt64R) + fn(map[string]float32(nil), (*encFnInfo).fastpathEncMapStringFloat32R, (*decFnInfo).fastpathDecMapStringFloat32R) + fn(map[string]float64(nil), (*encFnInfo).fastpathEncMapStringFloat64R, (*decFnInfo).fastpathDecMapStringFloat64R) + fn(map[string]bool(nil), (*encFnInfo).fastpathEncMapStringBoolR, (*decFnInfo).fastpathDecMapStringBoolR) + fn(map[float32]interface{}(nil), (*encFnInfo).fastpathEncMapFloat32IntfR, (*decFnInfo).fastpathDecMapFloat32IntfR) + fn(map[float32]string(nil), (*encFnInfo).fastpathEncMapFloat32StringR, (*decFnInfo).fastpathDecMapFloat32StringR) + fn(map[float32]uint(nil), (*encFnInfo).fastpathEncMapFloat32UintR, (*decFnInfo).fastpathDecMapFloat32UintR) + fn(map[float32]uint8(nil), (*encFnInfo).fastpathEncMapFloat32Uint8R, (*decFnInfo).fastpathDecMapFloat32Uint8R) + fn(map[float32]uint16(nil), (*encFnInfo).fastpathEncMapFloat32Uint16R, (*decFnInfo).fastpathDecMapFloat32Uint16R) + fn(map[float32]uint32(nil), (*encFnInfo).fastpathEncMapFloat32Uint32R, (*decFnInfo).fastpathDecMapFloat32Uint32R) + fn(map[float32]uint64(nil), (*encFnInfo).fastpathEncMapFloat32Uint64R, (*decFnInfo).fastpathDecMapFloat32Uint64R) + fn(map[float32]uintptr(nil), (*encFnInfo).fastpathEncMapFloat32UintptrR, (*decFnInfo).fastpathDecMapFloat32UintptrR) + fn(map[float32]int(nil), (*encFnInfo).fastpathEncMapFloat32IntR, (*decFnInfo).fastpathDecMapFloat32IntR) + fn(map[float32]int8(nil), (*encFnInfo).fastpathEncMapFloat32Int8R, (*decFnInfo).fastpathDecMapFloat32Int8R) + fn(map[float32]int16(nil), (*encFnInfo).fastpathEncMapFloat32Int16R, (*decFnInfo).fastpathDecMapFloat32Int16R) + fn(map[float32]int32(nil), (*encFnInfo).fastpathEncMapFloat32Int32R, (*decFnInfo).fastpathDecMapFloat32Int32R) + fn(map[float32]int64(nil), (*encFnInfo).fastpathEncMapFloat32Int64R, (*decFnInfo).fastpathDecMapFloat32Int64R) + fn(map[float32]float32(nil), (*encFnInfo).fastpathEncMapFloat32Float32R, (*decFnInfo).fastpathDecMapFloat32Float32R) + fn(map[float32]float64(nil), (*encFnInfo).fastpathEncMapFloat32Float64R, (*decFnInfo).fastpathDecMapFloat32Float64R) + fn(map[float32]bool(nil), (*encFnInfo).fastpathEncMapFloat32BoolR, (*decFnInfo).fastpathDecMapFloat32BoolR) + fn(map[float64]interface{}(nil), (*encFnInfo).fastpathEncMapFloat64IntfR, (*decFnInfo).fastpathDecMapFloat64IntfR) + fn(map[float64]string(nil), (*encFnInfo).fastpathEncMapFloat64StringR, (*decFnInfo).fastpathDecMapFloat64StringR) + fn(map[float64]uint(nil), (*encFnInfo).fastpathEncMapFloat64UintR, (*decFnInfo).fastpathDecMapFloat64UintR) + fn(map[float64]uint8(nil), (*encFnInfo).fastpathEncMapFloat64Uint8R, (*decFnInfo).fastpathDecMapFloat64Uint8R) + fn(map[float64]uint16(nil), (*encFnInfo).fastpathEncMapFloat64Uint16R, (*decFnInfo).fastpathDecMapFloat64Uint16R) + fn(map[float64]uint32(nil), (*encFnInfo).fastpathEncMapFloat64Uint32R, (*decFnInfo).fastpathDecMapFloat64Uint32R) + fn(map[float64]uint64(nil), (*encFnInfo).fastpathEncMapFloat64Uint64R, (*decFnInfo).fastpathDecMapFloat64Uint64R) + fn(map[float64]uintptr(nil), (*encFnInfo).fastpathEncMapFloat64UintptrR, (*decFnInfo).fastpathDecMapFloat64UintptrR) + fn(map[float64]int(nil), (*encFnInfo).fastpathEncMapFloat64IntR, (*decFnInfo).fastpathDecMapFloat64IntR) + fn(map[float64]int8(nil), (*encFnInfo).fastpathEncMapFloat64Int8R, (*decFnInfo).fastpathDecMapFloat64Int8R) + fn(map[float64]int16(nil), (*encFnInfo).fastpathEncMapFloat64Int16R, (*decFnInfo).fastpathDecMapFloat64Int16R) + fn(map[float64]int32(nil), (*encFnInfo).fastpathEncMapFloat64Int32R, (*decFnInfo).fastpathDecMapFloat64Int32R) + fn(map[float64]int64(nil), (*encFnInfo).fastpathEncMapFloat64Int64R, (*decFnInfo).fastpathDecMapFloat64Int64R) + fn(map[float64]float32(nil), (*encFnInfo).fastpathEncMapFloat64Float32R, (*decFnInfo).fastpathDecMapFloat64Float32R) + fn(map[float64]float64(nil), (*encFnInfo).fastpathEncMapFloat64Float64R, (*decFnInfo).fastpathDecMapFloat64Float64R) + fn(map[float64]bool(nil), (*encFnInfo).fastpathEncMapFloat64BoolR, (*decFnInfo).fastpathDecMapFloat64BoolR) + fn(map[uint]interface{}(nil), (*encFnInfo).fastpathEncMapUintIntfR, (*decFnInfo).fastpathDecMapUintIntfR) + fn(map[uint]string(nil), (*encFnInfo).fastpathEncMapUintStringR, (*decFnInfo).fastpathDecMapUintStringR) + fn(map[uint]uint(nil), (*encFnInfo).fastpathEncMapUintUintR, (*decFnInfo).fastpathDecMapUintUintR) + fn(map[uint]uint8(nil), (*encFnInfo).fastpathEncMapUintUint8R, (*decFnInfo).fastpathDecMapUintUint8R) + fn(map[uint]uint16(nil), (*encFnInfo).fastpathEncMapUintUint16R, (*decFnInfo).fastpathDecMapUintUint16R) + fn(map[uint]uint32(nil), (*encFnInfo).fastpathEncMapUintUint32R, (*decFnInfo).fastpathDecMapUintUint32R) + fn(map[uint]uint64(nil), (*encFnInfo).fastpathEncMapUintUint64R, (*decFnInfo).fastpathDecMapUintUint64R) + fn(map[uint]uintptr(nil), (*encFnInfo).fastpathEncMapUintUintptrR, (*decFnInfo).fastpathDecMapUintUintptrR) + fn(map[uint]int(nil), (*encFnInfo).fastpathEncMapUintIntR, (*decFnInfo).fastpathDecMapUintIntR) + fn(map[uint]int8(nil), (*encFnInfo).fastpathEncMapUintInt8R, (*decFnInfo).fastpathDecMapUintInt8R) + fn(map[uint]int16(nil), (*encFnInfo).fastpathEncMapUintInt16R, (*decFnInfo).fastpathDecMapUintInt16R) + fn(map[uint]int32(nil), (*encFnInfo).fastpathEncMapUintInt32R, (*decFnInfo).fastpathDecMapUintInt32R) + fn(map[uint]int64(nil), (*encFnInfo).fastpathEncMapUintInt64R, (*decFnInfo).fastpathDecMapUintInt64R) + fn(map[uint]float32(nil), (*encFnInfo).fastpathEncMapUintFloat32R, (*decFnInfo).fastpathDecMapUintFloat32R) + fn(map[uint]float64(nil), (*encFnInfo).fastpathEncMapUintFloat64R, (*decFnInfo).fastpathDecMapUintFloat64R) + fn(map[uint]bool(nil), (*encFnInfo).fastpathEncMapUintBoolR, (*decFnInfo).fastpathDecMapUintBoolR) + fn(map[uint8]interface{}(nil), (*encFnInfo).fastpathEncMapUint8IntfR, (*decFnInfo).fastpathDecMapUint8IntfR) + fn(map[uint8]string(nil), (*encFnInfo).fastpathEncMapUint8StringR, (*decFnInfo).fastpathDecMapUint8StringR) + fn(map[uint8]uint(nil), (*encFnInfo).fastpathEncMapUint8UintR, (*decFnInfo).fastpathDecMapUint8UintR) + fn(map[uint8]uint8(nil), (*encFnInfo).fastpathEncMapUint8Uint8R, (*decFnInfo).fastpathDecMapUint8Uint8R) + fn(map[uint8]uint16(nil), (*encFnInfo).fastpathEncMapUint8Uint16R, (*decFnInfo).fastpathDecMapUint8Uint16R) + fn(map[uint8]uint32(nil), (*encFnInfo).fastpathEncMapUint8Uint32R, (*decFnInfo).fastpathDecMapUint8Uint32R) + fn(map[uint8]uint64(nil), (*encFnInfo).fastpathEncMapUint8Uint64R, (*decFnInfo).fastpathDecMapUint8Uint64R) + fn(map[uint8]uintptr(nil), (*encFnInfo).fastpathEncMapUint8UintptrR, (*decFnInfo).fastpathDecMapUint8UintptrR) + fn(map[uint8]int(nil), (*encFnInfo).fastpathEncMapUint8IntR, (*decFnInfo).fastpathDecMapUint8IntR) + fn(map[uint8]int8(nil), (*encFnInfo).fastpathEncMapUint8Int8R, (*decFnInfo).fastpathDecMapUint8Int8R) + fn(map[uint8]int16(nil), (*encFnInfo).fastpathEncMapUint8Int16R, (*decFnInfo).fastpathDecMapUint8Int16R) + fn(map[uint8]int32(nil), (*encFnInfo).fastpathEncMapUint8Int32R, (*decFnInfo).fastpathDecMapUint8Int32R) + fn(map[uint8]int64(nil), (*encFnInfo).fastpathEncMapUint8Int64R, (*decFnInfo).fastpathDecMapUint8Int64R) + fn(map[uint8]float32(nil), (*encFnInfo).fastpathEncMapUint8Float32R, (*decFnInfo).fastpathDecMapUint8Float32R) + fn(map[uint8]float64(nil), (*encFnInfo).fastpathEncMapUint8Float64R, (*decFnInfo).fastpathDecMapUint8Float64R) + fn(map[uint8]bool(nil), (*encFnInfo).fastpathEncMapUint8BoolR, (*decFnInfo).fastpathDecMapUint8BoolR) + fn(map[uint16]interface{}(nil), (*encFnInfo).fastpathEncMapUint16IntfR, (*decFnInfo).fastpathDecMapUint16IntfR) + fn(map[uint16]string(nil), (*encFnInfo).fastpathEncMapUint16StringR, (*decFnInfo).fastpathDecMapUint16StringR) + fn(map[uint16]uint(nil), (*encFnInfo).fastpathEncMapUint16UintR, (*decFnInfo).fastpathDecMapUint16UintR) + fn(map[uint16]uint8(nil), (*encFnInfo).fastpathEncMapUint16Uint8R, (*decFnInfo).fastpathDecMapUint16Uint8R) + fn(map[uint16]uint16(nil), (*encFnInfo).fastpathEncMapUint16Uint16R, (*decFnInfo).fastpathDecMapUint16Uint16R) + fn(map[uint16]uint32(nil), (*encFnInfo).fastpathEncMapUint16Uint32R, (*decFnInfo).fastpathDecMapUint16Uint32R) + fn(map[uint16]uint64(nil), (*encFnInfo).fastpathEncMapUint16Uint64R, (*decFnInfo).fastpathDecMapUint16Uint64R) + fn(map[uint16]uintptr(nil), (*encFnInfo).fastpathEncMapUint16UintptrR, (*decFnInfo).fastpathDecMapUint16UintptrR) + fn(map[uint16]int(nil), (*encFnInfo).fastpathEncMapUint16IntR, (*decFnInfo).fastpathDecMapUint16IntR) + fn(map[uint16]int8(nil), (*encFnInfo).fastpathEncMapUint16Int8R, (*decFnInfo).fastpathDecMapUint16Int8R) + fn(map[uint16]int16(nil), (*encFnInfo).fastpathEncMapUint16Int16R, (*decFnInfo).fastpathDecMapUint16Int16R) + fn(map[uint16]int32(nil), (*encFnInfo).fastpathEncMapUint16Int32R, (*decFnInfo).fastpathDecMapUint16Int32R) + fn(map[uint16]int64(nil), (*encFnInfo).fastpathEncMapUint16Int64R, (*decFnInfo).fastpathDecMapUint16Int64R) + fn(map[uint16]float32(nil), (*encFnInfo).fastpathEncMapUint16Float32R, (*decFnInfo).fastpathDecMapUint16Float32R) + fn(map[uint16]float64(nil), (*encFnInfo).fastpathEncMapUint16Float64R, (*decFnInfo).fastpathDecMapUint16Float64R) + fn(map[uint16]bool(nil), (*encFnInfo).fastpathEncMapUint16BoolR, (*decFnInfo).fastpathDecMapUint16BoolR) + fn(map[uint32]interface{}(nil), (*encFnInfo).fastpathEncMapUint32IntfR, (*decFnInfo).fastpathDecMapUint32IntfR) + fn(map[uint32]string(nil), (*encFnInfo).fastpathEncMapUint32StringR, (*decFnInfo).fastpathDecMapUint32StringR) + fn(map[uint32]uint(nil), (*encFnInfo).fastpathEncMapUint32UintR, (*decFnInfo).fastpathDecMapUint32UintR) + fn(map[uint32]uint8(nil), (*encFnInfo).fastpathEncMapUint32Uint8R, (*decFnInfo).fastpathDecMapUint32Uint8R) + fn(map[uint32]uint16(nil), (*encFnInfo).fastpathEncMapUint32Uint16R, (*decFnInfo).fastpathDecMapUint32Uint16R) + fn(map[uint32]uint32(nil), (*encFnInfo).fastpathEncMapUint32Uint32R, (*decFnInfo).fastpathDecMapUint32Uint32R) + fn(map[uint32]uint64(nil), (*encFnInfo).fastpathEncMapUint32Uint64R, (*decFnInfo).fastpathDecMapUint32Uint64R) + fn(map[uint32]uintptr(nil), (*encFnInfo).fastpathEncMapUint32UintptrR, (*decFnInfo).fastpathDecMapUint32UintptrR) + fn(map[uint32]int(nil), (*encFnInfo).fastpathEncMapUint32IntR, (*decFnInfo).fastpathDecMapUint32IntR) + fn(map[uint32]int8(nil), (*encFnInfo).fastpathEncMapUint32Int8R, (*decFnInfo).fastpathDecMapUint32Int8R) + fn(map[uint32]int16(nil), (*encFnInfo).fastpathEncMapUint32Int16R, (*decFnInfo).fastpathDecMapUint32Int16R) + fn(map[uint32]int32(nil), (*encFnInfo).fastpathEncMapUint32Int32R, (*decFnInfo).fastpathDecMapUint32Int32R) + fn(map[uint32]int64(nil), (*encFnInfo).fastpathEncMapUint32Int64R, (*decFnInfo).fastpathDecMapUint32Int64R) + fn(map[uint32]float32(nil), (*encFnInfo).fastpathEncMapUint32Float32R, (*decFnInfo).fastpathDecMapUint32Float32R) + fn(map[uint32]float64(nil), (*encFnInfo).fastpathEncMapUint32Float64R, (*decFnInfo).fastpathDecMapUint32Float64R) + fn(map[uint32]bool(nil), (*encFnInfo).fastpathEncMapUint32BoolR, (*decFnInfo).fastpathDecMapUint32BoolR) + fn(map[uint64]interface{}(nil), (*encFnInfo).fastpathEncMapUint64IntfR, (*decFnInfo).fastpathDecMapUint64IntfR) + fn(map[uint64]string(nil), (*encFnInfo).fastpathEncMapUint64StringR, (*decFnInfo).fastpathDecMapUint64StringR) + fn(map[uint64]uint(nil), (*encFnInfo).fastpathEncMapUint64UintR, (*decFnInfo).fastpathDecMapUint64UintR) + fn(map[uint64]uint8(nil), (*encFnInfo).fastpathEncMapUint64Uint8R, (*decFnInfo).fastpathDecMapUint64Uint8R) + fn(map[uint64]uint16(nil), (*encFnInfo).fastpathEncMapUint64Uint16R, (*decFnInfo).fastpathDecMapUint64Uint16R) + fn(map[uint64]uint32(nil), (*encFnInfo).fastpathEncMapUint64Uint32R, (*decFnInfo).fastpathDecMapUint64Uint32R) + fn(map[uint64]uint64(nil), (*encFnInfo).fastpathEncMapUint64Uint64R, (*decFnInfo).fastpathDecMapUint64Uint64R) + fn(map[uint64]uintptr(nil), (*encFnInfo).fastpathEncMapUint64UintptrR, (*decFnInfo).fastpathDecMapUint64UintptrR) + fn(map[uint64]int(nil), (*encFnInfo).fastpathEncMapUint64IntR, (*decFnInfo).fastpathDecMapUint64IntR) + fn(map[uint64]int8(nil), (*encFnInfo).fastpathEncMapUint64Int8R, (*decFnInfo).fastpathDecMapUint64Int8R) + fn(map[uint64]int16(nil), (*encFnInfo).fastpathEncMapUint64Int16R, (*decFnInfo).fastpathDecMapUint64Int16R) + fn(map[uint64]int32(nil), (*encFnInfo).fastpathEncMapUint64Int32R, (*decFnInfo).fastpathDecMapUint64Int32R) + fn(map[uint64]int64(nil), (*encFnInfo).fastpathEncMapUint64Int64R, (*decFnInfo).fastpathDecMapUint64Int64R) + fn(map[uint64]float32(nil), (*encFnInfo).fastpathEncMapUint64Float32R, (*decFnInfo).fastpathDecMapUint64Float32R) + fn(map[uint64]float64(nil), (*encFnInfo).fastpathEncMapUint64Float64R, (*decFnInfo).fastpathDecMapUint64Float64R) + fn(map[uint64]bool(nil), (*encFnInfo).fastpathEncMapUint64BoolR, (*decFnInfo).fastpathDecMapUint64BoolR) + fn(map[uintptr]interface{}(nil), (*encFnInfo).fastpathEncMapUintptrIntfR, (*decFnInfo).fastpathDecMapUintptrIntfR) + fn(map[uintptr]string(nil), (*encFnInfo).fastpathEncMapUintptrStringR, (*decFnInfo).fastpathDecMapUintptrStringR) + fn(map[uintptr]uint(nil), (*encFnInfo).fastpathEncMapUintptrUintR, (*decFnInfo).fastpathDecMapUintptrUintR) + fn(map[uintptr]uint8(nil), (*encFnInfo).fastpathEncMapUintptrUint8R, (*decFnInfo).fastpathDecMapUintptrUint8R) + fn(map[uintptr]uint16(nil), (*encFnInfo).fastpathEncMapUintptrUint16R, (*decFnInfo).fastpathDecMapUintptrUint16R) + fn(map[uintptr]uint32(nil), (*encFnInfo).fastpathEncMapUintptrUint32R, (*decFnInfo).fastpathDecMapUintptrUint32R) + fn(map[uintptr]uint64(nil), (*encFnInfo).fastpathEncMapUintptrUint64R, (*decFnInfo).fastpathDecMapUintptrUint64R) + fn(map[uintptr]uintptr(nil), (*encFnInfo).fastpathEncMapUintptrUintptrR, (*decFnInfo).fastpathDecMapUintptrUintptrR) + fn(map[uintptr]int(nil), (*encFnInfo).fastpathEncMapUintptrIntR, (*decFnInfo).fastpathDecMapUintptrIntR) + fn(map[uintptr]int8(nil), (*encFnInfo).fastpathEncMapUintptrInt8R, (*decFnInfo).fastpathDecMapUintptrInt8R) + fn(map[uintptr]int16(nil), (*encFnInfo).fastpathEncMapUintptrInt16R, (*decFnInfo).fastpathDecMapUintptrInt16R) + fn(map[uintptr]int32(nil), (*encFnInfo).fastpathEncMapUintptrInt32R, (*decFnInfo).fastpathDecMapUintptrInt32R) + fn(map[uintptr]int64(nil), (*encFnInfo).fastpathEncMapUintptrInt64R, (*decFnInfo).fastpathDecMapUintptrInt64R) + fn(map[uintptr]float32(nil), (*encFnInfo).fastpathEncMapUintptrFloat32R, (*decFnInfo).fastpathDecMapUintptrFloat32R) + fn(map[uintptr]float64(nil), (*encFnInfo).fastpathEncMapUintptrFloat64R, (*decFnInfo).fastpathDecMapUintptrFloat64R) + fn(map[uintptr]bool(nil), (*encFnInfo).fastpathEncMapUintptrBoolR, (*decFnInfo).fastpathDecMapUintptrBoolR) + fn(map[int]interface{}(nil), (*encFnInfo).fastpathEncMapIntIntfR, (*decFnInfo).fastpathDecMapIntIntfR) + fn(map[int]string(nil), (*encFnInfo).fastpathEncMapIntStringR, (*decFnInfo).fastpathDecMapIntStringR) + fn(map[int]uint(nil), (*encFnInfo).fastpathEncMapIntUintR, (*decFnInfo).fastpathDecMapIntUintR) + fn(map[int]uint8(nil), (*encFnInfo).fastpathEncMapIntUint8R, (*decFnInfo).fastpathDecMapIntUint8R) + fn(map[int]uint16(nil), (*encFnInfo).fastpathEncMapIntUint16R, (*decFnInfo).fastpathDecMapIntUint16R) + fn(map[int]uint32(nil), (*encFnInfo).fastpathEncMapIntUint32R, (*decFnInfo).fastpathDecMapIntUint32R) + fn(map[int]uint64(nil), (*encFnInfo).fastpathEncMapIntUint64R, (*decFnInfo).fastpathDecMapIntUint64R) + fn(map[int]uintptr(nil), (*encFnInfo).fastpathEncMapIntUintptrR, (*decFnInfo).fastpathDecMapIntUintptrR) + fn(map[int]int(nil), (*encFnInfo).fastpathEncMapIntIntR, (*decFnInfo).fastpathDecMapIntIntR) + fn(map[int]int8(nil), (*encFnInfo).fastpathEncMapIntInt8R, (*decFnInfo).fastpathDecMapIntInt8R) + fn(map[int]int16(nil), (*encFnInfo).fastpathEncMapIntInt16R, (*decFnInfo).fastpathDecMapIntInt16R) + fn(map[int]int32(nil), (*encFnInfo).fastpathEncMapIntInt32R, (*decFnInfo).fastpathDecMapIntInt32R) + fn(map[int]int64(nil), (*encFnInfo).fastpathEncMapIntInt64R, (*decFnInfo).fastpathDecMapIntInt64R) + fn(map[int]float32(nil), (*encFnInfo).fastpathEncMapIntFloat32R, (*decFnInfo).fastpathDecMapIntFloat32R) + fn(map[int]float64(nil), (*encFnInfo).fastpathEncMapIntFloat64R, (*decFnInfo).fastpathDecMapIntFloat64R) + fn(map[int]bool(nil), (*encFnInfo).fastpathEncMapIntBoolR, (*decFnInfo).fastpathDecMapIntBoolR) + fn(map[int8]interface{}(nil), (*encFnInfo).fastpathEncMapInt8IntfR, (*decFnInfo).fastpathDecMapInt8IntfR) + fn(map[int8]string(nil), (*encFnInfo).fastpathEncMapInt8StringR, (*decFnInfo).fastpathDecMapInt8StringR) + fn(map[int8]uint(nil), (*encFnInfo).fastpathEncMapInt8UintR, (*decFnInfo).fastpathDecMapInt8UintR) + fn(map[int8]uint8(nil), (*encFnInfo).fastpathEncMapInt8Uint8R, (*decFnInfo).fastpathDecMapInt8Uint8R) + fn(map[int8]uint16(nil), (*encFnInfo).fastpathEncMapInt8Uint16R, (*decFnInfo).fastpathDecMapInt8Uint16R) + fn(map[int8]uint32(nil), (*encFnInfo).fastpathEncMapInt8Uint32R, (*decFnInfo).fastpathDecMapInt8Uint32R) + fn(map[int8]uint64(nil), (*encFnInfo).fastpathEncMapInt8Uint64R, (*decFnInfo).fastpathDecMapInt8Uint64R) + fn(map[int8]uintptr(nil), (*encFnInfo).fastpathEncMapInt8UintptrR, (*decFnInfo).fastpathDecMapInt8UintptrR) + fn(map[int8]int(nil), (*encFnInfo).fastpathEncMapInt8IntR, (*decFnInfo).fastpathDecMapInt8IntR) + fn(map[int8]int8(nil), (*encFnInfo).fastpathEncMapInt8Int8R, (*decFnInfo).fastpathDecMapInt8Int8R) + fn(map[int8]int16(nil), (*encFnInfo).fastpathEncMapInt8Int16R, (*decFnInfo).fastpathDecMapInt8Int16R) + fn(map[int8]int32(nil), (*encFnInfo).fastpathEncMapInt8Int32R, (*decFnInfo).fastpathDecMapInt8Int32R) + fn(map[int8]int64(nil), (*encFnInfo).fastpathEncMapInt8Int64R, (*decFnInfo).fastpathDecMapInt8Int64R) + fn(map[int8]float32(nil), (*encFnInfo).fastpathEncMapInt8Float32R, (*decFnInfo).fastpathDecMapInt8Float32R) + fn(map[int8]float64(nil), (*encFnInfo).fastpathEncMapInt8Float64R, (*decFnInfo).fastpathDecMapInt8Float64R) + fn(map[int8]bool(nil), (*encFnInfo).fastpathEncMapInt8BoolR, (*decFnInfo).fastpathDecMapInt8BoolR) + fn(map[int16]interface{}(nil), (*encFnInfo).fastpathEncMapInt16IntfR, (*decFnInfo).fastpathDecMapInt16IntfR) + fn(map[int16]string(nil), (*encFnInfo).fastpathEncMapInt16StringR, (*decFnInfo).fastpathDecMapInt16StringR) + fn(map[int16]uint(nil), (*encFnInfo).fastpathEncMapInt16UintR, (*decFnInfo).fastpathDecMapInt16UintR) + fn(map[int16]uint8(nil), (*encFnInfo).fastpathEncMapInt16Uint8R, (*decFnInfo).fastpathDecMapInt16Uint8R) + fn(map[int16]uint16(nil), (*encFnInfo).fastpathEncMapInt16Uint16R, (*decFnInfo).fastpathDecMapInt16Uint16R) + fn(map[int16]uint32(nil), (*encFnInfo).fastpathEncMapInt16Uint32R, (*decFnInfo).fastpathDecMapInt16Uint32R) + fn(map[int16]uint64(nil), (*encFnInfo).fastpathEncMapInt16Uint64R, (*decFnInfo).fastpathDecMapInt16Uint64R) + fn(map[int16]uintptr(nil), (*encFnInfo).fastpathEncMapInt16UintptrR, (*decFnInfo).fastpathDecMapInt16UintptrR) + fn(map[int16]int(nil), (*encFnInfo).fastpathEncMapInt16IntR, (*decFnInfo).fastpathDecMapInt16IntR) + fn(map[int16]int8(nil), (*encFnInfo).fastpathEncMapInt16Int8R, (*decFnInfo).fastpathDecMapInt16Int8R) + fn(map[int16]int16(nil), (*encFnInfo).fastpathEncMapInt16Int16R, (*decFnInfo).fastpathDecMapInt16Int16R) + fn(map[int16]int32(nil), (*encFnInfo).fastpathEncMapInt16Int32R, (*decFnInfo).fastpathDecMapInt16Int32R) + fn(map[int16]int64(nil), (*encFnInfo).fastpathEncMapInt16Int64R, (*decFnInfo).fastpathDecMapInt16Int64R) + fn(map[int16]float32(nil), (*encFnInfo).fastpathEncMapInt16Float32R, (*decFnInfo).fastpathDecMapInt16Float32R) + fn(map[int16]float64(nil), (*encFnInfo).fastpathEncMapInt16Float64R, (*decFnInfo).fastpathDecMapInt16Float64R) + fn(map[int16]bool(nil), (*encFnInfo).fastpathEncMapInt16BoolR, (*decFnInfo).fastpathDecMapInt16BoolR) + fn(map[int32]interface{}(nil), (*encFnInfo).fastpathEncMapInt32IntfR, (*decFnInfo).fastpathDecMapInt32IntfR) + fn(map[int32]string(nil), (*encFnInfo).fastpathEncMapInt32StringR, (*decFnInfo).fastpathDecMapInt32StringR) + fn(map[int32]uint(nil), (*encFnInfo).fastpathEncMapInt32UintR, (*decFnInfo).fastpathDecMapInt32UintR) + fn(map[int32]uint8(nil), (*encFnInfo).fastpathEncMapInt32Uint8R, (*decFnInfo).fastpathDecMapInt32Uint8R) + fn(map[int32]uint16(nil), (*encFnInfo).fastpathEncMapInt32Uint16R, (*decFnInfo).fastpathDecMapInt32Uint16R) + fn(map[int32]uint32(nil), (*encFnInfo).fastpathEncMapInt32Uint32R, (*decFnInfo).fastpathDecMapInt32Uint32R) + fn(map[int32]uint64(nil), (*encFnInfo).fastpathEncMapInt32Uint64R, (*decFnInfo).fastpathDecMapInt32Uint64R) + fn(map[int32]uintptr(nil), (*encFnInfo).fastpathEncMapInt32UintptrR, (*decFnInfo).fastpathDecMapInt32UintptrR) + fn(map[int32]int(nil), (*encFnInfo).fastpathEncMapInt32IntR, (*decFnInfo).fastpathDecMapInt32IntR) + fn(map[int32]int8(nil), (*encFnInfo).fastpathEncMapInt32Int8R, (*decFnInfo).fastpathDecMapInt32Int8R) + fn(map[int32]int16(nil), (*encFnInfo).fastpathEncMapInt32Int16R, (*decFnInfo).fastpathDecMapInt32Int16R) + fn(map[int32]int32(nil), (*encFnInfo).fastpathEncMapInt32Int32R, (*decFnInfo).fastpathDecMapInt32Int32R) + fn(map[int32]int64(nil), (*encFnInfo).fastpathEncMapInt32Int64R, (*decFnInfo).fastpathDecMapInt32Int64R) + fn(map[int32]float32(nil), (*encFnInfo).fastpathEncMapInt32Float32R, (*decFnInfo).fastpathDecMapInt32Float32R) + fn(map[int32]float64(nil), (*encFnInfo).fastpathEncMapInt32Float64R, (*decFnInfo).fastpathDecMapInt32Float64R) + fn(map[int32]bool(nil), (*encFnInfo).fastpathEncMapInt32BoolR, (*decFnInfo).fastpathDecMapInt32BoolR) + fn(map[int64]interface{}(nil), (*encFnInfo).fastpathEncMapInt64IntfR, (*decFnInfo).fastpathDecMapInt64IntfR) + fn(map[int64]string(nil), (*encFnInfo).fastpathEncMapInt64StringR, (*decFnInfo).fastpathDecMapInt64StringR) + fn(map[int64]uint(nil), (*encFnInfo).fastpathEncMapInt64UintR, (*decFnInfo).fastpathDecMapInt64UintR) + fn(map[int64]uint8(nil), (*encFnInfo).fastpathEncMapInt64Uint8R, (*decFnInfo).fastpathDecMapInt64Uint8R) + fn(map[int64]uint16(nil), (*encFnInfo).fastpathEncMapInt64Uint16R, (*decFnInfo).fastpathDecMapInt64Uint16R) + fn(map[int64]uint32(nil), (*encFnInfo).fastpathEncMapInt64Uint32R, (*decFnInfo).fastpathDecMapInt64Uint32R) + fn(map[int64]uint64(nil), (*encFnInfo).fastpathEncMapInt64Uint64R, (*decFnInfo).fastpathDecMapInt64Uint64R) + fn(map[int64]uintptr(nil), (*encFnInfo).fastpathEncMapInt64UintptrR, (*decFnInfo).fastpathDecMapInt64UintptrR) + fn(map[int64]int(nil), (*encFnInfo).fastpathEncMapInt64IntR, (*decFnInfo).fastpathDecMapInt64IntR) + fn(map[int64]int8(nil), (*encFnInfo).fastpathEncMapInt64Int8R, (*decFnInfo).fastpathDecMapInt64Int8R) + fn(map[int64]int16(nil), (*encFnInfo).fastpathEncMapInt64Int16R, (*decFnInfo).fastpathDecMapInt64Int16R) + fn(map[int64]int32(nil), (*encFnInfo).fastpathEncMapInt64Int32R, (*decFnInfo).fastpathDecMapInt64Int32R) + fn(map[int64]int64(nil), (*encFnInfo).fastpathEncMapInt64Int64R, (*decFnInfo).fastpathDecMapInt64Int64R) + fn(map[int64]float32(nil), (*encFnInfo).fastpathEncMapInt64Float32R, (*decFnInfo).fastpathDecMapInt64Float32R) + fn(map[int64]float64(nil), (*encFnInfo).fastpathEncMapInt64Float64R, (*decFnInfo).fastpathDecMapInt64Float64R) + fn(map[int64]bool(nil), (*encFnInfo).fastpathEncMapInt64BoolR, (*decFnInfo).fastpathDecMapInt64BoolR) + fn(map[bool]interface{}(nil), (*encFnInfo).fastpathEncMapBoolIntfR, (*decFnInfo).fastpathDecMapBoolIntfR) + fn(map[bool]string(nil), (*encFnInfo).fastpathEncMapBoolStringR, (*decFnInfo).fastpathDecMapBoolStringR) + fn(map[bool]uint(nil), (*encFnInfo).fastpathEncMapBoolUintR, (*decFnInfo).fastpathDecMapBoolUintR) + fn(map[bool]uint8(nil), (*encFnInfo).fastpathEncMapBoolUint8R, (*decFnInfo).fastpathDecMapBoolUint8R) + fn(map[bool]uint16(nil), (*encFnInfo).fastpathEncMapBoolUint16R, (*decFnInfo).fastpathDecMapBoolUint16R) + fn(map[bool]uint32(nil), (*encFnInfo).fastpathEncMapBoolUint32R, (*decFnInfo).fastpathDecMapBoolUint32R) + fn(map[bool]uint64(nil), (*encFnInfo).fastpathEncMapBoolUint64R, (*decFnInfo).fastpathDecMapBoolUint64R) + fn(map[bool]uintptr(nil), (*encFnInfo).fastpathEncMapBoolUintptrR, (*decFnInfo).fastpathDecMapBoolUintptrR) + fn(map[bool]int(nil), (*encFnInfo).fastpathEncMapBoolIntR, (*decFnInfo).fastpathDecMapBoolIntR) + fn(map[bool]int8(nil), (*encFnInfo).fastpathEncMapBoolInt8R, (*decFnInfo).fastpathDecMapBoolInt8R) + fn(map[bool]int16(nil), (*encFnInfo).fastpathEncMapBoolInt16R, (*decFnInfo).fastpathDecMapBoolInt16R) + fn(map[bool]int32(nil), (*encFnInfo).fastpathEncMapBoolInt32R, (*decFnInfo).fastpathDecMapBoolInt32R) + fn(map[bool]int64(nil), (*encFnInfo).fastpathEncMapBoolInt64R, (*decFnInfo).fastpathDecMapBoolInt64R) + fn(map[bool]float32(nil), (*encFnInfo).fastpathEncMapBoolFloat32R, (*decFnInfo).fastpathDecMapBoolFloat32R) + fn(map[bool]float64(nil), (*encFnInfo).fastpathEncMapBoolFloat64R, (*decFnInfo).fastpathDecMapBoolFloat64R) + fn(map[bool]bool(nil), (*encFnInfo).fastpathEncMapBoolBoolR, (*decFnInfo).fastpathDecMapBoolBoolR) sort.Sort(fastpathAslice(fastpathAV[:])) } @@ -341,6 +373,9 @@ func init() { // -- -- fast path type switch func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { case []interface{}: @@ -383,6 +418,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[interface{}]uint64: fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + case map[interface{}]int: fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) case *map[interface{}]int: @@ -463,6 +503,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[string]uint64: fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + case map[string]int: fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) case *map[string]int: @@ -543,6 +588,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[float32]uint64: fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + case map[float32]int: fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) case *map[float32]int: @@ -623,6 +673,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[float64]uint64: fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + case map[float64]int: fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) case *map[float64]int: @@ -703,6 +758,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[uint]uint64: fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + case map[uint]int: fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) case *map[uint]int: @@ -778,6 +838,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[uint8]uint64: fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint8]int: fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) case *map[uint8]int: @@ -858,6 +923,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[uint16]uint64: fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint16]int: fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) case *map[uint16]int: @@ -938,6 +1008,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[uint32]uint64: fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint32]int: fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) case *map[uint32]int: @@ -1018,6 +1093,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[uint64]uint64: fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint64]int: fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) case *map[uint64]int: @@ -1058,6 +1138,91 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[uint64]bool: fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + case []uintptr: + fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + case *[]uintptr: + fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + case []int: fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) case *[]int: @@ -1098,6 +1263,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[int]uint64: fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + case map[int]int: fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) case *map[int]int: @@ -1178,6 +1348,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[int8]uint64: fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + case map[int8]int: fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) case *map[int8]int: @@ -1258,6 +1433,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[int16]uint64: fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + case map[int16]int: fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) case *map[int16]int: @@ -1338,6 +1518,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[int32]uint64: fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + case map[int32]int: fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) case *map[int32]int: @@ -1418,6 +1603,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[int64]uint64: fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + case map[int64]int: fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) case *map[int64]int: @@ -1498,6 +1688,11 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { case *map[bool]uint64: fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + case map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + case *map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + case map[bool]int: fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) case *map[bool]int: @@ -1539,12 +1734,16 @@ func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true } func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { case []interface{}: @@ -1587,6 +1786,11 @@ func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { case *[]uint64: fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + case []uintptr: + fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + case *[]uintptr: + fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + case []int: fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) case *[]int: @@ -1618,12 +1822,16 @@ func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true } func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { case map[interface{}]interface{}: @@ -1661,6 +1869,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[interface{}]uint64: fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + case map[interface{}]int: fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) case *map[interface{}]int: @@ -1736,6 +1949,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[string]uint64: fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + case map[string]int: fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) case *map[string]int: @@ -1811,6 +2029,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[float32]uint64: fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + case map[float32]int: fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) case *map[float32]int: @@ -1886,6 +2109,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[float64]uint64: fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + case map[float64]int: fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) case *map[float64]int: @@ -1961,6 +2189,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[uint]uint64: fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + case map[uint]int: fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) case *map[uint]int: @@ -2036,6 +2269,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[uint8]uint64: fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint8]int: fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) case *map[uint8]int: @@ -2111,6 +2349,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[uint16]uint64: fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint16]int: fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) case *map[uint16]int: @@ -2186,6 +2429,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[uint32]uint64: fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint32]int: fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) case *map[uint32]int: @@ -2261,6 +2509,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[uint64]uint64: fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + case map[uint64]int: fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) case *map[uint64]int: @@ -2301,6 +2554,86 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[uint64]bool: fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + case map[int]interface{}: fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) case *map[int]interface{}: @@ -2336,6 +2669,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[int]uint64: fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + case map[int]int: fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) case *map[int]int: @@ -2411,6 +2749,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[int8]uint64: fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + case map[int8]int: fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) case *map[int8]int: @@ -2486,6 +2829,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[int16]uint64: fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + case map[int16]int: fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) case *map[int16]int: @@ -2561,6 +2909,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[int32]uint64: fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + case map[int32]int: fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) case *map[int32]int: @@ -2636,6 +2989,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[int64]uint64: fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + case map[int64]int: fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) case *map[int64]int: @@ -2711,6 +3069,11 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { case *map[bool]uint64: fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + case map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + case *map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + case map[bool]int: fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) case *map[bool]int: @@ -2752,6 +3115,7 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true @@ -2759,6290 +3123,17403 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { // -- -- fast path functions -func (f encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) { fastpathTV.EncSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } e.encode(v2) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceStringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceStringR(rv reflect.Value) { fastpathTV.EncSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeString(c_UTF8, v2) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) { fastpathTV.EncSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeFloat32(v2) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) { fastpathTV.EncSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeFloat64(v2) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceUintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceUintR(rv reflect.Value) { fastpathTV.EncSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeUint(uint64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) { fastpathTV.EncSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeUint(uint64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) { fastpathTV.EncSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeUint(uint64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) { fastpathTV.EncSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeUint(uint64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUintptrR(rv reflect.Value) { + fastpathTV.EncSliceUintptrV(rv.Interface().([]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceIntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceIntR(rv reflect.Value) { fastpathTV.EncSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeInt(int64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) { fastpathTV.EncSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeInt(int64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) { fastpathTV.EncSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeInt(int64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) { fastpathTV.EncSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeInt(int64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) { fastpathTV.EncSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeInt(int64(v2)) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) { fastpathTV.EncSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } ee.EncodeBool(v2) } - ee.EncodeEnd() + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } } -func (f encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) { fastpathTV.EncMapIntfIntfV(rv.Interface().(map[interface{}]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - e.encode(v2) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) { fastpathTV.EncMapIntfStringV(rv.Interface().(map[interface{}]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) { fastpathTV.EncMapIntfUintV(rv.Interface().(map[interface{}]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) { fastpathTV.EncMapIntfUint8V(rv.Interface().(map[interface{}]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) { fastpathTV.EncMapIntfUint16V(rv.Interface().(map[interface{}]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) { fastpathTV.EncMapIntfUint32V(rv.Interface().(map[interface{}]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) { fastpathTV.EncMapIntfUint64V(rv.Interface().(map[interface{}]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - e.encode(k2) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapIntfUintptrR(rv reflect.Value) { + fastpathTV.EncMapIntfUintptrV(rv.Interface().(map[interface{}]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) { fastpathTV.EncMapIntfIntV(rv.Interface().(map[interface{}]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) { fastpathTV.EncMapIntfInt8V(rv.Interface().(map[interface{}]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) { fastpathTV.EncMapIntfInt16V(rv.Interface().(map[interface{}]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) { fastpathTV.EncMapIntfInt32V(rv.Interface().(map[interface{}]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) { fastpathTV.EncMapIntfInt64V(rv.Interface().(map[interface{}]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) { fastpathTV.EncMapIntfFloat32V(rv.Interface().(map[interface{}]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeFloat32(v2) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) { fastpathTV.EncMapIntfFloat64V(rv.Interface().(map[interface{}]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeFloat64(v2) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) { fastpathTV.EncMapIntfBoolV(rv.Interface().(map[interface{}]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - e.encode(k2) - ee.EncodeBool(v2) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2 := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) { fastpathTV.EncMapStringIntfV(rv.Interface().(map[string]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[string(k2)]) } - e.encode(v2) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) { fastpathTV.EncMapStringStringV(rv.Interface().(map[string]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[string(k2)]) } - ee.EncodeString(c_UTF8, v2) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) { fastpathTV.EncMapStringUintV(rv.Interface().(map[string]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) { fastpathTV.EncMapStringUint8V(rv.Interface().(map[string]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - } - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) { fastpathTV.EncMapStringUint16V(rv.Interface().(map[string]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) { fastpathTV.EncMapStringUint32V(rv.Interface().(map[string]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) { fastpathTV.EncMapStringUint64V(rv.Interface().(map[string]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) } - ee.EncodeUint(uint64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUintptrR(rv reflect.Value) { + fastpathTV.EncMapStringUintptrV(rv.Interface().(map[string]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) { fastpathTV.EncMapStringIntV(rv.Interface().(map[string]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) { fastpathTV.EncMapStringInt8V(rv.Interface().(map[string]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) { fastpathTV.EncMapStringInt16V(rv.Interface().(map[string]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) { fastpathTV.EncMapStringInt32V(rv.Interface().(map[string]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) { fastpathTV.EncMapStringInt64V(rv.Interface().(map[string]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) } - ee.EncodeInt(int64(v2)) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) { fastpathTV.EncMapStringFloat32V(rv.Interface().(map[string]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[string(k2)]) } - ee.EncodeFloat32(v2) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) { fastpathTV.EncMapStringFloat64V(rv.Interface().(map[string]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[string(k2)]) } - ee.EncodeFloat64(v2) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) { fastpathTV.EncMapStringBoolV(rv.Interface().(map[string]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 - for k2, v2 := range v { - if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[string(k2)]) } - ee.EncodeBool(v2) + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) { fastpathTV.EncMapFloat32IntfV(rv.Interface().(map[float32]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - e.encode(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) { fastpathTV.EncMapFloat32StringV(rv.Interface().(map[float32]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) { fastpathTV.EncMapFloat32UintV(rv.Interface().(map[float32]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) { fastpathTV.EncMapFloat32Uint8V(rv.Interface().(map[float32]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) { fastpathTV.EncMapFloat32Uint16V(rv.Interface().(map[float32]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) { fastpathTV.EncMapFloat32Uint32V(rv.Interface().(map[float32]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) { fastpathTV.EncMapFloat32Uint64V(rv.Interface().(map[float32]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) { - fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapFloat32UintptrR(rv reflect.Value) { + fastpathTV.EncMapFloat32UintptrV(rv.Interface().(map[float32]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) { fastpathTV.EncMapFloat32Int8V(rv.Interface().(map[float32]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) { fastpathTV.EncMapFloat32Int16V(rv.Interface().(map[float32]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) { fastpathTV.EncMapFloat32Int32V(rv.Interface().(map[float32]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) { fastpathTV.EncMapFloat32Int64V(rv.Interface().(map[float32]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) { fastpathTV.EncMapFloat32Float32V(rv.Interface().(map[float32]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) { fastpathTV.EncMapFloat32Float64V(rv.Interface().(map[float32]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) { fastpathTV.EncMapFloat32BoolV(rv.Interface().(map[float32]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat32(k2) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) { fastpathTV.EncMapFloat64IntfV(rv.Interface().(map[float64]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - e.encode(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) { fastpathTV.EncMapFloat64StringV(rv.Interface().(map[float64]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) { fastpathTV.EncMapFloat64UintV(rv.Interface().(map[float64]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) { fastpathTV.EncMapFloat64Uint8V(rv.Interface().(map[float64]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) { fastpathTV.EncMapFloat64Uint16V(rv.Interface().(map[float64]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) { fastpathTV.EncMapFloat64Uint32V(rv.Interface().(map[float64]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) { fastpathTV.EncMapFloat64Uint64V(rv.Interface().(map[float64]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapFloat64UintptrR(rv reflect.Value) { + fastpathTV.EncMapFloat64UintptrV(rv.Interface().(map[float64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) { fastpathTV.EncMapFloat64IntV(rv.Interface().(map[float64]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) { fastpathTV.EncMapFloat64Int8V(rv.Interface().(map[float64]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) { fastpathTV.EncMapFloat64Int16V(rv.Interface().(map[float64]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) { fastpathTV.EncMapFloat64Int32V(rv.Interface().(map[float64]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) { fastpathTV.EncMapFloat64Int64V(rv.Interface().(map[float64]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) { fastpathTV.EncMapFloat64Float32V(rv.Interface().(map[float64]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeFloat32(v2) - } - ee.EncodeEnd() -} - -func (f encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) { - fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e) -} -func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) { - ee := e.e + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) { fastpathTV.EncMapFloat64BoolV(rv.Interface().(map[float64]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeFloat64(k2) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) { fastpathTV.EncMapUintIntfV(rv.Interface().(map[uint]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) { fastpathTV.EncMapUintStringV(rv.Interface().(map[uint]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) { fastpathTV.EncMapUintUintV(rv.Interface().(map[uint]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) { fastpathTV.EncMapUintUint8V(rv.Interface().(map[uint]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) { fastpathTV.EncMapUintUint16V(rv.Interface().(map[uint]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) { fastpathTV.EncMapUintUint32V(rv.Interface().(map[uint]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) { fastpathTV.EncMapUintUint64V(rv.Interface().(map[uint]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapUintUintptrR(rv reflect.Value) { + fastpathTV.EncMapUintUintptrV(rv.Interface().(map[uint]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) { fastpathTV.EncMapUintIntV(rv.Interface().(map[uint]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) { fastpathTV.EncMapUintInt8V(rv.Interface().(map[uint]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) { fastpathTV.EncMapUintInt16V(rv.Interface().(map[uint]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) { fastpathTV.EncMapUintInt32V(rv.Interface().(map[uint]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) { fastpathTV.EncMapUintInt64V(rv.Interface().(map[uint]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) { fastpathTV.EncMapUintFloat32V(rv.Interface().(map[uint]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) { fastpathTV.EncMapUintFloat64V(rv.Interface().(map[uint]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) { fastpathTV.EncMapUintBoolV(rv.Interface().(map[uint]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) { fastpathTV.EncMapUint8IntfV(rv.Interface().(map[uint8]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) { fastpathTV.EncMapUint8StringV(rv.Interface().(map[uint8]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) { fastpathTV.EncMapUint8UintV(rv.Interface().(map[uint8]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) { fastpathTV.EncMapUint8Uint8V(rv.Interface().(map[uint8]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) - } - ee.EncodeEnd() + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } } -func (f encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) { fastpathTV.EncMapUint8Uint16V(rv.Interface().(map[uint8]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) { fastpathTV.EncMapUint8Uint32V(rv.Interface().(map[uint8]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) { fastpathTV.EncMapUint8Uint64V(rv.Interface().(map[uint8]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapUint8UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint8UintptrV(rv.Interface().(map[uint8]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) { fastpathTV.EncMapUint8IntV(rv.Interface().(map[uint8]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) { fastpathTV.EncMapUint8Int8V(rv.Interface().(map[uint8]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) { fastpathTV.EncMapUint8Int16V(rv.Interface().(map[uint8]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) { fastpathTV.EncMapUint8Int32V(rv.Interface().(map[uint8]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) { fastpathTV.EncMapUint8Int64V(rv.Interface().(map[uint8]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) { fastpathTV.EncMapUint8Float32V(rv.Interface().(map[uint8]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) { fastpathTV.EncMapUint8Float64V(rv.Interface().(map[uint8]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) { fastpathTV.EncMapUint8BoolV(rv.Interface().(map[uint8]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) { fastpathTV.EncMapUint16IntfV(rv.Interface().(map[uint16]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) { fastpathTV.EncMapUint16StringV(rv.Interface().(map[uint16]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) { fastpathTV.EncMapUint16UintV(rv.Interface().(map[uint16]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) { fastpathTV.EncMapUint16Uint8V(rv.Interface().(map[uint16]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) { fastpathTV.EncMapUint16Uint16V(rv.Interface().(map[uint16]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) { fastpathTV.EncMapUint16Uint32V(rv.Interface().(map[uint16]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) { fastpathTV.EncMapUint16Uint64V(rv.Interface().(map[uint16]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapUint16UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint16UintptrV(rv.Interface().(map[uint16]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) { fastpathTV.EncMapUint16IntV(rv.Interface().(map[uint16]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) { fastpathTV.EncMapUint16Int8V(rv.Interface().(map[uint16]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) - } - ee.EncodeEnd() + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } } -func (f encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) { fastpathTV.EncMapUint16Int16V(rv.Interface().(map[uint16]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) { fastpathTV.EncMapUint16Int32V(rv.Interface().(map[uint16]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) { fastpathTV.EncMapUint16Int64V(rv.Interface().(map[uint16]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) { fastpathTV.EncMapUint16Float32V(rv.Interface().(map[uint16]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) { fastpathTV.EncMapUint16Float64V(rv.Interface().(map[uint16]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) { fastpathTV.EncMapUint16BoolV(rv.Interface().(map[uint16]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) { fastpathTV.EncMapUint32IntfV(rv.Interface().(map[uint32]interface{}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) { fastpathTV.EncMapUint32StringV(rv.Interface().(map[uint32]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) { fastpathTV.EncMapUint32UintV(rv.Interface().(map[uint32]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) { fastpathTV.EncMapUint32Uint8V(rv.Interface().(map[uint32]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) { fastpathTV.EncMapUint32Uint16V(rv.Interface().(map[uint32]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) { fastpathTV.EncMapUint32Uint32V(rv.Interface().(map[uint32]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) { fastpathTV.EncMapUint32Uint64V(rv.Interface().(map[uint32]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapUint32UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint32UintptrV(rv.Interface().(map[uint32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) { fastpathTV.EncMapUint32IntV(rv.Interface().(map[uint32]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) { fastpathTV.EncMapUint32Int8V(rv.Interface().(map[uint32]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) { fastpathTV.EncMapUint32Int16V(rv.Interface().(map[uint32]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) { fastpathTV.EncMapUint32Int32V(rv.Interface().(map[uint32]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) { fastpathTV.EncMapUint32Int64V(rv.Interface().(map[uint32]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) { fastpathTV.EncMapUint32Float32V(rv.Interface().(map[uint32]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) { fastpathTV.EncMapUint32Float64V(rv.Interface().(map[uint32]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) { fastpathTV.EncMapUint32BoolV(rv.Interface().(map[uint32]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeBool(v2) - } - ee.EncodeEnd() -} - -func (f encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) { - fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e) -} -func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) { - ee := e.e + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) { + fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) { fastpathTV.EncMapUint64StringV(rv.Interface().(map[uint64]string), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) { fastpathTV.EncMapUint64UintV(rv.Interface().(map[uint64]uint), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) { fastpathTV.EncMapUint64Uint8V(rv.Interface().(map[uint64]uint8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) { fastpathTV.EncMapUint64Uint16V(rv.Interface().(map[uint64]uint16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) { fastpathTV.EncMapUint64Uint32V(rv.Interface().(map[uint64]uint32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) { fastpathTV.EncMapUint64Uint64V(rv.Interface().(map[uint64]uint64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeUint(uint64(v2)) +func (f *encFnInfo) fastpathEncMapUint64UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint64UintptrV(rv.Interface().(map[uint64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) { fastpathTV.EncMapUint64IntV(rv.Interface().(map[uint64]int), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) { fastpathTV.EncMapUint64Int8V(rv.Interface().(map[uint64]int8), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) { fastpathTV.EncMapUint64Int16V(rv.Interface().(map[uint64]int16), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) { fastpathTV.EncMapUint64Int32V(rv.Interface().(map[uint64]int32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) { fastpathTV.EncMapUint64Int64V(rv.Interface().(map[uint64]int64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) { fastpathTV.EncMapUint64Float32V(rv.Interface().(map[uint64]float32), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) { fastpathTV.EncMapUint64Float64V(rv.Interface().(map[uint64]float64), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) { +func (f *encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) { fastpathTV.EncMapUint64BoolV(rv.Interface().(map[uint64]bool), fastpathCheckNilFalse, f.e) } func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeUint(uint64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) { - fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrIntfR(rv reflect.Value) { + fastpathTV.EncMapUintptrIntfV(rv.Interface().(map[uintptr]interface{}), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) { - fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrStringR(rv reflect.Value) { + fastpathTV.EncMapUintptrStringV(rv.Interface().(map[uintptr]string), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) { - fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrUintR(rv reflect.Value) { + fastpathTV.EncMapUintptrUintV(rv.Interface().(map[uintptr]uint), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) { - fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrUint8R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint8V(rv.Interface().(map[uintptr]uint8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) { - fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrUint16R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint16V(rv.Interface().(map[uintptr]uint16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) - } - ee.EncodeEnd() -} - -func (f encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) { - fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e) -} -func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) { - ee := e.e - if checkNil && v == nil { - ee.EncodeNil() - return + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } } - ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) { - fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrUint32R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint32V(rv.Interface().(map[uintptr]uint32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) { - fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrUint64R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint64V(rv.Interface().(map[uintptr]uint64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) { - fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrUintptrR(rv reflect.Value) { + fastpathTV.EncMapUintptrUintptrV(rv.Interface().(map[uintptr]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) { - fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrIntR(rv reflect.Value) { + fastpathTV.EncMapUintptrIntV(rv.Interface().(map[uintptr]int), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) { - fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrInt8R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt8V(rv.Interface().(map[uintptr]int8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) { - fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrInt16R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt16V(rv.Interface().(map[uintptr]int16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) { - fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrInt32R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt32V(rv.Interface().(map[uintptr]int32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) { - fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrInt64R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt64V(rv.Interface().(map[uintptr]int64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) { - fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrFloat32R(rv reflect.Value) { + fastpathTV.EncMapUintptrFloat32V(rv.Interface().(map[uintptr]float32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) { - fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrFloat64R(rv reflect.Value) { + fastpathTV.EncMapUintptrFloat64V(rv.Interface().(map[uintptr]float64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) { - fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapUintptrBoolR(rv reflect.Value) { + fastpathTV.EncMapUintptrBoolV(rv.Interface().(map[uintptr]bool), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) { - fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) { + fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) { + fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) { + fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) { + fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) { + fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) { - fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) { + fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) { - fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) { + fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) { - fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntUintptrR(rv reflect.Value) { + fastpathTV.EncMapIntUintptrV(rv.Interface().(map[int]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) { - fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) { + fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) { - fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) { + fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) { - fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) { + fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) { - fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) { + fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) { - fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) { + fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) { - fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) { - fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) { - fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) { + fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) { + fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) { + fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) { + fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) { - fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) { - fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) { - fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) { - fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt8UintptrV(rv.Interface().(map[int8]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) - } - ee.EncodeEnd() -} - -func (f encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) { - fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } } -func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) { + +func (f *encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) { + fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) { - fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) { + fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) { - fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) { + fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) { - fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) { + fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) { - fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) { + fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) { - fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) { + fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) { - fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) { + fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) { + fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) { + fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) { + fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) { + fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) { - fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) { - fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) { - fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) { - fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) { - fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt16UintptrV(rv.Interface().(map[int16]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) { - fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) { + fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) { - fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) { + fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) { - fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) { + fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) { - fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) { + fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - e.encode(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) { - fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) { + fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) { - fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) { + fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) { + fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) { + fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) { + fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) { - fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) { + fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) { - fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) { + fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) { - fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) { - fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) { - fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) { - fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) { - fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt32UintptrV(rv.Interface().(map[int32]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) { - fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) { + fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) { - fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) { + fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeInt(int64(k2)) - ee.EncodeBool(v2) - } - ee.EncodeEnd() -} - -func (f encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) { - fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } } -func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) { + +func (f *encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) { + fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - e.encode(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) { - fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) { + fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeString(c_UTF8, v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) { - fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) { + fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) { - fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) { + fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) { - fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) { + fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) { - fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) { + fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) { - fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) { + fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeUint(uint64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) { - fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) { + fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) { - fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) { + fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) { - fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) { - fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) { - fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeInt(int64(v2)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) { - fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeFloat32(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) { - fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt64UintptrV(rv.Interface().(map[int64]uintptr), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeFloat64(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -func (f encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) { - fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e) +func (f *encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) { + fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e) } -func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { +func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - - for k2, v2 := range v { - ee.EncodeBool(k2) - ee.EncodeBool(v2) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } - ee.EncodeEnd() } -// -- decode - -// -- -- fast path type switch -func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { - switch v := iv.(type) { - - case []interface{}: - fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d) - case *[]interface{}: - v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) { + fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[interface{}]interface{}: - fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]interface{}: - v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 - } - - case map[interface{}]string: - fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]string: - v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) } - - case map[interface{}]uint: - fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]uint: - v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[interface{}]uint8: - fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]uint8: - v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) { + fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[interface{}]uint16: - fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]uint16: - v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) } - - case map[interface{}]uint32: - fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]uint32: - v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[interface{}]uint64: - fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]uint64: - v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) { + fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[interface{}]int: - fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]int: - v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) } - - case map[interface{}]int8: - fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]int8: - v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[interface{}]int16: - fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]int16: - v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) { + fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[interface{}]int32: - fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]int32: - v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) } - - case map[interface{}]int64: - fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]int64: - v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[interface{}]float32: - fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]float32: - v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) { + fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[interface{}]float64: - fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]float64: - v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int64(k2)]) } - - case map[interface{}]bool: - fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d) - case *map[interface{}]bool: - v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case []string: - fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d) - case *[]string: - v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) { + fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[string]interface{}: - fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d) - case *map[string]interface{}: - v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int64(k2)]) } - - case map[string]string: - fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d) - case *map[string]string: - v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[string]uint: - fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d) - case *map[string]uint: - v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) { + fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k := range v { + v2[i] = int64(k) + i++ } - - case map[string]uint8: - fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d) - case *map[string]uint8: - v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int64(k2)]) } - - case map[string]uint16: - fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d) - case *map[string]uint16: - v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[string]uint32: - fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d) - case *map[string]uint32: - v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) { + fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case map[string]uint64: - fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d) - case *map[string]uint64: - v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[bool(k2)]) } - - case map[string]int: - fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d) - case *map[string]int: - v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[string]int8: - fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d) - case *map[string]int8: - v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) { + fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case map[string]int16: - fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d) - case *map[string]int16: - v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[bool(k2)]) } - - case map[string]int32: - fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d) - case *map[string]int32: - v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[string]int64: - fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d) - case *map[string]int64: - v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) { + fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case map[string]float32: - fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d) - case *map[string]float32: - v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) } - - case map[string]float64: - fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d) - case *map[string]float64: - v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[string]bool: - fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d) - case *map[string]bool: - v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) { + fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case []float32: - fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d) - case *[]float32: - v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) } - - case map[float32]interface{}: - fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d) - case *map[float32]interface{}: - v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]string: - fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d) - case *map[float32]string: - v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) { + fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case map[float32]uint: - fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d) - case *map[float32]uint: - v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) } - - case map[float32]uint8: - fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[float32]uint8: - v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]uint16: - fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[float32]uint16: - v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) { + fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case map[float32]uint32: - fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[float32]uint32: - v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) } - - case map[float32]uint64: - fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[float32]uint64: - v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]int: - fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d) - case *map[float32]int: - v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) { + fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } - - case map[float32]int8: - fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d) - case *map[float32]int8: - v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) } - - case map[float32]int16: - fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d) - case *map[float32]int16: - v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]int32: - fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d) - case *map[float32]int32: - v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolUintptrR(rv reflect.Value) { + fastpathTV.EncMapBoolUintptrV(rv.Interface().(map[bool]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]int64: - fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d) - case *map[float32]int64: - v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) { + fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]float32: - fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d) - case *map[float32]float32: - v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) { + fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]float64: - fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d) - case *map[float32]float64: - v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) { + fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float32]bool: - fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d) - case *map[float32]bool: - v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) { + fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case []float64: - fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d) - case *[]float64: - v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) { + fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float64]interface{}: - fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d) - case *map[float64]interface{}: - v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float64]string: - fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d) - case *map[float64]string: - v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float64]uint: - fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d) - case *map[float64]uint: - v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d) - if changed2 { - *v = v2 +func (f *encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) { + fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} - case map[float64]uint8: - fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[float64]uint8: - v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d) +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d) + case *[]interface{}: + v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]uint16: - fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[float64]uint16: - v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]interface{}: + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]interface{}: + v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]uint32: - fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[float64]uint32: - v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]string: + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]string: + v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]uint64: - fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[float64]uint64: - v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]uint: + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint: + v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]int: - fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d) - case *map[float64]int: - v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]uint8: + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint8: + v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]int8: - fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d) - case *map[float64]int8: - v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]uint16: + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint16: + v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]int16: - fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d) - case *map[float64]int16: - v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]uint32: + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint32: + v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]int32: - fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d) - case *map[float64]int32: - v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]uint64: + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint64: + v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]int64: - fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d) - case *map[float64]int64: - v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]uintptr: + fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uintptr: + v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]float32: - fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d) - case *map[float64]float32: - v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]int: + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int: + v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]float64: - fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d) - case *map[float64]float64: - v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]int8: + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int8: + v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[float64]bool: - fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d) - case *map[float64]bool: - v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]int16: + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int16: + v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []uint: - fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d) - case *[]uint: - v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]int32: + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int32: + v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]interface{}: - fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d) - case *map[uint]interface{}: - v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]int64: + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int64: + v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]string: - fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d) - case *map[uint]string: - v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]float32: + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float32: + v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]uint: - fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d) - case *map[uint]uint: - v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]float64: + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float64: + v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]uint8: - fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d) - case *map[uint]uint8: - v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d) + case map[interface{}]bool: + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]bool: + v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]uint16: - fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d) - case *map[uint]uint16: - v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d) + case []string: + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d) + case *[]string: + v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]uint32: - fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d) - case *map[uint]uint32: - v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d) + case map[string]interface{}: + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d) + case *map[string]interface{}: + v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]uint64: - fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d) - case *map[uint]uint64: - v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d) + case map[string]string: + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d) + case *map[string]string: + v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]int: - fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d) - case *map[uint]int: - v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d) + case map[string]uint: + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d) + case *map[string]uint: + v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]int8: - fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d) - case *map[uint]int8: - v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d) + case map[string]uint8: + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint8: + v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]int16: - fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d) - case *map[uint]int16: - v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d) + case map[string]uint16: + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint16: + v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]int32: - fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d) - case *map[uint]int32: - v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d) + case map[string]uint32: + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint32: + v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]int64: - fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d) - case *map[uint]int64: - v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d) + case map[string]uint64: + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint64: + v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]float32: - fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d) - case *map[uint]float32: - v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d) + case map[string]uintptr: + fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[string]uintptr: + v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]float64: - fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d) - case *map[uint]float64: - v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d) + case map[string]int: + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d) + case *map[string]int: + v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint]bool: - fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d) - case *map[uint]bool: - v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d) + case map[string]int8: + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d) + case *map[string]int8: + v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]interface{}: - fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d) - case *map[uint8]interface{}: - v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d) + case map[string]int16: + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d) + case *map[string]int16: + v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]string: - fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d) - case *map[uint8]string: - v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d) + case map[string]int32: + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d) + case *map[string]int32: + v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]uint: - fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d) - case *map[uint8]uint: - v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d) + case map[string]int64: + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d) + case *map[string]int64: + v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]uint8: - fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]uint8: - v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[string]float32: + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[string]float32: + v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]uint16: - fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]uint16: - v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[string]float64: + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[string]float64: + v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]uint32: - fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]uint32: - v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[string]bool: + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d) + case *map[string]bool: + v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]uint64: - fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]uint64: - v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d) + case []float32: + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d) + case *[]float32: + v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]int: - fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d) - case *map[uint8]int: - v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d) + case map[float32]interface{}: + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float32]interface{}: + v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]int8: - fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]int8: - v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d) + case map[float32]string: + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d) + case *map[float32]string: + v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]int16: - fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]int16: - v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d) + case map[float32]uint: + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint: + v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]int32: - fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]int32: - v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d) + case map[float32]uint8: + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint8: + v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]int64: - fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]int64: - v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d) + case map[float32]uint16: + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint16: + v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]float32: - fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]float32: - v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d) + case map[float32]uint32: + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint32: + v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]float64: - fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d) - case *map[uint8]float64: - v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d) + case map[float32]uint64: + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint64: + v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint8]bool: - fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d) - case *map[uint8]bool: - v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d) + case map[float32]uintptr: + fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uintptr: + v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []uint16: - fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d) - case *[]uint16: - v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d) + case map[float32]int: + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d) + case *map[float32]int: + v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]interface{}: - fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d) - case *map[uint16]interface{}: - v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d) + case map[float32]int8: + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int8: + v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]string: - fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d) - case *map[uint16]string: - v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d) + case map[float32]int16: + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int16: + v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]uint: - fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d) - case *map[uint16]uint: - v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d) + case map[float32]int32: + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int32: + v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]uint8: - fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]uint8: - v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[float32]int64: + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int64: + v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]uint16: - fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]uint16: - v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[float32]float32: + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float32: + v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]uint32: - fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]uint32: - v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[float32]float64: + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float64: + v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]uint64: - fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]uint64: - v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[float32]bool: + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float32]bool: + v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]int: - fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d) - case *map[uint16]int: - v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d) + case []float64: + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d) + case *[]float64: + v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]int8: - fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]int8: - v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d) + case map[float64]interface{}: + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float64]interface{}: + v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]int16: - fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]int16: - v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d) + case map[float64]string: + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d) + case *map[float64]string: + v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]int32: - fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]int32: - v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d) + case map[float64]uint: + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint: + v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]int64: - fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]int64: - v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d) + case map[float64]uint8: + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint8: + v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]float32: - fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]float32: - v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d) + case map[float64]uint16: + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint16: + v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]float64: - fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d) - case *map[uint16]float64: - v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d) + case map[float64]uint32: + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint32: + v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint16]bool: - fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d) - case *map[uint16]bool: - v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d) + case map[float64]uint64: + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint64: + v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []uint32: - fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d) - case *[]uint32: - v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d) + case map[float64]uintptr: + fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uintptr: + v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]interface{}: - fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d) - case *map[uint32]interface{}: - v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d) + case map[float64]int: + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d) + case *map[float64]int: + v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]string: - fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d) - case *map[uint32]string: - v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d) + case map[float64]int8: + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int8: + v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]uint: - fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d) - case *map[uint32]uint: - v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d) + case map[float64]int16: + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int16: + v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]uint8: - fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]uint8: - v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[float64]int32: + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int32: + v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]uint16: - fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]uint16: - v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[float64]int64: + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int64: + v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]uint32: - fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]uint32: - v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[float64]float32: + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float32: + v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]uint64: - fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]uint64: - v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[float64]float64: + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float64: + v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]int: - fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d) - case *map[uint32]int: - v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d) + case map[float64]bool: + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float64]bool: + v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]int8: - fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]int8: - v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d) + case []uint: + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d) + case *[]uint: + v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]int16: - fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]int16: - v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d) + case map[uint]interface{}: + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint]interface{}: + v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]int32: - fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]int32: - v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d) + case map[uint]string: + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d) + case *map[uint]string: + v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]int64: - fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]int64: - v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d) + case map[uint]uint: + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint: + v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]float32: - fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]float32: - v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d) + case map[uint]uint8: + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint8: + v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]float64: - fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d) - case *map[uint32]float64: - v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d) + case map[uint]uint16: + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint16: + v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint32]bool: - fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d) - case *map[uint32]bool: - v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d) + case map[uint]uint32: + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint32: + v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []uint64: - fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d) - case *[]uint64: - v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d) + case map[uint]uint64: + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint64: + v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]interface{}: - fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d) - case *map[uint64]interface{}: - v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d) + case map[uint]uintptr: + fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uintptr: + v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]string: - fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d) - case *map[uint64]string: - v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d) + case map[uint]int: + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d) + case *map[uint]int: + v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]uint: - fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d) - case *map[uint64]uint: - v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d) + case map[uint]int8: + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int8: + v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]uint8: - fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]uint8: - v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[uint]int16: + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int16: + v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]uint16: - fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]uint16: - v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[uint]int32: + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int32: + v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]uint32: - fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]uint32: - v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[uint]int64: + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int64: + v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]uint64: - fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]uint64: - v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[uint]float32: + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float32: + v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]int: - fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d) - case *map[uint64]int: - v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d) + case map[uint]float64: + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float64: + v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]int8: - fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]int8: - v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d) + case map[uint]bool: + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint]bool: + v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]int16: - fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]int16: - v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]interface{}: + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]interface{}: + v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]int32: - fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]int32: - v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]string: + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]string: + v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]int64: - fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]int64: - v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]uint: + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint: + v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]float32: - fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]float32: - v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]uint8: + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint8: + v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]float64: - fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d) - case *map[uint64]float64: - v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]uint16: + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint16: + v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[uint64]bool: - fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d) - case *map[uint64]bool: - v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d) + case map[uint8]uint32: + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint32: + v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []int: - fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d) - case *[]int: - v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d) + case map[uint8]uint64: + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint64: + v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]interface{}: - fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d) - case *map[int]interface{}: - v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d) + case map[uint8]uintptr: + fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uintptr: + v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]string: - fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d) - case *map[int]string: - v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d) + case map[uint8]int: + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int: + v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]uint: - fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d) - case *map[int]uint: - v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d) + case map[uint8]int8: + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int8: + v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]uint8: - fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d) - case *map[int]uint8: - v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]int16: + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int16: + v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]uint16: - fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d) - case *map[int]uint16: - v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]int32: + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int32: + v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]uint32: - fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d) - case *map[int]uint32: - v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]int64: + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int64: + v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]uint64: - fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d) - case *map[int]uint64: - v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]float32: + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float32: + v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]int: - fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d) - case *map[int]int: - v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d) + case map[uint8]float64: + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float64: + v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]int8: - fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d) - case *map[int]int8: - v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d) + case map[uint8]bool: + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]bool: + v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]int16: - fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d) - case *map[int]int16: - v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d) + case []uint16: + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d) + case *[]uint16: + v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]int32: - fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d) - case *map[int]int32: - v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]interface{}: + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]interface{}: + v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]int64: - fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d) - case *map[int]int64: - v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]string: + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]string: + v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]float32: - fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d) - case *map[int]float32: - v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]uint: + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint: + v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]float64: - fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d) - case *map[int]float64: - v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]uint8: + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint8: + v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int]bool: - fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d) - case *map[int]bool: - v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d) + case map[uint16]uint16: + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint16: + v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []int8: - fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d) - case *[]int8: - v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]uint32: + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint32: + v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]interface{}: - fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d) - case *map[int8]interface{}: - v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d) + case map[uint16]uint64: + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint64: + v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]string: - fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d) - case *map[int8]string: - v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d) + case map[uint16]uintptr: + fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uintptr: + v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]uint: - fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d) - case *map[int8]uint: - v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d) + case map[uint16]int: + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int: + v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]uint8: - fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[int8]uint8: - v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]int8: + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int8: + v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]uint16: - fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[int8]uint16: - v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]int16: + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int16: + v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]uint32: - fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[int8]uint32: - v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]int32: + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int32: + v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]uint64: - fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[int8]uint64: - v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]int64: + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int64: + v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]int: - fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d) - case *map[int8]int: - v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d) + case map[uint16]float32: + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float32: + v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]int8: - fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d) - case *map[int8]int8: - v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]float64: + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float64: + v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]int16: - fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d) - case *map[int8]int16: - v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d) + case map[uint16]bool: + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]bool: + v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]int32: - fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d) - case *map[int8]int32: - v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d) + case []uint32: + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d) + case *[]uint32: + v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]int64: - fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d) - case *map[int8]int64: - v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]interface{}: + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]interface{}: + v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]float32: - fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d) - case *map[int8]float32: - v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]string: + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]string: + v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]float64: - fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d) - case *map[int8]float64: - v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]uint: + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint: + v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int8]bool: - fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d) - case *map[int8]bool: - v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d) + case map[uint32]uint8: + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint8: + v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []int16: - fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d) - case *[]int16: - v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]uint16: + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint16: + v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]interface{}: - fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d) - case *map[int16]interface{}: - v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d) + case map[uint32]uint32: + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint32: + v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]string: - fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d) - case *map[int16]string: - v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d) + case map[uint32]uint64: + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint64: + v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]uint: - fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d) - case *map[int16]uint: - v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d) + case map[uint32]uintptr: + fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uintptr: + v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]uint8: - fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[int16]uint8: - v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]int: + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int: + v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]uint16: - fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[int16]uint16: - v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]int8: + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int8: + v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]uint32: - fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[int16]uint32: - v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]int16: + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int16: + v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]uint64: - fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[int16]uint64: - v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]int32: + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int32: + v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]int: - fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d) - case *map[int16]int: - v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d) + case map[uint32]int64: + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int64: + v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]int8: - fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d) - case *map[int16]int8: - v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]float32: + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float32: + v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]int16: - fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d) - case *map[int16]int16: - v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]float64: + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float64: + v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]int32: - fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d) - case *map[int16]int32: - v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d) + case map[uint32]bool: + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]bool: + v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]int64: - fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d) - case *map[int16]int64: - v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d) + case []uint64: + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d) + case *[]uint64: + v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]float32: - fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d) - case *map[int16]float32: - v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]interface{}: + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]interface{}: + v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]float64: - fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d) - case *map[int16]float64: - v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]string: + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]string: + v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int16]bool: - fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d) - case *map[int16]bool: - v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d) + case map[uint64]uint: + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint: + v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []int32: - fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d) - case *[]int32: - v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]uint8: + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint8: + v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]interface{}: - fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d) - case *map[int32]interface{}: - v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d) + case map[uint64]uint16: + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint16: + v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]string: - fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d) - case *map[int32]string: - v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d) + case map[uint64]uint32: + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint32: + v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]uint: - fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d) - case *map[int32]uint: - v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d) + case map[uint64]uint64: + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint64: + v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]uint8: - fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[int32]uint8: - v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]uintptr: + fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uintptr: + v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]uint16: - fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[int32]uint16: - v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]int: + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int: + v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]uint32: - fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[int32]uint32: - v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]int8: + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int8: + v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]uint64: - fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[int32]uint64: - v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]int16: + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int16: + v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]int: - fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d) - case *map[int32]int: - v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d) + case map[uint64]int32: + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int32: + v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]int8: - fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d) - case *map[int32]int8: - v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]int64: + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int64: + v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]int16: - fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d) - case *map[int32]int16: - v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]float32: + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float32: + v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]int32: - fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d) - case *map[int32]int32: - v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]float64: + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float64: + v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]int64: - fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d) - case *map[int32]int64: - v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d) + case map[uint64]bool: + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]bool: + v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]float32: - fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d) - case *map[int32]float32: - v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d) + case []uintptr: + fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, d) + case *[]uintptr: + v2, changed2 := fastpathTV.DecSliceUintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]float64: - fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d) - case *map[int32]float64: - v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]interface{}: + fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]interface{}: + v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int32]bool: - fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d) - case *map[int32]bool: - v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]string: + fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]string: + v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []int64: - fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d) - case *[]int64: - v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]uint: + fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint: + v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]interface{}: - fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d) - case *map[int64]interface{}: - v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]uint8: + fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint8: + v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]string: - fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d) - case *map[int64]string: - v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]uint16: + fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint16: + v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]uint: - fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d) - case *map[int64]uint: - v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]uint32: + fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint32: + v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]uint8: - fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d) - case *map[int64]uint8: - v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]uint64: + fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint64: + v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]uint16: - fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d) - case *map[int64]uint16: - v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]uintptr: + fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uintptr: + v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]uint32: - fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d) - case *map[int64]uint32: - v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]int: + fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int: + v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]uint64: - fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d) - case *map[int64]uint64: - v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]int8: + fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int8: + v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]int: - fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d) - case *map[int64]int: - v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]int16: + fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int16: + v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]int8: - fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d) - case *map[int64]int8: - v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]int32: + fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int32: + v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]int16: - fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d) - case *map[int64]int16: - v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]int64: + fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int64: + v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]int32: - fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d) - case *map[int64]int32: - v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]float32: + fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]float32: + v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]int64: - fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d) - case *map[int64]int64: - v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]float64: + fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]float64: + v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]float32: - fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d) - case *map[int64]float32: - v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d) + case map[uintptr]bool: + fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]bool: + v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]float64: - fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d) - case *map[int64]float64: - v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d) + case []int: + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d) + case *[]int: + v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[int64]bool: - fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d) - case *map[int64]bool: - v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d) + case map[int]interface{}: + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d) + case *map[int]interface{}: + v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case []bool: - fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d) - case *[]bool: - v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d) + case map[int]string: + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d) + case *map[int]string: + v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]interface{}: - fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d) - case *map[bool]interface{}: - v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d) + case map[int]uint: + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d) + case *map[int]uint: + v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]string: - fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d) - case *map[bool]string: - v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d) + case map[int]uint8: + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint8: + v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]uint: - fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d) - case *map[bool]uint: - v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d) + case map[int]uint16: + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint16: + v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]uint8: - fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d) - case *map[bool]uint8: - v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d) + case map[int]uint32: + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint32: + v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]uint16: - fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d) - case *map[bool]uint16: - v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d) + case map[int]uint64: + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint64: + v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]uint32: - fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d) - case *map[bool]uint32: - v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d) + case map[int]uintptr: + fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int]uintptr: + v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]uint64: - fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d) - case *map[bool]uint64: - v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d) + case map[int]int: + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d) + case *map[int]int: + v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]int: - fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d) - case *map[bool]int: - v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d) + case map[int]int8: + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d) + case *map[int]int8: + v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]int8: - fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d) - case *map[bool]int8: - v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d) + case map[int]int16: + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d) + case *map[int]int16: + v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]int16: - fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d) - case *map[bool]int16: - v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d) + case map[int]int32: + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d) + case *map[int]int32: + v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]int32: - fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d) - case *map[bool]int32: - v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d) + case map[int]int64: + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d) + case *map[int]int64: + v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]int64: - fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d) - case *map[bool]int64: - v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d) + case map[int]float32: + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[int]float32: + v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]float32: - fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d) - case *map[bool]float32: - v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d) + case map[int]float64: + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[int]float64: + v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]float64: - fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d) - case *map[bool]float64: - v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d) + case map[int]bool: + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d) + case *map[int]bool: + v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - case map[bool]bool: - fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d) - case *map[bool]bool: - v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d) + case []int8: + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d) + case *[]int8: + v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]interface{}: + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int8]interface{}: + v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]string: + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d) + case *map[int8]string: + v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint: + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint: + v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint8: + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint8: + v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint16: + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint16: + v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint32: + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint32: + v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint64: + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint64: + v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uintptr: + fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uintptr: + v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int: + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d) + case *map[int8]int: + v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int8: + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int8: + v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int16: + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int16: + v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int32: + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int32: + v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int64: + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int64: + v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float32: + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float32: + v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float64: + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float64: + v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]bool: + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int8]bool: + v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int16: + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d) + case *[]int16: + v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]interface{}: + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int16]interface{}: + v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]string: + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d) + case *map[int16]string: + v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint: + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint: + v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint8: + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint8: + v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint16: + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint16: + v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d) if changed2 { *v = v2 } - - default: - return false + + case map[int16]uint32: + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint32: + v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint64: + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint64: + v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uintptr: + fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uintptr: + v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int: + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d) + case *map[int16]int: + v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int8: + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int8: + v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int16: + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int16: + v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int32: + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int32: + v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int64: + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int64: + v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float32: + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float32: + v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float64: + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float64: + v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]bool: + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int16]bool: + v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int32: + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d) + case *[]int32: + v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]interface{}: + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int32]interface{}: + v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]string: + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d) + case *map[int32]string: + v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint: + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint: + v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint8: + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint8: + v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint16: + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint16: + v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint32: + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint32: + v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint64: + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint64: + v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uintptr: + fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uintptr: + v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int: + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d) + case *map[int32]int: + v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int8: + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int8: + v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int16: + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int16: + v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int32: + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int32: + v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int64: + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int64: + v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float32: + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float32: + v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float64: + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float64: + v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]bool: + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int32]bool: + v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int64: + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d) + case *[]int64: + v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]interface{}: + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int64]interface{}: + v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]string: + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d) + case *map[int64]string: + v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint: + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint: + v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint8: + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint8: + v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint16: + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint16: + v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint32: + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint32: + v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint64: + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint64: + v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uintptr: + fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uintptr: + v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int: + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d) + case *map[int64]int: + v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int8: + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int8: + v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int16: + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int16: + v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int32: + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int32: + v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int64: + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int64: + v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float32: + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float32: + v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float64: + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float64: + v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]bool: + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int64]bool: + v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []bool: + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d) + case *[]bool: + v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]interface{}: + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d) + case *map[bool]interface{}: + v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]string: + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d) + case *map[bool]string: + v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint: + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint: + v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint8: + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint8: + v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint16: + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint16: + v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint32: + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint32: + v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint64: + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint64: + v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uintptr: + fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uintptr: + v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int: + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d) + case *map[bool]int: + v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int8: + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int8: + v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int16: + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int16: + v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int32: + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int32: + v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int64: + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int64: + v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float32: + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float32: + v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float64: + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float64: + v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]bool: + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d) + case *map[bool]bool: + v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions + +func (f *decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]interface{}) + v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]interface{}) + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, d *Decoder) (_ []interface{}, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]interface{}, xlen) + } + } else { + v = make([]interface{}, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + d.decode(&v[j]) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, nil) + slh.ElemContainerState(j) + d.decode(&v[j]) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]interface{}, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, nil) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + d.decode(&v[j]) + + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceStringR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]string) + v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]string) + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) { + v, changed := f.DecSliceStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d *Decoder) (_ []string, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]string, xlen) + } + } else { + v = make([]string, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeString() + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, "") + slh.ElemContainerState(j) + v[j] = dd.DecodeString() + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]string, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, "") + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeString() + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]float32) + v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float32) + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, d *Decoder) (_ []float32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]float32, xlen) + } + } else { + v = make([]float32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = float32(dd.DecodeFloat(true)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = float32(dd.DecodeFloat(true)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]float32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = float32(dd.DecodeFloat(true)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]float64) + v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float64) + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, d *Decoder) (_ []float64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]float64, xlen) + } + } else { + v = make([]float64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeFloat(false) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeFloat(false) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]float64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeFloat(false) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUintR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint) + v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint) + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Decoder) (_ []uint, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint, xlen) + } + } else { + v = make([]uint, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint16) + v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint16) + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d *Decoder) (_ []uint16, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint16, xlen) + } + } else { + v = make([]uint16, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint16(dd.DecodeUint(16)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint16(dd.DecodeUint(16)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint16, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint16(dd.DecodeUint(16)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint32) + v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint32) + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d *Decoder) (_ []uint32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint32, xlen) + } + } else { + v = make([]uint32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint32(dd.DecodeUint(32)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint32(dd.DecodeUint(32)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint32(dd.DecodeUint(32)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint64) + v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint64) + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d *Decoder) (_ []uint64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint64, xlen) + } + } else { + v = make([]uint64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeUint(64) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeUint(64) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uint64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeUint(64) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUintptrR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uintptr) + v, changed := fastpathTV.DecSliceUintptrV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uintptr) + fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool, d *Decoder) (_ []uintptr, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uintptr{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uintptr, xlen) + } + } else { + v = make([]uintptr, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uintptr{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]uintptr, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceIntR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int) + v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int) + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decoder) (_ []int, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int, xlen) + } + } else { + v = make([]int, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int(dd.DecodeInt(intBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int(dd.DecodeInt(intBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int(dd.DecodeInt(intBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int8) + v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int8) + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Decoder) (_ []int8, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int8, xlen) + } + } else { + v = make([]int8, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int8(dd.DecodeInt(8)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int8(dd.DecodeInt(8)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int8, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int8(dd.DecodeInt(8)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int16) + v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int16) + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *Decoder) (_ []int16, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int16, xlen) + } + } else { + v = make([]int16, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int16(dd.DecodeInt(16)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int16(dd.DecodeInt(16)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int16, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int16(dd.DecodeInt(16)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int32) + v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int32) + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *Decoder) (_ []int32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int32, xlen) + } + } else { + v = make([]int32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int32(dd.DecodeInt(32)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int32(dd.DecodeInt(32)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int32(dd.DecodeInt(32)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int64) + v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int64) + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *Decoder) (_ []int64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int64, xlen) + } + } else { + v = make([]int64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeInt(64) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeInt(64) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]int64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeInt(64) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]bool) + v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]bool) + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) { + v, changed := f.DecSliceBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Decoder) (_ []bool, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]bool, xlen) + } + } else { + v = make([]bool, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeBool() + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, false) + slh.ElemContainerState(j) + v[j] = dd.DecodeBool() + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]bool, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, false) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeBool() + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]interface{}) + v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]interface{}) + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[interface{}]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk interface{} + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]string) + v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]string) + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[interface{}]string, xlen) + changed = true + } + + var mk interface{} + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint) + v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint) + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uint, xlen) + changed = true + } + + var mk interface{} + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint8) + v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint8) + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]uint8, xlen) + changed = true + } + + var mk interface{} + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint16) + v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint16) + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[interface{}]uint16, xlen) + changed = true + } + + var mk interface{} + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint32) + v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint32) + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]uint32, xlen) + changed = true + } + + var mk interface{} + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint64) + v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint64) + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uint64, xlen) + changed = true + } + + var mk interface{} + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uintptr) + v, changed := fastpathTV.DecMapIntfUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uintptr) + fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uintptr, xlen) + changed = true + } + + var mk interface{} + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int) + v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int) + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]int, xlen) + changed = true + } + + var mk interface{} + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int8) + v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int8) + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]int8, xlen) + changed = true + } + + var mk interface{} + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } } - return true + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed } -// -- -- fast path functions - -func (f decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]interface{}) - v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int16) + v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]interface{}) - fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[interface{}]int16) + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecSliceIntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, - d *Decoder) (_ []interface{}, changed bool) { +func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9050,97 +20527,81 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []interface{}{} - } else { - v = make([]interface{}, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[interface{}]int16, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]interface{}, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk interface{} + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - d.decode(&v[j]) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, nil) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - d.decode(&v[j]) - - } else { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceStringR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]string) - v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int32) + v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]string) - fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[interface{}]int32) + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) { - v, changed := f.DecSliceStringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, - d *Decoder) (_ []string, changed bool) { +func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9148,96 +20609,81 @@ func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []string{} - } else { - v = make([]string, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]int32, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]string, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk interface{} + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = dd.DecodeString() - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, "") - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = dd.DecodeString() - } else { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]float32) - v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int64) + v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]float32) - fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[interface{}]int64) + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) { - v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, - d *Decoder) (_ []float32, changed bool) { +func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9245,96 +20691,81 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []float32{} - } else { - v = make([]float32, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]int64, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]float32, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk interface{} + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = float32(dd.DecodeFloat(true)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = float32(dd.DecodeFloat(true)) - } else { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]float64) - v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float32) + v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]float64) - fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[interface{}]float32) + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) { - v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, - d *Decoder) (_ []float64, changed bool) { +func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9342,96 +20773,81 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() - if canChange && v == nil { - if containerLenS <= 0 { - v = []float64{} - } else { - v = make([]float64, containerLenS, containerLenS) - } - changed = true - } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]float32, xlen) + changed = true } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]float64, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk interface{} + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = dd.DecodeFloat(false) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = dd.DecodeFloat(false) - } else { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceUintR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]uint) - v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float64) + v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]uint) - fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[interface{}]float64) + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, - d *Decoder) (_ []uint, changed bool) { +func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9439,96 +20855,81 @@ func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []uint{} - } else { - v = make([]uint, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]float64, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]uint, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk interface{} + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = uint(dd.DecodeUint(uintBitsize)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = uint(dd.DecodeUint(uintBitsize)) - } else { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]uint16) - v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]bool) + v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]uint16) - fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[interface{}]bool) + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, - d *Decoder) (_ []uint16, changed bool) { +func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9536,96 +20937,81 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []uint16{} - } else { - v = make([]uint16, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]bool, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]uint16, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk interface{} + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = uint16(dd.DecodeUint(16)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = uint16(dd.DecodeUint(16)) - } else { - d.swallow() + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]uint32) - v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]interface{}) + v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]uint32) - fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]interface{}) + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, - d *Decoder) (_ []uint32, changed bool) { +func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[string]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9633,96 +21019,83 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []uint32{} - } else { - v = make([]uint32, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[string]interface{}, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]uint32, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk string + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + mv = nil } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = uint32(dd.DecodeUint(32)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + d.decode(&mv) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = uint32(dd.DecodeUint(32)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] } else { - d.swallow() + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]uint64) - v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]string) + v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]uint64) - fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]string) + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecSliceUint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringStringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, - d *Decoder) (_ []uint64, changed bool) { +func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool, + d *Decoder) (_ map[string]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9730,96 +21103,73 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []uint64{} - } else { - v = make([]uint64, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[string]string, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]uint64, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = dd.DecodeUint(64) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = dd.DecodeUint(64) - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceIntR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]int) - v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint) + v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]int) - fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]uint) + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) { - v, changed := f.DecSliceIntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, - d *Decoder) (_ []int, changed bool) { +func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9827,96 +21177,73 @@ func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []int{} - } else { - v = make([]int, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uint, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]int, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = int(dd.DecodeInt(intBitsize)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = int(dd.DecodeInt(intBitsize)) - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]int8) - v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint8) + v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]int8) - fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]uint8) + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, - d *Decoder) (_ []int8, changed bool) { +func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -9924,96 +21251,73 @@ func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []int8{} - } else { - v = make([]int8, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]uint8, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]int8, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = int8(dd.DecodeInt(8)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = int8(dd.DecodeInt(8)) - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]int16) - v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint16) + v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]int16) - fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]uint16) + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, - d *Decoder) (_ []int16, changed bool) { +func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10021,96 +21325,73 @@ func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []int16{} - } else { - v = make([]int16, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[string]uint16, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]int16, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = int16(dd.DecodeInt(16)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = int16(dd.DecodeInt(16)) - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]int32) - v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint32) + v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]int32) - fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]uint32) + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, - d *Decoder) (_ []int32, changed bool) { +func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10118,96 +21399,73 @@ func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []int32{} - } else { - v = make([]int32, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]uint32, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]int32, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = int32(dd.DecodeInt(32)) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = int32(dd.DecodeInt(32)) - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]int64) - v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint64) + v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]int64) - fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]uint64) + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) { - v, changed := f.DecSliceInt64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, - d *Decoder) (_ []int64, changed bool) { +func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10215,96 +21473,73 @@ func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []int64{} - } else { - v = make([]int64, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uint64, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]int64, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = dd.DecodeInt(64) - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, 0) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = dd.DecodeInt(64) - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) { - array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported - vp := rv.Addr().Interface().(*[]bool) - v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d) +func (f *decFnInfo) fastpathDecMapStringUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uintptr) + v, changed := fastpathTV.DecMapStringUintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().([]bool) - fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]uintptr) + fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, f.d) } } - -func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) { - v, changed := f.DecSliceBoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, - d *Decoder) (_ []bool, changed bool) { +func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10312,94 +21547,73 @@ func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, return nil, changed } - slh, containerLenS := d.decSliceHelperStart() + containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLenS <= 0 { - v = []bool{} - } else { - v = make([]bool, containerLenS, containerLenS) - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uintptr, xlen) changed = true } - if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - } - return v, changed - } - // for j := 0; j < containerLenS; j++ { - if containerLenS > 0 { - decLen := containerLenS - if containerLenS > cap(v) { - if canChange { - s := make([]bool, containerLenS, containerLenS) - // copy(s, v[:cap(v)]) - v = s - changed = true - } else { - d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) + var mk string + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. - j := 0 - for ; j < decLen; j++ { - v[j] = dd.DecodeBool() - } - if !canChange { - for ; j < containerLenS; j++ { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv } } - } else { - j := 0 - for ; !dd.CheckBreak(); j++ { - if j >= len(v) { - if canChange { - v = append(v, false) - changed = true - } else { - d.arrayCannotExpand(len(v), j+1) - } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) } - if j < len(v) { // all checks done. cannot go past len. - v[j] = dd.DecodeBool() - } else { - d.swallow() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv } } - slh.End() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]interface{}) - v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]int) + v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]interface{}) - fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]int) + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]interface{}, changed bool) { +func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10409,68 +21623,71 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]interface{}, containerLen) - } else { - v = make(map[interface{}]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]int, xlen) changed = true } + + var mk string + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - d.decode(&mv) - + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - d.decode(&mv) - + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]string) - v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]int8) + v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]string) - fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]int8) + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]string, changed bool) { +func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10480,66 +21697,71 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]string, containerLen) - } else { - v = make(map[interface{}]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]int8, xlen) changed = true } + + var mk string + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeString() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeString() + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]uint) - v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]int16) + v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]uint) - fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]int16) + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]uint, changed bool) { +func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10549,66 +21771,71 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canCha containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]uint, containerLen) - } else { - v = make(map[interface{}]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[string]int16, xlen) changed = true } + + var mk string + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]uint8) - v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]int32) + v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]uint8) - fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]int32) + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]uint8, changed bool) { +func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10618,66 +21845,71 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]uint8, containerLen) - } else { - v = make(map[interface{}]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]int32, xlen) changed = true } + + var mk string + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]uint16) - v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]int64) + v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]uint16) - fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]int64) + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]uint16, changed bool) { +func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10687,66 +21919,71 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]uint16, containerLen) - } else { - v = make(map[interface{}]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]int64, xlen) changed = true } + + var mk string + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]uint32) - v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]float32) + v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]uint32) - fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]float32) + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]uint32, changed bool) { +func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10756,66 +21993,71 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]uint32, containerLen) - } else { - v = make(map[interface{}]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]float32, xlen) changed = true } + + var mk string + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]uint64) - v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]float64) + v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]uint64) - fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]float64) + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]uint64, changed bool) { +func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10825,66 +22067,71 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]uint64, containerLen) - } else { - v = make(map[interface{}]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]float64, xlen) changed = true } + + var mk string + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeUint(64) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeUint(64) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]int) - v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[string]bool) + v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]int) - fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[string]bool) + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]int, changed bool) { +func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[string]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10894,66 +22141,71 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChang containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]int, containerLen) - } else { - v = make(map[interface{}]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]bool, xlen) changed = true } + + var mk string + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]int8) - v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]interface{}) + v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]int8) - fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]interface{}) + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]int8, changed bool) { +func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -10963,66 +22215,81 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canCha containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]int8, containerLen) - } else { - v = make(map[interface{}]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[float32]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk float32 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]int16) - v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]string) + v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]int16) - fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]string) + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]int16, changed bool) { +func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11032,66 +22299,71 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]int16, containerLen) - } else { - v = make(map[interface{}]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[float32]string, xlen) changed = true } + + var mk float32 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]int32) - v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]uint) + v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]int32) - fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]uint) + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]int32, changed bool) { +func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11101,66 +22373,71 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]int32, containerLen) - } else { - v = make(map[interface{}]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uint, xlen) changed = true } + + var mk float32 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]int64) - v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]uint8) + v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]int64) - fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]uint8) + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]int64, changed bool) { +func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11170,66 +22447,71 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]int64, containerLen) - } else { - v = make(map[interface{}]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]uint8, xlen) changed = true } + + var mk float32 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeInt(64) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeInt(64) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]float32) - v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]uint16) + v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]float32) - fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]uint16) + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]float32, changed bool) { +func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11239,66 +22521,71 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]float32, containerLen) - } else { - v = make(map[interface{}]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[float32]uint16, xlen) changed = true } + + var mk float32 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]float64) - v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]uint32) + v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]float64) - fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]uint32) + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]float64, changed bool) { +func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11308,66 +22595,71 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]float64, containerLen) - } else { - v = make(map[interface{}]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]uint32, xlen) changed = true } + + var mk float32 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeFloat(false) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeFloat(false) + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[interface{}]bool) - v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]uint64) + v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[interface{}]bool) - fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]uint64) + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[interface{}]bool, changed bool) { +func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11377,66 +22669,71 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canCha containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[interface{}]bool, containerLen) - } else { - v = make(map[interface{}]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uint64, xlen) changed = true } + + var mk float32 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeBool() + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - var mk interface{} - d.decode(&mk) - if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. + if cr != nil { + cr.sendContainerState(containerMapKey) } - mv := v[mk] - mv = dd.DecodeBool() + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]interface{}) - v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]uintptr) + v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]interface{}) - fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]uintptr) + fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[string]interface{}, changed bool) { +func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11446,60 +22743,71 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]interface{}, containerLen) - } else { - v = make(map[string]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uintptr, xlen) changed = true } + + var mk float32 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]string) - v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]int) + v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]string) - fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]int) + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringStringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool, - d *Decoder) (_ map[string]string, changed bool) { +func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11509,58 +22817,71 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]string, containerLen) - } else { - v = make(map[string]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]int, xlen) changed = true } + + var mk float32 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]uint) - v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]int8) + v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]uint) - fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]int8) + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[string]uint, changed bool) { +func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11570,58 +22891,71 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]uint, containerLen) - } else { - v = make(map[string]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]int8, xlen) changed = true } + + var mk float32 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]uint8) - v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]int16) + v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]uint8) - fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]int16) + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[string]uint8, changed bool) { +func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11631,58 +22965,71 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]uint8, containerLen) - } else { - v = make(map[string]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[float32]int16, xlen) changed = true } + + var mk float32 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]uint16) - v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]int32) + v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]uint16) - fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]int32) + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[string]uint16, changed bool) { +func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11692,58 +23039,71 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]uint16, containerLen) - } else { - v = make(map[string]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]int32, xlen) changed = true } + + var mk float32 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]uint32) - v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]int64) + v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]uint32) - fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]int64) + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[string]uint32, changed bool) { +func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11753,58 +23113,71 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]uint32, containerLen) - } else { - v = make(map[string]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]int64, xlen) changed = true } + + var mk float32 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]uint64) - v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]float32) + v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]uint64) - fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]float32) + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[string]uint64, changed bool) { +func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11814,58 +23187,71 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]uint64, containerLen) - } else { - v = make(map[string]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]float32, xlen) changed = true } + + var mk float32 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]int) - v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]float64) + v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]int) - fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]float64) + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringIntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool, - d *Decoder) (_ map[string]int, changed bool) { +func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11875,58 +23261,71 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]int, containerLen) - } else { - v = make(map[string]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]float64, xlen) changed = true } + + var mk float32 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]int8) - v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float32]bool) + v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]int8) - fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float32]bool) + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[string]int8, changed bool) { +func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11936,58 +23335,71 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]int8, containerLen) - } else { - v = make(map[string]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]bool, xlen) changed = true } + + var mk float32 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]int16) - v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]interface{}) + v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]int16) - fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]interface{}) + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[string]int16, changed bool) { +func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -11997,58 +23409,81 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]int16, containerLen) - } else { - v = make(map[string]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[float64]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk float64 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]int32) - v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]string) + v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]int32) - fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]string) + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[string]int32, changed bool) { +func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12058,58 +23493,71 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]int32, containerLen) - } else { - v = make(map[string]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[float64]string, xlen) changed = true } + + var mk float64 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]int64) - v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]uint) + v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]int64) - fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]uint) + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[string]int64, changed bool) { +func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12119,58 +23567,71 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]int64, containerLen) - } else { - v = make(map[string]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uint, xlen) changed = true } + + var mk float64 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]float32) - v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]uint8) + v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]float32) - fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]uint8) + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[string]float32, changed bool) { +func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12180,58 +23641,71 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]float32, containerLen) - } else { - v = make(map[string]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]uint8, xlen) changed = true } + + var mk float64 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]float64) - v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]uint16) + v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]float64) - fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]uint16) + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[string]float64, changed bool) { +func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12241,58 +23715,71 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]float64, containerLen) - } else { - v = make(map[string]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[float64]uint16, xlen) changed = true } + + var mk float64 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[string]bool) - v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]uint32) + v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[string]bool) - fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]uint32) + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[string]bool, changed bool) { +func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12302,58 +23789,71 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[string]bool, containerLen) - } else { - v = make(map[string]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]uint32, xlen) changed = true } + + var mk float64 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeString() - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]interface{}) - v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]uint64) + v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]interface{}) - fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]uint64) + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]interface{}, changed bool) { +func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12363,60 +23863,71 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]interface{}, containerLen) - } else { - v = make(map[float32]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uint64, xlen) changed = true } + + var mk float64 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]string) - v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]uintptr) + v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]string) - fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]uintptr) + fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]string, changed bool) { +func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12426,58 +23937,71 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]string, containerLen) - } else { - v = make(map[float32]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uintptr, xlen) changed = true } + + var mk float64 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]uint) - v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]int) + v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]uint) - fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]int) + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]uint, changed bool) { +func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12487,58 +24011,71 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]uint, containerLen) - } else { - v = make(map[float32]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]int, xlen) changed = true } + + var mk float64 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]uint8) - v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]int8) + v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]uint8) - fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]int8) + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]uint8, changed bool) { +func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12548,58 +24085,71 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]uint8, containerLen) - } else { - v = make(map[float32]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]int8, xlen) changed = true } + + var mk float64 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]uint16) - v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]int16) + v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]uint16) - fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]int16) + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]uint16, changed bool) { +func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12609,58 +24159,71 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]uint16, containerLen) - } else { - v = make(map[float32]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[float64]int16, xlen) changed = true } + + var mk float64 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]uint32) - v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]int32) + v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]uint32) - fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]int32) + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]uint32, changed bool) { +func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12670,58 +24233,71 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]uint32, containerLen) - } else { - v = make(map[float32]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]int32, xlen) changed = true } + + var mk float64 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]uint64) - v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]int64) + v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]uint64) - fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]int64) + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]uint64, changed bool) { +func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12731,58 +24307,71 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]uint64, containerLen) - } else { - v = make(map[float32]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]int64, xlen) changed = true } + + var mk float64 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]int) - v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]float32) + v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]int) - fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]float32) + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]int, changed bool) { +func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12792,58 +24381,71 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]int, containerLen) - } else { - v = make(map[float32]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]float32, xlen) changed = true } + + var mk float64 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]int8) - v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]float64) + v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]int8) - fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]float64) + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]int8, changed bool) { +func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12853,58 +24455,71 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]int8, containerLen) - } else { - v = make(map[float32]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]float64, xlen) changed = true } + + var mk float64 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]int16) - v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[float64]bool) + v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]int16) - fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[float64]bool) + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]int16, changed bool) { +func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12914,58 +24529,71 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]int16, containerLen) - } else { - v = make(map[float32]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]bool, xlen) changed = true } + + var mk float64 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]int32) - v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]interface{}) + v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]int32) - fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]interface{}) + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]int32, changed bool) { +func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -12975,58 +24603,81 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]int32, containerLen) - } else { - v = make(map[float32]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]int64) - v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]string) + v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]int64) - fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]string) + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintStringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]int64, changed bool) { +func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13036,58 +24687,71 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]int64, containerLen) - } else { - v = make(map[float32]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint]string, xlen) changed = true } + + var mk uint + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]float32) - v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]uint) + v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]float32) - fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]uint) + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]float32, changed bool) { +func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13097,58 +24761,71 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, c containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]float32, containerLen) - } else { - v = make(map[float32]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uint, xlen) changed = true } + + var mk uint + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]float64) - v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]uint8) + v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]float64) - fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]uint8) + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]float64, changed bool) { +func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13158,58 +24835,71 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, c containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]float64, containerLen) - } else { - v = make(map[float32]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]uint8, xlen) changed = true } + + var mk uint + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float32]bool) - v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]uint16) + v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float32]bool) - fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]uint16) + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[float32]bool, changed bool) { +func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13219,58 +24909,71 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float32]bool, containerLen) - } else { - v = make(map[float32]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint]uint16, xlen) changed = true } + + var mk uint + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := float32(dd.DecodeFloat(true)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]interface{}) - v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]uint32) + v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } - } else { - v := rv.Interface().(map[float64]interface{}) - fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d) + } else { + v := rv.Interface().(map[uint]uint32) + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]interface{}, changed bool) { +func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13280,60 +24983,71 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]interface{}, containerLen) - } else { - v = make(map[float64]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]uint32, xlen) changed = true } + + var mk uint + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]string) - v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]uint64) + v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]string) - fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]uint64) + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]string, changed bool) { +func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13343,58 +25057,71 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]string, containerLen) - } else { - v = make(map[float64]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uint64, xlen) changed = true } + + var mk uint + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintUintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]uint) - v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]uintptr) + v, changed := fastpathTV.DecMapUintUintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]uint) - fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]uintptr) + fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]uint, changed bool) { +func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13404,58 +25131,71 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]uint, containerLen) - } else { - v = make(map[float64]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uintptr, xlen) changed = true } + + var mk uint + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]uint8) - v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]int) + v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]uint8) - fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]int) + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]uint8, changed bool) { +func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13465,58 +25205,71 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]uint8, containerLen) - } else { - v = make(map[float64]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]int, xlen) changed = true } + + var mk uint + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]uint16) - v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]int8) + v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]uint16) - fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]int8) + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]uint16, changed bool) { +func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13526,58 +25279,71 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]uint16, containerLen) - } else { - v = make(map[float64]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]int8, xlen) changed = true } + + var mk uint + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]uint32) - v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]int16) + v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]uint32) - fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]int16) + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]uint32, changed bool) { +func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13587,58 +25353,71 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]uint32, containerLen) - } else { - v = make(map[float64]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint]int16, xlen) changed = true } + + var mk uint + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]uint64) - v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]int32) + v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]uint64) - fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]int32) + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]uint64, changed bool) { +func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13648,58 +25427,71 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]uint64, containerLen) - } else { - v = make(map[float64]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]int32, xlen) changed = true } + + var mk uint + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]int) - v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]int64) + v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]int) - fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]int64) + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]int, changed bool) { +func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13709,58 +25501,71 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]int, containerLen) - } else { - v = make(map[float64]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]int64, xlen) changed = true } + + var mk uint + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]int8) - v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]float32) + v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]int8) - fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]float32) + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]int8, changed bool) { +func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13770,58 +25575,71 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]int8, containerLen) - } else { - v = make(map[float64]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]float32, xlen) changed = true } + + var mk uint + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]int16) - v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]float64) + v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]int16) - fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]float64) + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]int16, changed bool) { +func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13831,58 +25649,71 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]int16, containerLen) - } else { - v = make(map[float64]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]float64, xlen) changed = true } + + var mk uint + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]int32) - v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint]bool) + v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]int32) - fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint]bool) + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]int32, changed bool) { +func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13892,58 +25723,71 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]int32, containerLen) - } else { - v = make(map[float64]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]bool, xlen) changed = true } + + var mk uint + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]int64) - v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]interface{}) + v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]int64) - fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]interface{}) + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]int64, changed bool) { +func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -13953,58 +25797,81 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]int64, containerLen) - } else { - v = make(map[float64]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[uint8]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint8 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]float32) - v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]string) + v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]float32) - fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]string) + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]float32, changed bool) { +func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14014,58 +25881,71 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, c containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]float32, containerLen) - } else { - v = make(map[float64]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[uint8]string, xlen) changed = true } + + var mk uint8 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]float64) - v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]uint) + v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]float64) - fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]uint) + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]float64, changed bool) { +func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14075,58 +25955,71 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, c containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]float64, containerLen) - } else { - v = make(map[float64]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uint, xlen) changed = true } + + var mk uint8 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[float64]bool) - v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]uint8) + v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[float64]bool) - fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]uint8) + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[float64]bool, changed bool) { +func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14136,58 +26029,71 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[float64]bool, containerLen) - } else { - v = make(map[float64]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]uint8, xlen) changed = true } + + var mk uint8 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeFloat(false) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]interface{}) - v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]uint16) + v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]interface{}) - fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]uint16) + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]interface{}, changed bool) { +func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14197,60 +26103,71 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canCha containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]interface{}, containerLen) - } else { - v = make(map[uint]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint8]uint16, xlen) changed = true } + + var mk uint8 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]string) - v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]uint32) + v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]string) - fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]uint32) + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintStringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]string, changed bool) { +func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14260,58 +26177,71 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]string, containerLen) - } else { - v = make(map[uint]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]uint32, xlen) changed = true } + + var mk uint8 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]uint) - v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]uint64) + v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]uint) - fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]uint64) + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]uint, changed bool) { +func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14321,58 +26251,71 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]uint, containerLen) - } else { - v = make(map[uint]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uint64, xlen) changed = true } + + var mk uint8 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]uint8) - v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]uintptr) + v, changed := fastpathTV.DecMapUint8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]uint8) - fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]uintptr) + fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]uint8, changed bool) { +func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14382,58 +26325,71 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]uint8, containerLen) - } else { - v = make(map[uint]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uintptr, xlen) changed = true } + + var mk uint8 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]uint16) - v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]int) + v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]uint16) - fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]int) + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]uint16, changed bool) { +func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14443,58 +26399,71 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]uint16, containerLen) - } else { - v = make(map[uint]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]int, xlen) changed = true } + + var mk uint8 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]uint32) - v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]int8) + v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]uint32) - fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]int8) + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]uint32, changed bool) { +func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14504,58 +26473,71 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]uint32, containerLen) - } else { - v = make(map[uint]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]int8, xlen) changed = true } + + var mk uint8 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]uint64) - v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]int16) + v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]uint64) - fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]int16) + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]uint64, changed bool) { +func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14565,58 +26547,71 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]uint64, containerLen) - } else { - v = make(map[uint]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint8]int16, xlen) changed = true } + + var mk uint8 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]int) - v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]int32) + v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]int) - fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]int32) + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintIntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]int, changed bool) { +func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14626,58 +26621,71 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]int, containerLen) - } else { - v = make(map[uint]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]int32, xlen) changed = true } + + var mk uint8 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]int8) - v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]int64) + v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]int8) - fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]int64) + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]int8, changed bool) { +func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14687,58 +26695,71 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]int8, containerLen) - } else { - v = make(map[uint]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]int64, xlen) changed = true } + + var mk uint8 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]int16) - v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]float32) + v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]int16) - fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]float32) + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]int16, changed bool) { +func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14748,58 +26769,71 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]int16, containerLen) - } else { - v = make(map[uint]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]float32, xlen) changed = true } + + var mk uint8 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]int32) - v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]float64) + v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]int32) - fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]float64) + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]int32, changed bool) { +func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14809,58 +26843,71 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]int32, containerLen) - } else { - v = make(map[uint]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]float64, xlen) changed = true } + + var mk uint8 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]int64) - v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint8]bool) + v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]int64) - fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint8]bool) + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]int64, changed bool) { +func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14870,58 +26917,71 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]int64, containerLen) - } else { - v = make(map[uint]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]bool, xlen) changed = true } + + var mk uint8 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]float32) - v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]interface{}) + v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]float32) - fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]interface{}) + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]float32, changed bool) { +func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14931,58 +26991,81 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]float32, containerLen) - } else { - v = make(map[uint]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[uint16]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint16 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]float64) - v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]string) + v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]float64) - fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]string) + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]float64, changed bool) { +func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -14992,58 +27075,71 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]float64, containerLen) - } else { - v = make(map[uint]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[uint16]string, xlen) changed = true } + + var mk uint16 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint]bool) - v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]uint) + v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint]bool) - fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]uint) + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[uint]bool, changed bool) { +func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15053,58 +27149,71 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint]bool, containerLen) - } else { - v = make(map[uint]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uint, xlen) changed = true } + + var mk uint16 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint(dd.DecodeUint(uintBitsize)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]interface{}) - v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]uint8) + v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]interface{}) - fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]uint8) + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]interface{}, changed bool) { +func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15114,60 +27223,71 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]interface{}, containerLen) - } else { - v = make(map[uint8]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]uint8, xlen) changed = true } + + var mk uint16 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]string) - v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]uint16) + v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]string) - fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]uint16) + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]string, changed bool) { +func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15177,58 +27297,71 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]string, containerLen) - } else { - v = make(map[uint8]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[uint16]uint16, xlen) changed = true } + + var mk uint16 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]uint) - v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]uint32) + v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]uint) - fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]uint32) + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]uint, changed bool) { +func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15238,58 +27371,71 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]uint, containerLen) - } else { - v = make(map[uint8]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]uint32, xlen) changed = true } + + var mk uint16 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]uint8) - v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]uint64) + v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]uint8) - fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]uint64) + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]uint8, changed bool) { +func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15299,58 +27445,71 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]uint8, containerLen) - } else { - v = make(map[uint8]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uint64, xlen) changed = true } + + var mk uint16 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]uint16) - v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]uintptr) + v, changed := fastpathTV.DecMapUint16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]uint16) - fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]uintptr) + fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]uint16, changed bool) { +func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15360,58 +27519,71 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]uint16, containerLen) - } else { - v = make(map[uint8]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uintptr, xlen) changed = true } + + var mk uint16 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]uint32) - v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]int) + v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]uint32) - fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]int) + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]uint32, changed bool) { +func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15421,58 +27593,71 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]uint32, containerLen) - } else { - v = make(map[uint8]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]int, xlen) changed = true } + + var mk uint16 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) { - if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]uint64) - v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) +func (f *decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int8) + v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]uint64) - fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]int8) + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]uint64, changed bool) { +func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15482,58 +27667,71 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]uint64, containerLen) - } else { - v = make(map[uint8]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]int8, xlen) changed = true } + + var mk uint16 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]int) - v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]int16) + v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]int) - fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]int16) + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]int, changed bool) { +func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15543,58 +27741,71 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]int, containerLen) - } else { - v = make(map[uint8]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[uint16]int16, xlen) changed = true } + + var mk uint16 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]int8) - v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]int32) + v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]int8) - fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]int32) + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]int8, changed bool) { +func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15604,58 +27815,71 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]int8, containerLen) - } else { - v = make(map[uint8]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]int32, xlen) changed = true } + + var mk uint16 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]int16) - v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]int64) + v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]int16) - fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]int64) + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]int16, changed bool) { +func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15665,58 +27889,71 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]int16, containerLen) - } else { - v = make(map[uint8]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]int64, xlen) changed = true } + + var mk uint16 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]int32) - v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]float32) + v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]int32) - fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]float32) + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]int32, changed bool) { +func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15726,58 +27963,71 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]int32, containerLen) - } else { - v = make(map[uint8]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]float32, xlen) changed = true } + + var mk uint16 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]int64) - v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]float64) + v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]int64) - fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]float64) + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]int64, changed bool) { +func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15787,58 +28037,71 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]int64, containerLen) - } else { - v = make(map[uint8]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]float64, xlen) changed = true } + + var mk uint16 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]float32) - v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint16]bool) + v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]float32) - fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint16]bool) + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]float32, changed bool) { +func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15848,58 +28111,71 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]float32, containerLen) - } else { - v = make(map[uint8]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]bool, xlen) changed = true } + + var mk uint16 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]float64) - v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]interface{}) + v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]float64) - fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]interface{}) + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]float64, changed bool) { +func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15909,58 +28185,81 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]float64, containerLen) - } else { - v = make(map[uint8]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[uint32]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint32 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint8]bool) - v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]string) + v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint8]bool) - fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]string) + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[uint8]bool, changed bool) { +func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -15970,58 +28269,71 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint8]bool, containerLen) - } else { - v = make(map[uint8]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[uint32]string, xlen) changed = true } + + var mk uint32 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint8(dd.DecodeUint(8)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]interface{}) - v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]uint) + v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]interface{}) - fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]uint) + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]interface{}, changed bool) { +func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16031,60 +28343,71 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]interface{}, containerLen) - } else { - v = make(map[uint16]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uint, xlen) changed = true } + + var mk uint32 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]string) - v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]uint8) + v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]string) - fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]uint8) + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]string, changed bool) { +func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16094,58 +28417,71 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]string, containerLen) - } else { - v = make(map[uint16]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]uint8, xlen) changed = true } + + var mk uint32 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]uint) - v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]uint16) + v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]uint) - fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]uint16) + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]uint, changed bool) { +func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16155,58 +28491,71 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]uint, containerLen) - } else { - v = make(map[uint16]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint32]uint16, xlen) changed = true } + + var mk uint32 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]uint8) - v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]uint32) + v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]uint8) - fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]uint32) + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]uint8, changed bool) { +func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16216,58 +28565,71 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]uint8, containerLen) - } else { - v = make(map[uint16]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]uint32, xlen) changed = true } + + var mk uint32 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]uint16) - v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]uint64) + v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]uint16) - fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]uint64) + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]uint16, changed bool) { +func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16277,58 +28639,71 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]uint16, containerLen) - } else { - v = make(map[uint16]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uint64, xlen) changed = true } + + var mk uint32 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]uint32) - v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]uintptr) + v, changed := fastpathTV.DecMapUint32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]uint32) - fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]uintptr) + fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]uint32, changed bool) { +func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16338,58 +28713,71 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]uint32, containerLen) - } else { - v = make(map[uint16]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uintptr, xlen) changed = true } + + var mk uint32 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]uint64) - v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]int) + v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]uint64) - fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]int) + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]uint64, changed bool) { +func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16399,58 +28787,71 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]uint64, containerLen) - } else { - v = make(map[uint16]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]int, xlen) changed = true } + + var mk uint32 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]int) - v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]int8) + v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]int) - fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]int8) + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]int, changed bool) { +func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16460,58 +28861,71 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]int, containerLen) - } else { - v = make(map[uint16]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]int8, xlen) changed = true } + + var mk uint32 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]int8) - v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]int16) + v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]int8) - fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]int16) + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]int8, changed bool) { +func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16521,58 +28935,71 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]int8, containerLen) - } else { - v = make(map[uint16]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint32]int16, xlen) changed = true } + + var mk uint32 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]int16) - v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]int32) + v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]int16) - fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]int32) + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]int16, changed bool) { +func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16582,58 +29009,71 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]int16, containerLen) - } else { - v = make(map[uint16]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]int32, xlen) changed = true } + + var mk uint32 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]int32) - v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]int64) + v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]int32) - fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]int64) + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]int32, changed bool) { +func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16643,58 +29083,71 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]int32, containerLen) - } else { - v = make(map[uint16]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]int64, xlen) changed = true } + + var mk uint32 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]int64) - v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]float32) + v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]int64) - fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]float32) + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]int64, changed bool) { +func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16704,58 +29157,71 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]int64, containerLen) - } else { - v = make(map[uint16]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]float32, xlen) changed = true } + + var mk uint32 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]float32) - v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]float64) + v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]float32) - fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]float64) + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]float32, changed bool) { +func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16765,58 +29231,71 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]float32, containerLen) - } else { - v = make(map[uint16]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]float64, xlen) changed = true } + + var mk uint32 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]float64) - v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint32]bool) + v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]float64) - fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint32]bool) + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]float64, changed bool) { +func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16826,58 +29305,71 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]float64, containerLen) - } else { - v = make(map[uint16]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]bool, xlen) changed = true } + + var mk uint32 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint16]bool) - v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]interface{}) + v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint16]bool) - fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]interface{}) + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[uint16]bool, changed bool) { +func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16887,58 +29379,81 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint16]bool, containerLen) - } else { - v = make(map[uint16]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint64]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint64 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint16(dd.DecodeUint(16)) - mv := v[mk] - mv = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]interface{}) - v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]string) + v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]interface{}) - fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]string) + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]interface{}, changed bool) { +func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -16948,60 +29463,71 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]interface{}, containerLen) - } else { - v = make(map[uint32]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint64]string, xlen) changed = true } + + var mk uint64 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - d.decode(&mv) - + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]string) - v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]uint) + v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]string) - fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]uint) + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]string, changed bool) { +func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17011,58 +29537,71 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]string, containerLen) - } else { - v = make(map[uint32]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uint, xlen) changed = true } + + var mk uint64 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]uint) - v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]uint8) + v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]uint) - fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]uint8) + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]uint, changed bool) { +func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17072,58 +29611,71 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]uint, containerLen) - } else { - v = make(map[uint32]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]uint8, xlen) changed = true } + + var mk uint64 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]uint8) - v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]uint16) + v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]uint8) - fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]uint16) + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]uint8, changed bool) { +func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17133,58 +29685,71 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]uint8, containerLen) - } else { - v = make(map[uint32]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint64]uint16, xlen) changed = true } + + var mk uint64 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]uint16) - v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]uint32) + v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]uint16) - fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]uint32) + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]uint16, changed bool) { +func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17194,58 +29759,71 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]uint16, containerLen) - } else { - v = make(map[uint32]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]uint32, xlen) changed = true } + + var mk uint64 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]uint32) - v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]uint64) + v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]uint32) - fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]uint64) + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]uint32, changed bool) { +func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17255,58 +29833,71 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]uint32, containerLen) - } else { - v = make(map[uint32]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uint64, xlen) changed = true } + + var mk uint64 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]uint64) - v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]uintptr) + v, changed := fastpathTV.DecMapUint64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]uint64) - fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]uintptr) + fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]uint64, changed bool) { +func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17316,58 +29907,71 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]uint64, containerLen) - } else { - v = make(map[uint32]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uintptr, xlen) changed = true } + + var mk uint64 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]int) - v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]int) + v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]int) - fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]int) + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]int, changed bool) { +func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17377,17 +29981,22 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]int, containerLen) - } else { - v = make(map[uint32]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]int, xlen) changed = true } + + var mk uint64 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -17395,40 +30004,48 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]int8) - v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]int8) + v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]int8) - fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]int8) + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]int8, changed bool) { +func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17438,17 +30055,22 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]int8, containerLen) - } else { - v = make(map[uint32]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]int8, xlen) changed = true } + + var mk uint64 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -17456,40 +30078,48 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]int16) - v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]int16) + v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]int16) - fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]int16) + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]int16, changed bool) { +func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17499,17 +30129,22 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]int16, containerLen) - } else { - v = make(map[uint32]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint64]int16, xlen) changed = true } + + var mk uint64 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -17517,40 +30152,48 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]int32) - v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]int32) + v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]int32) - fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]int32) + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]int32, changed bool) { +func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17560,17 +30203,22 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]int32, containerLen) - } else { - v = make(map[uint32]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]int32, xlen) changed = true } + + var mk uint64 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -17578,40 +30226,48 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]int64) - v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]int64) + v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]int64) - fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]int64) + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]int64, changed bool) { +func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17621,17 +30277,22 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]int64, containerLen) - } else { - v = make(map[uint32]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]int64, xlen) changed = true } + + var mk uint64 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -17639,40 +30300,48 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]float32) - v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]float32) + v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]float32) - fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]float32) + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]float32, changed bool) { +func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17682,17 +30351,22 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]float32, containerLen) - } else { - v = make(map[uint32]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]float32, xlen) changed = true } + + var mk uint64 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -17700,40 +30374,48 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, can } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]float64) - v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]float64) + v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]float64) - fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]float64) + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]float64, changed bool) { +func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17743,17 +30425,22 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]float64, containerLen) - } else { - v = make(map[uint32]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]float64, xlen) changed = true } + + var mk uint64 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -17761,40 +30448,48 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, can } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint32]bool) - v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uint64]bool) + v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint32]bool) - fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uint64]bool) + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[uint32]bool, changed bool) { +func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17804,17 +30499,22 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint32]bool, containerLen) - } else { - v = make(map[uint32]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]bool, xlen) changed = true } + + var mk uint64 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -17822,40 +30522,48 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := uint32(dd.DecodeUint(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrIntfR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]interface{}) - v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]interface{}) + v, changed := fastpathTV.DecMapUintptrIntfV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]interface{}) - fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]interface{}) + fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrIntfV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]interface{}, changed bool) { +func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17865,60 +30573,81 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, ca containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]interface{}, containerLen) - } else { - v = make(map[uint64]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uintptr]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uintptr + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrStringR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]string) - v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]string) + v, changed := fastpathTV.DecMapUintptrStringV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]string) - fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]string) + fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrStringV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]string, changed bool) { +func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17928,17 +30657,22 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]string, containerLen) - } else { - v = make(map[uint64]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uintptr]string, xlen) changed = true } + + var mk uintptr + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -17946,40 +30680,48 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrUintR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]uint) - v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]uint) + v, changed := fastpathTV.DecMapUintptrUintV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]uint) - fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]uint) + fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUintV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]uint, changed bool) { +func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -17989,17 +30731,22 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]uint, containerLen) - } else { - v = make(map[uint64]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uint, xlen) changed = true } + + var mk uintptr + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -18007,40 +30754,48 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrUint8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]uint8) - v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]uint8) + v, changed := fastpathTV.DecMapUintptrUint8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]uint8) - fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]uint8) + fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]uint8, changed bool) { +func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18050,17 +30805,22 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]uint8, containerLen) - } else { - v = make(map[uint64]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]uint8, xlen) changed = true } + + var mk uintptr + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -18068,40 +30828,48 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrUint16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]uint16) - v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]uint16) + v, changed := fastpathTV.DecMapUintptrUint16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]uint16) - fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]uint16) + fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]uint16, changed bool) { +func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18111,17 +30879,22 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]uint16, containerLen) - } else { - v = make(map[uint64]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uintptr]uint16, xlen) changed = true } + + var mk uintptr + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -18129,40 +30902,48 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrUint32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]uint32) - v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]uint32) + v, changed := fastpathTV.DecMapUintptrUint32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]uint32) - fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]uint32) + fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]uint32, changed bool) { +func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18172,17 +30953,22 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]uint32, containerLen) - } else { - v = make(map[uint64]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]uint32, xlen) changed = true } + + var mk uintptr + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -18190,40 +30976,48 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrUint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]uint64) - v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]uint64) + v, changed := fastpathTV.DecMapUintptrUint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]uint64) - fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]uint64) + fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]uint64, changed bool) { +func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18233,17 +31027,22 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]uint64, containerLen) - } else { - v = make(map[uint64]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uint64, xlen) changed = true } + + var mk uintptr + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -18251,40 +31050,48 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrUintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]int) - v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]uintptr) + v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]int) - fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]uintptr) + fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]int, changed bool) { +func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18294,17 +31101,96 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]int, containerLen) - } else { - v = make(map[uint64]int) // supports indefinite-length, etc + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uintptr, xlen) + changed = true + } + + var mk uintptr + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int) + v, changed := fastpathTV.DecMapUintptrIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int) + fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]int, xlen) changed = true } + + var mk uintptr + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -18312,40 +31198,48 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrInt8R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]int8) - v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]int8) + v, changed := fastpathTV.DecMapUintptrInt8V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]int8) - fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]int8) + fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, f.d) } -} -func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d) +} +func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt8V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]int8, changed bool) { +func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18355,17 +31249,22 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]int8, containerLen) - } else { - v = make(map[uint64]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]int8, xlen) changed = true } + + var mk uintptr + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -18373,40 +31272,48 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrInt16R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]int16) - v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]int16) + v, changed := fastpathTV.DecMapUintptrInt16V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]int16) - fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]int16) + fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt16V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]int16, changed bool) { +func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18416,17 +31323,22 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]int16, containerLen) - } else { - v = make(map[uint64]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uintptr]int16, xlen) changed = true } + + var mk uintptr + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -18434,40 +31346,48 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrInt32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]int32) - v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]int32) + v, changed := fastpathTV.DecMapUintptrInt32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]int32) - fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]int32) + fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]int32, changed bool) { +func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18477,17 +31397,22 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]int32, containerLen) - } else { - v = make(map[uint64]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]int32, xlen) changed = true } + + var mk uintptr + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -18495,40 +31420,48 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrInt64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]int64) - v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]int64) + v, changed := fastpathTV.DecMapUintptrInt64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]int64) - fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]int64) + fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]int64, changed bool) { +func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18538,17 +31471,22 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]int64, containerLen) - } else { - v = make(map[uint64]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]int64, xlen) changed = true } + + var mk uintptr + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -18556,40 +31494,48 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrFloat32R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]float32) - v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]float32) + v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]float32) - fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]float32) + fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrFloat32V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]float32, changed bool) { +func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18599,17 +31545,22 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]float32, containerLen) - } else { - v = make(map[uint64]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]float32, xlen) changed = true } + + var mk uintptr + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -18617,40 +31568,48 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, can } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrFloat64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]float64) - v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]float64) + v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]float64) - fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]float64) + fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrFloat64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]float64, changed bool) { +func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18660,17 +31619,22 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, can containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]float64, containerLen) - } else { - v = make(map[uint64]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]float64, xlen) changed = true } + + var mk uintptr + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -18678,40 +31642,48 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, can } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapUintptrBoolR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[uint64]bool) - v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[uintptr]bool) + v, changed := fastpathTV.DecMapUintptrBoolV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[uint64]bool) - fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[uintptr]bool) + fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) { - v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d) +func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrBoolV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool, - d *Decoder) (_ map[uint64]bool, changed bool) { +func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18721,17 +31693,22 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[uint64]bool, containerLen) - } else { - v = make(map[uint64]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]bool, xlen) changed = true } + + var mk uintptr + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -18739,19 +31716,26 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeUint(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]interface{}) v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d) @@ -18772,7 +31756,8 @@ func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, checkNil bool, d *Dec func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChange bool, d *Decoder) (_ map[int]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18782,39 +31767,59 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChang containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]interface{}, containerLen) - } else { - v = make(map[int]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]string) v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d) @@ -18835,7 +31840,8 @@ func (f fastpathT) DecMapIntStringX(vp *map[int]string, checkNil bool, d *Decode func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange bool, d *Decoder) (_ map[int]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18845,17 +31851,22 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]string, containerLen) - } else { - v = make(map[int]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int]string, xlen) changed = true } + + var mk int + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -18863,19 +31874,26 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]uint) v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d) @@ -18896,7 +31914,8 @@ func (f fastpathT) DecMapIntUintX(vp *map[int]uint, checkNil bool, d *Decoder) { func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, d *Decoder) (_ map[int]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18906,17 +31925,22 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]uint, containerLen) - } else { - v = make(map[int]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uint, xlen) changed = true } + + var mk int + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -18924,19 +31948,26 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]uint8) v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -18957,7 +31988,8 @@ func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, checkNil bool, d *Decoder) func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange bool, d *Decoder) (_ map[int]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -18967,17 +31999,22 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]uint8, containerLen) - } else { - v = make(map[int]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]uint8, xlen) changed = true } + + var mk int + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -18985,19 +32022,26 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]uint16) v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19018,7 +32062,8 @@ func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, checkNil bool, d *Decode func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange bool, d *Decoder) (_ map[int]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19028,17 +32073,22 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]uint16, containerLen) - } else { - v = make(map[int]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int]uint16, xlen) changed = true } + + var mk int + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -19046,19 +32096,26 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]uint32) v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19079,7 +32136,8 @@ func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, checkNil bool, d *Decode func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange bool, d *Decoder) (_ map[int]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19089,17 +32147,22 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]uint32, containerLen) - } else { - v = make(map[int]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]uint32, xlen) changed = true } + + var mk int + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -19107,19 +32170,26 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]uint64) v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19140,7 +32210,8 @@ func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, checkNil bool, d *Decode func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange bool, d *Decoder) (_ map[int]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19150,17 +32221,22 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]uint64, containerLen) - } else { - v = make(map[int]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uint64, xlen) changed = true } + + var mk int + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -19168,19 +32244,100 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uintptr) + v, changed := fastpathTV.DecMapIntUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uintptr) + fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uintptr, xlen) + changed = true + } + + var mk int + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]int) v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d) @@ -19201,7 +32358,8 @@ func (f fastpathT) DecMapIntIntX(vp *map[int]int, checkNil bool, d *Decoder) { func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, d *Decoder) (_ map[int]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19211,17 +32369,22 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]int, containerLen) - } else { - v = make(map[int]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]int, xlen) changed = true } + + var mk int + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -19229,19 +32392,26 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]int8) v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19262,7 +32432,8 @@ func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, checkNil bool, d *Decoder) { func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, d *Decoder) (_ map[int]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19272,17 +32443,22 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]int8, containerLen) - } else { - v = make(map[int]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]int8, xlen) changed = true } + + var mk int + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -19290,19 +32466,26 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]int16) v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19323,7 +32506,8 @@ func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, checkNil bool, d *Decoder) func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange bool, d *Decoder) (_ map[int]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19333,17 +32517,22 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]int16, containerLen) - } else { - v = make(map[int]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int]int16, xlen) changed = true } + + var mk int + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -19351,19 +32540,26 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]int32) v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19384,7 +32580,8 @@ func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, checkNil bool, d *Decoder) func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange bool, d *Decoder) (_ map[int]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19394,17 +32591,22 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]int32, containerLen) - } else { - v = make(map[int]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]int32, xlen) changed = true } + + var mk int + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -19412,19 +32614,26 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]int64) v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19445,7 +32654,8 @@ func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, checkNil bool, d *Decoder) func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange bool, d *Decoder) (_ map[int]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19455,17 +32665,22 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]int64, containerLen) - } else { - v = make(map[int]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]int64, xlen) changed = true } + + var mk int + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -19473,19 +32688,26 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]float32) v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19506,7 +32728,8 @@ func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, checkNil bool, d *Deco func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange bool, d *Decoder) (_ map[int]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19516,17 +32739,22 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]float32, containerLen) - } else { - v = make(map[int]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]float32, xlen) changed = true } + + var mk int + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -19534,19 +32762,26 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]float64) v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19567,7 +32802,8 @@ func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, checkNil bool, d *Deco func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange bool, d *Decoder) (_ map[int]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19577,17 +32813,22 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]float64, containerLen) - } else { - v = make(map[int]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]float64, xlen) changed = true } + + var mk int + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -19595,19 +32836,26 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int]bool) v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d) @@ -19628,7 +32876,8 @@ func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, checkNil bool, d *Decoder) { func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, d *Decoder) (_ map[int]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19638,17 +32887,22 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int]bool, containerLen) - } else { - v = make(map[int]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]bool, xlen) changed = true } + + var mk int + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -19656,19 +32910,26 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int(dd.DecodeInt(intBitsize)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]interface{}) v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d) @@ -19689,7 +32950,8 @@ func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, checkNil bool, d *D func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canChange bool, d *Decoder) (_ map[int8]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19699,39 +32961,59 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canCha containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]interface{}, containerLen) - } else { - v = make(map[int8]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[int8]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int8 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]string) v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d) @@ -19752,7 +33034,8 @@ func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, checkNil bool, d *Deco func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange bool, d *Decoder) (_ map[int8]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19762,17 +33045,22 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]string, containerLen) - } else { - v = make(map[int8]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[int8]string, xlen) changed = true } + + var mk int8 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -19780,19 +33068,26 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]uint) v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d) @@ -19813,7 +33108,8 @@ func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, checkNil bool, d *Decoder) func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange bool, d *Decoder) (_ map[int8]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19823,17 +33119,22 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]uint, containerLen) - } else { - v = make(map[int8]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uint, xlen) changed = true } + + var mk int8 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -19841,19 +33142,26 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]uint8) v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19874,7 +33182,8 @@ func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, checkNil bool, d *Decode func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange bool, d *Decoder) (_ map[int8]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19884,17 +33193,22 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]uint8, containerLen) - } else { - v = make(map[int8]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]uint8, xlen) changed = true } + + var mk int8 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -19902,19 +33216,26 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]uint16) v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19935,7 +33256,8 @@ func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, checkNil bool, d *Deco func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange bool, d *Decoder) (_ map[int8]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -19945,17 +33267,22 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]uint16, containerLen) - } else { - v = make(map[int8]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int8]uint16, xlen) changed = true } + + var mk int8 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -19963,19 +33290,26 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]uint32) v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -19996,7 +33330,8 @@ func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, checkNil bool, d *Deco func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange bool, d *Decoder) (_ map[int8]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20006,17 +33341,22 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]uint32, containerLen) - } else { - v = make(map[int8]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]uint32, xlen) changed = true } + + var mk int8 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -20024,19 +33364,26 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]uint64) v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20057,7 +33404,8 @@ func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, checkNil bool, d *Deco func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange bool, d *Decoder) (_ map[int8]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20067,17 +33415,22 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]uint64, containerLen) - } else { - v = make(map[int8]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uint64, xlen) changed = true } + + var mk int8 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -20085,19 +33438,100 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uintptr) + v, changed := fastpathTV.DecMapInt8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uintptr) + fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uintptr, xlen) + changed = true + } + + var mk int8 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]int) v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d) @@ -20118,7 +33552,8 @@ func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, checkNil bool, d *Decoder) { func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, d *Decoder) (_ map[int8]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20128,17 +33563,22 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]int, containerLen) - } else { - v = make(map[int8]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]int, xlen) changed = true } + + var mk int8 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -20146,19 +33586,26 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]int8) v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20179,7 +33626,8 @@ func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, checkNil bool, d *Decoder) func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange bool, d *Decoder) (_ map[int8]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20189,17 +33637,22 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]int8, containerLen) - } else { - v = make(map[int8]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]int8, xlen) changed = true } + + var mk int8 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -20207,19 +33660,26 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]int16) v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20240,7 +33700,8 @@ func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, checkNil bool, d *Decode func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange bool, d *Decoder) (_ map[int8]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20250,17 +33711,22 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]int16, containerLen) - } else { - v = make(map[int8]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int8]int16, xlen) changed = true } + + var mk int8 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -20268,19 +33734,26 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]int32) v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20301,7 +33774,8 @@ func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, checkNil bool, d *Decode func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange bool, d *Decoder) (_ map[int8]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20311,17 +33785,22 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]int32, containerLen) - } else { - v = make(map[int8]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]int32, xlen) changed = true } + + var mk int8 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -20329,19 +33808,26 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]int64) v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20362,7 +33848,8 @@ func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, checkNil bool, d *Decode func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange bool, d *Decoder) (_ map[int8]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20372,17 +33859,22 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]int64, containerLen) - } else { - v = make(map[int8]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]int64, xlen) changed = true } + + var mk int8 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -20390,19 +33882,26 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]float32) v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20423,7 +33922,8 @@ func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, checkNil bool, d *De func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChange bool, d *Decoder) (_ map[int8]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20433,17 +33933,22 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]float32, containerLen) - } else { - v = make(map[int8]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]float32, xlen) changed = true } + + var mk int8 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -20451,19 +33956,26 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]float64) v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20484,7 +33996,8 @@ func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, checkNil bool, d *De func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChange bool, d *Decoder) (_ map[int8]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20494,17 +34007,22 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]float64, containerLen) - } else { - v = make(map[int8]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]float64, xlen) changed = true } + + var mk int8 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -20512,19 +34030,26 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int8]bool) v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d) @@ -20545,7 +34070,8 @@ func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, checkNil bool, d *Decoder) func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange bool, d *Decoder) (_ map[int8]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20555,17 +34081,22 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int8]bool, containerLen) - } else { - v = make(map[int8]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]bool, xlen) changed = true } + + var mk int8 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -20573,19 +34104,26 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int8(dd.DecodeInt(8)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]interface{}) v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d) @@ -20606,7 +34144,8 @@ func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, checkNil bool, d func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canChange bool, d *Decoder) (_ map[int16]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20616,39 +34155,59 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]interface{}, containerLen) - } else { - v = make(map[int16]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[int16]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int16 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]string) v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d) @@ -20669,7 +34228,8 @@ func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, checkNil bool, d *De func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChange bool, d *Decoder) (_ map[int16]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20679,17 +34239,22 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]string, containerLen) - } else { - v = make(map[int16]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[int16]string, xlen) changed = true } + + var mk int16 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -20697,19 +34262,26 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]uint) v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d) @@ -20730,7 +34302,8 @@ func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, checkNil bool, d *Decode func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange bool, d *Decoder) (_ map[int16]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20740,17 +34313,22 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]uint, containerLen) - } else { - v = make(map[int16]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uint, xlen) changed = true } + + var mk int16 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -20758,19 +34336,26 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]uint8) v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20791,7 +34376,8 @@ func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, checkNil bool, d *Deco func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange bool, d *Decoder) (_ map[int16]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20801,17 +34387,22 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]uint8, containerLen) - } else { - v = make(map[int16]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]uint8, xlen) changed = true } + + var mk int16 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -20819,19 +34410,26 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]uint16) v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20852,7 +34450,8 @@ func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, checkNil bool, d *De func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChange bool, d *Decoder) (_ map[int16]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20862,17 +34461,22 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]uint16, containerLen) - } else { - v = make(map[int16]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[int16]uint16, xlen) changed = true } + + var mk int16 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -20880,19 +34484,26 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]uint32) v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20913,7 +34524,8 @@ func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, checkNil bool, d *De func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChange bool, d *Decoder) (_ map[int16]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20923,17 +34535,22 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]uint32, containerLen) - } else { - v = make(map[int16]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]uint32, xlen) changed = true } + + var mk int16 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -20941,19 +34558,26 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]uint64) v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -20974,7 +34598,8 @@ func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, checkNil bool, d *De func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChange bool, d *Decoder) (_ map[int16]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -20984,17 +34609,22 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]uint64, containerLen) - } else { - v = make(map[int16]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uint64, xlen) changed = true } + + var mk int16 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -21002,19 +34632,100 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uintptr) + v, changed := fastpathTV.DecMapInt16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uintptr) + fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uintptr, xlen) + changed = true + } + + var mk int16 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]int) v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d) @@ -21035,7 +34746,8 @@ func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, checkNil bool, d *Decoder) func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange bool, d *Decoder) (_ map[int16]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21045,17 +34757,22 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]int, containerLen) - } else { - v = make(map[int16]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]int, xlen) changed = true } + + var mk int16 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -21063,19 +34780,26 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]int8) v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21096,7 +34820,8 @@ func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, checkNil bool, d *Decode func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange bool, d *Decoder) (_ map[int16]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21106,17 +34831,22 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]int8, containerLen) - } else { - v = make(map[int16]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]int8, xlen) changed = true } + + var mk int16 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -21124,19 +34854,26 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]int16) v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21157,7 +34894,8 @@ func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, checkNil bool, d *Deco func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange bool, d *Decoder) (_ map[int16]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21167,17 +34905,22 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]int16, containerLen) - } else { - v = make(map[int16]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[int16]int16, xlen) changed = true } + + var mk int16 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -21185,19 +34928,26 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]int32) v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21218,7 +34968,8 @@ func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, checkNil bool, d *Deco func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange bool, d *Decoder) (_ map[int16]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21228,17 +34979,22 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]int32, containerLen) - } else { - v = make(map[int16]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]int32, xlen) changed = true } + + var mk int16 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -21246,19 +35002,26 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]int64) v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21279,7 +35042,8 @@ func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, checkNil bool, d *Deco func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange bool, d *Decoder) (_ map[int16]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21289,17 +35053,22 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]int64, containerLen) - } else { - v = make(map[int16]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]int64, xlen) changed = true } + + var mk int16 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -21307,19 +35076,26 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]float32) v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21340,7 +35116,8 @@ func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, checkNil bool, d * func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canChange bool, d *Decoder) (_ map[int16]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21350,17 +35127,22 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]float32, containerLen) - } else { - v = make(map[int16]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]float32, xlen) changed = true } + + var mk int16 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -21368,19 +35150,26 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]float64) v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21401,7 +35190,8 @@ func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, checkNil bool, d * func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canChange bool, d *Decoder) (_ map[int16]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21411,17 +35201,22 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]float64, containerLen) - } else { - v = make(map[int16]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]float64, xlen) changed = true } + + var mk int16 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -21429,19 +35224,26 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int16]bool) v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d) @@ -21462,7 +35264,8 @@ func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, checkNil bool, d *Decode func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange bool, d *Decoder) (_ map[int16]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21472,17 +35275,22 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int16]bool, containerLen) - } else { - v = make(map[int16]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]bool, xlen) changed = true } + + var mk int16 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -21490,19 +35298,26 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int16(dd.DecodeInt(16)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]interface{}) v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d) @@ -21523,7 +35338,8 @@ func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, checkNil bool, d func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canChange bool, d *Decoder) (_ map[int32]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21533,39 +35349,59 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]interface{}, containerLen) - } else { - v = make(map[int32]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[int32]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int32 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]string) v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d) @@ -21586,7 +35422,8 @@ func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, checkNil bool, d *De func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChange bool, d *Decoder) (_ map[int32]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21596,17 +35433,22 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]string, containerLen) - } else { - v = make(map[int32]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[int32]string, xlen) changed = true } + + var mk int32 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -21614,19 +35456,26 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]uint) v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d) @@ -21647,7 +35496,8 @@ func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, checkNil bool, d *Decode func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange bool, d *Decoder) (_ map[int32]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21657,17 +35507,22 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]uint, containerLen) - } else { - v = make(map[int32]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uint, xlen) changed = true } + + var mk int32 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -21675,19 +35530,26 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]uint8) v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21708,7 +35570,8 @@ func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, checkNil bool, d *Deco func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange bool, d *Decoder) (_ map[int32]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21718,17 +35581,22 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]uint8, containerLen) - } else { - v = make(map[int32]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]uint8, xlen) changed = true } + + var mk int32 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -21736,19 +35604,26 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]uint16) v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -21766,10 +35641,85 @@ func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, checkNil bool, d *De *vp = v } } -func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool, - d *Decoder) (_ map[int32]uint16, changed bool) { +func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int32]uint16, xlen) + changed = true + } + + var mk int32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint32) + v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint32) + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21779,58 +35729,71 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]uint16, containerLen) - } else { - v = make(map[int32]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]uint32, xlen) changed = true } + + var mk int32 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] - mv = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[int32]uint32) - v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[int32]uint64) + v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[int32]uint32) - fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[int32]uint64) + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d) +func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool, - d *Decoder) (_ map[int32]uint32, changed bool) { +func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21840,58 +35803,71 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]uint32, containerLen) - } else { - v = make(map[int32]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uint64, xlen) changed = true } + + var mk int32 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] - mv = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32UintptrR(rv reflect.Value) { if rv.CanAddr() { - vp := rv.Addr().Interface().(*map[int32]uint64) - v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + vp := rv.Addr().Interface().(*map[int32]uintptr) + v, changed := fastpathTV.DecMapInt32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) if changed { *vp = v } } else { - v := rv.Interface().(map[int32]uint64) - fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d) + v := rv.Interface().(map[int32]uintptr) + fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, f.d) } } -func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) { - v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d) +func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32UintptrV(*vp, checkNil, true, d) if changed { *vp = v } } -func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool, - d *Decoder) (_ map[int32]uint64, changed bool) { +func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uintptr, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21901,37 +35877,49 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]uint64, containerLen) - } else { - v = make(map[int32]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uintptr, xlen) changed = true } + + var mk int32 + var mv uintptr if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] - mv = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]int) v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d) @@ -21952,7 +35940,8 @@ func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, checkNil bool, d *Decoder) func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange bool, d *Decoder) (_ map[int32]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -21962,17 +35951,22 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]int, containerLen) - } else { - v = make(map[int32]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]int, xlen) changed = true } + + var mk int32 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -21980,19 +35974,26 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]int8) v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22013,7 +36014,8 @@ func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, checkNil bool, d *Decode func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange bool, d *Decoder) (_ map[int32]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22023,17 +36025,22 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]int8, containerLen) - } else { - v = make(map[int32]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]int8, xlen) changed = true } + + var mk int32 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -22041,19 +36048,26 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]int16) v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22074,7 +36088,8 @@ func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, checkNil bool, d *Deco func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange bool, d *Decoder) (_ map[int32]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22084,17 +36099,22 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]int16, containerLen) - } else { - v = make(map[int32]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int32]int16, xlen) changed = true } + + var mk int32 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -22102,19 +36122,26 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]int32) v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22135,7 +36162,8 @@ func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, checkNil bool, d *Deco func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange bool, d *Decoder) (_ map[int32]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22145,17 +36173,22 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]int32, containerLen) - } else { - v = make(map[int32]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]int32, xlen) changed = true } + + var mk int32 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -22163,19 +36196,26 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]int64) v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22196,7 +36236,8 @@ func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, checkNil bool, d *Deco func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange bool, d *Decoder) (_ map[int32]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22206,17 +36247,22 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]int64, containerLen) - } else { - v = make(map[int32]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]int64, xlen) changed = true } + + var mk int32 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -22224,19 +36270,26 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]float32) v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22257,7 +36310,8 @@ func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, checkNil bool, d * func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canChange bool, d *Decoder) (_ map[int32]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22267,17 +36321,22 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]float32, containerLen) - } else { - v = make(map[int32]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]float32, xlen) changed = true } + + var mk int32 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -22285,19 +36344,26 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]float64) v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22318,7 +36384,8 @@ func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, checkNil bool, d * func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canChange bool, d *Decoder) (_ map[int32]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22328,17 +36395,22 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]float64, containerLen) - } else { - v = make(map[int32]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]float64, xlen) changed = true } + + var mk int32 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -22346,19 +36418,26 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int32]bool) v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d) @@ -22379,7 +36458,8 @@ func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, checkNil bool, d *Decode func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange bool, d *Decoder) (_ map[int32]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22389,17 +36469,22 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int32]bool, containerLen) - } else { - v = make(map[int32]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]bool, xlen) changed = true } + + var mk int32 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -22407,19 +36492,26 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := int32(dd.DecodeInt(32)) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]interface{}) v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d) @@ -22440,7 +36532,8 @@ func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, checkNil bool, d func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canChange bool, d *Decoder) (_ map[int64]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22450,39 +36543,59 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canC containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]interface{}, containerLen) - } else { - v = make(map[int64]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int64]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int64 + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]string) v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d) @@ -22503,7 +36616,8 @@ func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, checkNil bool, d *De func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChange bool, d *Decoder) (_ map[int64]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22513,17 +36627,22 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]string, containerLen) - } else { - v = make(map[int64]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int64]string, xlen) changed = true } + + var mk int64 + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -22531,19 +36650,26 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]uint) v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d) @@ -22564,7 +36690,8 @@ func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, checkNil bool, d *Decode func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange bool, d *Decoder) (_ map[int64]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22574,17 +36701,22 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]uint, containerLen) - } else { - v = make(map[int64]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uint, xlen) changed = true } + + var mk int64 + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -22592,19 +36724,26 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]uint8) v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22625,7 +36764,8 @@ func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, checkNil bool, d *Deco func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange bool, d *Decoder) (_ map[int64]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22635,17 +36775,22 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]uint8, containerLen) - } else { - v = make(map[int64]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]uint8, xlen) changed = true } + + var mk int64 + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -22653,19 +36798,26 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]uint16) v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22686,7 +36838,8 @@ func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, checkNil bool, d *De func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChange bool, d *Decoder) (_ map[int64]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22696,17 +36849,22 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]uint16, containerLen) - } else { - v = make(map[int64]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int64]uint16, xlen) changed = true } + + var mk int64 + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -22714,19 +36872,26 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]uint32) v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22747,7 +36912,8 @@ func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, checkNil bool, d *De func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChange bool, d *Decoder) (_ map[int64]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22757,17 +36923,22 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]uint32, containerLen) - } else { - v = make(map[int64]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]uint32, xlen) changed = true } + + var mk int64 + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -22775,19 +36946,26 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]uint64) v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22808,7 +36986,8 @@ func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, checkNil bool, d *De func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChange bool, d *Decoder) (_ map[int64]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22818,17 +36997,22 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]uint64, containerLen) - } else { - v = make(map[int64]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uint64, xlen) changed = true } + + var mk int64 + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -22836,19 +37020,100 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uintptr) + v, changed := fastpathTV.DecMapInt64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uintptr) + fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uintptr, xlen) + changed = true + } + + var mk int64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]int) v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d) @@ -22869,7 +37134,8 @@ func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, checkNil bool, d *Decoder) func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange bool, d *Decoder) (_ map[int64]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22878,18 +37144,23 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange boo } containerLen := dd.ReadMapStart() - if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]int, containerLen) - } else { - v = make(map[int64]int) // supports indefinite-length, etc - } + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]int, xlen) changed = true } + + var mk int64 + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -22897,19 +37168,26 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]int8) v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22930,7 +37208,8 @@ func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, checkNil bool, d *Decode func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange bool, d *Decoder) (_ map[int64]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -22940,17 +37219,22 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]int8, containerLen) - } else { - v = make(map[int64]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]int8, xlen) changed = true } + + var mk int64 + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -22958,19 +37242,26 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]int16) v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -22991,7 +37282,8 @@ func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, checkNil bool, d *Deco func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange bool, d *Decoder) (_ map[int64]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23001,17 +37293,22 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]int16, containerLen) - } else { - v = make(map[int64]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int64]int16, xlen) changed = true } + + var mk int64 + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -23019,19 +37316,26 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]int32) v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23052,7 +37356,8 @@ func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, checkNil bool, d *Deco func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange bool, d *Decoder) (_ map[int64]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23062,17 +37367,22 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]int32, containerLen) - } else { - v = make(map[int64]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]int32, xlen) changed = true } + + var mk int64 + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -23080,19 +37390,26 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]int64) v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23113,7 +37430,8 @@ func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, checkNil bool, d *Deco func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange bool, d *Decoder) (_ map[int64]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23123,17 +37441,22 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]int64, containerLen) - } else { - v = make(map[int64]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]int64, xlen) changed = true } + + var mk int64 + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -23141,19 +37464,26 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]float32) v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23174,7 +37504,8 @@ func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, checkNil bool, d * func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canChange bool, d *Decoder) (_ map[int64]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23184,17 +37515,22 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]float32, containerLen) - } else { - v = make(map[int64]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]float32, xlen) changed = true } + + var mk int64 + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -23202,19 +37538,26 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]float64) v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23235,7 +37578,8 @@ func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, checkNil bool, d * func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canChange bool, d *Decoder) (_ map[int64]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23245,17 +37589,22 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canCh containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]float64, containerLen) - } else { - v = make(map[int64]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]float64, xlen) changed = true } + + var mk int64 + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -23263,19 +37612,26 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canCh } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[int64]bool) v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d) @@ -23296,7 +37652,8 @@ func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, checkNil bool, d *Decode func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange bool, d *Decoder) (_ map[int64]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23306,17 +37663,22 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[int64]bool, containerLen) - } else { - v = make(map[int64]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]bool, xlen) changed = true } + + var mk int64 + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -23324,19 +37686,26 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeInt(64) - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]interface{}) v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d) @@ -23357,7 +37726,8 @@ func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, checkNil bool, d *D func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canChange bool, d *Decoder) (_ map[bool]interface{}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23367,39 +37737,59 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canCha containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]interface{}, containerLen) - } else { - v = make(map[bool]interface{}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[bool]interface{}, xlen) changed = true } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk bool + var mv interface{} if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } d.decode(&mv) - if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]string) v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d) @@ -23420,7 +37810,8 @@ func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, checkNil bool, d *Deco func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange bool, d *Decoder) (_ map[bool]string, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23430,17 +37821,22 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]string, containerLen) - } else { - v = make(map[bool]string) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[bool]string, xlen) changed = true } + + var mk bool + var mv string if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv @@ -23448,19 +37844,26 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeString() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]uint) v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d) @@ -23481,7 +37884,8 @@ func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, checkNil bool, d *Decoder) func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange bool, d *Decoder) (_ map[bool]uint, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23491,17 +37895,22 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]uint, containerLen) - } else { - v = make(map[bool]uint) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uint, xlen) changed = true } + + var mk bool + var mv uint if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv @@ -23509,19 +37918,26 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint(dd.DecodeUint(uintBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]uint8) v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23542,7 +37958,8 @@ func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, checkNil bool, d *Decode func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange bool, d *Decoder) (_ map[bool]uint8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23552,17 +37969,22 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]uint8, containerLen) - } else { - v = make(map[bool]uint8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]uint8, xlen) changed = true } + + var mk bool + var mv uint8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv @@ -23570,19 +37992,26 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint8(dd.DecodeUint(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]uint16) v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23603,7 +38032,8 @@ func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, checkNil bool, d *Deco func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange bool, d *Decoder) (_ map[bool]uint16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23613,17 +38043,22 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]uint16, containerLen) - } else { - v = make(map[bool]uint16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[bool]uint16, xlen) changed = true } + + var mk bool + var mv uint16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv @@ -23631,19 +38066,26 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint16(dd.DecodeUint(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]uint32) v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23664,7 +38106,8 @@ func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, checkNil bool, d *Deco func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange bool, d *Decoder) (_ map[bool]uint32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23674,17 +38117,22 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]uint32, containerLen) - } else { - v = make(map[bool]uint32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]uint32, xlen) changed = true } + + var mk bool + var mv uint32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv @@ -23692,19 +38140,26 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = uint32(dd.DecodeUint(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]uint64) v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23725,7 +38180,8 @@ func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, checkNil bool, d *Deco func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange bool, d *Decoder) (_ map[bool]uint64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23735,17 +38191,22 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]uint64, containerLen) - } else { - v = make(map[bool]uint64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uint64, xlen) changed = true } + + var mk bool + var mv uint64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv @@ -23753,19 +38214,100 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeUint(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uintptr) + v, changed := fastpathTV.DecMapBoolUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uintptr) + fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uintptr, xlen) + changed = true + } + + var mk bool + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]int) v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d) @@ -23786,7 +38328,8 @@ func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, checkNil bool, d *Decoder) { func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, d *Decoder) (_ map[bool]int, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23796,17 +38339,22 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]int, containerLen) - } else { - v = make(map[bool]int) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]int, xlen) changed = true } + + var mk bool + var mv int if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv @@ -23814,19 +38362,26 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int(dd.DecodeInt(intBitsize)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]int8) v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23847,7 +38402,8 @@ func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, checkNil bool, d *Decoder) func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange bool, d *Decoder) (_ map[bool]int8, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23857,17 +38413,22 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]int8, containerLen) - } else { - v = make(map[bool]int8) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]int8, xlen) changed = true } + + var mk bool + var mv int8 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv @@ -23875,19 +38436,26 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int8(dd.DecodeInt(8)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]int16) v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23908,7 +38476,8 @@ func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, checkNil bool, d *Decode func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange bool, d *Decoder) (_ map[bool]int16, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23918,17 +38487,22 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]int16, containerLen) - } else { - v = make(map[bool]int16) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[bool]int16, xlen) changed = true } + + var mk bool + var mv int16 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv @@ -23936,19 +38510,26 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int16(dd.DecodeInt(16)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]int32) v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -23969,7 +38550,8 @@ func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, checkNil bool, d *Decode func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange bool, d *Decoder) (_ map[bool]int32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -23979,17 +38561,22 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]int32, containerLen) - } else { - v = make(map[bool]int32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]int32, xlen) changed = true } + + var mk bool + var mv int32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv @@ -23997,19 +38584,26 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = int32(dd.DecodeInt(32)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]int64) v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -24030,7 +38624,8 @@ func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, checkNil bool, d *Decode func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange bool, d *Decoder) (_ map[bool]int64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -24040,17 +38635,22 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange b containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]int64, containerLen) - } else { - v = make(map[bool]int64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]int64, xlen) changed = true } + + var mk bool + var mv int64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv @@ -24058,19 +38658,26 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange b } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeInt(64) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]float32) v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d) @@ -24091,7 +38698,8 @@ func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, checkNil bool, d *De func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChange bool, d *Decoder) (_ map[bool]float32, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -24101,17 +38709,22 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]float32, containerLen) - } else { - v = make(map[bool]float32) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]float32, xlen) changed = true } + + var mk bool + var mv float32 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv @@ -24119,19 +38732,26 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = float32(dd.DecodeFloat(true)) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]float64) v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d) @@ -24152,7 +38772,8 @@ func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, checkNil bool, d *De func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChange bool, d *Decoder) (_ map[bool]float64, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -24162,17 +38783,22 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChan containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]float64, containerLen) - } else { - v = make(map[bool]float64) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]float64, xlen) changed = true } + + var mk bool + var mv float64 if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv @@ -24180,19 +38806,26 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChan } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeFloat(false) if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } -func (f decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) { +func (f *decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[bool]bool) v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d) @@ -24213,7 +38846,8 @@ func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, checkNil bool, d *Decoder) func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange bool, d *Decoder) (_ map[bool]bool, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -24223,17 +38857,22 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange boo containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[bool]bool, containerLen) - } else { - v = make(map[bool]bool) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]bool, xlen) changed = true } + + var mk bool + var mv bool if containerLen > 0 { for j := 0; j < containerLen; j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv @@ -24241,14 +38880,21 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange boo } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - mk := dd.DecodeBool() - mv := v[mk] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } mv = dd.DecodeBool() if v != nil { v[mk] = mv } } - dd.ReadEnd() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) } return v, changed } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl index d45e2b6..58cc6df 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl @@ -1,4 +1,4 @@ -// //+build ignore +// +build !notfastpath // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. // Use of this source code is governed by a MIT license found in the LICENSE file. @@ -48,8 +48,8 @@ var fastpathTV fastpathT type fastpathE struct { rtid uintptr rt reflect.Type - encfn func(encFnInfo, reflect.Value) - decfn func(decFnInfo, reflect.Value) + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) } type fastpathA [{{ .FastpathLen }}]fastpathE @@ -85,7 +85,7 @@ func init() { return } i := 0 - fn := func(v interface{}, fe func(encFnInfo, reflect.Value), fd func(decFnInfo, reflect.Value)) (f fastpathE) { + fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { xrt := reflect.TypeOf(v) xptr := reflect.ValueOf(xrt).Pointer() fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} @@ -93,11 +93,11 @@ func init() { return } - {{range .Values}}{{if not .Primitive}}{{if .Slice }} - fn([]{{ .Elem }}(nil), (encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + fn([]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} - {{range .Values}}{{if not .Primitive}}{{if not .Slice }} - fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + {{range .Values}}{{if not .Primitive}}{{if .MapKey }} + fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} sort.Sort(fastpathAslice(fastpathAV[:])) } @@ -106,92 +106,149 @@ func init() { // -- -- fast path type switch func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { -{{range .Values}}{{if not .Primitive}}{{if .Slice }} +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} case []{{ .Elem }}:{{else}} case map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if .Slice }} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if not .MapKey }} case *[]{{ .Elem }}:{{else}} case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) {{end}}{{end}} default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true } func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { -{{range .Values}}{{if not .Primitive}}{{if .Slice }} +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} case []{{ .Elem }}: fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) case *[]{{ .Elem }}: fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) {{end}}{{end}}{{end}} default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true } func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { -{{range .Values}}{{if not .Primitive}}{{if not .Slice }} +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} case map[{{ .MapKey }}]{{ .Elem }}: fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) case *map[{{ .MapKey }}]{{ .Elem }}: fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) {{end}}{{end}}{{end}} default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true } // -- -- fast path functions -{{range .Values}}{{if not .Primitive}}{{if .Slice }} +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} -func (f encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { +func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { - ee := e.e + ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeArrayStart(len(v)) for _, v2 := range v { + if cr != nil { cr.sendContainerState(containerArrayElem) } {{ encmd .Elem "v2"}} } - ee.EncodeEnd() + if cr != nil { cr.sendContainerState(containerArrayEnd) }{{/* ee.EncodeEnd() */}} } {{end}}{{end}}{{end}} -{{range .Values}}{{if not .Primitive}}{{if not .Slice }} +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} -func (f encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { +func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e) } func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) { ee := e.e + cr := e.cr if checkNil && v == nil { ee.EncodeNil() return } ee.EncodeMapStart(len(v)) - {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0{{end}} - for k2, v2 := range v { - {{if eq .MapKey "string"}}if asSymbols { - ee.EncodeSymbol(k2) - } else { - ee.EncodeString(c_UTF8, k2) - }{{else}}{{ encmd .MapKey "k2"}}{{end}} - {{ encmd .Elem "v2"}} + {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + {{end}}if e.h.Canonical { + {{if eq .MapKey "interface{}"}}{{/* out of band + */}}var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI {{/* put loop variables outside. seems currently needed for better perf */}} + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { cr.sendContainerState(containerMapKey) } + e.asis(v2[j].v) + if cr != nil { cr.sendContainerState(containerMapValue) } + e.encode(v[v2[j].i]) + } {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) + var i int + for k, _ := range v { + v2[i] = {{ $x }}(k) + i++ + } + sort.Sort({{ sorttype .MapKey false}}(v2)) + for _, k2 := range v2 { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} + } {{end}} + } else { + for k2, v2 := range v { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ encmd .MapKey "k2"}}{{end}} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ encmd .Elem "v2"}} + } } - ee.EncodeEnd() + if cr != nil { cr.sendContainerState(containerMapEnd) }{{/* ee.EncodeEnd() */}} } {{end}}{{end}}{{end}} @@ -200,11 +257,14 @@ func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Ele // -- -- fast path type switch func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + if !fastpathEnabled { + return false + } switch v := iv.(type) { -{{range .Values}}{{if not .Primitive}}{{if .Slice }} +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} case []{{ .Elem }}:{{else}} case map[{{ .MapKey }}]{{ .Elem }}:{{end}} - fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if .Slice }} + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if not .MapKey }} case *[]{{ .Elem }}:{{else}} case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, fastpathCheckNilFalse, true, d) @@ -213,22 +273,23 @@ func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { } {{end}}{{end}} default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) return false } return true } // -- -- fast path functions -{{range .Values}}{{if not .Primitive}}{{if .Slice }} +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} {{/* Slices can change if they - did not come from an array - are addressable (from a ptr) - are settable (e.g. contained in an interface{}) */}} -func (f decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { +func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { array := f.seq == seqTypeArray - if !array && rv.CanAddr() { // CanSet => CanAddr + Exported + if !array && rv.CanAddr() { {{/* // CanSet => CanAddr + Exported */}} vp := rv.Addr().Interface().(*[]{{ .Elem }}) v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d) if changed { @@ -246,10 +307,9 @@ func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, checkNil *vp = v } } -func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, - d *Decoder) (_ []{{ .Elem }}, changed bool) { +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, d *Decoder) (_ []{{ .Elem }}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() + {{/* // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() */}} if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -258,54 +318,87 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil b } slh, containerLenS := d.decSliceHelperStart() - if canChange && v == nil { - if containerLenS <= 0 { - v = []{{ .Elem }}{} - } else { - v = make([]{{ .Elem }}, containerLenS, containerLenS) - } - changed = true - } if containerLenS == 0 { - if canChange && len(v) != 0 { - v = v[:0] - changed = true - }{{/* - // slh.End() // dd.ReadArrayEnd() - */}} - return v, changed + if canChange { + if v == nil { + v = []{{ .Elem }}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return } - // for j := 0; j < containerLenS; j++ { if containerLenS > 0 { - decLen := containerLenS + x2read := containerLenS + var xtrunc bool if containerLenS > cap(v) { - if canChange { - s := make([]{{ .Elem }}, containerLenS, containerLenS) + if canChange { {{/* + // fast-path is for "basic" immutable types, so no need to copy them over + // s := make([]{{ .Elem }}, decInferLen(containerLenS, d.h.MaxInitLen)) // copy(s, v[:cap(v)]) - v = s + // v = s */}} + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]{{ .Elem }}, xlen) + } + } else { + v = make([]{{ .Elem }}, xlen) + } changed = true } else { d.arrayCannotExpand(len(v), containerLenS) - decLen = len(v) } + x2read = len(v) } else if containerLenS != len(v) { - v = v[:containerLenS] - changed = true - } - // all checks done. cannot go past len. + if canChange { + v = v[:containerLenS] + changed = true + } + } {{/* // all checks done. cannot go past len. */}} j := 0 - for ; j < decLen; j++ { + for ; j < x2read; j++ { + slh.ElemContainerState(j) {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} } - if !canChange { - for ; j < containerLenS; j++ { + if xtrunc { {{/* // means canChange=true, changed=true already. */}} + for ; j < containerLenS; j++ { + v = append(v, {{ zerocmd .Elem }}) + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) d.swallow() } } } else { - j := 0 - for ; !dd.CheckBreak(); j++ { + breakFound := dd.CheckBreak() {{/* check break first, so we can initialize v with a capacity of 4 if necessary */}} + if breakFound { + if canChange { + if v == nil { + v = []{{ .Elem }}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return + } + if cap(v) == 0 { + v = make([]{{ .Elem }}, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { if j >= len(v) { if canChange { v = append(v, {{ zerocmd .Elem }}) @@ -313,29 +406,35 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil b } else { d.arrayCannotExpand(len(v), j+1) } - } - if j < len(v) { // all checks done. cannot go past len. + } + slh.ElemContainerState(j) + if j < len(v) { {{/* // all checks done. cannot go past len. */}} {{ if eq .Elem "interface{}" }}d.decode(&v[j]) {{ else }}v[j] = {{ decmd .Elem }}{{ end }} } else { d.swallow() } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true } - slh.End() } + slh.End() return v, changed } {{end}}{{end}}{{end}} -{{range .Values}}{{if not .Primitive}}{{if not .Slice }} +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} {{/* Maps can change if they are - addressable (from a ptr) - settable (e.g. contained in an interface{}) */}} -func (f decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { +func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { if rv.CanAddr() { vp := rv.Addr().Interface().(*map[{{ .MapKey }}]{{ .Elem }}) v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, true, f.d) @@ -356,7 +455,8 @@ func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .E func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, canChange bool, d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { dd := d.d - // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() + cr := d.cr + {{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}} if checkNil && dd.TryDecodeAsNil() { if v != nil { changed = true @@ -366,43 +466,45 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele containerLen := dd.ReadMapStart() if canChange && v == nil { - if containerLen > 0 { - v = make(map[{{ .MapKey }}]{{ .Elem }}, containerLen) - } else { - v = make(map[{{ .MapKey }}]{{ .Elem }}) // supports indefinite-length, etc - } + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }}) + v = make(map[{{ .MapKey }}]{{ .Elem }}, xlen) changed = true } + {{ if eq .Elem "interface{}" }}mapGet := !d.h.MapValueReset && !d.h.InterfaceReset{{end}} + var mk {{ .MapKey }} + var mv {{ .Elem }} if containerLen > 0 { for j := 0; j < containerLen; j++ { - {{ if eq .MapKey "interface{}" }}var mk interface{} + if cr != nil { cr.sendContainerState(containerMapKey) } + {{ if eq .MapKey "interface{}" }}mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. - }{{ else }}mk := {{ decmd .MapKey }}{{ end }} - mv := v[mk] - {{ if eq .Elem "interface{}" }}d.decode(&mv) - {{ else }}mv = {{ decmd .Elem }}{{ end }} + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } + d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} if v != nil { v[mk] = mv } } } else if containerLen < 0 { for j := 0; !dd.CheckBreak(); j++ { - {{ if eq .MapKey "interface{}" }}var mk interface{} + if cr != nil { cr.sendContainerState(containerMapKey) } + {{ if eq .MapKey "interface{}" }}mk = nil d.decode(&mk) if bv, bok := mk.([]byte); bok { - mk = string(bv) // maps cannot have []byte as key. switch to string. - }{{ else }}mk := {{ decmd .MapKey }}{{ end }} - mv := v[mk] - {{ if eq .Elem "interface{}" }}d.decode(&mv) - {{ else }}mv = {{ decmd .Elem }}{{ end }} + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } + d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} if v != nil { v[mk] = mv } } - dd.ReadEnd() } + if cr != nil { cr.sendContainerState(containerMapEnd) } return v, changed } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go new file mode 100644 index 0000000..d6f5f0c --- /dev/null +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go @@ -0,0 +1,32 @@ +// +build notfastpath + +package codec + +import "reflect" + +// The generated fast-path code is very large, and adds a few seconds to the build time. +// This causes test execution, execution of small tools which use codec, etc +// to take a long time. +// +// To mitigate, we now support the notfastpath tag. +// This tag disables fastpath during build, allowing for faster build, test execution, +// short-program runs, etc. + +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } + +type fastpathT struct{} +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} +type fastpathA [0]fastpathE + +func (x fastpathA) index(rtid uintptr) int { return -1 } + +var fastpathAV fastpathA +var fastpathTV fastpathT diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl index 4c15e85..2caae5b 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl @@ -1,77 +1,101 @@ -{{var "v"}} := {{ if not isArray}}*{{ end }}{{ .Varname }} -{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() - -var {{var "c"}} bool -_ = {{var "c"}} - -{{ if not isArray }}if {{var "v"}} == nil { - if {{var "l"}} <= 0 { - {{var "v"}} = make({{ .CTyp }}, 0) - } else { - {{var "v"}} = make({{ .CTyp }}, {{var "l"}}) - } - {{var "c"}} = true -} -{{ end }} -if {{var "l"}} == 0 { {{ if isSlice }} - if len({{var "v"}}) != 0 { - {{var "v"}} = {{var "v"}}[:0] - {{var "c"}} = true - } {{ end }} +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}} +var {{var "c"}} bool {{/* // changed */}} +if {{var "l"}} == 0 { + {{if isSlice }}if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{end}} {{if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } {{end}} } else if {{var "l"}} > 0 { - {{ if isChan }} + {{if isChan }}if {{var "v"}} == nil { + {{var "rl"}}, _ = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make({{ .CTyp }}, {{var "rl"}}) + {{var "c"}} = true + } for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + {{var "h"}}.ElemContainerState({{var "r"}}) var {{var "t"}} {{ .Typ }} {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} - {{var "v"}} <- {{var "t"}} - {{ else }} - {{var "n"}} := {{var "l"}} + {{var "v"}} <- {{var "t"}} + } + {{ else }} var {{var "rr"}}, {{var "rl"}} int {{/* // num2read, length of slice/array/chan */}} + var {{var "rt"}} bool {{/* truncated */}} if {{var "l"}} > cap({{var "v"}}) { - {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) - {{var "n"}} = len({{var "v"}}) - {{ else }}{{ if .Immutable }} - {{var "v2"}} := {{var "v"}} - {{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) - if len({{var "v"}}) > 0 { - copy({{var "v"}}, {{var "v2"}}[:cap({{var "v2"}})]) + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{ else }}{{if not .Immutable }} + {{var "rg"}} := len({{var "v"}}) > 0 + {{var "v2"}} := {{var "v"}} {{end}} + {{var "rl"}}, {{var "rt"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rt"}} { + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) } - {{ else }}{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) - {{ end }}{{var "c"}} = true - {{ end }} - } else if {{var "l"}} != len({{var "v"}}) { - {{ if isSlice }}{{var "v"}} = {{var "v"}}[:{{var "l"}}] - {{var "c"}} = true {{ end }} - } + {{var "c"}} = true + {{var "rr"}} = len({{var "v"}}) {{if not .Immutable }} + if {{var "rg"}} { copy({{var "v"}}, {{var "v2"}}) } {{end}} {{end}}{{/* end not Immutable, isArray */}} + } {{if isSlice }} else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } {{end}} {{/* end isSlice:47 */}} {{var "j"}} := 0 - for ; {{var "j"}} < {{var "n"}} ; {{var "j"}}++ { + for ; {{var "j"}} < {{var "rr"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} - } {{ if isArray }} - for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + } + {{if isArray }}for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) z.DecSwallow() - }{{ end }} - {{ end }}{{/* closing if not chan */}} -} else { - for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { - if {{var "j"}} >= len({{var "v"}}) { - {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) - {{ else if isSlice}}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} - {{var "c"}} = true {{ end }} + } + {{ else }}if {{var "rt"}} { + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "v"}} = append({{var "v"}}, {{ zero}}) + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} } - {{ if isChan}} + } {{end}} {{/* end isArray:56 */}} + {{end}} {{/* end isChan:16 */}} +} else { {{/* len < 0 */}} + {{var "j"}} := 0 + for ; !r.CheckBreak(); {{var "j"}}++ { + {{if isChan }} + {{var "h"}}.ElemContainerState({{var "j"}}) var {{var "t"}} {{ .Typ }} {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} {{var "v"}} <- {{var "t"}} {{ else }} + if {{var "j"}} >= len({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else }}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{end}} + } + {{var "h"}}.ElemContainerState({{var "j"}}) if {{var "j"}} < len({{var "v"}}) { {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} } else { z.DecSwallow() } - {{ end }} + {{end}} } - {{var "h"}}.End() + {{if isSlice }}if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + }{{end}} } -{{ if not isArray }}if {{var "c"}} { +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { *{{ .Varname }} = {{var "v"}} -}{{ end }} - +}{{end}} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl index 07e570c..77400e0 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl @@ -1,42 +1,58 @@ {{var "v"}} := *{{ .Varname }} {{var "l"}} := r.ReadMapStart() +{{var "bh"}} := z.DecBasicHandle() if {{var "v"}} == nil { - if {{var "l"}} > 0 { - {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "l"}}) - } else { - {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}) // supports indefinite-length, etc - } + {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) *{{ .Varname }} = {{var "v"}} } +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if {{var "bh"}}.MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } if {{var "l"}} > 0 { for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { - var {{var "mk"}} {{ .KTyp }} + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} -{{ if eq .KTyp "interface{}" }}// special case if a byte array. - if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) - } -{{ end }} - {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true{{end}} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} - if {{var "v"}} != nil { + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } } else if {{var "l"}} < 0 { for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { - var {{var "mk"}} {{ .KTyp }} + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} -{{ if eq .KTyp "interface{}" }}// special case if a byte array. - if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) - } -{{ end }} - {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true {{ end }} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} - if {{var "v"}} != nil { + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } -r.ReadEnd() } // else len==0: TODO: Should we clear map entries? +z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go index 32f4946..22bce77 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go @@ -115,6 +115,15 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) { return false } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncSendContainerState(c containerState) { + if f.e.cr != nil { + f.e.cr.sendContainerState(c) + } +} + +// ---------------- DECODER FOLLOWS ----------------- + // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecBasicHandle() *BasicHandle { return f.d.h @@ -167,11 +176,8 @@ func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { // bs := f.dd.DecodeBytes(f.d.b[:], true, true) - f.d.r.track() - f.d.swallow() - bs := f.d.r.stopTrack() - // fmt.Printf(">>>>>> CODECGEN JSON: %s\n", bs) - fnerr := tm.UnmarshalJSON(bs) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) if fnerr != nil { panic(fnerr) } @@ -213,3 +219,15 @@ func (f genHelperDecoder) DecExt(v interface{}) (r bool) { } return false } + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + return decInferLen(clen, maxlen, unit) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSendContainerState(c containerState) { + if f.d.cr != nil { + f.d.cr.sendContainerState(c) + } +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl index 0960b56..3195857 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl @@ -106,6 +106,14 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) { } return false } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncSendContainerState(c containerState) { + if f.e.cr != nil { + f.e.cr.sendContainerState(c) + } +} + +// ---------------- DECODER FOLLOWS ----------------- // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecBasicHandle() *BasicHandle { @@ -150,11 +158,8 @@ func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { // FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { // bs := f.dd.DecodeBytes(f.d.b[:], true, true) - f.d.r.track() - f.d.swallow() - bs := f.d.r.stopTrack() - // fmt.Printf(">>>>>> CODECGEN JSON: %s\n", bs) - fnerr := tm.UnmarshalJSON(bs) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) if fnerr != nil { panic(fnerr) } @@ -191,6 +196,16 @@ func (f genHelperDecoder) DecExt(v interface{}) (r bool) { } return false } +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + return decInferLen(clen, maxlen, unit) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSendContainerState(c containerState) { + if f.d.cr != nil { + f.d.cr.sendContainerState(c) + } +} {{/* diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go index adc1645..f3c1b70 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go @@ -8,125 +8,164 @@ package codec const genDecMapTmpl = ` {{var "v"}} := *{{ .Varname }} {{var "l"}} := r.ReadMapStart() +{{var "bh"}} := z.DecBasicHandle() if {{var "v"}} == nil { - if {{var "l"}} > 0 { - {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "l"}}) - } else { - {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}) // supports indefinite-length, etc - } + {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) *{{ .Varname }} = {{var "v"}} } +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if {{var "bh"}}.MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } if {{var "l"}} > 0 { for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { - var {{var "mk"}} {{ .KTyp }} + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} -{{ if eq .KTyp "interface{}" }}// special case if a byte array. - if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) - } -{{ end }} - {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true{{end}} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} - if {{var "v"}} != nil { + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } } else if {{var "l"}} < 0 { for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { - var {{var "mk"}} {{ .KTyp }} + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} -{{ if eq .KTyp "interface{}" }}// special case if a byte array. - if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { {{var "mk"}} = string({{var "bv"}}) - } -{{ end }} - {{var "mv"}} := {{var "v"}}[{{var "mk"}}] + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true {{ end }} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} - if {{var "v"}} != nil { + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { {{var "v"}}[{{var "mk"}}] = {{var "mv"}} } } -r.ReadEnd() } // else len==0: TODO: Should we clear map entries? +z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) ` const genDecListTmpl = ` -{{var "v"}} := {{ if not isArray}}*{{ end }}{{ .Varname }} -{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() - -var {{var "c"}} bool -_ = {{var "c"}} - -{{ if not isArray }}if {{var "v"}} == nil { - if {{var "l"}} <= 0 { - {{var "v"}} = make({{ .CTyp }}, 0) - } else { - {{var "v"}} = make({{ .CTyp }}, {{var "l"}}) - } - {{var "c"}} = true -} -{{ end }} -if {{var "l"}} == 0 { {{ if isSlice }} - if len({{var "v"}}) != 0 { - {{var "v"}} = {{var "v"}}[:0] - {{var "c"}} = true - } {{ end }} +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}} +var {{var "c"}} bool {{/* // changed */}} +if {{var "l"}} == 0 { + {{if isSlice }}if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{end}} {{if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } {{end}} } else if {{var "l"}} > 0 { - {{ if isChan }} + {{if isChan }}if {{var "v"}} == nil { + {{var "rl"}}, _ = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make({{ .CTyp }}, {{var "rl"}}) + {{var "c"}} = true + } for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + {{var "h"}}.ElemContainerState({{var "r"}}) var {{var "t"}} {{ .Typ }} {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} - {{var "v"}} <- {{var "t"}} - {{ else }} - {{var "n"}} := {{var "l"}} + {{var "v"}} <- {{var "t"}} + } + {{ else }} var {{var "rr"}}, {{var "rl"}} int {{/* // num2read, length of slice/array/chan */}} + var {{var "rt"}} bool {{/* truncated */}} if {{var "l"}} > cap({{var "v"}}) { - {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) - {{var "n"}} = len({{var "v"}}) - {{ else }}{{ if .Immutable }} - {{var "v2"}} := {{var "v"}} - {{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) - if len({{var "v"}}) > 0 { - copy({{var "v"}}, {{var "v2"}}[:cap({{var "v2"}})]) + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{ else }}{{if not .Immutable }} + {{var "rg"}} := len({{var "v"}}) > 0 + {{var "v2"}} := {{var "v"}} {{end}} + {{var "rl"}}, {{var "rt"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rt"}} { + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) } - {{ else }}{{var "v"}} = make([]{{ .Typ }}, {{var "l"}}, {{var "l"}}) - {{ end }}{{var "c"}} = true - {{ end }} - } else if {{var "l"}} != len({{var "v"}}) { - {{ if isSlice }}{{var "v"}} = {{var "v"}}[:{{var "l"}}] - {{var "c"}} = true {{ end }} - } + {{var "c"}} = true + {{var "rr"}} = len({{var "v"}}) {{if not .Immutable }} + if {{var "rg"}} { copy({{var "v"}}, {{var "v2"}}) } {{end}} {{end}}{{/* end not Immutable, isArray */}} + } {{if isSlice }} else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } {{end}} {{/* end isSlice:47 */}} {{var "j"}} := 0 - for ; {{var "j"}} < {{var "n"}} ; {{var "j"}}++ { + for ; {{var "j"}} < {{var "rr"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} - } {{ if isArray }} - for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + } + {{if isArray }}for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) z.DecSwallow() - }{{ end }} - {{ end }}{{/* closing if not chan */}} -} else { - for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { - if {{var "j"}} >= len({{var "v"}}) { - {{ if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) - {{ else if isSlice}}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} - {{var "c"}} = true {{ end }} + } + {{ else }}if {{var "rt"}} { + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "v"}} = append({{var "v"}}, {{ zero}}) + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} } - {{ if isChan}} + } {{end}} {{/* end isArray:56 */}} + {{end}} {{/* end isChan:16 */}} +} else { {{/* len < 0 */}} + {{var "j"}} := 0 + for ; !r.CheckBreak(); {{var "j"}}++ { + {{if isChan }} + {{var "h"}}.ElemContainerState({{var "j"}}) var {{var "t"}} {{ .Typ }} {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} {{var "v"}} <- {{var "t"}} {{ else }} + if {{var "j"}} >= len({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else }}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{end}} + } + {{var "h"}}.ElemContainerState({{var "j"}}) if {{var "j"}} < len({{var "v"}}) { {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} } else { z.DecSwallow() } - {{ end }} + {{end}} } - {{var "h"}}.End() + {{if isSlice }}if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + }{{end}} } -{{ if not isArray }}if {{var "c"}} { +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { *{{ .Varname }} = {{var "v"}} -}{{ end }} - +}{{end}} ` - diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go index 64acfa3..754672b 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go @@ -12,8 +12,10 @@ import ( "io" "io/ioutil" "math/rand" + "os" "reflect" "regexp" + "sort" "strconv" "strings" "sync" @@ -89,7 +91,8 @@ import ( // v3: Changes for Kubernetes: // changes in signature of some unpublished helper methods and codecgen cmdline arguments. // v4: Removed separator support from (en|de)cDriver, and refactored codec(gen) -const GenVersion = 4 +// v5: changes to support faster json decoding. Let encoder/decoder maintain state of collections. +const GenVersion = 5 const ( genCodecPkg = "codec1978" @@ -108,6 +111,14 @@ const ( genUseOneFunctionForDecStructMap = true ) +type genStructMapStyle uint8 + +const ( + genStructMapStyleConsolidated genStructMapStyle = iota + genStructMapStyleLenPrefix + genStructMapStyleCheckBreak +) + var ( genAllTypesSamePkgErr = errors.New("All types must be in the same package") genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice") @@ -142,6 +153,7 @@ type genRunner struct { xs string // top level variable/constant suffix hn string // fn helper type name + ti *TypeInfos // rr *rand.Rand // random generator for file-specific types } @@ -149,7 +161,7 @@ type genRunner struct { // type passed. All the types must be in the same package. // // Library users: *DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.* -func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...reflect.Type) { +func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeInfos, typ ...reflect.Type) { if len(typ) == 0 { return } @@ -164,8 +176,12 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...ref is: make(map[reflect.Type]struct{}), tm: make(map[reflect.Type]struct{}), ts: []reflect.Type{}, - bp: typ[0].PkgPath(), + bp: genImportPath(typ[0]), xs: uid, + ti: ti, + } + if x.ti == nil { + x.ti = defTypeInfos } if x.xs == "" { rr := rand.New(rand.NewSource(time.Now().UnixNano())) @@ -173,11 +189,11 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...ref } // gather imports first: - x.cp = reflect.TypeOf(x).PkgPath() + x.cp = genImportPath(reflect.TypeOf(x)) x.imn[x.cp] = genCodecPkg for _, t := range typ { - // fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", t.PkgPath(), t.Name()) - if t.PkgPath() != x.bp { + // fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) + if genImportPath(t) != x.bp { panic(genAllTypesSamePkgErr) } x.genRefPkgs(t) @@ -201,7 +217,13 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...ref x.cpfx = genCodecPkg + "." x.linef("%s \"%s\"", genCodecPkg, x.cp) } - for k, _ := range x.im { + // use a sorted set of im keys, so that we can get consistent output + imKeys := make([]string, 0, len(x.im)) + for k := range x.im { + imKeys = append(imKeys, k) + } + sort.Strings(imKeys) + for _, k := range imKeys { // for k, _ := range x.im { x.linef("%s \"%s\"", x.imn[k], k) } // add required packages @@ -217,10 +239,18 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...ref x.line("") x.line("const (") + x.linef("// ----- content types ----") x.linef("codecSelferC_UTF8%s = %v", x.xs, int64(c_UTF8)) x.linef("codecSelferC_RAW%s = %v", x.xs, int64(c_RAW)) - x.linef("codecSelverValueTypeArray%s = %v", x.xs, int64(valueTypeArray)) - x.linef("codecSelverValueTypeMap%s = %v", x.xs, int64(valueTypeMap)) + x.linef("// ----- value types used ----") + x.linef("codecSelferValueTypeArray%s = %v", x.xs, int64(valueTypeArray)) + x.linef("codecSelferValueTypeMap%s = %v", x.xs, int64(valueTypeMap)) + x.linef("// ----- containerStateValues ----") + x.linef("codecSelfer_containerMapKey%s = %v", x.xs, int64(containerMapKey)) + x.linef("codecSelfer_containerMapValue%s = %v", x.xs, int64(containerMapValue)) + x.linef("codecSelfer_containerMapEnd%s = %v", x.xs, int64(containerMapEnd)) + x.linef("codecSelfer_containerArrayElem%s = %v", x.xs, int64(containerArrayElem)) + x.linef("codecSelfer_containerArrayEnd%s = %v", x.xs, int64(containerArrayEnd)) x.line(")") x.line("var (") x.line("codecSelferBitsize" + x.xs + " = uint8(reflect.TypeOf(uint(0)).Bits())") @@ -242,12 +272,12 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, typ ...ref x.line(`err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) x.linef(`%v, %sGenVersion, file)`, GenVersion, x.cpfx) x.line("panic(err)") - // x.linef(`panic(fmt.Errorf("Re-run codecgen due to version mismatch: `+ - // `current: %%v, need %%v, file: %%v", %v, %sGenVersion, file))`, GenVersion, x.cpfx) x.linef("}") x.line("if false { // reference the types, but skip this branch at build/run time") var n int - for k, t := range x.im { + // for k, t := range x.im { + for _, k := range imKeys { + t := x.im[k] x.linef("var v%v %s.%s", n, x.imn[k], t.Name()) n++ } @@ -337,9 +367,9 @@ func (x *genRunner) genRefPkgs(t reflect.Type) { if _, ok := x.is[t]; ok { return } - // fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", t.PkgPath(), t.Name()) + // fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) x.is[t] = struct{}{} - tpkg, tname := t.PkgPath(), t.Name() + tpkg, tname := genImportPath(t), t.Name() if tpkg != "" && tpkg != x.bp && tpkg != x.cp && tname != "" && tname[0] >= 'A' && tname[0] <= 'Z' { if _, ok := x.im[tpkg]; !ok { x.im[tpkg] = t @@ -429,10 +459,10 @@ func (x *genRunner) genTypeName(t reflect.Type) (n string) { func (x *genRunner) genTypeNamePrim(t reflect.Type) (n string) { if t.Name() == "" { return t.String() - } else if t.PkgPath() == "" || t.PkgPath() == x.tc.PkgPath() { + } else if genImportPath(t) == "" || genImportPath(t) == genImportPath(x.tc) { return t.Name() } else { - return x.imn[t.PkgPath()] + "." + t.Name() + return x.imn[genImportPath(t)] + "." + t.Name() // return t.String() // best way to get the package name inclusive } } @@ -500,21 +530,21 @@ func (x *genRunner) selfer(encode bool) { x.out(fnSigPfx) x.line(") codecDecodeSelfFromMap(l int, d *" + x.cpfx + "Decoder) {") x.genRequiredMethodVars(false) - x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, 0) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleConsolidated) x.line("}") x.line("") } else { x.out(fnSigPfx) x.line(") codecDecodeSelfFromMapLenPrefix(l int, d *" + x.cpfx + "Decoder) {") x.genRequiredMethodVars(false) - x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, 1) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleLenPrefix) x.line("}") x.line("") x.out(fnSigPfx) x.line(") codecDecodeSelfFromMapCheckBreak(l int, d *" + x.cpfx + "Decoder) {") x.genRequiredMethodVars(false) - x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, 2) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleCheckBreak) x.line("}") x.line("") } @@ -533,10 +563,8 @@ func (x *genRunner) selfer(encode bool) { func (x *genRunner) xtraSM(varname string, encode bool, t reflect.Type) { if encode { x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), varname) - // x.line("h.enc" + x.genMethodNameT(t) + "(" + x.genTypeName(t) + "(" + varname + "), e)") } else { x.linef("h.dec%s((*%s)(%s), d)", x.genMethodNameT(t), x.genTypeName(t), varname) - // x.line("h.dec" + x.genMethodNameT(t) + "((*" + x.genTypeName(t) + ")(" + varname + "), d)") } if _, ok := x.tm[t]; !ok { x.tm[t] = struct{}{} @@ -644,7 +672,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { x.linef("r.EncodeBuiltin(%s, %s)", vrtid, varname) } // only check for extensions if the type is named, and has a packagePath. - if t.PkgPath() != "" && t.Name() != "" { + if genImportPath(t) != "" && t.Name() != "" { // first check if extensions are configued, before doing the interface conversion x.linef("} else if z.HasExtensions() && z.EncExt(%s) {", varname) } @@ -687,7 +715,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { if rtid == uint8SliceTypId { x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))") } else if fastpathAV.index(rtid) != -1 { - g := genV{Slice: true, Elem: x.genTypeName(t.Elem())} + g := x.newGenV(t) x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") } else { x.xtraSM(varname, true, t) @@ -701,9 +729,7 @@ func (x *genRunner) enc(varname string, t reflect.Type) { // - else call Encoder.encode(XXX) on it. // x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ") if fastpathAV.index(rtid) != -1 { - g := genV{Slice: false, - Elem: x.genTypeName(t.Elem()), - MapKey: x.genTypeName(t.Key())} + g := x.newGenV(t) x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") } else { x.xtraSM(varname, true, t) @@ -748,7 +774,7 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { // replicate code in kStruct i.e. for each field, deref type to non-pointer, and call x.enc on it // if t === type currently running selfer on, do for all - ti := getTypeInfo(rtid, t) + ti := x.ti.get(rtid, t) i := x.varsfx() sepVarname := genTempVarPfx + "sep" + i numfieldsvar := genTempVarPfx + "q" + i @@ -802,12 +828,14 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { } x.linef("%s[%v] = %s", numfieldsvar, j, omitline) } + x.linef("var %snn%s int", genTempVarPfx, i) x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { x.line("r.EncodeArrayStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") x.linef("} else {") // if not ti.toArray - x.linef("var %snn%s int = %v", genTempVarPfx, i, nn) + x.linef("%snn%s = %v", genTempVarPfx, i, nn) x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) + x.linef("%snn%s = %v", genTempVarPfx, i, 0) // x.line("r.EncodeMapStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") x.line("}") // close if not StructToArray @@ -851,11 +879,9 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { if labelUsed { x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") } + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) if si.omitEmpty { x.linef("if %s[%v] {", numfieldsvar, j) - // omitEmptyVarNameX := genTempVarPfx + "ov" + i - // x.line("var " + omitEmptyVarNameX + " " + x.genTypeName(t2.Type)) - // x.encVar(omitEmptyVarNameX, t2.Type) } x.encVar(varname+"."+t2.Name, t2.Type) if si.omitEmpty { @@ -866,21 +892,15 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { if labelUsed { x.line("}") } + x.linef("} else {") // if not ti.toArray - // omitEmptyVar := genTempVarPfx + "x" + i + t2.Name - // x.line("const " + omitEmptyVar + " bool = " + strconv.FormatBool(si.omitEmpty)) - // doOmitEmpty := si.omitEmpty && t2.Type.Kind() != reflect.Struct + if si.omitEmpty { x.linef("if %s[%v] {", numfieldsvar, j) - // x.linef(`println("Encoding field: %v")`, j) - // x.out("if ") - // if labelUsed { - // x.out("!" + isNilVarName + " && ") - // } - // x.line(varname + "." + t2.Name + " != " + genZeroValueR(t2.Type, x.tc) + " {") } - // x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + t2.Name + "\"))") + x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))") + x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) if labelUsed { x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") x.encVar(varname+"."+t2.Name, t2.Type) @@ -893,9 +913,12 @@ func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { } x.linef("} ") // end if/else ti.toArray } - x.line("if " + sepVarname + " {") - x.line("r.EncodeEnd()") + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { + x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("} else {") + x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) x.line("}") + } func (x *genRunner) encListFallback(varname string, t reflect.Type) { @@ -904,25 +927,30 @@ func (x *genRunner) encListFallback(varname string, t reflect.Type) { x.line("r.EncodeArrayStart(len(" + varname + "))") if t.Kind() == reflect.Chan { x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i) + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) x.linef("%sv%s := <-%s", g, i, varname) } else { // x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) } x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.line("r.EncodeEnd()") + x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) } func (x *genRunner) encMapFallback(varname string, t reflect.Type) { + // TODO: expand this to handle canonical. i := x.varsfx() x.line("r.EncodeMapStart(len(" + varname + "))") x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) // x.line("for " + genTempVarPfx + "k" + i + ", " + genTempVarPfx + "v" + i + " := range " + varname + " {") + x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) x.encVar(genTempVarPfx+"k"+i, t.Key()) + x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) x.encVar(genTempVarPfx+"v"+i, t.Elem()) x.line("}") - x.line("r.EncodeEnd()") + x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) } func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { @@ -940,8 +968,6 @@ func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { x.line("if r.TryDecodeAsNil() {") if t.Kind() == reflect.Ptr { x.line("if " + varname + " != nil { ") - // x.line("var " + genTempVarPfx + i + " " + x.genTypeName(t.Elem())) - // x.line("*" + varname + " = " + genTempVarPfx + i) // if varname is a field of a struct (has a dot in it), // then just set it to nil @@ -950,12 +976,8 @@ func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { } else { x.line("*" + varname + " = " + x.genZeroValueR(t.Elem())) } - // x.line("*" + varname + " = nil") x.line("}") - } else { - // x.line("var " + genTempVarPfx + i + " " + x.genTypeName(t)) - // x.line(varname + " = " + genTempVarPfx + i) x.line(varname + " = " + x.genZeroValueR(t)) } x.line("} else {") @@ -1056,7 +1078,7 @@ func (x *genRunner) dec(varname string, t reflect.Type) { x.linef("r.DecodeBuiltin(%s, %s)", vrtid, varname) } // only check for extensions if the type is named, and has a packagePath. - if t.PkgPath() != "" && t.Name() != "" { + if genImportPath(t) != "" && t.Name() != "" { // first check if extensions are configued, before doing the interface conversion x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) } @@ -1133,10 +1155,8 @@ func (x *genRunner) dec(varname string, t reflect.Type) { if rtid == uint8SliceTypId { x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false, false)") } else if fastpathAV.index(rtid) != -1 { - g := genV{Slice: true, Elem: x.genTypeName(t.Elem())} + g := x.newGenV(t) x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") - // x.line("z." + g.MethodNamePfx("Dec", false) + "(" + varname + ")") - // x.line(g.FastpathName(false) + "(" + varname + ", d)") } else { x.xtraSM(varname, false, t) // x.decListFallback(varname, rtid, false, t) @@ -1147,10 +1167,8 @@ func (x *genRunner) dec(varname string, t reflect.Type) { // - if elements are primitives or Selfers, call dedicated function on each member. // - else call Encoder.encode(XXX) on it. if fastpathAV.index(rtid) != -1 { - g := genV{Slice: false, Elem: x.genTypeName(t.Elem()), MapKey: x.genTypeName(t.Key())} + g := x.newGenV(t) x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") - // x.line("z." + g.MethodNamePfx("Dec", false) + "(" + varname + ")") - // x.line(g.FastpathName(false) + "(" + varname + ", d)") } else { x.xtraSM(varname, false, t) // x.decMapFallback(varname, rtid, t) @@ -1238,11 +1256,13 @@ func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type CTyp string Typ string Immutable bool + Size int } telem := t.Elem() - ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem)} + ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem), int(telem.Size())} funcs := make(template.FuncMap) + funcs["decLineVar"] = func(varname string) string { x.decVar(varname, telem, false) return "" @@ -1278,15 +1298,33 @@ func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) { type tstruc struct { TempVar string + Sfx string Rand string Varname string KTyp string Typ string + Size int } telem := t.Elem() tkey := t.Key() - ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(tkey), x.genTypeName(telem)} + ts := tstruc{ + genTempVarPfx, x.xs, x.varsfx(), varname, x.genTypeName(tkey), + x.genTypeName(telem), int(telem.Size() + tkey.Size()), + } + funcs := make(template.FuncMap) + funcs["decElemZero"] = func() string { + return x.genZeroValueR(telem) + } + funcs["decElemKindImmutable"] = func() bool { + return genIsImmutable(telem) + } + funcs["decElemKindPtr"] = func() bool { + return telem.Kind() == reflect.Ptr + } + funcs["decElemKindIntf"] = func() bool { + return telem.Kind() == reflect.Interface + } funcs["decLineVarK"] = func(varname string) string { x.decVar(varname, tkey, false) return "" @@ -1317,7 +1355,7 @@ func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) } func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintptr, t reflect.Type) { - ti := getTypeInfo(rtid, t) + ti := x.ti.get(rtid, t) tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. x.line("switch (" + kName + ") {") for _, si := range tisfi { @@ -1326,6 +1364,7 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt if si.i != -1 { t2 = t.Field(int(si.i)) } else { + //we must accomodate anonymous fields, where the embedded field is a nil pointer in the value. // t2 = t.FieldByIndex(si.is) t2typ := t varname3 := varname @@ -1337,8 +1376,7 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt t2typ = t2.Type varname3 = varname3 + "." + t2.Name if t2typ.Kind() == reflect.Ptr { - x.line("if " + varname3 + " == nil {" + - varname3 + " = new(" + x.genTypeName(t2typ.Elem()) + ") }") + x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) } } } @@ -1347,11 +1385,10 @@ func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintpt x.line("default:") // pass the slice here, so that the string will not escape, and maybe save allocation x.line("z.DecStructFieldNotFound(-1, " + kName + ")") - // x.line("z.DecStructFieldNotFoundB(" + kName + "Slc)") x.line("} // end switch " + kName) } -func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style uint8) { +func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style genStructMapStyle) { tpfx := genTempVarPfx i := x.varsfx() kName := tpfx + "s" + i @@ -1373,14 +1410,11 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref x.line("var " + kName + "Slc = z.DecScratchBuffer() // default slice to decode into") - // x.line("var " + kName + " string // default string to decode into") - // x.line("_ = " + kName) x.line("_ = " + kName + "Slc") - // x.linef("var %sb%s bool", tpfx, i) // break switch style { - case 1: + case genStructMapStyleLenPrefix: x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i) - case 2: + case genStructMapStyleCheckBreak: x.linef("for %sj%s := 0; !r.CheckBreak(); %sj%s++ {", tpfx, i, tpfx, i) default: // 0, otherwise. x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length @@ -1388,11 +1422,9 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) x.line("} else { if r.CheckBreak() { break }; }") } - // x.line(kName + " = z.ReadStringAsBytes(" + kName + ")") - // x.line(kName + " = z.ReadString()") + x.linef("z.DecSendContainerState(codecSelfer_containerMapKey%s)", x.xs) x.line(kName + "Slc = r.DecodeBytes(" + kName + "Slc, true, true)") // let string be scoped to this loop alone, so it doesn't escape. - // x.line(kName + " := " + x.cpfx + "GenBytesToStringRO(" + kName + "Slc)") if x.unsafe { x.line(kName + "SlcHdr := codecSelferUnsafeString" + x.xs + "{uintptr(unsafe.Pointer(&" + kName + "Slc[0])), len(" + kName + "Slc)}") @@ -1400,43 +1432,50 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref } else { x.line(kName + " := string(" + kName + "Slc)") } + x.linef("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs) x.decStructMapSwitch(kName, varname, rtid, t) x.line("} // end for " + tpfx + "j" + i) - switch style { - case 1: - case 2: - x.line("r.ReadEnd()") - default: - x.linef("if !%shl%s { r.ReadEnd() }", tpfx, i) - } + x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) } func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { tpfx := genTempVarPfx i := x.varsfx() - ti := getTypeInfo(rtid, t) + ti := x.ti.get(rtid, t) tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. x.linef("var %sj%s int", tpfx, i) - x.linef("var %sb%s bool", tpfx, i) // break - // x.linef("var %sl%s := r.ReadArrayStart()", tpfx, i) + x.linef("var %sb%s bool", tpfx, i) // break x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length for _, si := range tisfi { var t2 reflect.StructField if si.i != -1 { t2 = t.Field(int(si.i)) } else { - t2 = t.FieldByIndex(si.is) + //we must accomodate anonymous fields, where the embedded field is a nil pointer in the value. + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) + } + } } x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) - // x.line("if " + tpfx + "j" + i + "++; " + tpfx + "j" + - // i + " <= " + tpfx + "l" + i + " {") - x.linef("if %sb%s { r.ReadEnd(); %s }", tpfx, i, breakString) + x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", + tpfx, i, x.xs, breakString) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) x.decVar(varname+"."+t2.Name, t2.Type, true) - // x.line("} // end if " + tpfx + "j" + i + " <= " + tpfx + "l" + i) } // read remaining values and throw away. x.line("for {") @@ -1444,19 +1483,20 @@ func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid tpfx, i, tpfx, i, tpfx, i, tpfx, i, lenvarname, tpfx, i) x.linef("if %sb%s { break }", tpfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) x.line("}") - x.line("r.ReadEnd()") + x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) } func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { // if container is map - // x.line("if z.DecContainerIsMap() { ") i := x.varsfx() - x.line("if r.IsContainerType(codecSelverValueTypeMap" + x.xs + ") {") + x.linef("%sct%s := r.ContainerType()", genTempVarPfx, i) + x.linef("if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.line("r.ReadEnd()") + x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) if genUseOneFunctionForDecStructMap { x.line("} else { ") x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i) @@ -1469,29 +1509,44 @@ func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { x.line("}") // else if container is array - // x.line("} else if z.DecContainerIsArray() { ") - x.line("} else if r.IsContainerType(codecSelverValueTypeArray" + x.xs + ") {") + x.linef("} else if %sct%s == codecSelferValueTypeArray%s {", genTempVarPfx, i, x.xs) x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") x.linef("if %sl%s == 0 {", genTempVarPfx, i) - x.line("r.ReadEnd()") + x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) x.line("} else { ") x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i) x.line("}") // else panic x.line("} else { ") x.line("panic(codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + ")") - // x.line("panic(`only encoded map or array can be decoded into a struct`)") x.line("} ") } // -------- type genV struct { - // genV is either a primitive (Primitive != "") or a slice (Slice = true) or a map. - Slice bool + // genV is either a primitive (Primitive != "") or a map (MapKey != "") or a slice MapKey string Elem string Primitive string + Size int +} + +func (x *genRunner) newGenV(t reflect.Type) (v genV) { + switch t.Kind() { + case reflect.Slice, reflect.Array: + te := t.Elem() + v.Elem = x.genTypeName(te) + v.Size = int(te.Size()) + case reflect.Map: + te, tk := t.Elem(), t.Key() + v.Elem = x.genTypeName(te) + v.MapKey = x.genTypeName(tk) + v.Size = int(te.Size() + tk.Size()) + default: + panic("unexpected type for newGenV. Requires map or slice type") + } + return } func (x *genV) MethodNamePfx(prefix string, prim bool) string { @@ -1502,7 +1557,7 @@ func (x *genV) MethodNamePfx(prefix string, prim bool) string { if prim { name = append(name, genTitleCaseName(x.Primitive)...) } else { - if x.Slice { + if x.MapKey == "" { name = append(name, "Slice"...) } else { name = append(name, "Map"...) @@ -1514,6 +1569,29 @@ func (x *genV) MethodNamePfx(prefix string, prim bool) string { } +var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" + +// genImportPath returns import path of a non-predeclared named typed, or an empty string otherwise. +// +// This handles the misbehaviour that occurs when 1.5-style vendoring is enabled, +// where PkgPath returns the full path, including the vendoring pre-fix that should have been stripped. +// We strip it here. +func genImportPath(t reflect.Type) (s string) { + s = t.PkgPath() + if genCheckVendor { + // HACK: Misbehaviour occurs in go 1.5. May have to re-visit this later. + // if s contains /vendor/ OR startsWith vendor/, then return everything after it. + const vendorStart = "vendor/" + const vendorInline = "/vendor/" + if i := strings.LastIndex(s, vendorInline); i >= 0 { + s = s[i+len(vendorInline):] + } else if strings.HasPrefix(s, vendorStart) { + s = s[len(vendorStart):] + } + } + return +} + func genNonPtr(t reflect.Type) reflect.Type { for t.Kind() == reflect.Ptr { t = t.Elem() @@ -1538,7 +1616,7 @@ func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) { } tstr := t.String() if tn := t.Name(); tn != "" { - if tRef != nil && t.PkgPath() == tRef.PkgPath() { + if tRef != nil && genImportPath(t) == genImportPath(tRef) { return ptrPfx + tn } else { if genQNameRegex.MatchString(tstr) { @@ -1570,7 +1648,7 @@ func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) { if t == intfTyp { return ptrPfx + "Interface" } else { - if tRef != nil && t.PkgPath() == tRef.PkgPath() { + if tRef != nil && genImportPath(t) == genImportPath(tRef) { if t.Name() != "" { return ptrPfx + t.Name() } else { @@ -1607,7 +1685,7 @@ func genCustomTypeName(tstr string) string { } func genIsImmutable(t reflect.Type) (v bool) { - return isMutableKind(t.Kind()) + return isImmutableKind(t.Kind()) } type genInternal struct { @@ -1670,6 +1748,8 @@ func genInternalDecCommandAsString(s string) string { return "uint32(dd.DecodeUint(32))" case "uint64": return "dd.DecodeUint(64)" + case "uintptr": + return "uintptr(dd.DecodeUint(uintBitsize))" case "int": return "int(dd.DecodeInt(intBitsize))" case "int8": @@ -1690,9 +1770,24 @@ func genInternalDecCommandAsString(s string) string { case "bool": return "dd.DecodeBool()" default: - panic(errors.New("unknown type for decode: " + s)) + panic(errors.New("gen internal: unknown type for decode: " + s)) } +} +func genInternalSortType(s string, elem bool) string { + for _, v := range [...]string{"int", "uint", "float", "bool", "string"} { + if strings.HasPrefix(s, v) { + if elem { + if v == "int" || v == "uint" || v == "float" { + return v + "64" + } else { + return v + } + } + return v + "Slice" + } + } + panic("sorttype: unexpected type: " + s) } // var genInternalMu sync.Mutex @@ -1711,6 +1806,7 @@ func genInternalInit() { "uint16", "uint32", "uint64", + "uintptr", "int", "int8", "int16", @@ -1728,6 +1824,7 @@ func genInternalInit() { "uint16", "uint32", "uint64", + "uintptr", "int", "int8", "int16", @@ -1737,23 +1834,39 @@ func genInternalInit() { "float64", "bool", } - mapvaltypes2 := make(map[string]bool) - for _, s := range mapvaltypes { - mapvaltypes2[s] = true + wordSizeBytes := int(intBitsize) / 8 + + mapvaltypes2 := map[string]int{ + "interface{}": 2 * wordSizeBytes, + "string": 2 * wordSizeBytes, + "uint": 1 * wordSizeBytes, + "uint8": 1, + "uint16": 2, + "uint32": 4, + "uint64": 8, + "uintptr": 1 * wordSizeBytes, + "int": 1 * wordSizeBytes, + "int8": 1, + "int16": 2, + "int32": 4, + "int64": 8, + "float32": 4, + "float64": 8, + "bool": 1, } var gt genInternal // For each slice or map type, there must be a (symetrical) Encode and Decode fast-path function for _, s := range types { - gt.Values = append(gt.Values, genV{false, "", "", s}) + gt.Values = append(gt.Values, genV{Primitive: s, Size: mapvaltypes2[s]}) if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. - gt.Values = append(gt.Values, genV{true, "", s, ""}) + gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) } - if !mapvaltypes2[s] { - gt.Values = append(gt.Values, genV{false, s, s, ""}) + if _, ok := mapvaltypes2[s]; !ok { + gt.Values = append(gt.Values, genV{MapKey: s, Elem: s, Size: 2 * mapvaltypes2[s]}) } for _, ms := range mapvaltypes { - gt.Values = append(gt.Values, genV{false, s, ms, ""}) + gt.Values = append(gt.Values, genV{MapKey: s, Elem: ms, Size: mapvaltypes2[s] + mapvaltypes2[ms]}) } } @@ -1762,16 +1875,18 @@ func genInternalInit() { funcs["encmd"] = genInternalEncCommandAsString funcs["decmd"] = genInternalDecCommandAsString funcs["zerocmd"] = genInternalZeroValue + funcs["hasprefix"] = strings.HasPrefix + funcs["sorttype"] = genInternalSortType genInternalV = gt genInternalTmplFuncs = funcs } -// GenInternalGoFile is used to generate source files from templates. +// genInternalGoFile is used to generate source files from templates. // It is run by the program author alone. // Unfortunately, it has to be exported so that it can be called from a command line tool. // *** DO NOT USE *** -func GenInternalGoFile(r io.Reader, w io.Writer, safe bool) (err error) { +func genInternalGoFile(r io.Reader, w io.Writer, safe bool) (err error) { genInternalOnce.Do(genInternalInit) gt := genInternalV diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go index 8b76e8e..40065a0 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go @@ -101,6 +101,7 @@ package codec // check for these error conditions. import ( + "bytes" "encoding" "encoding/binary" "errors" @@ -111,12 +112,11 @@ import ( "strings" "sync" "time" - "unicode" - "unicode/utf8" ) const ( scratchByteArrayLen = 32 + initCollectionCap = 32 // 32 is defensive. 16 is preferred. // Support encoding.(Binary|Text)(Unm|M)arshaler. // This constant flag will enable or disable it. @@ -147,10 +147,18 @@ const ( // if derefForIsEmptyValue, deref pointers and interfaces when checking isEmptyValue derefForIsEmptyValue = false + + // if resetSliceElemToZeroValue, then on decoding a slice, reset the element to a zero value first. + // Only concern is that, if the slice already contained some garbage, we will decode into that garbage. + // The chances of this are slim, so leave this "optimization". + // TODO: should this be true, to ensure that we always decode into a "zero" "empty" value? + resetSliceElemToZeroValue bool = false ) -var oneByteArr = [1]byte{0} -var zeroByteSlice = oneByteArr[:0:0] +var ( + oneByteArr = [1]byte{0} + zeroByteSlice = oneByteArr[:0:0] +) type charEncoding uint8 @@ -186,14 +194,6 @@ const ( type seqType uint8 -// mirror json.Marshaler and json.Unmarshaler here, so we don't import the encoding/json package -type jsonMarshaler interface { - MarshalJSON() ([]byte, error) -} -type jsonUnmarshaler interface { - UnmarshalJSON([]byte) error -} - const ( _ seqType = iota seqTypeArray @@ -201,16 +201,61 @@ const ( seqTypeChan ) +// note that containerMapStart and containerArraySend are not sent. +// This is because the ReadXXXStart and EncodeXXXStart already does these. +type containerState uint8 + +const ( + _ containerState = iota + + containerMapStart // slot left open, since Driver method already covers it + containerMapKey + containerMapValue + containerMapEnd + containerArrayStart // slot left open, since Driver methods already cover it + containerArrayElem + containerArrayEnd +) + +type rgetPoolT struct { + encNames [8]string + fNames [8]string + etypes [8]uintptr + sfis [8]*structFieldInfo +} + +var rgetPool = sync.Pool{ + New: func() interface{} { return new(rgetPoolT) }, +} + +type rgetT struct { + fNames []string + encNames []string + etypes []uintptr + sfis []*structFieldInfo +} + +type containerStateRecv interface { + sendContainerState(containerState) +} + +// mirror json.Marshaler and json.Unmarshaler here, +// so we don't import the encoding/json package +type jsonMarshaler interface { + MarshalJSON() ([]byte, error) +} +type jsonUnmarshaler interface { + UnmarshalJSON([]byte) error +} + var ( bigen = binary.BigEndian structInfoFieldName = "_struct" - cachedTypeInfo = make(map[uintptr]*typeInfo, 64) - cachedTypeInfoMutex sync.RWMutex - - // mapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) - intfSliceTyp = reflect.TypeOf([]interface{}(nil)) - intfTyp = intfSliceTyp.Elem() + mapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) + mapIntfIntfTyp = reflect.TypeOf(map[interface{}]interface{}(nil)) + intfSliceTyp = reflect.TypeOf([]interface{}(nil)) + intfTyp = intfSliceTyp.Elem() stringTyp = reflect.TypeOf("") timeTyp = reflect.TypeOf(time.Time{}) @@ -236,6 +281,9 @@ var ( timeTypId = reflect.ValueOf(timeTyp).Pointer() stringTypId = reflect.ValueOf(stringTyp).Pointer() + mapStrIntfTypId = reflect.ValueOf(mapStrIntfTyp).Pointer() + mapIntfIntfTypId = reflect.ValueOf(mapIntfIntfTyp).Pointer() + intfSliceTypId = reflect.ValueOf(intfSliceTyp).Pointer() // mapBySliceTypId = reflect.ValueOf(mapBySliceTyp).Pointer() intBitsize uint8 = uint8(reflect.TypeOf(int(0)).Bits()) @@ -249,6 +297,8 @@ var ( noFieldNameToStructFieldInfoErr = errors.New("no field name passed to parseStructFieldInfo") ) +var defTypeInfos = NewTypeInfos([]string{"codec", "json"}) + // Selfer defines methods by which a value can encode or decode itself. // // Any type which implements Selfer will be able to encode or decode itself. @@ -274,6 +324,11 @@ type MapBySlice interface { // // BasicHandle encapsulates the common options and extension functions. type BasicHandle struct { + // TypeInfos is used to get the type info for any type. + // + // If not configured, the default TypeInfos is used, which uses struct tag keys: codec, json + TypeInfos *TypeInfos + extHandle EncodeOptions DecodeOptions @@ -283,6 +338,13 @@ func (x *BasicHandle) getBasicHandle() *BasicHandle { return x } +func (x *BasicHandle) getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) { + if x.TypeInfos != nil { + return x.TypeInfos.get(rtid, rt) + } + return defTypeInfos.get(rtid, rt) +} + // Handle is the interface for a specific encoding format. // // Typically, a Handle is pre-configured before first time use, @@ -309,33 +371,45 @@ type RawExt struct { Value interface{} } -// Ext handles custom (de)serialization of custom types / extensions. -type Ext interface { +// BytesExt handles custom (de)serialization of types to/from []byte. +// It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. +type BytesExt interface { // WriteExt converts a value to a []byte. - // It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. + // + // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. WriteExt(v interface{}) []byte // ReadExt updates a value from a []byte. - // It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. ReadExt(dst interface{}, src []byte) +} +// InterfaceExt handles custom (de)serialization of types to/from another interface{} value. +// The Encoder or Decoder will then handle the further (de)serialization of that known type. +// +// It is used by codecs (e.g. cbor, json) which use the format to do custom serialization of the types. +type InterfaceExt interface { // ConvertExt converts a value into a simpler interface for easy encoding e.g. convert time.Time to int64. - // It is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. + // + // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. ConvertExt(v interface{}) interface{} // UpdateExt updates a value from a simpler interface for easy decoding e.g. convert int64 to time.Time. - // It is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. UpdateExt(dst interface{}, src interface{}) } -// bytesExt is a wrapper implementation to support former AddExt exported method. -type bytesExt struct { +// Ext handles custom (de)serialization of custom types / extensions. +type Ext interface { + BytesExt + InterfaceExt +} + +// addExtWrapper is a wrapper implementation to support former AddExt exported method. +type addExtWrapper struct { encFn func(reflect.Value) ([]byte, error) decFn func(reflect.Value, []byte) error } -func (x bytesExt) WriteExt(v interface{}) []byte { - // fmt.Printf(">>>>>>>>>> WriteExt: %T, %v\n", v, v) +func (x addExtWrapper) WriteExt(v interface{}) []byte { bs, err := x.encFn(reflect.ValueOf(v)) if err != nil { panic(err) @@ -343,21 +417,56 @@ func (x bytesExt) WriteExt(v interface{}) []byte { return bs } -func (x bytesExt) ReadExt(v interface{}, bs []byte) { - // fmt.Printf(">>>>>>>>>> ReadExt: %T, %v\n", v, v) +func (x addExtWrapper) ReadExt(v interface{}, bs []byte) { if err := x.decFn(reflect.ValueOf(v), bs); err != nil { panic(err) } } -func (x bytesExt) ConvertExt(v interface{}) interface{} { +func (x addExtWrapper) ConvertExt(v interface{}) interface{} { return x.WriteExt(v) } -func (x bytesExt) UpdateExt(dest interface{}, v interface{}) { +func (x addExtWrapper) UpdateExt(dest interface{}, v interface{}) { x.ReadExt(dest, v.([]byte)) } +type setExtWrapper struct { + b BytesExt + i InterfaceExt +} + +func (x *setExtWrapper) WriteExt(v interface{}) []byte { + if x.b == nil { + panic("BytesExt.WriteExt is not supported") + } + return x.b.WriteExt(v) +} + +func (x *setExtWrapper) ReadExt(v interface{}, bs []byte) { + if x.b == nil { + panic("BytesExt.WriteExt is not supported") + + } + x.b.ReadExt(v, bs) +} + +func (x *setExtWrapper) ConvertExt(v interface{}) interface{} { + if x.i == nil { + panic("InterfaceExt.ConvertExt is not supported") + + } + return x.i.ConvertExt(v) +} + +func (x *setExtWrapper) UpdateExt(dest interface{}, v interface{}) { + if x.i == nil { + panic("InterfaceExxt.UpdateExt is not supported") + + } + x.i.UpdateExt(dest, v) +} + // type errorString string // func (x errorString) Error() string { return string(x) } @@ -410,9 +519,9 @@ type extTypeTagFn struct { ext Ext } -type extHandle []*extTypeTagFn +type extHandle []extTypeTagFn -// DEPRECATED: AddExt is deprecated in favor of SetExt. It exists for compatibility only. +// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. // // AddExt registes an encode and decode function for a reflect.Type. // AddExt internally calls SetExt. @@ -424,10 +533,10 @@ func (o *extHandle) AddExt( if encfn == nil || decfn == nil { return o.SetExt(rt, uint64(tag), nil) } - return o.SetExt(rt, uint64(tag), bytesExt{encfn, decfn}) + return o.SetExt(rt, uint64(tag), addExtWrapper{encfn, decfn}) } -// SetExt registers a tag and Ext for a reflect.Type. +// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. // // Note that the type must be a named type, and specifically not // a pointer or Interface. An error is returned if that is not honored. @@ -449,12 +558,17 @@ func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { } } - *o = append(*o, &extTypeTagFn{rtid, rt, tag, ext}) + if *o == nil { + *o = make([]extTypeTagFn, 0, 4) + } + *o = append(*o, extTypeTagFn{rtid, rt, tag, ext}) return } func (o extHandle) getExt(rtid uintptr) *extTypeTagFn { - for _, v := range o { + var v *extTypeTagFn + for i := range o { + v = &o[i] if v.rtid == rtid { return v } @@ -463,7 +577,9 @@ func (o extHandle) getExt(rtid uintptr) *extTypeTagFn { } func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn { - for _, v := range o { + var v *extTypeTagFn + for i := range o { + v = &o[i] if v.tag == tag { return v } @@ -586,6 +702,8 @@ type typeInfo struct { rt reflect.Type rtid uintptr + numMeth uint16 // number of methods + // baseId gives pointer to the base reflect.Type, after deferencing // the pointers. E.g. base type of ***time.Time is time.Time. base reflect.Type @@ -643,33 +761,49 @@ func (ti *typeInfo) indexForEncName(name string) int { return -1 } -func getStructTag(t reflect.StructTag) (s string) { +// TypeInfos caches typeInfo for each type on first inspection. +// +// It is configured with a set of tag keys, which are used to get +// configuration for the type. +type TypeInfos struct { + infos map[uintptr]*typeInfo + mu sync.RWMutex + tags []string +} + +// NewTypeInfos creates a TypeInfos given a set of struct tags keys. +// +// This allows users customize the struct tag keys which contain configuration +// of their types. +func NewTypeInfos(tags []string) *TypeInfos { + return &TypeInfos{tags: tags, infos: make(map[uintptr]*typeInfo, 64)} +} + +func (x *TypeInfos) structTag(t reflect.StructTag) (s string) { // check for tags: codec, json, in that order. // this allows seamless support for many configured structs. - s = t.Get("codec") - if s == "" { - s = t.Get("json") + for _, x := range x.tags { + s = t.Get(x) + if s != "" { + return s + } } return } -func getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) { +func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { var ok bool - cachedTypeInfoMutex.RLock() - pti, ok = cachedTypeInfo[rtid] - cachedTypeInfoMutex.RUnlock() + x.mu.RLock() + pti, ok = x.infos[rtid] + x.mu.RUnlock() if ok { return } - cachedTypeInfoMutex.Lock() - defer cachedTypeInfoMutex.Unlock() - if pti, ok = cachedTypeInfo[rtid]; ok { - return - } - + // do not hold lock while computing this. + // it may lead to duplication, but that's ok. ti := typeInfo{rt: rt, rtid: rtid} - pti = &ti + ti.numMeth = uint16(rt.NumMethod()) var indir int8 if ok, indir = implementsIntf(rt, binaryMarshalerTyp); ok { @@ -716,87 +850,131 @@ func getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) { if rt.Kind() == reflect.Struct { var siInfo *structFieldInfo if f, ok := rt.FieldByName(structInfoFieldName); ok { - siInfo = parseStructFieldInfo(structInfoFieldName, getStructTag(f.Tag)) + siInfo = parseStructFieldInfo(structInfoFieldName, x.structTag(f.Tag)) ti.toArray = siInfo.toArray } - sfip := make([]*structFieldInfo, 0, rt.NumField()) - rgetTypeInfo(rt, nil, make(map[string]bool, 16), &sfip, siInfo) - - ti.sfip = make([]*structFieldInfo, len(sfip)) - ti.sfi = make([]*structFieldInfo, len(sfip)) - copy(ti.sfip, sfip) - sort.Sort(sfiSortedByEncName(sfip)) - copy(ti.sfi, sfip) + pi := rgetPool.Get() + pv := pi.(*rgetPoolT) + pv.etypes[0] = ti.baseId + vv := rgetT{pv.fNames[:0], pv.encNames[:0], pv.etypes[:1], pv.sfis[:0]} + x.rget(rt, rtid, nil, &vv, siInfo) + ti.sfip = make([]*structFieldInfo, len(vv.sfis)) + ti.sfi = make([]*structFieldInfo, len(vv.sfis)) + copy(ti.sfip, vv.sfis) + sort.Sort(sfiSortedByEncName(vv.sfis)) + copy(ti.sfi, vv.sfis) + rgetPool.Put(pi) } // sfi = sfip - cachedTypeInfo[rtid] = pti + + x.mu.Lock() + if pti, ok = x.infos[rtid]; !ok { + pti = &ti + x.infos[rtid] = pti + } + x.mu.Unlock() return } -func rgetTypeInfo(rt reflect.Type, indexstack []int, fnameToHastag map[string]bool, - sfi *[]*structFieldInfo, siInfo *structFieldInfo, +func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, + indexstack []int, pv *rgetT, siInfo *structFieldInfo, ) { - for j := 0; j < rt.NumField(); j++ { + // This will read up the fields and store how to access the value. + // It uses the go language's rules for embedding, as below: + // - if a field has been seen while traversing, skip it + // - if an encName has been seen while traversing, skip it + // - if an embedded type has been seen, skip it + // + // Also, per Go's rules, embedded fields must be analyzed AFTER all top-level fields. + // + // Note: we consciously use slices, not a map, to simulate a set. + // Typically, types have < 16 fields, and iteration using equals is faster than maps there + + type anonField struct { + ft reflect.Type + idx int + } + + var anonFields []anonField + +LOOP: + for j, jlen := 0, rt.NumField(); j < jlen; j++ { f := rt.Field(j) - // func types are skipped. - if tk := f.Type.Kind(); tk == reflect.Func { - continue + fkind := f.Type.Kind() + // skip if a func type, or is unexported, or structTag value == "-" + switch fkind { + case reflect.Func, reflect.Complex64, reflect.Complex128, reflect.UnsafePointer: + continue LOOP } - stag := getStructTag(f.Tag) - if stag == "-" { + + // if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) { + if f.PkgPath != "" && !f.Anonymous { // unexported, not embedded continue } - if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) { + stag := x.structTag(f.Tag) + if stag == "-" { continue } var si *structFieldInfo - // if anonymous and there is no struct tag (or it's blank) - // and its a struct (or pointer to struct), inline it. - var doInline bool - if f.Anonymous && f.Type.Kind() != reflect.Interface { - doInline = stag == "" + // if anonymous and no struct tag (or it's blank), and a struct (or pointer to struct), inline it. + if f.Anonymous && fkind != reflect.Interface { + doInline := stag == "" if !doInline { si = parseStructFieldInfo("", stag) doInline = si.encName == "" // doInline = si.isZero() - // fmt.Printf(">>>> doInline for si.isZero: %s: %v\n", f.Name, doInline) } - } - - if doInline { - ft := f.Type - for ft.Kind() == reflect.Ptr { - ft = ft.Elem() - } - if ft.Kind() == reflect.Struct { - indexstack2 := make([]int, len(indexstack)+1, len(indexstack)+4) - copy(indexstack2, indexstack) - indexstack2[len(indexstack)] = j - // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) - rgetTypeInfo(ft, indexstack2, fnameToHastag, sfi, siInfo) - continue + if doInline { + ft := f.Type + for ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if ft.Kind() == reflect.Struct { + // handle anonymous fields after handling all the non-anon fields + anonFields = append(anonFields, anonField{ft, j}) + continue + } } } - // do not let fields with same name in embedded structs override field at higher level. - // this must be done after anonymous check, to allow anonymous field - // still include their child fields - if _, ok := fnameToHastag[f.Name]; ok { + + // after the anonymous dance: if an unexported field, skip + if f.PkgPath != "" { // unexported continue } + if f.Name == "" { panic(noFieldNameToStructFieldInfoErr) } + + for _, k := range pv.fNames { + if k == f.Name { + continue LOOP + } + } + pv.fNames = append(pv.fNames, f.Name) + if si == nil { si = parseStructFieldInfo(f.Name, stag) } else if si.encName == "" { si.encName = f.Name } + + for _, k := range pv.encNames { + if k == si.encName { + continue LOOP + } + } + pv.encNames = append(pv.encNames, si.encName) + // si.ikind = int(f.Type.Kind()) if len(indexstack) == 0 { si.i = int16(j) } else { si.i = -1 - si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + si.is = make([]int, len(indexstack)+1) + copy(si.is, indexstack) + si.is[len(indexstack)] = j + // si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) } if siInfo != nil { @@ -804,8 +982,26 @@ func rgetTypeInfo(rt reflect.Type, indexstack []int, fnameToHastag map[string]bo si.omitEmpty = true } } - *sfi = append(*sfi, si) - fnameToHastag[f.Name] = stag != "" + pv.sfis = append(pv.sfis, si) + } + + // now handle anonymous fields +LOOP2: + for _, af := range anonFields { + // if etypes contains this, then do not call rget again (as the fields are already seen here) + ftid := reflect.ValueOf(af.ft).Pointer() + for _, k := range pv.etypes { + if k == ftid { + continue LOOP2 + } + } + pv.etypes = append(pv.etypes, ftid) + + indexstack2 := make([]int, len(indexstack)+1) + copy(indexstack2, indexstack) + indexstack2[len(indexstack)] = af.idx + // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + x.rget(af.ft, ftid, indexstack2, pv, siInfo) } } @@ -825,7 +1021,7 @@ func panicToErr(err *error) { // panic(fmt.Errorf("%s: "+format, params2...)) // } -func isMutableKind(k reflect.Kind) (v bool) { +func isImmutableKind(k reflect.Kind) (v bool) { return false || k == reflect.Int || k == reflect.Int8 || @@ -892,3 +1088,184 @@ func (_ checkOverflow) SignedInt(v uint64) (i int64, overflow bool) { i = int64(v) return } + +// ------------------ SORT ----------------- + +func isNaN(f float64) bool { return f != f } + +// ----------------------- + +type intSlice []int64 +type uintSlice []uint64 +type floatSlice []float64 +type boolSlice []bool +type stringSlice []string +type bytesSlice [][]byte + +func (p intSlice) Len() int { return len(p) } +func (p intSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p intSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p uintSlice) Len() int { return len(p) } +func (p uintSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p uintSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p floatSlice) Len() int { return len(p) } +func (p floatSlice) Less(i, j int) bool { + return p[i] < p[j] || isNaN(p[i]) && !isNaN(p[j]) +} +func (p floatSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p stringSlice) Len() int { return len(p) } +func (p stringSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p stringSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p bytesSlice) Len() int { return len(p) } +func (p bytesSlice) Less(i, j int) bool { return bytes.Compare(p[i], p[j]) == -1 } +func (p bytesSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p boolSlice) Len() int { return len(p) } +func (p boolSlice) Less(i, j int) bool { return !p[i] && p[j] } +func (p boolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// --------------------- + +type intRv struct { + v int64 + r reflect.Value +} +type intRvSlice []intRv +type uintRv struct { + v uint64 + r reflect.Value +} +type uintRvSlice []uintRv +type floatRv struct { + v float64 + r reflect.Value +} +type floatRvSlice []floatRv +type boolRv struct { + v bool + r reflect.Value +} +type boolRvSlice []boolRv +type stringRv struct { + v string + r reflect.Value +} +type stringRvSlice []stringRv +type bytesRv struct { + v []byte + r reflect.Value +} +type bytesRvSlice []bytesRv + +func (p intRvSlice) Len() int { return len(p) } +func (p intRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p intRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p uintRvSlice) Len() int { return len(p) } +func (p uintRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p uintRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p floatRvSlice) Len() int { return len(p) } +func (p floatRvSlice) Less(i, j int) bool { + return p[i].v < p[j].v || isNaN(p[i].v) && !isNaN(p[j].v) +} +func (p floatRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p stringRvSlice) Len() int { return len(p) } +func (p stringRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p stringRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p bytesRvSlice) Len() int { return len(p) } +func (p bytesRvSlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } +func (p bytesRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p boolRvSlice) Len() int { return len(p) } +func (p boolRvSlice) Less(i, j int) bool { return !p[i].v && p[j].v } +func (p boolRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// ----------------- + +type bytesI struct { + v []byte + i interface{} +} + +type bytesISlice []bytesI + +func (p bytesISlice) Len() int { return len(p) } +func (p bytesISlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } +func (p bytesISlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// ----------------- + +type set []uintptr + +func (s *set) add(v uintptr) (exists bool) { + // e.ci is always nil, or len >= 1 + // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Add: %v, exists: %v\n", v, exists) }() + x := *s + if x == nil { + x = make([]uintptr, 1, 8) + x[0] = v + *s = x + return + } + // typically, length will be 1. make this perform. + if len(x) == 1 { + if j := x[0]; j == 0 { + x[0] = v + } else if j == v { + exists = true + } else { + x = append(x, v) + *s = x + } + return + } + // check if it exists + for _, j := range x { + if j == v { + exists = true + return + } + } + // try to replace a "deleted" slot + for i, j := range x { + if j == 0 { + x[i] = v + return + } + } + // if unable to replace deleted slot, just append it. + x = append(x, v) + *s = x + return +} + +func (s *set) remove(v uintptr) (exists bool) { + // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Rm: %v, exists: %v\n", v, exists) }() + x := *s + if len(x) == 0 { + return + } + if len(x) == 1 { + if x[0] == v { + x[0] = 0 + } + return + } + for i, j := range x { + if j == v { + exists = true + x[i] = 0 // set it to 0, as way to delete it. + // copy(x[i:], x[i+1:]) + // x = x[:len(x)-1] + return + } + } + return +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go index c865246..dea981f 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go @@ -149,3 +149,94 @@ func halfFloatToFloatBits(yy uint16) (d uint32) { m = m << 13 return (s << 31) | (e << 23) | m } + +// GrowCap will return a new capacity for a slice, given the following: +// - oldCap: current capacity +// - unit: in-memory size of an element +// - num: number of elements to add +func growCap(oldCap, unit, num int) (newCap int) { + // appendslice logic (if cap < 1024, *2, else *1.25): + // leads to many copy calls, especially when copying bytes. + // bytes.Buffer model (2*cap + n): much better for bytes. + // smarter way is to take the byte-size of the appended element(type) into account + + // maintain 3 thresholds: + // t1: if cap <= t1, newcap = 2x + // t2: if cap <= t2, newcap = 1.75x + // t3: if cap <= t3, newcap = 1.5x + // else newcap = 1.25x + // + // t1, t2, t3 >= 1024 always. + // i.e. if unit size >= 16, then always do 2x or 1.25x (ie t1, t2, t3 are all same) + // + // With this, appending for bytes increase by: + // 100% up to 4K + // 75% up to 8K + // 50% up to 16K + // 25% beyond that + + // unit can be 0 e.g. for struct{}{}; handle that appropriately + var t1, t2, t3 int // thresholds + if unit <= 1 { + t1, t2, t3 = 4*1024, 8*1024, 16*1024 + } else if unit < 16 { + t3 = 16 / unit * 1024 + t1 = t3 * 1 / 4 + t2 = t3 * 2 / 4 + } else { + t1, t2, t3 = 1024, 1024, 1024 + } + + var x int // temporary variable + + // x is multiplier here: one of 5, 6, 7 or 8; incr of 25%, 50%, 75% or 100% respectively + if oldCap <= t1 { // [0,t1] + x = 8 + } else if oldCap > t3 { // (t3,infinity] + x = 5 + } else if oldCap <= t2 { // (t1,t2] + x = 7 + } else { // (t2,t3] + x = 6 + } + newCap = x * oldCap / 4 + + if num > 0 { + newCap += num + } + + // ensure newCap is a multiple of 64 (if it is > 64) or 16. + if newCap > 64 { + if x = newCap % 64; x != 0 { + x = newCap / 64 + newCap = 64 * (x + 1) + } + } else { + if x = newCap % 16; x != 0 { + x = newCap / 16 + newCap = 16 * (x + 1) + } + } + return +} + +func expandSliceValue(s reflect.Value, num int) reflect.Value { + if num <= 0 { + return s + } + l0 := s.Len() + l1 := l0 + num // new slice length + if l1 < l0 { + panic("ExpandSlice: slice overflow") + } + c0 := s.Cap() + if l1 <= c0 { + return s.Slice(0, l1) + } + st := s.Type() + c1 := growCap(c0, int(st.Elem().Size()), num) + s2 := reflect.MakeSlice(st, l1, c1) + // println("expandslicevalue: cap-old: ", c0, ", cap-new: ", c1, ", len-new: ", l1) + reflect.Copy(s2, s) + return s2 +} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go deleted file mode 100644 index 685c576..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_test.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -// All non-std package dependencies related to testing live in this file, -// so porting to different environment is easy (just update functions). -// -// This file sets up the variables used, including testInitFns. -// Each file should add initialization that should be performed -// after flags are parsed. -// -// init is a multi-step process: -// - setup vars (handled by init functions in each file) -// - parse flags -// - setup derived vars (handled by pre-init registered functions - registered in init function) -// - post init (handled by post-init registered functions - registered in init function) -// This way, no one has to manage carefully control the initialization -// using file names, etc. -// -// Tests which require external dependencies need the -tag=x parameter. -// They should be run as: -// go test -tags=x -run=. -// Benchmarks should also take this parameter, to include the sereal, xdr, etc. -// To run against codecgen, etc, make sure you pass extra parameters. -// Example usage: -// go test "-tags=x codecgen unsafe" -bench=. -// -// To fully test everything: -// go test -tags=x -benchtime=100ms -tv -bg -bi -brw -bu -v -run=. -bench=. - -import ( - "errors" - "flag" - "fmt" - "reflect" - "sync" - "testing" -) - -const ( - testLogToT = true - failNowOnFail = true -) - -var ( - testNoopH = NoopHandle(8) - testMsgpackH = &MsgpackHandle{} - testBincH = &BincHandle{} - testBincHNoSym = &BincHandle{} - testBincHSym = &BincHandle{} - testSimpleH = &SimpleHandle{} - testCborH = &CborHandle{} - testJsonH = &JsonHandle{} - - testPreInitFns []func() - testPostInitFns []func() - - testOnce sync.Once -) - -func init() { - testBincHSym.AsSymbols = AsSymbolAll - testBincHNoSym.AsSymbols = AsSymbolNone -} - -func testInitAll() { - flag.Parse() - for _, f := range testPreInitFns { - f() - } - for _, f := range testPostInitFns { - f() - } -} - -func logT(x interface{}, format string, args ...interface{}) { - if t, ok := x.(*testing.T); ok && t != nil && testLogToT { - if testVerbose { - t.Logf(format, args...) - } - } else if b, ok := x.(*testing.B); ok && b != nil && testLogToT { - b.Logf(format, args...) - } else { - if len(format) == 0 || format[len(format)-1] != '\n' { - format = format + "\n" - } - fmt.Printf(format, args...) - } -} - -func approxDataSize(rv reflect.Value) (sum int) { - switch rk := rv.Kind(); rk { - case reflect.Invalid: - case reflect.Ptr, reflect.Interface: - sum += int(rv.Type().Size()) - sum += approxDataSize(rv.Elem()) - case reflect.Slice: - sum += int(rv.Type().Size()) - for j := 0; j < rv.Len(); j++ { - sum += approxDataSize(rv.Index(j)) - } - case reflect.String: - sum += int(rv.Type().Size()) - sum += rv.Len() - case reflect.Map: - sum += int(rv.Type().Size()) - for _, mk := range rv.MapKeys() { - sum += approxDataSize(mk) - sum += approxDataSize(rv.MapIndex(mk)) - } - case reflect.Struct: - //struct size already includes the full data size. - //sum += int(rv.Type().Size()) - for j := 0; j < rv.NumField(); j++ { - sum += approxDataSize(rv.Field(j)) - } - default: - //pure value types - sum += int(rv.Type().Size()) - } - return -} - -// ----- functions below are used only by tests (not benchmarks) - -func checkErrT(t *testing.T, err error) { - if err != nil { - logT(t, err.Error()) - failT(t) - } -} - -func checkEqualT(t *testing.T, v1 interface{}, v2 interface{}, desc string) (err error) { - if err = deepEqual(v1, v2); err != nil { - logT(t, "Not Equal: %s: %v. v1: %v, v2: %v", desc, err, v1, v2) - failT(t) - } - return -} - -func failT(t *testing.T) { - if failNowOnFail { - t.FailNow() - } else { - t.Fail() - } -} - -func deepEqual(v1, v2 interface{}) (err error) { - if !reflect.DeepEqual(v1, v2) { - err = errors.New("Not Match") - } - return -} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go index d799496..373b2b1 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go @@ -26,6 +26,9 @@ type unsafeBytes struct { // In unsafe mode, it doesn't incur allocation and copying caused by conversion. // In regular safe mode, it is an allocation and copy. func stringView(v []byte) string { + if len(v) == 0 { + return "" + } x := unsafeString{uintptr(unsafe.Pointer(&v[0])), len(v)} return *(*string)(unsafe.Pointer(&x)) } @@ -34,6 +37,9 @@ func stringView(v []byte) string { // In unsafe mode, it doesn't incur allocation and copying caused by conversion. // In regular safe mode, it is an allocation and copy. func bytesView(v string) []byte { + if len(v) == 0 { + return zeroByteSlice + } x := unsafeBytes{uintptr(unsafe.Pointer(&v)), len(v), len(v)} return *(*[]byte)(unsafe.Pointer(&x)) } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go index f2f7bce..142d5b5 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go @@ -3,8 +3,9 @@ package codec -// This json support uses base64 encoding for bytes, because you cannot +// By default, this json support uses base64 encoding for bytes, because you cannot // store and read any arbitrary string in json (only unicode). +// However, the user can configre how to encode/decode bytes. // // This library specifically supports UTF-8 for encoding and decoding only. // @@ -29,13 +30,12 @@ package codec // Top-level methods of json(End|Dec)Driver (which are implementations of (en|de)cDriver // MUST not call one-another. -// They all must call sep(), and sep() MUST NOT be called more than once for each read. -// If sep() is called and read is not done, you MUST call retryRead so separator wouldn't be read/written twice. import ( "bytes" "encoding/base64" "fmt" + "reflect" "strconv" "unicode/utf16" "unicode/utf8" @@ -43,26 +43,32 @@ import ( //-------------------------------- -var jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} +var ( + jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} -var jsonFloat64Pow10 = [...]float64{ - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22, -} + jsonFloat64Pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, + } -var jsonUint64Pow10 = [...]uint64{ - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, -} + jsonUint64Pow10 = [...]uint64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + } + + // jsonTabs and jsonSpaces are used as caches for indents + jsonTabs, jsonSpaces string +) const ( - // if jsonTrackSkipWhitespace, we track Whitespace and reduce the number of redundant checks. - // Make it a const flag, so that it can be elided during linking if false. + // jsonUnreadAfterDecNum controls whether we unread after decoding a number. // - // It is not a clear win, because we continually set a flag behind a pointer - // and then check it each time, as opposed to just 4 conditionals on a stack variable. - jsonTrackSkipWhitespace = true + // instead of unreading, just update d.tok (iff it's not a whitespace char) + // However, doing this means that we may HOLD onto some data which belongs to another stream. + // Thus, it is safest to unread the data when done. + // keep behind a constant flag for now. + jsonUnreadAfterDecNum = true // If !jsonValidateSymbols, decoding will be faster, by skipping some checks: // - If we see first character of null, false or true, @@ -84,104 +90,105 @@ const ( jsonNumUintMaxVal = 1<= slen { e.bs = e.bs[:slen] } else { @@ -306,9 +280,6 @@ func (e *jsonEncDriver) EncodeStringBytes(c charEncoding, v []byte) { } func (e *jsonEncDriver) EncodeAsis(v []byte) { - if c := e.s.sc.sep(); c != 0 { - e.w.writen1(c) - } e.w.writeb(v) } @@ -383,7 +354,7 @@ func (e *jsonEncDriver) quoteStr(s string) { //-------------------------------- type jsonNum struct { - bytes []byte // may have [+-.eE0-9] + // bytes []byte // may have [+-.eE0-9] mantissa uint64 // where mantissa ends, and maybe dot begins. exponent int16 // exponent value. manOverflow bool @@ -393,7 +364,6 @@ type jsonNum struct { } func (x *jsonNum) reset() { - x.bytes = x.bytes[:0] x.manOverflow = false x.neg = false x.dot = false @@ -426,29 +396,26 @@ func (x *jsonNum) uintExp() (n uint64, overflow bool) { // return } -func (x *jsonNum) floatVal() (f float64) { +// these constants are only used withn floatVal. +// They are brought out, so that floatVal can be inlined. +const ( + jsonUint64MantissaBits = 52 + jsonMaxExponent = int16(len(jsonFloat64Pow10)) - 1 +) + +func (x *jsonNum) floatVal() (f float64, parseUsingStrConv bool) { // We do not want to lose precision. // Consequently, we will delegate to strconv.ParseFloat if any of the following happen: // - There are more digits than in math.MaxUint64: 18446744073709551615 (20 digits) // We expect up to 99.... (19 digits) // - The mantissa cannot fit into a 52 bits of uint64 // - The exponent is beyond our scope ie beyong 22. - const uint64MantissaBits = 52 - const maxExponent = int16(len(jsonFloat64Pow10)) - 1 + parseUsingStrConv = x.manOverflow || + x.exponent > jsonMaxExponent || + (x.exponent < 0 && -(x.exponent) > jsonMaxExponent) || + x.mantissa>>jsonUint64MantissaBits != 0 - parseUsingStrConv := x.manOverflow || - x.exponent > maxExponent || - (x.exponent < 0 && -(x.exponent) > maxExponent) || - x.mantissa>>uint64MantissaBits != 0 if parseUsingStrConv { - var err error - if f, err = strconv.ParseFloat(stringView(x.bytes), 64); err != nil { - panic(fmt.Errorf("parse float: %s, %v", x.bytes, err)) - return - } - if x.neg { - f = -f - } return } @@ -467,186 +434,221 @@ func (x *jsonNum) floatVal() (f float64) { } type jsonDecDriver struct { - d *Decoder - h *JsonHandle - r decReader // *bytesDecReader decReader - ct valueType // container type. one of unset, array or map. - bstr [8]byte // scratch used for string \UXXX parsing - b [64]byte // scratch + noBuiltInTypes + d *Decoder + h *JsonHandle + r decReader + + c containerState + // tok is used to store the token read right after skipWhiteSpace. + tok uint8 - wsSkipped bool // whitespace skipped + bstr [8]byte // scratch used for string \UXXX parsing + b [64]byte // scratch, used for parsing strings or numbers + b2 [64]byte // scratch, used only for decodeBytes (after base64) + bs []byte // scratch. Initialized from b. Used for parsing strings or numbers. - s jsonStack + se setExtWrapper n jsonNum - noBuiltInTypes } -// This will skip whitespace characters and return the next byte to read. -// The next byte determines what the value will be one of. -func (d *jsonDecDriver) skipWhitespace(unread bool) (b byte) { - // as initReadNext is not called all the time, we set ct to unSet whenever - // we skipwhitespace, as this is the signal that something new is about to be read. - d.ct = valueTypeUnset - b = d.r.readn1() - if !jsonTrackSkipWhitespace || !d.wsSkipped { - for ; b == ' ' || b == '\t' || b == '\r' || b == '\n'; b = d.r.readn1() { +func jsonIsWS(b byte) bool { + return b == ' ' || b == '\t' || b == '\r' || b == '\n' +} + +// // This will skip whitespace characters and return the next byte to read. +// // The next byte determines what the value will be one of. +// func (d *jsonDecDriver) skipWhitespace() { +// // fast-path: do not enter loop. Just check first (in case no whitespace). +// b := d.r.readn1() +// if jsonIsWS(b) { +// r := d.r +// for b = r.readn1(); jsonIsWS(b); b = r.readn1() { +// } +// } +// d.tok = b +// } + +func (d *jsonDecDriver) uncacheRead() { + if d.tok != 0 { + d.r.unreadn1() + d.tok = 0 + } +} + +func (d *jsonDecDriver) sendContainerState(c containerState) { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + var xc uint8 // char expected + if c == containerMapKey { + if d.c != containerMapStart { + xc = ',' } - if jsonTrackSkipWhitespace { - d.wsSkipped = true + } else if c == containerMapValue { + xc = ':' + } else if c == containerMapEnd { + xc = '}' + } else if c == containerArrayElem { + if d.c != containerArrayStart { + xc = ',' } + } else if c == containerArrayEnd { + xc = ']' } - if unread { - d.r.unreadn1() + if xc != 0 { + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + } + d.tok = 0 } - return b + d.c = c } func (d *jsonDecDriver) CheckBreak() bool { - b := d.skipWhitespace(true) - return b == '}' || b == ']' + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == '}' || d.tok == ']' { + // d.tok = 0 // only checking, not consuming + return true + } + return false } func (d *jsonDecDriver) readStrIdx(fromIdx, toIdx uint8) { bs := d.r.readx(int(toIdx - fromIdx)) + d.tok = 0 if jsonValidateSymbols { if !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) { d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs) return } } - if jsonTrackSkipWhitespace { - d.wsSkipped = false - } } func (d *jsonDecDriver) TryDecodeAsNil() bool { - // we mustn't consume the state here, and end up trying to read separator twice. - // Instead, we keep track of the state and restore it if we couldn't decode as nil. - - if c := d.s.sc.sep(); c != 0 { - d.expectChar(c) + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b } - b := d.skipWhitespace(false) - if b == 'n' { + if d.tok == 'n' { d.readStrIdx(10, 13) // ull - d.ct = valueTypeNil return true } - d.r.unreadn1() - d.s.sc.retryRead() return false } func (d *jsonDecDriver) DecodeBool() bool { - if c := d.s.sc.sep(); c != 0 { - d.expectChar(c) + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b } - b := d.skipWhitespace(false) - if b == 'f' { + if d.tok == 'f' { d.readStrIdx(5, 9) // alse return false } - if b == 't' { + if d.tok == 't' { d.readStrIdx(1, 4) // rue return true } - d.d.errorf("json: decode bool: got first char %c", b) + d.d.errorf("json: decode bool: got first char %c", d.tok) return false // "unreachable" } func (d *jsonDecDriver) ReadMapStart() int { - if c := d.s.sc.sep(); c != 0 { - d.expectChar(c) + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b } - d.s.start('}') - d.expectChar('{') - d.ct = valueTypeMap - return -1 -} - -func (d *jsonDecDriver) ReadArrayStart() int { - if c := d.s.sc.sep(); c != 0 { - d.expectChar(c) + if d.tok != '{' { + d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok) } - d.s.start(']') - d.expectChar('[') - d.ct = valueTypeArray + d.tok = 0 + d.c = containerMapStart return -1 } -func (d *jsonDecDriver) ReadEnd() { - b := d.s.sc.st - d.s.end() - d.expectChar(b) -} - -func (d *jsonDecDriver) expectChar(c uint8) { - b := d.skipWhitespace(false) - if b != c { - d.d.errorf("json: expect char '%c' but got char '%c'", c, b) - return +func (d *jsonDecDriver) ReadArrayStart() int { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b } - if jsonTrackSkipWhitespace { - d.wsSkipped = false + if d.tok != '[' { + d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok) } + d.tok = 0 + d.c = containerArrayStart + return -1 } -// func (d *jsonDecDriver) maybeChar(c uint8) { -// b := d.skipWhitespace(false) -// if b != c { -// d.r.unreadn1() -// return -// } -// if jsonTrackSkipWhitespace { -// d.wsSkipped = false -// } -// } - -func (d *jsonDecDriver) IsContainerType(vt valueType) bool { +func (d *jsonDecDriver) ContainerType() (vt valueType) { // check container type by checking the first char - if d.ct == valueTypeUnset { - b := d.skipWhitespace(true) - if b == '{' { - d.ct = valueTypeMap - } else if b == '[' { - d.ct = valueTypeArray - } else if b == 'n' { - d.ct = valueTypeNil - } else if b == '"' { - d.ct = valueTypeString + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { } - } - if vt == valueTypeNil || vt == valueTypeBytes || vt == valueTypeString || - vt == valueTypeArray || vt == valueTypeMap { - return d.ct == vt - } - // ugorji: made switch into conditionals, so that IsContainerType can be inlined. - // switch vt { - // case valueTypeNil, valueTypeBytes, valueTypeString, valueTypeArray, valueTypeMap: - // return d.ct == vt - // } - d.d.errorf("isContainerType: unsupported parameter: %v", vt) - return false // "unreachable" + d.tok = b + } + if b := d.tok; b == '{' { + return valueTypeMap + } else if b == '[' { + return valueTypeArray + } else if b == 'n' { + return valueTypeNil + } else if b == '"' { + return valueTypeString + } + return valueTypeUnset + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // return false // "unreachable" } func (d *jsonDecDriver) decNum(storeBytes bool) { - // storeBytes = true // TODO: remove. - // If it is has a . or an e|E, decode as a float; else decode as an int. - b := d.skipWhitespace(false) + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + b := d.tok if !(b == '+' || b == '-' || b == '.' || (b >= '0' && b <= '9')) { d.d.errorf("json: decNum: got first char '%c'", b) return } + d.tok = 0 const cutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) const jsonNumUintMaxVal = 1<= slen { + if slen <= cap(bs) { bsOut = bs[:slen] + } else if zerocopy && slen <= cap(d.b2) { + bsOut = d.b2[:slen] } else { bsOut = make([]byte, slen) } @@ -902,20 +915,36 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut [ } func (d *jsonDecDriver) DecodeString() (s string) { - if c := d.s.sc.sep(); c != 0 { - d.expectChar(c) + d.appendStringAsBytes() + // if x := d.s.sc; x != nil && x.so && x.st == '}' { // map key + if d.c == containerMapKey { + return d.d.string(d.bs) } - return string(d.appendStringAsBytes(d.b[:0])) + return string(d.bs) } -func (d *jsonDecDriver) appendStringAsBytes(v []byte) []byte { - d.expectChar('"') +func (d *jsonDecDriver) appendStringAsBytes() { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '"' { + d.d.errorf("json: expect char '%c' but got char '%c'", '"', d.tok) + } + d.tok = 0 + + v := d.bs[:0] + var c uint8 + r := d.r for { - c := d.r.readn1() + c = r.readn1() if c == '"' { break } else if c == '\\' { - c = d.r.readn1() + c = r.readn1() switch c { case '"', '\\', '/', '\'': v = append(v, c) @@ -939,27 +968,24 @@ func (d *jsonDecDriver) appendStringAsBytes(v []byte) []byte { v = append(v, d.bstr[:w2]...) default: d.d.errorf("json: unsupported escaped value: %c", c) - return nil } } else { v = append(v, c) } } - if jsonTrackSkipWhitespace { - d.wsSkipped = false - } - return v + d.bs = v } func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune { - if checkSlashU && !(d.r.readn1() == '\\' && d.r.readn1() == 'u') { + r := d.r + if checkSlashU && !(r.readn1() == '\\' && r.readn1() == 'u') { d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`) return 0 } // u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64) var u uint32 for i := 0; i < 4; i++ { - v := d.r.readn1() + v := r.readn1() if '0' <= v && v <= '9' { v = v - '0' } else if 'a' <= v && v <= 'z' { @@ -975,75 +1001,83 @@ func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune { return rune(u) } -func (d *jsonDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { - if c := d.s.sc.sep(); c != 0 { - d.expectChar(c) +func (d *jsonDecDriver) DecodeNaked() { + z := &d.d.n + // var decodeFurther bool + + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b } - n := d.skipWhitespace(true) - switch n { + switch d.tok { case 'n': - d.readStrIdx(9, 13) // null - vt = valueTypeNil + d.readStrIdx(10, 13) // ull + z.v = valueTypeNil case 'f': - d.readStrIdx(4, 9) // false - vt = valueTypeBool - v = false + d.readStrIdx(5, 9) // alse + z.v = valueTypeBool + z.b = false case 't': - d.readStrIdx(0, 4) // true - vt = valueTypeBool - v = true + d.readStrIdx(1, 4) // rue + z.v = valueTypeBool + z.b = true case '{': - vt = valueTypeMap - decodeFurther = true + z.v = valueTypeMap + // d.tok = 0 // don't consume. kInterfaceNaked will call ReadMapStart + // decodeFurther = true case '[': - vt = valueTypeArray - decodeFurther = true + z.v = valueTypeArray + // d.tok = 0 // don't consume. kInterfaceNaked will call ReadArrayStart + // decodeFurther = true case '"': - vt = valueTypeString - v = string(d.appendStringAsBytes(d.b[:0])) // same as d.DecodeString(), but skipping sep() call. + z.v = valueTypeString + z.s = d.DecodeString() default: // number d.decNum(true) n := &d.n // if the string had a any of [.eE], then decode as float. switch { case n.explicitExponent, n.dot, n.exponent < 0, n.manOverflow: - vt = valueTypeFloat - v = n.floatVal() + z.v = valueTypeFloat + z.f = d.floatVal() case n.exponent == 0: u := n.mantissa switch { case n.neg: - vt = valueTypeInt - v = -int64(u) + z.v = valueTypeInt + z.i = -int64(u) case d.h.SignedInteger: - vt = valueTypeInt - v = int64(u) + z.v = valueTypeInt + z.i = int64(u) default: - vt = valueTypeUint - v = u + z.v = valueTypeUint + z.u = u } default: u, overflow := n.uintExp() switch { case overflow: - vt = valueTypeFloat - v = n.floatVal() + z.v = valueTypeFloat + z.f = d.floatVal() case n.neg: - vt = valueTypeInt - v = -int64(u) + z.v = valueTypeInt + z.i = -int64(u) case d.h.SignedInteger: - vt = valueTypeInt - v = int64(u) + z.v = valueTypeInt + z.i = int64(u) default: - vt = valueTypeUint - v = u + z.v = valueTypeUint + z.u = u } } // fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v) } - if decodeFurther { - d.s.sc.retryRead() - } + // if decodeFurther { + // d.s.sc.retryRead() + // } return } @@ -1053,7 +1087,8 @@ func (d *jsonDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurthe // // Json is comprehensively supported: // - decodes numbers into interface{} as int, uint or float64 -// - encodes and decodes []byte using base64 Std Encoding +// - configurable way to encode/decode []byte . +// by default, encodes and decodes []byte using base64 Std Encoding // - UTF-8 support for encoding and decoding // // It has better performance than the json library in the standard library, @@ -1065,21 +1100,67 @@ func (d *jsonDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurthe // For example, a user can read a json value, then a cbor value, then a msgpack value, // all from the same stream in sequence. type JsonHandle struct { - BasicHandle textEncodingType + BasicHandle + // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. + // If not configured, raw bytes are encoded to/from base64 text. + RawBytesExt InterfaceExt + + // Indent indicates how a value is encoded. + // - If positive, indent by that number of spaces. + // - If negative, indent by that number of tabs. + Indent int8 +} + +func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{i: ext}) } func (h *JsonHandle) newEncDriver(e *Encoder) encDriver { - return &jsonEncDriver{e: e, w: e.w, h: h} + hd := jsonEncDriver{e: e, h: h} + hd.bs = hd.b[:0] + + hd.reset() + + return &hd } func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} - hd := jsonDecDriver{d: d, r: d.r, h: h} - hd.n.bytes = d.b[:] + hd := jsonDecDriver{d: d, h: h} + hd.bs = hd.b[:0] + hd.reset() return &hd } +func (e *jsonEncDriver) reset() { + e.w = e.e.w + e.se.i = e.h.RawBytesExt + if e.bs != nil { + e.bs = e.bs[:0] + } + e.d, e.dt, e.dl, e.ds = false, false, 0, "" + e.c = 0 + if e.h.Indent > 0 { + e.d = true + e.ds = jsonSpaces[:e.h.Indent] + } else if e.h.Indent < 0 { + e.d = true + e.dt = true + e.ds = jsonTabs[:-(e.h.Indent)] + } +} + +func (d *jsonDecDriver) reset() { + d.r = d.d.r + d.se.i = d.h.RawBytesExt + if d.bs != nil { + d.bs = d.bs[:0] + } + d.c, d.tok = 0, 0 + d.n.reset() +} + var jsonEncodeTerminate = []byte{' '} func (h *JsonHandle) rpcEncodeTerminate() []byte { diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go index 7c9f8e6..afe5935 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go @@ -24,6 +24,7 @@ import ( "io" "math" "net/rpc" + "reflect" ) const ( @@ -102,11 +103,11 @@ var ( //--------------------------------------------- type msgpackEncDriver struct { + noBuiltInTypes + encNoSeparator e *Encoder w encWriter h *MsgpackHandle - noBuiltInTypes - encNoSeparator x [8]byte } @@ -270,7 +271,6 @@ type msgpackDecDriver struct { bd byte bdRead bool br bool // bytes reader - bdType valueType noBuiltInTypes noStreamingCodec decNoSeparator @@ -281,106 +281,100 @@ type msgpackDecDriver struct { // It is called when a nil interface{} is passed, leaving it up to the DecDriver // to introspect the stream and decide how best to decode. // It deciphers the value by looking at the stream first. -func (d *msgpackDecDriver) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { +func (d *msgpackDecDriver) DecodeNaked() { if !d.bdRead { d.readNextBd() } bd := d.bd + n := &d.d.n + var decodeFurther bool switch bd { case mpNil: - vt = valueTypeNil + n.v = valueTypeNil d.bdRead = false case mpFalse: - vt = valueTypeBool - v = false + n.v = valueTypeBool + n.b = false case mpTrue: - vt = valueTypeBool - v = true + n.v = valueTypeBool + n.b = true case mpFloat: - vt = valueTypeFloat - v = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + n.v = valueTypeFloat + n.f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) case mpDouble: - vt = valueTypeFloat - v = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + n.v = valueTypeFloat + n.f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) case mpUint8: - vt = valueTypeUint - v = uint64(d.r.readn1()) + n.v = valueTypeUint + n.u = uint64(d.r.readn1()) case mpUint16: - vt = valueTypeUint - v = uint64(bigen.Uint16(d.r.readx(2))) + n.v = valueTypeUint + n.u = uint64(bigen.Uint16(d.r.readx(2))) case mpUint32: - vt = valueTypeUint - v = uint64(bigen.Uint32(d.r.readx(4))) + n.v = valueTypeUint + n.u = uint64(bigen.Uint32(d.r.readx(4))) case mpUint64: - vt = valueTypeUint - v = uint64(bigen.Uint64(d.r.readx(8))) + n.v = valueTypeUint + n.u = uint64(bigen.Uint64(d.r.readx(8))) case mpInt8: - vt = valueTypeInt - v = int64(int8(d.r.readn1())) + n.v = valueTypeInt + n.i = int64(int8(d.r.readn1())) case mpInt16: - vt = valueTypeInt - v = int64(int16(bigen.Uint16(d.r.readx(2)))) + n.v = valueTypeInt + n.i = int64(int16(bigen.Uint16(d.r.readx(2)))) case mpInt32: - vt = valueTypeInt - v = int64(int32(bigen.Uint32(d.r.readx(4)))) + n.v = valueTypeInt + n.i = int64(int32(bigen.Uint32(d.r.readx(4)))) case mpInt64: - vt = valueTypeInt - v = int64(int64(bigen.Uint64(d.r.readx(8)))) + n.v = valueTypeInt + n.i = int64(int64(bigen.Uint64(d.r.readx(8)))) default: switch { case bd >= mpPosFixNumMin && bd <= mpPosFixNumMax: // positive fixnum (always signed) - vt = valueTypeInt - v = int64(int8(bd)) + n.v = valueTypeInt + n.i = int64(int8(bd)) case bd >= mpNegFixNumMin && bd <= mpNegFixNumMax: // negative fixnum - vt = valueTypeInt - v = int64(int8(bd)) + n.v = valueTypeInt + n.i = int64(int8(bd)) case bd == mpStr8, bd == mpStr16, bd == mpStr32, bd >= mpFixStrMin && bd <= mpFixStrMax: if d.h.RawToString { - var rvm string - vt = valueTypeString - v = &rvm + n.v = valueTypeString + n.s = d.DecodeString() } else { - var rvm = zeroByteSlice - vt = valueTypeBytes - v = &rvm + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) } - decodeFurther = true case bd == mpBin8, bd == mpBin16, bd == mpBin32: - var rvm = zeroByteSlice - vt = valueTypeBytes - v = &rvm - decodeFurther = true + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax: - vt = valueTypeArray + n.v = valueTypeArray decodeFurther = true case bd == mpMap16, bd == mpMap32, bd >= mpFixMapMin && bd <= mpFixMapMax: - vt = valueTypeMap + n.v = valueTypeMap decodeFurther = true case bd >= mpFixExt1 && bd <= mpFixExt16, bd >= mpExt8 && bd <= mpExt32: + n.v = valueTypeExt clen := d.readExtLen() - var re RawExt - re.Tag = uint64(d.r.readn1()) - re.Data = d.r.readx(clen) - v = &re - vt = valueTypeExt + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(clen) default: d.d.errorf("Nil-Deciphered DecodeValue: %s: hex: %x, dec: %d", msgBadDesc, bd, bd) - return } } if !decodeFurther { d.bdRead = false } - if vt == valueTypeUint && d.h.SignedInteger { - d.bdType = valueTypeInt - v = int64(v.(uint64)) + if n.v == valueTypeUint && d.h.SignedInteger { + n.v = valueTypeInt + n.i = int64(n.v) } return } @@ -565,28 +559,27 @@ func (d *msgpackDecDriver) DecodeString() (s string) { func (d *msgpackDecDriver) readNextBd() { d.bd = d.r.readn1() d.bdRead = true - d.bdType = valueTypeUnset } -func (d *msgpackDecDriver) IsContainerType(vt valueType) bool { +func (d *msgpackDecDriver) ContainerType() (vt valueType) { bd := d.bd - switch vt { - case valueTypeNil: - return bd == mpNil - case valueTypeBytes: - return bd == mpBin8 || bd == mpBin16 || bd == mpBin32 || - (!d.h.RawToString && - (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax))) - case valueTypeString: - return d.h.RawToString && - (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax)) - case valueTypeArray: - return bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) - case valueTypeMap: - return bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) - } - d.d.errorf("isContainerType: unsupported parameter: %v", vt) - return false // "unreachable" + if bd == mpNil { + return valueTypeNil + } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 || + (!d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax))) { + return valueTypeBytes + } else if d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax)) { + return valueTypeString + } else if bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) { + return valueTypeArray + } else if bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset } func (d *msgpackDecDriver) TryDecodeAsNil() (v bool) { @@ -700,7 +693,6 @@ func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs //MsgpackHandle is a Handle for the Msgpack Schema-Free Encoding Format. type MsgpackHandle struct { BasicHandle - binaryEncodingType // RawToString controls how raw bytes are decoded into a nil interface{}. RawToString bool @@ -716,6 +708,11 @@ type MsgpackHandle struct { // type is provided (e.g. decoding into a nil interface{}), you get back // a []byte or string based on the setting of RawToString. WriteExt bool + binaryEncodingType +} + +func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) } func (h *MsgpackHandle) newEncDriver(e *Encoder) encDriver { @@ -726,6 +723,15 @@ func (h *MsgpackHandle) newDecDriver(d *Decoder) decDriver { return &msgpackDecDriver{d: d, r: d.r, h: h, br: d.bytes} } +func (e *msgpackEncDriver) reset() { + e.w = e.e.w +} + +func (d *msgpackDecDriver) reset() { + d.r = d.d.r + d.bd, d.bdRead = 0, false +} + //-------------------------------------------------- type msgpackSpecRpcCodec struct { diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go index bcfe60e..cfee3d0 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go @@ -38,27 +38,44 @@ type noopHandle struct { } type noopDrv struct { + d *Decoder + e *Encoder i int S []string B [][]byte mks []bool // stack. if map (true), else if array (false) mk bool // top of stack. what container are we on? map or array? - ct valueType // last request for IsContainerType. - cb bool // last response for IsContainerType. + ct valueType // last response for IsContainerType. + cb int // counter for ContainerType rand *rand.Rand } func (h *noopDrv) r(v int) int { return h.rand.Intn(v) } func (h *noopDrv) m(v int) int { h.i++; return h.i % v } -func (h *noopDrv) newEncDriver(_ *Encoder) encDriver { return h } -func (h *noopDrv) newDecDriver(_ *Decoder) decDriver { return h } +func (h *noopDrv) newEncDriver(e *Encoder) encDriver { h.e = e; return h } +func (h *noopDrv) newDecDriver(d *Decoder) decDriver { h.d = d; return h } + +func (h *noopDrv) reset() {} +func (h *noopDrv) uncacheRead() {} // --- encDriver // stack functions (for map and array) -func (h *noopDrv) start(b bool) { h.mks = append(h.mks, b); h.mk = b } -func (h *noopDrv) end() { h.mks = h.mks[:len(h.mks)-1]; h.mk = h.mks[len(h.mks)-1] } +func (h *noopDrv) start(b bool) { + // println("start", len(h.mks)+1) + h.mks = append(h.mks, b) + h.mk = b +} +func (h *noopDrv) end() { + // println("end: ", len(h.mks)-1) + h.mks = h.mks[:len(h.mks)-1] + if len(h.mks) > 0 { + h.mk = h.mks[len(h.mks)-1] + } else { + h.mk = false + } +} func (h *noopDrv) EncodeBuiltin(rt uintptr, v interface{}) {} func (h *noopDrv) EncodeNil() {} @@ -93,24 +110,54 @@ func (h *noopDrv) DecodeString() (s string) { return h.S[h.m(8 func (h *noopDrv) DecodeBytes(bs []byte, isstring, zerocopy bool) []byte { return h.B[h.m(len(h.B))] } -func (h *noopDrv) ReadEnd() { h.start(true) } +func (h *noopDrv) ReadEnd() { h.end() } // toggle map/slice func (h *noopDrv) ReadMapStart() int { h.start(true); return h.m(10) } func (h *noopDrv) ReadArrayStart() int { h.start(false); return h.m(10) } -func (h *noopDrv) IsContainerType(vt valueType) bool { +func (h *noopDrv) ContainerType() (vt valueType) { // return h.m(2) == 0 - // handle kStruct - if h.ct == valueTypeMap && vt == valueTypeArray || h.ct == valueTypeArray && vt == valueTypeMap { - h.cb = !h.cb - h.ct = vt - return h.cb - } - // go in a loop and check it. - h.ct = vt - h.cb = h.m(7) == 0 - return h.cb + // handle kStruct, which will bomb is it calls this and doesn't get back a map or array. + // consequently, if the return value is not map or array, reset it to one of them based on h.m(7) % 2 + // for kstruct: at least one out of every 2 times, return one of valueTypeMap or Array (else kstruct bombs) + // however, every 10th time it is called, we just return something else. + var vals = [...]valueType{valueTypeArray, valueTypeMap} + // ------------ TAKE ------------ + // if h.cb%2 == 0 { + // if h.ct == valueTypeMap || h.ct == valueTypeArray { + // } else { + // h.ct = vals[h.m(2)] + // } + // } else if h.cb%5 == 0 { + // h.ct = valueType(h.m(8)) + // } else { + // h.ct = vals[h.m(2)] + // } + // ------------ TAKE ------------ + // if h.cb%16 == 0 { + // h.ct = valueType(h.cb % 8) + // } else { + // h.ct = vals[h.cb%2] + // } + h.ct = vals[h.cb%2] + h.cb++ + return h.ct + + // if h.ct == valueTypeNil || h.ct == valueTypeString || h.ct == valueTypeBytes { + // return h.ct + // } + // return valueTypeUnset + // TODO: may need to tweak this so it works. + // if h.ct == valueTypeMap && vt == valueTypeArray || h.ct == valueTypeArray && vt == valueTypeMap { + // h.cb = !h.cb + // h.ct = vt + // return h.cb + // } + // // go in a loop and check it. + // h.ct = vt + // h.cb = h.m(7) == 0 + // return h.cb } func (h *noopDrv) TryDecodeAsNil() bool { if h.mk { @@ -123,7 +170,7 @@ func (h *noopDrv) DecodeExt(rv interface{}, xtag uint64, ext Ext) uint64 { return 0 } -func (h *noopDrv) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool) { +func (h *noopDrv) DecodeNaked() { // use h.r (random) not h.m() because h.m() could cause the same value to be given. var sk int if h.mk { @@ -132,32 +179,35 @@ func (h *noopDrv) DecodeNaked() (v interface{}, vt valueType, decodeFurther bool } else { sk = h.r(12) } + n := &h.d.n switch sk { case 0: - vt = valueTypeNil + n.v = valueTypeNil case 1: - vt, v = valueTypeBool, false + n.v, n.b = valueTypeBool, false case 2: - vt, v = valueTypeBool, true + n.v, n.b = valueTypeBool, true case 3: - vt, v = valueTypeInt, h.DecodeInt(64) + n.v, n.i = valueTypeInt, h.DecodeInt(64) case 4: - vt, v = valueTypeUint, h.DecodeUint(64) + n.v, n.u = valueTypeUint, h.DecodeUint(64) case 5: - vt, v = valueTypeFloat, h.DecodeFloat(true) + n.v, n.f = valueTypeFloat, h.DecodeFloat(true) case 6: - vt, v = valueTypeFloat, h.DecodeFloat(false) + n.v, n.f = valueTypeFloat, h.DecodeFloat(false) case 7: - vt, v = valueTypeString, h.DecodeString() + n.v, n.s = valueTypeString, h.DecodeString() case 8: - vt, v = valueTypeBytes, h.B[h.m(len(h.B))] + n.v, n.l = valueTypeBytes, h.B[h.m(len(h.B))] case 9: - vt, decodeFurther = valueTypeArray, true + n.v = valueTypeArray case 10: - vt, decodeFurther = valueTypeMap, true + n.v = valueTypeMap default: - vt, v = valueTypeExt, &RawExt{Tag: h.DecodeUint(64), Data: h.B[h.m(len(h.B))]} + n.v = valueTypeExt + n.u = h.DecodeUint(64) + n.l = h.B[h.m(len(h.B))] } - h.ct = vt + h.ct = n.v return } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh b/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh index c58f178..98f4424 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh @@ -49,7 +49,8 @@ _build() { # [ -e "safe${_gg}" ] && mv safe${_gg} safe${_gg}__${_zts}.bak # [ -e "unsafe${_gg}" ] && mv unsafe${_gg} unsafe${_gg}__${_zts}.bak else - rm -f fast-path.generated.go gen.generated.go gen-helper.generated.go *safe.generated.go *_generated_test.go *.generated_ffjson_expose.go + rm -f fast-path.generated.go gen.generated.go gen-helper.generated.go \ + *safe.generated.go *_generated_test.go *.generated_ffjson_expose.go fi cat > gen.generated.go < fast-path.generated.go < gen-from-tmpl.codec.generated.go < gen-from-tmpl.generated.go <>>>>>> tags: $ztags" + printf '............. TAGS: %s .............\n' "$ztags" + # echo ">>>>>>> TAGS: $ztags" OPTIND=1 - while getopts "xurtcinsvg" flag + while getopts "_xurtcinsvgzmefdl" flag do case "x$flag" in - 'xt') echo ">>>>>>> REGULAR "; go test "-tags=$ztags" "$zverbose" ; sleep 2 ;; - 'xc') echo ">>>>>>> CANONICAL "; go test "-tags=$ztags" "$zverbose" -tc; sleep 2 ;; - 'xi') echo ">>>>>>> I/O "; go test "-tags=$ztags" "$zverbose" -ti; sleep 2 ;; - 'xn') echo ">>>>>>> NO_SYMBOLS "; go test "-tags=$ztags" "$zverbose" -tn; sleep 2 ;; - 'xs') echo ">>>>>>> TO_ARRAY "; go test "-tags=$ztags" "$zverbose" -ts; sleep 2 ;; + 'xt') printf ">>>>>>> REGULAR : "; go test "-tags=$ztags" $zargs ; sleep 2 ;; + 'xc') printf ">>>>>>> CANONICAL : "; go test "-tags=$ztags" $zargs -tc; sleep 2 ;; + 'xi') printf ">>>>>>> I/O : "; go test "-tags=$ztags" $zargs -ti; sleep 2 ;; + 'xn') printf ">>>>>>> NO_SYMBOLS : "; go test "-tags=$ztags" -run=Binc $zargs -tn; sleep 2 ;; + 'xs') printf ">>>>>>> TO_ARRAY : "; go test "-tags=$ztags" $zargs -ts; sleep 2 ;; + 'xe') printf ">>>>>>> INTERN : "; go test "-tags=$ztags" $zargs -te; sleep 2 ;; + 'xd') printf ">>>>>>> INDENT : "; + go test "-tags=$ztags" -run=JsonCodecsTable -td=-1 $zargs; + go test "-tags=$ztags" -run=JsonCodecsTable -td=8 $zargs; + sleep 2 ;; *) ;; esac done @@ -43,13 +58,23 @@ _run() { OPTIND=1 } -echo ">>>>>>> RUNNING VARIATIONS OF TESTS" -if [[ "x$@" = x ]]; then - # r, x, g, gu - _run "-rtcins" - _run "-xtcins" - _run "-gtcins" - _run "-gutcins" +# echo ">>>>>>> RUNNING VARIATIONS OF TESTS" +if [[ "x$@" = "x" ]]; then + # All: r, x, g, gu + _run "-_tcinsed_ml" # regular + _run "-_tcinsed_ml_z" # regular with reset + _run "-_tcinsed_ml_f" # regular with no fastpath (notfastpath) + _run "-x_tcinsed_ml" # external + _run "-gx_tcinsed_ml" # codecgen: requires external + _run "-gxu_tcinsed_ml" # codecgen + unsafe +elif [[ "x$@" = "x-Z" ]]; then + # Regular + _run "-_tcinsed_ml" # regular + _run "-_tcinsed_ml_z" # regular with reset +elif [[ "x$@" = "x-F" ]]; then + # regular with notfastpath + _run "-_tcinsed_ml_f" # regular + _run "-_tcinsed_ml_zf" # regular with reset else _run "$@" fi diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go index 733fc3f..718b731 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go +++ b/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go @@ -4,13 +4,53 @@ package codec import ( + "fmt" + "reflect" "time" ) var ( - timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} + timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} + timeExtEncFn = func(rv reflect.Value) (bs []byte, err error) { + defer panicToErr(&err) + bs = timeExt{}.WriteExt(rv.Interface()) + return + } + timeExtDecFn = func(rv reflect.Value, bs []byte) (err error) { + defer panicToErr(&err) + timeExt{}.ReadExt(rv.Interface(), bs) + return + } ) +type timeExt struct{} + +func (x timeExt) WriteExt(v interface{}) (bs []byte) { + switch v2 := v.(type) { + case time.Time: + bs = encodeTime(v2) + case *time.Time: + bs = encodeTime(*v2) + default: + panic(fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2)) + } + return +} +func (x timeExt) ReadExt(v interface{}, bs []byte) { + tt, err := decodeTime(bs) + if err != nil { + panic(err) + } + *(v.(*time.Time)) = tt +} + +func (x timeExt) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} +func (x timeExt) UpdateExt(v interface{}, src interface{}) { + x.ReadExt(v, src.([]byte)) +} + // EncodeTime encodes a time.Time as a []byte, including // information on the instant in time and UTC offset. // diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go deleted file mode 100644 index 4ec28e1..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/values_test.go +++ /dev/null @@ -1,203 +0,0 @@ -// // +build testing - -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -package codec - -// This file contains values used by tests and benchmarks. -// JSON/BSON do not like maps with keys that are not strings, -// so we only use maps with string keys here. - -import ( - "math" - "time" -) - -var testStrucTime = time.Date(2012, 2, 2, 2, 2, 2, 2000, time.UTC).UTC() - -type AnonInTestStruc struct { - AS string - AI64 int64 - AI16 int16 - AUi64 uint64 - ASslice []string - AI64slice []int64 - AF64slice []float64 - // AMI32U32 map[int32]uint32 - // AMU32F64 map[uint32]float64 // json/bson do not like it - AMSU16 map[string]uint16 -} - -type AnonInTestStrucIntf struct { - Islice []interface{} - Ms map[string]interface{} - Nintf interface{} //don't set this, so we can test for nil - T time.Time -} - -type TestStruc struct { - _struct struct{} `codec:",omitempty"` //set omitempty for every field - - S string - I64 int64 - I16 int16 - Ui64 uint64 - Ui8 uint8 - B bool - By uint8 // byte: msgp doesn't like byte - - Sslice []string - I64slice []int64 - I16slice []int16 - Ui64slice []uint64 - Ui8slice []uint8 - Bslice []bool - Byslice []byte - - Iptrslice []*int64 - - // TODO: test these separately, specifically for reflection and codecgen. - // Unfortunately, ffjson doesn't support these. Its compilation even fails. - // Ui64array [4]uint64 - // Ui64slicearray [][4]uint64 - - AnonInTestStruc - - //M map[interface{}]interface{} `json:"-",bson:"-"` - Msi64 map[string]int64 - - // make this a ptr, so that it could be set or not. - // for comparison (e.g. with msgp), give it a struct tag (so it is not inlined), - // make this one omitempty (so it is included if nil). - *AnonInTestStrucIntf `codec:",omitempty"` - - Nmap map[string]bool //don't set this, so we can test for nil - Nslice []byte //don't set this, so we can test for nil - Nint64 *int64 //don't set this, so we can test for nil - Mtsptr map[string]*TestStruc - Mts map[string]TestStruc - Its []*TestStruc - Nteststruc *TestStruc -} - -// small struct for testing that codecgen works for unexported types -type tLowerFirstLetter struct { - I int - u uint64 - S string - b []byte -} - -func newTestStruc(depth int, bench bool, useInterface, useStringKeyOnly bool) (ts *TestStruc) { - var i64a, i64b, i64c, i64d int64 = 64, 6464, 646464, 64646464 - - ts = &TestStruc{ - S: "some string", - I64: math.MaxInt64 * 2 / 3, // 64, - I16: 1616, - Ui64: uint64(int64(math.MaxInt64 * 2 / 3)), // 64, //don't use MaxUint64, as bson can't write it - Ui8: 160, - B: true, - By: 5, - - Sslice: []string{"one", "two", "three"}, - I64slice: []int64{1111, 2222, 3333}, - I16slice: []int16{44, 55, 66}, - Ui64slice: []uint64{12121212, 34343434, 56565656}, - Ui8slice: []uint8{210, 211, 212}, - Bslice: []bool{true, false, true, false}, - Byslice: []byte{13, 14, 15}, - - Msi64: map[string]int64{ - "one": 1, - "two": 2, - }, - AnonInTestStruc: AnonInTestStruc{ - // There's more leeway in altering this. - AS: "A-String", - AI64: -64646464, - AI16: 1616, - AUi64: 64646464, - // (U+1D11E)G-clef character may be represented in json as "\uD834\uDD1E". - // single reverse solidus character may be represented in json as "\u005C". - // include these in ASslice below. - ASslice: []string{"Aone", "Atwo", "Athree", - "Afour.reverse_solidus.\u005c", "Afive.Gclef.\U0001d11E"}, - AI64slice: []int64{1, -22, 333, -4444, 55555, -666666}, - AMSU16: map[string]uint16{"1": 1, "22": 2, "333": 3, "4444": 4}, - AF64slice: []float64{11.11e-11, 22.22E+22, 33.33E-33, 44.44e+44, 555.55E-6, 666.66E6}, - }, - } - if useInterface { - ts.AnonInTestStrucIntf = &AnonInTestStrucIntf{ - Islice: []interface{}{"true", true, "no", false, uint64(288), float64(0.4)}, - Ms: map[string]interface{}{ - "true": "true", - "int64(9)": false, - }, - T: testStrucTime, - } - } - - //For benchmarks, some things will not work. - if !bench { - //json and bson require string keys in maps - //ts.M = map[interface{}]interface{}{ - // true: "true", - // int8(9): false, - //} - //gob cannot encode nil in element in array (encodeArray: nil element) - ts.Iptrslice = []*int64{nil, &i64a, nil, &i64b, nil, &i64c, nil, &i64d, nil} - // ts.Iptrslice = nil - } - if !useStringKeyOnly { - // ts.AnonInTestStruc.AMU32F64 = map[uint32]float64{1: 1, 2: 2, 3: 3} // Json/Bson barf - } - if depth > 0 { - depth-- - if ts.Mtsptr == nil { - ts.Mtsptr = make(map[string]*TestStruc) - } - if ts.Mts == nil { - ts.Mts = make(map[string]TestStruc) - } - ts.Mtsptr["0"] = newTestStruc(depth, bench, useInterface, useStringKeyOnly) - ts.Mts["0"] = *(ts.Mtsptr["0"]) - ts.Its = append(ts.Its, ts.Mtsptr["0"]) - } - return -} - -// Some other types - -type Sstring string -type Bbool bool -type Sstructsmall struct { - A int -} - -type Sstructbig struct { - A int - B bool - c string - // Sval Sstruct - Ssmallptr *Sstructsmall - Ssmall *Sstructsmall - Sptr *Sstructbig -} - -type SstructbigMapBySlice struct { - _struct struct{} `codec:",toarray"` - A int - B bool - c string - // Sval Sstruct - Ssmallptr *Sstructsmall - Ssmall *Sstructsmall - Sptr *Sstructbig -} - -type Sinterface interface { - Noop() -} From 0388716a99b5c12233a780d580aebad1510fb682 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire Date: Thu, 12 Nov 2015 14:51:36 +0100 Subject: [PATCH 021/163] update dependencies --- .../github.com/Sirupsen/logrus/entry_test.go | 77 - .../Sirupsen/logrus/formatter_bench_test.go | 98 - .../formatters/logstash/logstash_test.go | 52 - .../github.com/Sirupsen/logrus/hook_test.go | 122 - .../logrus/hooks/airbrake/airbrake_test.go | 133 - .../logrus/hooks/bugsnag/bugsnag_test.go | 64 - .../hooks/papertrail/papertrail_test.go | 26 - .../logrus/hooks/sentry/sentry_test.go | 154 -- .../logrus/hooks/syslog/syslog_test.go | 26 - .../Sirupsen/logrus/json_formatter_test.go | 120 - .../github.com/Sirupsen/logrus/logrus_test.go | 301 --- .../Sirupsen/logrus/text_formatter_test.go | 61 - .../src/github.com/spf13/pflag/LICENSE | 28 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../src/github.com/appc/spec/LICENSE | 202 ++ .../appc/spec/discovery/discovery_test.go | 227 -- .../appc/spec/discovery/http_test.go | 162 -- .../appc/spec/discovery/parse_test.go | 175 -- .../github.com/appc/spec/schema/image_test.go | 62 - .../appc/spec/schema/lastditch/image_test.go | 70 - .../appc/spec/schema/lastditch/pod_test.go | 161 -- .../github.com/appc/spec/schema/pod_test.go | 73 - .../spec/schema/types/acidentifier_test.go | 279 -- .../appc/spec/schema/types/ackind_test.go | 93 - .../appc/spec/schema/types/acname_test.go | 266 -- .../spec/schema/types/annotations_test.go | 233 -- .../appc/spec/schema/types/app_test.go | 230 -- .../appc/spec/schema/types/date_test.go | 80 - .../spec/schema/types/dependencies_test.go | 40 - .../spec/schema/types/environment_test.go | 76 - .../appc/spec/schema/types/exec_test.go | 42 - .../appc/spec/schema/types/hash_test.go | 96 - .../appc/spec/schema/types/isolator_test.go | 262 -- .../appc/spec/schema/types/labels_test.go | 108 - .../appc/spec/schema/types/mountpoint_test.go | 83 - .../appc/spec/schema/types/port_test.go | 48 - .../appc/spec/schema/types/semver_test.go | 129 - .../appc/spec/schema/types/url_test.go | 137 - .../appc/spec/schema/types/uuid_test.go | 73 - .../appc/spec/schema/types/volume_test.go | 99 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/ghodss/yaml/LICENSE | 50 + .../inconshreveable/mousetrap/LICENSE | 13 + .../src/github.com/juju/errors/LICENSE | 191 ++ .../src/github.com/mgutz/ansi/LICENSE | 9 + .../github.com/mitchellh/go-homedir/LICENSE | 21 + .../src/github.com/onsi/gomega/LICENSE | 20 + .../src/github.com/spf13/cobra/LICENSE.txt | 174 ++ .../src/github.com/spf13/pflag/LICENSE | 28 + .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 ++ .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../blablacar/cnt/log/formatter_test.go | 43 - .../cnt/utils/version_generator_test.go | 10 - .../blablacar/cnt/utils/version_test.go | 28 - .../src/github.com/akrennmair/gopcap/LICENSE | 27 + .../bgentry/speakeasy/LICENSE_WINDOWS | 201 ++ .../src/github.com/boltdb/bolt/LICENSE | 20 + .../src/github.com/bradfitz/http2/LICENSE | 7 + .../src/github.com/cheggaaa/pb/LICENSE | 12 + .../src/github.com/codegangsta/cli/LICENSE | 21 + .../src/github.com/golang/glog/LICENSE | 191 ++ .../src/github.com/google/btree/LICENSE | 202 ++ .../github.com/jonboulle/clockwork/LICENSE | 201 ++ .../src/github.com/prometheus/procfs/LICENSE | 201 ++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../src/github.com/xiang90/probing/LICENSE | 22 + .../src/golang.org/x/oauth2/LICENSE | 27 + .../src/google.golang.org/grpc/LICENSE | 28 + .../src/google.golang.org/grpc/PATENTS | 22 + .../src/github.com/coreos/etcd/LICENSE | 202 ++ .../src/github.com/coreos/etcd/NOTICE | 5 + .../coreos/etcd/client/client_test.go | 896 ------- .../etcd/client/fake_transport_go14_test.go | 41 - .../coreos/etcd/client/fake_transport_test.go | 42 - .../coreos/etcd/client/keys_bench_test.go | 87 - .../coreos/etcd/client/keys_test.go | 1407 ---------- .../coreos/etcd/client/members_test.go | 522 ---- .../github.com/coreos/etcd/client/srv_test.go | 102 - .../coreos/etcd/pkg/pathutil/path_test.go | 38 - .../coreos/etcd/pkg/types/id_test.go | 95 - .../coreos/etcd/pkg/types/set_test.go | 186 -- .../coreos/etcd/pkg/types/slice_test.go | 30 - .../coreos/etcd/pkg/types/urls_test.go | 169 -- .../etcd/pkg/types/urlsmap_go15_test.go | 40 - .../coreos/etcd/pkg/types/urlsmap_test.go | 99 - .../code.google.com/p/go-uuid/uuid/LICENSE | 27 + .../src/github.com/godbus/dbus/LICENSE | 25 + .../github.com/jonboulle/clockwork/LICENSE | 201 ++ .../googleapi/internal/uritemplates/LICENSE | 18 + .../src/github.com/coreos/fleet/LICENSE | 202 ++ .../src/github.com/coreos/fleet/NOTICE | 5 + .../github.com/coreos/fleet/pkg/args_test.go | 44 - .../coreos/fleet/pkg/backoff_test.go | 40 - .../coreos/fleet/pkg/filepath_test.go | 57 - .../coreos/fleet/pkg/filesystem_test.go | 53 - .../github.com/coreos/fleet/pkg/flag_test.go | 39 - .../coreos/fleet/pkg/lease/etcd_test.go | 131 - .../coreos/fleet/pkg/reconcile_test.go | 138 - .../github.com/coreos/fleet/pkg/set_test.go | 164 -- .../github.com/coreos/fleet/pkg/tls_test.go | 210 -- .../src/github.com/coreos/fleet/ssh/LICENSE | 42 + .../github.com/coreos/fleet/unit/fake_test.go | 114 - .../coreos/fleet/unit/generator_test.go | 79 - .../github.com/coreos/fleet/unit/unit_test.go | 400 --- .../src/github.com/coreos/go-semver/LICENSE | 202 ++ .../coreos/go-semver/semver/semver_test.go | 297 --- .../src/github.com/coreos/go-systemd/LICENSE | 191 ++ .../go-systemd/unit/deserialize_test.go | 381 --- .../coreos/go-systemd/unit/end_to_end_test.go | 88 - .../coreos/go-systemd/unit/escape_test.go | 211 -- .../coreos/go-systemd/unit/option_test.go | 214 -- .../coreos/go-systemd/unit/serialize_test.go | 170 -- .../github.com/SeanDolphin/bqschema/LICENSE | 201 ++ .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/abbot/go-http-auth/LICENSE | 178 ++ .../docker/docker/pkg/symlink/LICENSE.APACHE | 191 ++ .../docker/docker/pkg/symlink/LICENSE.BSD | 27 + .../github.com/docker/libcontainer/LICENSE | 191 ++ .../src/github.com/docker/libcontainer/NOTICE | 16 + .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/codegangsta/cli/LICENSE | 21 + .../src/github.com/coreos/go-systemd/LICENSE | 191 ++ .../vendor/src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/protobuf/LICENSE | 31 + .../github.com/syndtr/gocapability/LICENSE | 24 + .../github.com/fsouza/go-dockerclient/LICENSE | 22 + .../github.com/Sirupsen/logrus/LICENSE | 21 + .../docker/docker/pkg/mflag/LICENSE | 27 + .../github.com/gorilla/context/LICENSE | 27 + .../external/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/glog/LICENSE | 191 ++ .../src/github.com/kr/pretty/License | 21 + .../_workspace/src/github.com/kr/text/License | 19 + .../src/github.com/prometheus/procfs/LICENSE | 201 ++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../src/github.com/stretchr/objx/LICENSE.md | 23 + .../src/golang.org/x/oauth2/LICENSE | 27 + .../googleapi/internal/uritemplates/LICENSE | 18 + .../src/gopkg.in/olivere/elastic.v2/LICENSE | 20 + .../olivere/elastic.v2/uritemplates/LICENSE | 18 + .../src/github.com/google/cadvisor/LICENSE | 190 ++ .../cadvisor/utils/machine/testdata/cpuinfo | 251 -- .../cadvisor/utils/machine/topology_test.go | 117 - .../utils/oomparser/oomparser_test.go | 166 -- .../cadvisor/utils/sysinfo/sysinfo_test.go | 132 - .../google/cadvisor/utils/timed_store_test.go | 221 -- .../jonboulle/clockwork/clockwork_test.go | 129 - .../jonboulle/clockwork/example_test.go | 49 - .../src/github.com/juju/errors/error_test.go | 161 -- .../github.com/juju/errors/errortypes_test.go | 173 -- .../github.com/juju/errors/example_test.go | 23 - .../src/github.com/juju/errors/export_test.go | 12 - .../github.com/juju/errors/functions_test.go | 305 --- .../github.com/juju/errors/package_test.go | 95 - .../src/github.com/juju/errors/path_test.go | 29 - .../kelseyhightower/memkv/store_test.go | 177 -- .../src/github.com/mgutz/ansi/ansi_test.go | 42 - .../mitchellh/go-homedir/homedir_test.go | 98 - .../peterbourgon/mergemap/mergemap_test.go | 89 - .../spf13/cobra/bash_completions_test.go | 80 - .../src/github.com/spf13/cobra/cobra_test.go | 965 ------- .../github.com/spf13/cobra/command_test.go | 90 - .../github.com/spf13/cobra/md_docs_test.go | 67 - .../src/github.com/spf13/pflag/bool_test.go | 180 -- .../github.com/spf13/pflag/example_test.go | 77 - .../src/github.com/spf13/pflag/export_test.go | 29 - .../src/github.com/spf13/pflag/flag_test.go | 755 ------ .../github.com/spf13/pflag/int_slice_test.go | 49 - .../spf13/pflag/string_slice_test.go | 44 - .../_workspace/src/golang.org/x/net/LICENSE | 27 + .../_workspace/src/golang.org/x/net/PATENTS | 22 + .../golang.org/x/net/context/context_test.go | 575 ----- .../x/net/context/ctxhttp/ctxhttp_test.go | 72 - .../x/net/context/withtimeout_test.go | 26 - .../golang.org/x/net/html/atom/atom_test.go | 109 - .../golang.org/x/net/html/atom/table_test.go | 351 --- .../x/net/html/charset/charset_test.go | 236 -- .../html/charset/testdata/HTTP-charset.html | 48 - .../charset/testdata/HTTP-vs-UTF-8-BOM.html | 48 - .../testdata/HTTP-vs-meta-charset.html | 49 - .../testdata/HTTP-vs-meta-content.html | 49 - .../testdata/No-encoding-declaration.html | 47 - .../x/net/html/charset/testdata/README | 9 - .../html/charset/testdata/UTF-16BE-BOM.html | Bin 2670 -> 0 bytes .../html/charset/testdata/UTF-16LE-BOM.html | Bin 2682 -> 0 bytes .../testdata/UTF-8-BOM-vs-meta-charset.html | 49 - .../testdata/UTF-8-BOM-vs-meta-content.html | 48 - .../testdata/meta-charset-attribute.html | 48 - .../testdata/meta-content-attribute.html | 48 - .../src/golang.org/x/net/html/entity_test.go | 29 - .../src/golang.org/x/net/html/escape_test.go | 97 - .../src/golang.org/x/net/html/example_test.go | 40 - .../src/golang.org/x/net/html/node_test.go | 146 -- .../src/golang.org/x/net/html/parse_test.go | 388 --- .../src/golang.org/x/net/html/render_test.go | 156 -- .../golang.org/x/net/html/testdata/go1.html | 2237 ---------------- .../x/net/html/testdata/webkit/README | 28 - .../x/net/html/testdata/webkit/adoption01.dat | 194 -- .../x/net/html/testdata/webkit/adoption02.dat | 31 - .../x/net/html/testdata/webkit/comments01.dat | 135 - .../x/net/html/testdata/webkit/doctype01.dat | 370 --- .../x/net/html/testdata/webkit/entities01.dat | 603 ----- .../x/net/html/testdata/webkit/entities02.dat | 249 -- .../html/testdata/webkit/html5test-com.dat | 246 -- .../x/net/html/testdata/webkit/inbody01.dat | 43 - .../x/net/html/testdata/webkit/isindex.dat | 40 - ...pending-spec-changes-plain-text-unsafe.dat | Bin 115 -> 0 bytes .../testdata/webkit/pending-spec-changes.dat | 52 - .../testdata/webkit/plain-text-unsafe.dat | Bin 4166 -> 0 bytes .../net/html/testdata/webkit/scriptdata01.dat | 308 --- .../testdata/webkit/scripted/adoption01.dat | 15 - .../testdata/webkit/scripted/webkit01.dat | 28 - .../x/net/html/testdata/webkit/tables01.dat | 212 -- .../x/net/html/testdata/webkit/tests1.dat | 1952 -------------- .../x/net/html/testdata/webkit/tests10.dat | 799 ------ .../x/net/html/testdata/webkit/tests11.dat | 482 ---- .../x/net/html/testdata/webkit/tests12.dat | 62 - .../x/net/html/testdata/webkit/tests14.dat | 74 - .../x/net/html/testdata/webkit/tests15.dat | 208 -- .../x/net/html/testdata/webkit/tests16.dat | 2299 ----------------- .../x/net/html/testdata/webkit/tests17.dat | 153 -- .../x/net/html/testdata/webkit/tests18.dat | 269 -- .../x/net/html/testdata/webkit/tests19.dat | 1237 --------- .../x/net/html/testdata/webkit/tests2.dat | 763 ------ .../x/net/html/testdata/webkit/tests20.dat | 455 ---- .../x/net/html/testdata/webkit/tests21.dat | 221 -- .../x/net/html/testdata/webkit/tests22.dat | 157 -- .../x/net/html/testdata/webkit/tests23.dat | 155 -- .../x/net/html/testdata/webkit/tests24.dat | 79 - .../x/net/html/testdata/webkit/tests25.dat | 219 -- .../x/net/html/testdata/webkit/tests26.dat | 313 --- .../x/net/html/testdata/webkit/tests3.dat | 305 --- .../x/net/html/testdata/webkit/tests4.dat | 59 - .../x/net/html/testdata/webkit/tests5.dat | 191 -- .../x/net/html/testdata/webkit/tests6.dat | 663 ----- .../x/net/html/testdata/webkit/tests7.dat | 390 --- .../x/net/html/testdata/webkit/tests8.dat | 148 -- .../x/net/html/testdata/webkit/tests9.dat | 457 ---- .../testdata/webkit/tests_innerHTML_1.dat | 741 ------ .../x/net/html/testdata/webkit/tricky01.dat | 261 -- .../x/net/html/testdata/webkit/webkit01.dat | 610 ----- .../x/net/html/testdata/webkit/webkit02.dat | 159 -- .../src/golang.org/x/net/html/token_test.go | 748 ------ .../src/gopkg.in/yaml.v2/decode_test.go | 966 ------- .../src/gopkg.in/yaml.v2/encode_test.go | 501 ---- .../src/gopkg.in/yaml.v2/suite_test.go | 12 - .../bertimus9/systemstat/LICENSE | 20 + .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/abbot/go-http-auth/LICENSE | 178 ++ .../github.com/codegangsta/negroni/LICENSE | 21 + .../src/github.com/dgrijalva/jwt-go/LICENSE | 8 + .../github.com/docker/libcontainer/LICENSE | 191 ++ .../src/github.com/docker/libcontainer/NOTICE | 16 + .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/codegangsta/cli/LICENSE | 21 + .../src/github.com/coreos/go-systemd/LICENSE | 191 ++ .../vendor/src/github.com/godbus/dbus/LICENSE | 25 + .../github.com/syndtr/gocapability/LICENSE | 24 + .../src/github.com/docker/spdystream/LICENSE | 191 ++ .../elazarl/go-bindata-assetfs/LICENSE | 23 + .../github.com/emicklei/go-restful/LICENSE | 22 + .../src/github.com/evanphx/json-patch/LICENSE | 25 + .../github.com/fsouza/go-dockerclient/LICENSE | 22 + .../github.com/Sirupsen/logrus/LICENSE | 21 + .../docker/docker/pkg/mflag/LICENSE | 27 + .../github.com/gorilla/context/LICENSE | 27 + .../external/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/ghodss/yaml/LICENSE | 50 + .../src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/glog/LICENSE | 191 ++ .../src/github.com/google/gofuzz/LICENSE | 202 ++ .../src/github.com/gorilla/context/LICENSE | 27 + .../src/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/imdario/mergo/LICENSE | 28 + .../imdario/mergo/testdata/license.yml | 3 + .../inconshreveable/mousetrap/LICENSE | 13 + .../github.com/jonboulle/clockwork/LICENSE | 201 ++ .../src/github.com/juju/ratelimit/LICENSE | 191 ++ .../src/github.com/kardianos/osext/LICENSE | 27 + .../_workspace/src/github.com/kr/pty/License | 23 + .../src/github.com/miekg/dns/COPYRIGHT | 9 + .../src/github.com/miekg/dns/LICENSE | 32 + .../github.com/mitchellh/mapstructure/LICENSE | 21 + .../src/github.com/onsi/ginkgo/LICENSE | 20 + .../src/github.com/onsi/gomega/LICENSE | 20 + .../src/github.com/pborman/uuid/LICENSE | 27 + .../src/github.com/prometheus/procfs/LICENSE | 201 ++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../github.com/rackspace/gophercloud/LICENSE | 191 ++ .../russross/blackfriday/LICENSE.txt | 29 + .../src/github.com/scalingdata/gcfg/LICENSE | 57 + .../src/github.com/spf13/cobra/LICENSE.txt | 174 ++ .../src/github.com/spf13/pflag/LICENSE | 28 + .../src/github.com/vaughan0/go-ini/LICENSE | 14 + .../github.com/xyproto/simpleredis/LICENSE | 21 + .../src/golang.org/x/oauth2/LICENSE | 27 + .../googleapi/internal/uritemplates/LICENSE | 18 + .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 21 + .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 ++ .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 ++ .../charms/trusty/kubernetes-master/copyright | 13 + .../juju/charms/trusty/kubernetes/copyright | 13 + .../update-demo/local/LICENSE.angular | 21 + .../pkg/api/resource/quantity_example_test.go | 59 - .../pkg/api/resource/quantity_test.go | 517 ---- .../third_party/forked/json/LICENSE | 27 + .../third_party/forked/reflect/LICENSE | 27 + .../kubernetes/third_party/golang/LICENSE | 27 + .../kubernetes/third_party/golang/PATENTS | 22 + .../kubernetes/third_party/htpasswd/COPYING | 28 + .../kubernetes/third_party/pause/LICENSE | 19 + .../kubernetes/third_party/swagger-ui/LICENSE | 11 + .../go/exp/math/dec/inf/benchmark_test.go | 210 -- .../go/exp/math/dec/inf/dec_go1_2_test.go | 33 - .../go/exp/math/dec/inf/dec_internal_test.go | 40 - .../go/exp/math/dec/inf/dec_test.go | 379 --- .../go/exp/math/dec/inf/example_test.go | 62 - .../exp/math/dec/inf/rounder_example_test.go | 72 - .../go/exp/math/dec/inf/rounder_test.go | 109 - utils/attribute-files.go | 2 +- 324 files changed, 9204 insertions(+), 40857 deletions(-) delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/entry_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter_bench_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hook_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus_test.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter_test.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/appc/spec/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/discovery/discovery_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/discovery/http_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/discovery/parse_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/image_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/pod_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/acidentifier_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/ackind_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/acname_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/annotations_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/app_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/date_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/dependencies_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/environment_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/exec_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/hash_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/labels_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/port_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/semver_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/url_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/uuid_test.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/types/volume_test.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/juju/errors/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator_test.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/LICENSE create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver_test.go create mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go delete mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go delete mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/error_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/errortypes_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/example_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/export_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/functions_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/package_test.go delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/path_test.go delete mode 100644 Godeps/_workspace/src/github.com/kelseyhightower/memkv/store_test.go delete mode 100644 Godeps/_workspace/src/github.com/mgutz/ansi/ansi_test.go delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/go-homedir/homedir_test.go delete mode 100644 Godeps/_workspace/src/github.com/peterbourgon/mergemap/mergemap_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/bash_completions_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/command_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/md_docs_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/bool_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/example_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/export_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/int_slice_test.go delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/string_slice_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/LICENSE create mode 100644 Godeps/_workspace/src/golang.org/x/net/PATENTS delete mode 100644 Godeps/_workspace/src/golang.org/x/net/context/context_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/atom/atom_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/atom/table_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/charset_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-charset.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/README delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-content-attribute.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/entity_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/escape_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/example_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/node_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/parse_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/render_test.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/go1.html delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/README delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption02.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/comments01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/doctype01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities02.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/html5test-com.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/inbody01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/isindex.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scriptdata01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tables01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests1.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests10.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests11.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests12.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests14.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests15.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests16.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests17.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests18.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests19.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests2.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests20.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests21.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests22.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests23.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests24.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests25.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests26.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests3.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests4.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests5.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests6.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests7.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests8.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests9.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tricky01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit01.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit02.dat delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/token_test.go delete mode 100644 Godeps/_workspace/src/gopkg.in/yaml.v2/decode_test.go delete mode 100644 Godeps/_workspace/src/gopkg.in/yaml.v2/encode_test.go delete mode 100644 Godeps/_workspace/src/gopkg.in/yaml.v2/suite_test.go create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_example_test.go delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_test.go create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE create mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/benchmark_test.go delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_go1_2_test.go delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_internal_test.go delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_test.go delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/example_test.go delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_example_test.go delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_test.go diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/entry_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/entry_test.go deleted file mode 100644 index 99c3b41..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/entry_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestEntryWithError(t *testing.T) { - - assert := assert.New(t) - - defer func() { - ErrorKey = "error" - }() - - err := fmt.Errorf("kaboom at layer %d", 4711) - - assert.Equal(err, WithError(err).Data["error"]) - - logger := New() - logger.Out = &bytes.Buffer{} - entry := NewEntry(logger) - - assert.Equal(err, entry.WithError(err).Data["error"]) - - ErrorKey = "err" - - assert.Equal(err, entry.WithError(err).Data["err"]) - -} - -func TestEntryPanicln(t *testing.T) { - errBoom := fmt.Errorf("boom time") - - defer func() { - p := recover() - assert.NotNil(t, p) - - switch pVal := p.(type) { - case *Entry: - assert.Equal(t, "kaboom", pVal.Message) - assert.Equal(t, errBoom, pVal.Data["err"]) - default: - t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) - } - }() - - logger := New() - logger.Out = &bytes.Buffer{} - entry := NewEntry(logger) - entry.WithField("err", errBoom).Panicln("kaboom") -} - -func TestEntryPanicf(t *testing.T) { - errBoom := fmt.Errorf("boom again") - - defer func() { - p := recover() - assert.NotNil(t, p) - - switch pVal := p.(type) { - case *Entry: - assert.Equal(t, "kaboom true", pVal.Message) - assert.Equal(t, errBoom, pVal.Data["err"]) - default: - t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal) - } - }() - - logger := New() - logger.Out = &bytes.Buffer{} - entry := NewEntry(logger) - entry.WithField("err", errBoom).Panicf("kaboom %v", true) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter_bench_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter_bench_test.go deleted file mode 100644 index c6d290c..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter_bench_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package logrus - -import ( - "fmt" - "testing" - "time" -) - -// smallFields is a small size data set for benchmarking -var smallFields = Fields{ - "foo": "bar", - "baz": "qux", - "one": "two", - "three": "four", -} - -// largeFields is a large size data set for benchmarking -var largeFields = Fields{ - "foo": "bar", - "baz": "qux", - "one": "two", - "three": "four", - "five": "six", - "seven": "eight", - "nine": "ten", - "eleven": "twelve", - "thirteen": "fourteen", - "fifteen": "sixteen", - "seventeen": "eighteen", - "nineteen": "twenty", - "a": "b", - "c": "d", - "e": "f", - "g": "h", - "i": "j", - "k": "l", - "m": "n", - "o": "p", - "q": "r", - "s": "t", - "u": "v", - "w": "x", - "y": "z", - "this": "will", - "make": "thirty", - "entries": "yeah", -} - -var errorFields = Fields{ - "foo": fmt.Errorf("bar"), - "baz": fmt.Errorf("qux"), -} - -func BenchmarkErrorTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{DisableColors: true}, errorFields) -} - -func BenchmarkSmallTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{DisableColors: true}, smallFields) -} - -func BenchmarkLargeTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{DisableColors: true}, largeFields) -} - -func BenchmarkSmallColoredTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{ForceColors: true}, smallFields) -} - -func BenchmarkLargeColoredTextFormatter(b *testing.B) { - doBenchmark(b, &TextFormatter{ForceColors: true}, largeFields) -} - -func BenchmarkSmallJSONFormatter(b *testing.B) { - doBenchmark(b, &JSONFormatter{}, smallFields) -} - -func BenchmarkLargeJSONFormatter(b *testing.B) { - doBenchmark(b, &JSONFormatter{}, largeFields) -} - -func doBenchmark(b *testing.B, formatter Formatter, fields Fields) { - entry := &Entry{ - Time: time.Time{}, - Level: InfoLevel, - Message: "message", - Data: fields, - } - var d []byte - var err error - for i := 0; i < b.N; i++ { - d, err = formatter.Format(entry) - if err != nil { - b.Fatal(err) - } - b.SetBytes(int64(len(d))) - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go deleted file mode 100644 index d8814a0..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash_test.go +++ /dev/null @@ -1,52 +0,0 @@ -package logstash - -import ( - "bytes" - "encoding/json" - "github.com/Sirupsen/logrus" - "github.com/stretchr/testify/assert" - "testing" -) - -func TestLogstashFormatter(t *testing.T) { - assert := assert.New(t) - - lf := LogstashFormatter{Type: "abc"} - - fields := logrus.Fields{ - "message": "def", - "level": "ijk", - "type": "lmn", - "one": 1, - "pi": 3.14, - "bool": true, - } - - entry := logrus.WithFields(fields) - entry.Message = "msg" - entry.Level = logrus.InfoLevel - - b, _ := lf.Format(entry) - - var data map[string]interface{} - dec := json.NewDecoder(bytes.NewReader(b)) - dec.UseNumber() - dec.Decode(&data) - - // base fields - assert.Equal(json.Number("1"), data["@version"]) - assert.NotEmpty(data["@timestamp"]) - assert.Equal("abc", data["type"]) - assert.Equal("msg", data["message"]) - assert.Equal("info", data["level"]) - - // substituted fields - assert.Equal("def", data["fields.message"]) - assert.Equal("ijk", data["fields.level"]) - assert.Equal("lmn", data["fields.type"]) - - // formats - assert.Equal(json.Number("1"), data["one"]) - assert.Equal(json.Number("3.14"), data["pi"]) - assert.Equal(true, data["bool"]) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hook_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hook_test.go deleted file mode 100644 index 13f34cb..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hook_test.go +++ /dev/null @@ -1,122 +0,0 @@ -package logrus - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -type TestHook struct { - Fired bool -} - -func (hook *TestHook) Fire(entry *Entry) error { - hook.Fired = true - return nil -} - -func (hook *TestHook) Levels() []Level { - return []Level{ - DebugLevel, - InfoLevel, - WarnLevel, - ErrorLevel, - FatalLevel, - PanicLevel, - } -} - -func TestHookFires(t *testing.T) { - hook := new(TestHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - assert.Equal(t, hook.Fired, false) - - log.Print("test") - }, func(fields Fields) { - assert.Equal(t, hook.Fired, true) - }) -} - -type ModifyHook struct { -} - -func (hook *ModifyHook) Fire(entry *Entry) error { - entry.Data["wow"] = "whale" - return nil -} - -func (hook *ModifyHook) Levels() []Level { - return []Level{ - DebugLevel, - InfoLevel, - WarnLevel, - ErrorLevel, - FatalLevel, - PanicLevel, - } -} - -func TestHookCanModifyEntry(t *testing.T) { - hook := new(ModifyHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - log.WithField("wow", "elephant").Print("test") - }, func(fields Fields) { - assert.Equal(t, fields["wow"], "whale") - }) -} - -func TestCanFireMultipleHooks(t *testing.T) { - hook1 := new(ModifyHook) - hook2 := new(TestHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook1) - log.Hooks.Add(hook2) - - log.WithField("wow", "elephant").Print("test") - }, func(fields Fields) { - assert.Equal(t, fields["wow"], "whale") - assert.Equal(t, hook2.Fired, true) - }) -} - -type ErrorHook struct { - Fired bool -} - -func (hook *ErrorHook) Fire(entry *Entry) error { - hook.Fired = true - return nil -} - -func (hook *ErrorHook) Levels() []Level { - return []Level{ - ErrorLevel, - } -} - -func TestErrorHookShouldntFireOnInfo(t *testing.T) { - hook := new(ErrorHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - log.Info("test") - }, func(fields Fields) { - assert.Equal(t, hook.Fired, false) - }) -} - -func TestErrorHookShouldFireOnError(t *testing.T) { - hook := new(ErrorHook) - - LogAndAssertJSON(t, func(log *Logger) { - log.Hooks.Add(hook) - log.Error("test") - }, func(fields Fields) { - assert.Equal(t, hook.Fired, true) - }) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake_test.go deleted file mode 100644 index 058a91e..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake_test.go +++ /dev/null @@ -1,133 +0,0 @@ -package airbrake - -import ( - "encoding/xml" - "net/http" - "net/http/httptest" - "testing" - "time" - - "github.com/Sirupsen/logrus" -) - -type notice struct { - Error NoticeError `xml:"error"` -} -type NoticeError struct { - Class string `xml:"class"` - Message string `xml:"message"` -} - -type customErr struct { - msg string -} - -func (e *customErr) Error() string { - return e.msg -} - -const ( - testAPIKey = "abcxyz" - testEnv = "development" - expectedClass = "*airbrake.customErr" - expectedMsg = "foo" - unintendedMsg = "Airbrake will not see this string" -) - -var ( - noticeError = make(chan NoticeError, 1) -) - -// TestLogEntryMessageReceived checks if invoking Logrus' log.Error -// method causes an XML payload containing the log entry message is received -// by a HTTP server emulating an Airbrake-compatible endpoint. -func TestLogEntryMessageReceived(t *testing.T) { - log := logrus.New() - ts := startAirbrakeServer(t) - defer ts.Close() - - hook := NewHook(ts.URL, testAPIKey, "production") - log.Hooks.Add(hook) - - log.Error(expectedMsg) - - select { - case received := <-noticeError: - if received.Message != expectedMsg { - t.Errorf("Unexpected message received: %s", received.Message) - } - case <-time.After(time.Second): - t.Error("Timed out; no notice received by Airbrake API") - } -} - -// TestLogEntryMessageReceived confirms that, when passing an error type using -// logrus.Fields, a HTTP server emulating an Airbrake endpoint receives the -// error message returned by the Error() method on the error interface -// rather than the logrus.Entry.Message string. -func TestLogEntryWithErrorReceived(t *testing.T) { - log := logrus.New() - ts := startAirbrakeServer(t) - defer ts.Close() - - hook := NewHook(ts.URL, testAPIKey, "production") - log.Hooks.Add(hook) - - log.WithFields(logrus.Fields{ - "error": &customErr{expectedMsg}, - }).Error(unintendedMsg) - - select { - case received := <-noticeError: - if received.Message != expectedMsg { - t.Errorf("Unexpected message received: %s", received.Message) - } - if received.Class != expectedClass { - t.Errorf("Unexpected error class: %s", received.Class) - } - case <-time.After(time.Second): - t.Error("Timed out; no notice received by Airbrake API") - } -} - -// TestLogEntryWithNonErrorTypeNotReceived confirms that, when passing a -// non-error type using logrus.Fields, a HTTP server emulating an Airbrake -// endpoint receives the logrus.Entry.Message string. -// -// Only error types are supported when setting the 'error' field using -// logrus.WithFields(). -func TestLogEntryWithNonErrorTypeNotReceived(t *testing.T) { - log := logrus.New() - ts := startAirbrakeServer(t) - defer ts.Close() - - hook := NewHook(ts.URL, testAPIKey, "production") - log.Hooks.Add(hook) - - log.WithFields(logrus.Fields{ - "error": expectedMsg, - }).Error(unintendedMsg) - - select { - case received := <-noticeError: - if received.Message != unintendedMsg { - t.Errorf("Unexpected message received: %s", received.Message) - } - case <-time.After(time.Second): - t.Error("Timed out; no notice received by Airbrake API") - } -} - -func startAirbrakeServer(t *testing.T) *httptest.Server { - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - var notice notice - if err := xml.NewDecoder(r.Body).Decode(¬ice); err != nil { - t.Error(err) - } - r.Body.Close() - - noticeError <- notice.Error - })) - - return ts -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag_test.go deleted file mode 100644 index e9ea298..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package logrus_bugsnag - -import ( - "encoding/json" - "errors" - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - "time" - - "github.com/Sirupsen/logrus" - "github.com/bugsnag/bugsnag-go" -) - -type notice struct { - Events []struct { - Exceptions []struct { - Message string `json:"message"` - } `json:"exceptions"` - } `json:"events"` -} - -func TestNoticeReceived(t *testing.T) { - msg := make(chan string, 1) - expectedMsg := "foo" - - ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - var notice notice - data, _ := ioutil.ReadAll(r.Body) - if err := json.Unmarshal(data, ¬ice); err != nil { - t.Error(err) - } - _ = r.Body.Close() - - msg <- notice.Events[0].Exceptions[0].Message - })) - defer ts.Close() - - hook := &bugsnagHook{} - - bugsnag.Configure(bugsnag.Configuration{ - Endpoint: ts.URL, - ReleaseStage: "production", - APIKey: "12345678901234567890123456789012", - Synchronous: true, - }) - - log := logrus.New() - log.Hooks.Add(hook) - - log.WithFields(logrus.Fields{ - "error": errors.New(expectedMsg), - }).Error("Bugsnag will not see this string") - - select { - case received := <-msg: - if received != expectedMsg { - t.Errorf("Unexpected message received: %s", received) - } - case <-time.After(time.Second): - t.Error("Timed out; no notice received by Bugsnag API") - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go deleted file mode 100644 index 96318d0..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package logrus_papertrail - -import ( - "fmt" - "testing" - - "github.com/Sirupsen/logrus" - "github.com/stvp/go-udp-testing" -) - -func TestWritingToUDP(t *testing.T) { - port := 16661 - udp.SetAddr(fmt.Sprintf(":%d", port)) - - hook, err := NewPapertrailHook("localhost", port, "test") - if err != nil { - t.Errorf("Unable to connect to local UDP server.") - } - - log := logrus.New() - log.Hooks.Add(hook) - - udp.ShouldReceive(t, "foo", func() { - log.Info("foo") - }) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry_test.go deleted file mode 100644 index 4a97bc6..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry_test.go +++ /dev/null @@ -1,154 +0,0 @@ -package logrus_sentry - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/http/httptest" - "reflect" - "strings" - "testing" - - "github.com/Sirupsen/logrus" - "github.com/getsentry/raven-go" -) - -const ( - message = "error message" - server_name = "testserver.internal" - logger_name = "test.logger" -) - -func getTestLogger() *logrus.Logger { - l := logrus.New() - l.Out = ioutil.Discard - return l -} - -func WithTestDSN(t *testing.T, tf func(string, <-chan *raven.Packet)) { - pch := make(chan *raven.Packet, 1) - s := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { - defer req.Body.Close() - d := json.NewDecoder(req.Body) - p := &raven.Packet{} - err := d.Decode(p) - if err != nil { - t.Fatal(err.Error()) - } - - pch <- p - })) - defer s.Close() - - fragments := strings.SplitN(s.URL, "://", 2) - dsn := fmt.Sprintf( - "%s://public:secret@%s/sentry/project-id", - fragments[0], - fragments[1], - ) - tf(dsn, pch) -} - -func TestSpecialFields(t *testing.T) { - WithTestDSN(t, func(dsn string, pch <-chan *raven.Packet) { - logger := getTestLogger() - - hook, err := NewSentryHook(dsn, []logrus.Level{ - logrus.ErrorLevel, - }) - - if err != nil { - t.Fatal(err.Error()) - } - logger.Hooks.Add(hook) - - req, _ := http.NewRequest("GET", "url", nil) - logger.WithFields(logrus.Fields{ - "server_name": server_name, - "logger": logger_name, - "http_request": req, - }).Error(message) - - packet := <-pch - if packet.Logger != logger_name { - t.Errorf("logger should have been %s, was %s", logger_name, packet.Logger) - } - - if packet.ServerName != server_name { - t.Errorf("server_name should have been %s, was %s", server_name, packet.ServerName) - } - }) -} - -func TestSentryHandler(t *testing.T) { - WithTestDSN(t, func(dsn string, pch <-chan *raven.Packet) { - logger := getTestLogger() - hook, err := NewSentryHook(dsn, []logrus.Level{ - logrus.ErrorLevel, - }) - if err != nil { - t.Fatal(err.Error()) - } - logger.Hooks.Add(hook) - - logger.Error(message) - packet := <-pch - if packet.Message != message { - t.Errorf("message should have been %s, was %s", message, packet.Message) - } - }) -} - -func TestSentryWithClient(t *testing.T) { - WithTestDSN(t, func(dsn string, pch <-chan *raven.Packet) { - logger := getTestLogger() - - client, _ := raven.New(dsn) - - hook, err := NewWithClientSentryHook(client, []logrus.Level{ - logrus.ErrorLevel, - }) - if err != nil { - t.Fatal(err.Error()) - } - logger.Hooks.Add(hook) - - logger.Error(message) - packet := <-pch - if packet.Message != message { - t.Errorf("message should have been %s, was %s", message, packet.Message) - } - }) -} - -func TestSentryTags(t *testing.T) { - WithTestDSN(t, func(dsn string, pch <-chan *raven.Packet) { - logger := getTestLogger() - tags := map[string]string{ - "site": "test", - } - levels := []logrus.Level{ - logrus.ErrorLevel, - } - - hook, err := NewWithTagsSentryHook(dsn, tags, levels) - if err != nil { - t.Fatal(err.Error()) - } - - logger.Hooks.Add(hook) - - logger.Error(message) - packet := <-pch - expected := raven.Tags{ - raven.Tag{ - Key: "site", - Value: "test", - }, - } - if !reflect.DeepEqual(packet.Tags, expected) { - t.Errorf("message should have been %s, was %s", message, packet.Message) - } - }) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go deleted file mode 100644 index 42762dc..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go +++ /dev/null @@ -1,26 +0,0 @@ -package logrus_syslog - -import ( - "github.com/Sirupsen/logrus" - "log/syslog" - "testing" -) - -func TestLocalhostAddAndPrint(t *testing.T) { - log := logrus.New() - hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - - if err != nil { - t.Errorf("Unable to connect to local syslog.") - } - - log.Hooks.Add(hook) - - for _, level := range hook.Levels() { - if len(log.Hooks[level]) != 1 { - t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) - } - } - - log.Info("Congratulations!") -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter_test.go deleted file mode 100644 index 1d70873..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package logrus - -import ( - "encoding/json" - "errors" - - "testing" -) - -func TestErrorNotLost(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("error", errors.New("wild walrus"))) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["error"] != "wild walrus" { - t.Fatal("Error field not set") - } -} - -func TestErrorNotLostOnFieldNotNamedError(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("omg", errors.New("wild walrus"))) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["omg"] != "wild walrus" { - t.Fatal("Error field not set") - } -} - -func TestFieldClashWithTime(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("time", "right now!")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["fields.time"] != "right now!" { - t.Fatal("fields.time not set to original time field") - } - - if entry["time"] != "0001-01-01T00:00:00Z" { - t.Fatal("time field not set to current time, was: ", entry["time"]) - } -} - -func TestFieldClashWithMsg(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("msg", "something")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["fields.msg"] != "something" { - t.Fatal("fields.msg not set to original msg field") - } -} - -func TestFieldClashWithLevel(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("level", "something")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - entry := make(map[string]interface{}) - err = json.Unmarshal(b, &entry) - if err != nil { - t.Fatal("Unable to unmarshal formatted entry: ", err) - } - - if entry["fields.level"] != "something" { - t.Fatal("fields.level not set to original level field") - } -} - -func TestJSONEntryEndsWithNewline(t *testing.T) { - formatter := &JSONFormatter{} - - b, err := formatter.Format(WithField("level", "something")) - if err != nil { - t.Fatal("Unable to format entry: ", err) - } - - if b[len(b)-1] != '\n' { - t.Fatal("Expected JSON log entry to end with a newline") - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus_test.go deleted file mode 100644 index efaacea..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus_test.go +++ /dev/null @@ -1,301 +0,0 @@ -package logrus - -import ( - "bytes" - "encoding/json" - "strconv" - "strings" - "sync" - "testing" - - "github.com/stretchr/testify/assert" -) - -func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fields)) { - var buffer bytes.Buffer - var fields Fields - - logger := New() - logger.Out = &buffer - logger.Formatter = new(JSONFormatter) - - log(logger) - - err := json.Unmarshal(buffer.Bytes(), &fields) - assert.Nil(t, err) - - assertions(fields) -} - -func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields map[string]string)) { - var buffer bytes.Buffer - - logger := New() - logger.Out = &buffer - logger.Formatter = &TextFormatter{ - DisableColors: true, - } - - log(logger) - - fields := make(map[string]string) - for _, kv := range strings.Split(buffer.String(), " ") { - if !strings.Contains(kv, "=") { - continue - } - kvArr := strings.Split(kv, "=") - key := strings.TrimSpace(kvArr[0]) - val := kvArr[1] - if kvArr[1][0] == '"' { - var err error - val, err = strconv.Unquote(val) - assert.NoError(t, err) - } - fields[key] = val - } - assertions(fields) -} - -func TestPrint(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Print("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["level"], "info") - }) -} - -func TestInfo(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["level"], "info") - }) -} - -func TestWarn(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Warn("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["level"], "warning") - }) -} - -func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln("test", "test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test test") - }) -} - -func TestInfolnShouldAddSpacesBetweenStringAndNonstring(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln("test", 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test 10") - }) -} - -func TestInfolnShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln(10, 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "10 10") - }) -} - -func TestInfoShouldAddSpacesBetweenTwoNonStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Infoln(10, 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "10 10") - }) -} - -func TestInfoShouldNotAddSpacesBetweenStringAndNonstring(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Info("test", 10) - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test10") - }) -} - -func TestInfoShouldNotAddSpacesBetweenStrings(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.Info("test", "test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "testtest") - }) -} - -func TestWithFieldsShouldAllowAssignments(t *testing.T) { - var buffer bytes.Buffer - var fields Fields - - logger := New() - logger.Out = &buffer - logger.Formatter = new(JSONFormatter) - - localLog := logger.WithFields(Fields{ - "key1": "value1", - }) - - localLog.WithField("key2", "value2").Info("test") - err := json.Unmarshal(buffer.Bytes(), &fields) - assert.Nil(t, err) - - assert.Equal(t, "value2", fields["key2"]) - assert.Equal(t, "value1", fields["key1"]) - - buffer = bytes.Buffer{} - fields = Fields{} - localLog.Info("test") - err = json.Unmarshal(buffer.Bytes(), &fields) - assert.Nil(t, err) - - _, ok := fields["key2"] - assert.Equal(t, false, ok) - assert.Equal(t, "value1", fields["key1"]) -} - -func TestUserSuppliedFieldDoesNotOverwriteDefaults(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("msg", "hello").Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - }) -} - -func TestUserSuppliedMsgFieldHasPrefix(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("msg", "hello").Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["msg"], "test") - assert.Equal(t, fields["fields.msg"], "hello") - }) -} - -func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("time", "hello").Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["fields.time"], "hello") - }) -} - -func TestUserSuppliedLevelFieldHasPrefix(t *testing.T) { - LogAndAssertJSON(t, func(log *Logger) { - log.WithField("level", 1).Info("test") - }, func(fields Fields) { - assert.Equal(t, fields["level"], "info") - assert.Equal(t, fields["fields.level"], 1.0) // JSON has floats only - }) -} - -func TestDefaultFieldsAreNotPrefixed(t *testing.T) { - LogAndAssertText(t, func(log *Logger) { - ll := log.WithField("herp", "derp") - ll.Info("hello") - ll.Info("bye") - }, func(fields map[string]string) { - for _, fieldName := range []string{"fields.level", "fields.time", "fields.msg"} { - if _, ok := fields[fieldName]; ok { - t.Fatalf("should not have prefixed %q: %v", fieldName, fields) - } - } - }) -} - -func TestDoubleLoggingDoesntPrefixPreviousFields(t *testing.T) { - - var buffer bytes.Buffer - var fields Fields - - logger := New() - logger.Out = &buffer - logger.Formatter = new(JSONFormatter) - - llog := logger.WithField("context", "eating raw fish") - - llog.Info("looks delicious") - - err := json.Unmarshal(buffer.Bytes(), &fields) - assert.NoError(t, err, "should have decoded first message") - assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") - assert.Equal(t, fields["msg"], "looks delicious") - assert.Equal(t, fields["context"], "eating raw fish") - - buffer.Reset() - - llog.Warn("omg it is!") - - err = json.Unmarshal(buffer.Bytes(), &fields) - assert.NoError(t, err, "should have decoded second message") - assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields") - assert.Equal(t, fields["msg"], "omg it is!") - assert.Equal(t, fields["context"], "eating raw fish") - assert.Nil(t, fields["fields.msg"], "should not have prefixed previous `msg` entry") - -} - -func TestConvertLevelToString(t *testing.T) { - assert.Equal(t, "debug", DebugLevel.String()) - assert.Equal(t, "info", InfoLevel.String()) - assert.Equal(t, "warning", WarnLevel.String()) - assert.Equal(t, "error", ErrorLevel.String()) - assert.Equal(t, "fatal", FatalLevel.String()) - assert.Equal(t, "panic", PanicLevel.String()) -} - -func TestParseLevel(t *testing.T) { - l, err := ParseLevel("panic") - assert.Nil(t, err) - assert.Equal(t, PanicLevel, l) - - l, err = ParseLevel("fatal") - assert.Nil(t, err) - assert.Equal(t, FatalLevel, l) - - l, err = ParseLevel("error") - assert.Nil(t, err) - assert.Equal(t, ErrorLevel, l) - - l, err = ParseLevel("warn") - assert.Nil(t, err) - assert.Equal(t, WarnLevel, l) - - l, err = ParseLevel("warning") - assert.Nil(t, err) - assert.Equal(t, WarnLevel, l) - - l, err = ParseLevel("info") - assert.Nil(t, err) - assert.Equal(t, InfoLevel, l) - - l, err = ParseLevel("debug") - assert.Nil(t, err) - assert.Equal(t, DebugLevel, l) - - l, err = ParseLevel("invalid") - assert.Equal(t, "not a valid logrus Level: \"invalid\"", err.Error()) -} - -func TestGetSetLevelRace(t *testing.T) { - wg := sync.WaitGroup{} - for i := 0; i < 100; i++ { - wg.Add(1) - go func(i int) { - defer wg.Done() - if i%2 == 0 { - SetLevel(InfoLevel) - } else { - GetLevel() - } - }(i) - - } - wg.Wait() -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter_test.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter_test.go deleted file mode 100644 index e25a44f..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package logrus - -import ( - "bytes" - "errors" - "testing" - "time" -) - -func TestQuoting(t *testing.T) { - tf := &TextFormatter{DisableColors: true} - - checkQuoting := func(q bool, value interface{}) { - b, _ := tf.Format(WithField("test", value)) - idx := bytes.Index(b, ([]byte)("test=")) - cont := bytes.Contains(b[idx+5:], []byte{'"'}) - if cont != q { - if q { - t.Errorf("quoting expected for: %#v", value) - } else { - t.Errorf("quoting not expected for: %#v", value) - } - } - } - - checkQuoting(false, "abcd") - checkQuoting(false, "v1.0") - checkQuoting(false, "1234567890") - checkQuoting(true, "/foobar") - checkQuoting(true, "x y") - checkQuoting(true, "x,y") - checkQuoting(false, errors.New("invalid")) - checkQuoting(true, errors.New("invalid argument")) -} - -func TestTimestampFormat(t *testing.T) { - checkTimeStr := func(format string) { - customFormatter := &TextFormatter{DisableColors: true, TimestampFormat: format} - customStr, _ := customFormatter.Format(WithField("test", "test")) - timeStart := bytes.Index(customStr, ([]byte)("time=")) - timeEnd := bytes.Index(customStr, ([]byte)("level=")) - timeStr := customStr[timeStart+5 : timeEnd-1] - if timeStr[0] == '"' && timeStr[len(timeStr)-1] == '"' { - timeStr = timeStr[1 : len(timeStr)-1] - } - if format == "" { - format = time.RFC3339 - } - _, e := time.Parse(format, (string)(timeStr)) - if e != nil { - t.Errorf("time string \"%s\" did not match provided time format \"%s\": %s", timeStr, format, e) - } - } - - checkTimeStr("2006-01-02T15:04:05.000000000Z07:00") - checkTimeStr("Mon Jan _2 15:04:05 2006") - checkTimeStr("") -} - -// TODO add tests for sorting etc., this requires a parser for the text -// formatter output. diff --git a/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/appc/spec/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery_test.go b/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery_test.go deleted file mode 100644 index 88f73c9..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery_test.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package discovery - -import ( - "bytes" - "io/ioutil" - "net/http" - "os" - "testing" - - "github.com/appc/spec/schema/types" -) - -func fakeHTTPGet(filename string, failures int) func(uri string) (*http.Response, error) { - attempts := 0 - return func(uri string) (*http.Response, error) { - f, err := os.Open(filename) - if err != nil { - return nil, err - } - - var resp *http.Response - - switch { - case attempts < failures: - resp = &http.Response{ - Status: "404 Not Found", - StatusCode: http.StatusNotFound, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Header: http.Header{ - "Content-Type": []string{"text/html"}, - }, - Body: ioutil.NopCloser(bytes.NewBufferString("")), - } - default: - resp = &http.Response{ - Status: "200 OK", - StatusCode: http.StatusOK, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Header: http.Header{ - "Content-Type": []string{"text/html"}, - }, - Body: f, - } - } - - attempts = attempts + 1 - return resp, nil - } -} - -type httpgetter func(uri string) (*http.Response, error) - -func TestDiscoverEndpoints(t *testing.T) { - tests := []struct { - get httpgetter - expectDiscoverySuccess bool - app App - expectedACIEndpoints []ACIEndpoint - expectedKeys []string - }{ - { - fakeHTTPGet("myapp.html", 0), - true, - App{ - Name: "example.com/myapp", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - "os": "linux", - "arch": "amd64", - }, - }, - []ACIEndpoint{ - { - ACI: "https://storage.example.com/example.com/myapp-1.0.0.aci?torrent", - ASC: "https://storage.example.com/example.com/myapp-1.0.0.aci.asc?torrent", - }, - { - ACI: "hdfs://storage.example.com/example.com/myapp-1.0.0.aci", - ASC: "hdfs://storage.example.com/example.com/myapp-1.0.0.aci.asc", - }, - }, - []string{"https://example.com/pubkeys.gpg"}, - }, - { - fakeHTTPGet("myapp.html", 1), - true, - App{ - Name: "example.com/myapp/foobar", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - "os": "linux", - "arch": "amd64", - }, - }, - []ACIEndpoint{ - { - ACI: "https://storage.example.com/example.com/myapp/foobar-1.0.0.aci?torrent", - ASC: "https://storage.example.com/example.com/myapp/foobar-1.0.0.aci.asc?torrent", - }, - { - ACI: "hdfs://storage.example.com/example.com/myapp/foobar-1.0.0.aci", - ASC: "hdfs://storage.example.com/example.com/myapp/foobar-1.0.0.aci.asc", - }, - }, - []string{"https://example.com/pubkeys.gpg"}, - }, - { - fakeHTTPGet("myapp.html", 20), - false, - App{ - Name: "example.com/myapp/foobar/bazzer", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - "os": "linux", - "arch": "amd64", - }, - }, - []ACIEndpoint{}, - []string{}, - }, - // Test missing label. Only one ac-discovery template should be - // returned as the other one cannot be completely rendered due to - // missing labels. - { - fakeHTTPGet("myapp2.html", 0), - true, - App{ - Name: "example.com/myapp", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - }, - }, - []ACIEndpoint{ - { - ACI: "https://storage.example.com/example.com/myapp-1.0.0.aci", - ASC: "https://storage.example.com/example.com/myapp-1.0.0.aci.asc", - }, - }, - []string{"https://example.com/pubkeys.gpg"}, - }, - // Test missing labels. version label should default to - // "latest" and the first template should be rendered - { - fakeHTTPGet("myapp2.html", 0), - false, - App{ - Name: "example.com/myapp", - Labels: map[types.ACIdentifier]string{}, - }, - []ACIEndpoint{ - { - ACI: "https://storage.example.com/example.com/myapp-latest.aci", - ASC: "https://storage.example.com/example.com/myapp-latest.aci.asc", - }, - }, - []string{"https://example.com/pubkeys.gpg"}, - }, - // Test with a label called "name". It should be ignored. - { - fakeHTTPGet("myapp2.html", 0), - false, - App{ - Name: "example.com/myapp", - Labels: map[types.ACIdentifier]string{ - "name": "labelcalledname", - "version": "1.0.0", - }, - }, - []ACIEndpoint{ - { - ACI: "https://storage.example.com/example.com/myapp-1.0.0.aci", - ASC: "https://storage.example.com/example.com/myapp-1.0.0.aci.asc", - }, - }, - []string{"https://example.com/pubkeys.gpg"}, - }, - } - - for i, tt := range tests { - httpGet = &mockHttpGetter{getter: tt.get} - de, _, err := DiscoverEndpoints(tt.app, true) - if err != nil && !tt.expectDiscoverySuccess { - continue - } - if err != nil { - t.Fatalf("#%d DiscoverEndpoints failed: %v", i, err) - } - - if len(de.ACIEndpoints) != len(tt.expectedACIEndpoints) { - t.Errorf("ACIEndpoints array is wrong length want %d got %d", len(tt.expectedACIEndpoints), len(de.ACIEndpoints)) - } else { - for n := range de.ACIEndpoints { - if de.ACIEndpoints[n] != tt.expectedACIEndpoints[n] { - t.Errorf("#%d ACIEndpoints[%d] mismatch: want %v got %v", i, n, tt.expectedACIEndpoints[n], de.ACIEndpoints[n]) - } - } - } - - if len(de.Keys) != len(tt.expectedKeys) { - t.Errorf("Keys array is wrong length want %d got %d", len(tt.expectedKeys), len(de.Keys)) - } else { - for n := range de.Keys { - if de.Keys[n] != tt.expectedKeys[n] { - t.Errorf("#%d sig[%d] mismatch: want %v got %v", i, n, tt.expectedKeys[n], de.Keys[n]) - } - } - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/http_test.go b/Godeps/_workspace/src/github.com/appc/spec/discovery/http_test.go deleted file mode 100644 index 4aa76a8..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/http_test.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package discovery - -import ( - "bytes" - "errors" - "io/ioutil" - "net/http" - "os" - "strings" - "testing" -) - -// mockHttpGetter defines a wrapper that allows returning a mocked response. -type mockHttpGetter struct { - getter func(url string) (resp *http.Response, err error) -} - -func (m *mockHttpGetter) Get(url string) (resp *http.Response, err error) { - return m.getter(url) -} - -func fakeHttpOrHttpsGet(filename string, httpSuccess bool, httpsSuccess bool, httpErrorCode int) func(uri string) (*http.Response, error) { - return func(uri string) (*http.Response, error) { - f, err := os.Open(filename) - if err != nil { - return nil, err - } - - var resp *http.Response - - switch { - case strings.HasPrefix(uri, "https://") && httpsSuccess: - fallthrough - case strings.HasPrefix(uri, "http://") && httpSuccess: - resp = &http.Response{ - Status: "200 OK", - StatusCode: http.StatusOK, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Header: http.Header{ - "Content-Type": []string{"text/html"}, - }, - Body: f, - } - case httpErrorCode > 0: - resp = &http.Response{ - Status: "Error", - StatusCode: httpErrorCode, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Header: http.Header{ - "Content-Type": []string{"text/html"}, - }, - Body: ioutil.NopCloser(bytes.NewBufferString("")), - } - default: - err = errors.New("fakeHttpOrHttpsGet failed as requested") - return nil, err - } - - return resp, nil - } -} - -func TestHttpsOrHTTP(t *testing.T) { - tests := []struct { - name string - insecure bool - get httpgetter - expectUrlStr string - expectSuccess bool - }{ - { - "good-server", - false, - fakeHttpOrHttpsGet("myapp.html", true, true, 0), - "https://good-server?ac-discovery=1", - true, - }, - { - "file-not-found", - false, - fakeHttpOrHttpsGet("myapp.html", false, false, 404), - "", - false, - }, - { - "completely-broken-server", - false, - fakeHttpOrHttpsGet("myapp.html", false, false, 0), - "", - false, - }, - { - "file-only-on-http", - false, // do not accept fallback on http - fakeHttpOrHttpsGet("myapp.html", true, false, 404), - "", - false, - }, - { - "file-only-on-http", - true, // accept fallback on http - fakeHttpOrHttpsGet("myapp.html", true, false, 404), - "http://file-only-on-http?ac-discovery=1", - true, - }, - { - "https-server-is-down", - true, // accept fallback on http - fakeHttpOrHttpsGet("myapp.html", true, false, 0), - "http://https-server-is-down?ac-discovery=1", - true, - }, - } - - for i, tt := range tests { - httpGet = &mockHttpGetter{getter: tt.get} - urlStr, body, err := httpsOrHTTP(tt.name, tt.insecure) - if tt.expectSuccess { - if err != nil { - t.Fatalf("#%d httpsOrHTTP failed: %v", i, err) - } - if urlStr == "" { - t.Fatalf("#%d httpsOrHTTP didn't return a urlStr", i) - } - if urlStr != tt.expectUrlStr { - t.Fatalf("#%d httpsOrHTTP urlStr mismatch: want %s got %s", - i, tt.expectUrlStr, urlStr) - } - if body == nil { - t.Fatalf("#%d httpsOrHTTP didn't return a body", i) - } - } else { - if err == nil { - t.Fatalf("#%d httpsOrHTTP should have failed", i) - } - if urlStr != "" { - t.Fatalf("#%d httpsOrHTTP should not have returned a urlStr", i) - } - if body != nil { - t.Fatalf("#%d httpsOrHTTP should not have returned a body", i) - } - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/parse_test.go b/Godeps/_workspace/src/github.com/appc/spec/discovery/parse_test.go deleted file mode 100644 index 044fb30..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/parse_test.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package discovery - -import ( - "reflect" - "testing" - - "github.com/appc/spec/schema/types" -) - -func TestNewAppFromString(t *testing.T) { - tests := []struct { - in string - - w *App - werr bool - }{ - { - "example.com/reduce-worker:1.0.0", - - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - }, - }, - false, - }, - { - "example.com/reduce-worker,channel=alpha,label=value", - - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{ - "channel": "alpha", - "label": "value", - }, - }, - - false, - }, - - // bad AC name for app - { - "not an app name", - - nil, - true, - }, - - // bad URL escape (bad query) - { - "example.com/garbage%8 939", - - nil, - true, - }, - - // multi-value labels - { - "foo.com/bar,channel=alpha,dog=woof,channel=beta", - - nil, - true, - }, - } - for i, tt := range tests { - g, err := NewAppFromString(tt.in) - gerr := (err != nil) - if !reflect.DeepEqual(g, tt.w) { - t.Errorf("#%d: got %v, want %v", i, g, tt.w) - } - if gerr != tt.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, tt.werr, err) - } - } -} - -func TestAppString(t *testing.T) { - tests := []struct { - a *App - out string - }{ - { - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{}, - }, - "example.com/reduce-worker", - }, - { - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - }, - }, - "example.com/reduce-worker:1.0.0", - }, - { - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{ - "channel": "alpha", - "label": "value", - }, - }, - "example.com/reduce-worker,channel=alpha,label=value", - }, - } - for i, tt := range tests { - appString := tt.a.String() - - g, err := NewAppFromString(appString) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if !reflect.DeepEqual(g, tt.a) { - t.Errorf("#%d: got %#v, want %#v", i, g, tt.a) - } - } -} - -func TestAppCopy(t *testing.T) { - tests := []struct { - a *App - out string - }{ - { - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{}, - }, - "example.com/reduce-worker", - }, - { - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{ - "version": "1.0.0", - }, - }, - "example.com/reduce-worker:1.0.0", - }, - { - &App{ - Name: "example.com/reduce-worker", - Labels: map[types.ACIdentifier]string{ - "channel": "alpha", - "label": "value", - }, - }, - "example.com/reduce-worker,channel=alpha,label=value", - }, - } - for i, tt := range tests { - appCopy := tt.a.Copy() - if !reflect.DeepEqual(appCopy, tt.a) { - t.Errorf("#%d: got %#v, want %#v", i, appCopy, tt.a) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/image_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/image_test.go deleted file mode 100644 index dd9aeb3..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/image_test.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package schema - -import "testing" - -func TestEmptyApp(t *testing.T) { - imj := ` - { - "acKind": "ImageManifest", - "acVersion": "0.6.1", - "name": "example.com/test" - } - ` - - var im ImageManifest - - err := im.UnmarshalJSON([]byte(imj)) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - // Marshal and Unmarshal to verify that no "app": {} is generated on - // Marshal and converted to empty struct on Unmarshal - buf, err := im.MarshalJSON() - if err != nil { - t.Errorf("unexpected error: %v", err) - } - - err = im.UnmarshalJSON(buf) - if err != nil { - t.Errorf("unexpected error: %v", err) - } -} - -func TestImageManifestMerge(t *testing.T) { - imj := `{"name": "example.com/test"}` - im := &ImageManifest{} - - if im.UnmarshalJSON([]byte(imj)) == nil { - t.Fatal("Manifest JSON without acKind and acVersion unmarshalled successfully") - } - - im = BlankImageManifest() - - err := im.UnmarshalJSON([]byte(imj)) - if err != nil { - t.Errorf("unexpected error: %v", err) - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image_test.go deleted file mode 100644 index 0efe9e0..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image_test.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lastditch - -import ( - "reflect" - "testing" - - "github.com/appc/spec/schema/types" -) - -func TestImageManifestWithInvalidName(t *testing.T) { - invalidName := "example.com/test!" - imj := ` - { - "acKind": "ImageManifest", - "acVersion": "0.6.1", - "name": "` + invalidName + `" - } - ` - if types.ValidACIdentifier.MatchString(invalidName) { - t.Fatalf("%q is an unexpectedly valid name", invalidName) - } - expected := ImageManifest{ - ACKind: "ImageManifest", - ACVersion: "0.6.1", - Name: invalidName, - } - im := ImageManifest{} - if err := im.UnmarshalJSON([]byte(imj)); err != nil { - t.Errorf("unexpected error: %v", err) - } - if !reflect.DeepEqual(im, expected) { - t.Errorf("did not get expected image manifest, got: %+v, expected: %+v", im, expected) - } -} - -func TestBogusImageManifest(t *testing.T) { - bogus := []string{` - { - "acKind": "Bogus", - "acVersion": "0.6.1", - } - `, ` - - - Certainly not a JSON - - `, - } - - for _, str := range bogus { - im := ImageManifest{} - if im.UnmarshalJSON([]byte(str)) == nil { - t.Errorf("bogus image manifest unmarshalled successfully: %s", str) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod_test.go deleted file mode 100644 index af0b382..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lastditch - -import ( - "fmt" - "reflect" - "testing" -) - -func TestInvalidPodManifest(t *testing.T) { - // empty image JSON - eImgJ := "{}" - // empty image instance - eImgI := imgI("", "") - tests := []struct { - desc string - json string - expected PodManifest - }{ - { - desc: "Check an empty pod manifest", - json: podJ("", ""), - expected: podI(), - }, - { - desc: "Check a pod manifest with an invalid app name", - json: podJ(appJ("!", eImgJ, ""), ""), - expected: podI(appI("!", eImgI)), - }, - { - desc: "Check a pod manifest with duplicated app names", - json: podJ(appJ("a", eImgJ, "")+","+appJ("a", eImgJ, ""), ""), - expected: podI(appI("a", eImgI), appI("a", eImgI)), - }, - { - desc: "Check a pod manifest with an invalid image name and ID", - json: podJ(appJ("?", imgJ("!!!", "&&&", ""), ""), ""), - expected: podI(appI("?", imgI("!!!", "&&&"))), - }, - { - desc: "Check if we ignore extra fields in a pod", - json: podJ("", `"ports": [],`), - expected: podI(), - }, - { - desc: "Check if we ignore extra fields in an app", - json: podJ(appJ("a", eImgJ, `"mounts": [],`), `"ports": [],`), - expected: podI(appI("a", eImgI)), - }, - { - desc: "Check if we ignore extra fields in an image", - json: podJ(appJ("a", imgJ("i", "id", `"labels": [],`), `"mounts": [],`), `"ports": [],`), - expected: podI(appI("a", imgI("i", "id"))), - }, - } - for _, tt := range tests { - got := PodManifest{} - if err := got.UnmarshalJSON([]byte(tt.json)); err != nil { - t.Errorf("%s: unexpected error during unmarshalling pod manifest: %v", tt.desc, err) - } - if !reflect.DeepEqual(tt.expected, got) { - t.Errorf("%s: did not get expected pod manifest, got: %+v, expected: %+v", tt.desc, got, tt.expected) - } - } -} - -func TestBogusPodManifest(t *testing.T) { - bogus := []string{ - ` - { - "acKind": "Bogus", - "acVersion": "0.6.1", - } - `, - ` - - - Certainly not a JSON - - `, - } - - for _, str := range bogus { - pm := PodManifest{} - if pm.UnmarshalJSON([]byte(str)) == nil { - t.Errorf("bogus pod manifest unmarshalled successfully: %s", str) - } - } -} - -// podJ returns a pod manifest JSON with given apps -func podJ(apps, extra string) string { - return fmt.Sprintf(` - { - %s - "acKind": "PodManifest", - "acVersion": "0.6.1", - "apps": [%s] - }`, extra, apps) -} - -// podI returns a pod manifest instance with given apps -func podI(apps ...RuntimeApp) PodManifest { - if apps == nil { - apps = AppList{} - } - return PodManifest{ - ACVersion: "0.6.1", - ACKind: "PodManifest", - Apps: apps, - } -} - -// appJ returns an app JSON snippet with given name and image -func appJ(name, image, extra string) string { - return fmt.Sprintf(` - { - %s - "name": "%s", - "image": %s - }`, extra, name, image) -} - -// appI returns an app instance with given name and image -func appI(name string, image Image) RuntimeApp { - return RuntimeApp{ - Name: name, - Image: image, - } -} - -// imgJ returns an image JSON snippet with given name and id -func imgJ(name, id, extra string) string { - return fmt.Sprintf(` - { - %s - "name": "%s", - "id": "%s" - }`, extra, name, id) -} - -// imgI returns an image instance with given name and id -func imgI(name, id string) Image { - return Image{ - Name: name, - ID: id, - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/pod_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/pod_test.go deleted file mode 100644 index 978e99d..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/pod_test.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package schema - -import ( - "testing" - - "github.com/appc/spec/schema/types" -) - -func TestPodManifestMerge(t *testing.T) { - pmj := `{}` - pm := &PodManifest{} - - if pm.UnmarshalJSON([]byte(pmj)) == nil { - t.Fatal("Manifest JSON without acKind and acVersion unmarshalled successfully") - } - - pm = BlankPodManifest() - - err := pm.UnmarshalJSON([]byte(pmj)) - if err != nil { - t.Errorf("unexpected error: %v", err) - } -} - -func TestAppList(t *testing.T) { - ri := RuntimeImage{ - ID: *types.NewHashSHA512([]byte{}), - } - al := AppList{ - RuntimeApp{ - Name: "foo", - Image: ri, - }, - RuntimeApp{ - Name: "bar", - Image: ri, - }, - } - if _, err := al.MarshalJSON(); err != nil { - t.Errorf("want err=nil, got %v", err) - } - dal := AppList{ - RuntimeApp{ - Name: "foo", - Image: ri, - }, - RuntimeApp{ - Name: "bar", - Image: ri, - }, - RuntimeApp{ - Name: "foo", - Image: ri, - }, - } - if _, err := dal.MarshalJSON(); err == nil { - t.Errorf("want err, got nil") - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/acidentifier_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/acidentifier_test.go deleted file mode 100644 index b662705..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/acidentifier_test.go +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "reflect" - "testing" -) - -var ( - goodIdentifiers = []string{ - "asdf", - "foo-bar-baz", - "zab_rab_oof", - "database", - "my~database", - "example.com/database", - "example.com/~bob/database", - "example.com/ourapp-1.0.0", - "sub-domain.example.com/org/product/release-1.0.0", - "sub-domain.example.com/org/product/~alice/release-1.0.0", - } - badIdentifiers = []string{ - "", - "BAR", - "foo#", - "EXAMPLE.com", - "foo.com/BAR", - "/app", - "app/", - "-app", - "app-", - ".app", - "app.", - "_app", - "app_", - "~app", - "app~", - } -) - -func TestNewACIdentifier(t *testing.T) { - for i, in := range goodIdentifiers { - l, err := NewACIdentifier(in) - if err != nil { - t.Errorf("#%d: got err=%v, want nil", i, err) - } - if l == nil { - t.Errorf("#%d: got l=nil, want non-nil", i) - } - } -} - -func TestNewACIdentifierBad(t *testing.T) { - for i, in := range badIdentifiers { - l, err := NewACIdentifier(in) - if l != nil { - t.Errorf("#%d: got l=%v, want nil", i, l) - } - if err == nil { - t.Errorf("#%d: got err=nil, want non-nil", i) - } - } -} - -func TestMustACIdentifier(t *testing.T) { - for i, in := range goodIdentifiers { - l := MustACIdentifier(in) - if l == nil { - t.Errorf("#%d: got l=nil, want non-nil", i) - } - } -} - -func expectPanicMustACIdentifier(i int, in string, t *testing.T) { - defer func() { - recover() - }() - _ = MustACIdentifier(in) - t.Errorf("#%d: panic expected", i) -} - -func TestMustACIdentifierBad(t *testing.T) { - for i, in := range badIdentifiers { - expectPanicMustACIdentifier(i, in, t) - } -} - -func TestSanitizeACIdentifier(t *testing.T) { - tests := map[string]string{ - "foo#": "foo", - "FOO": "foo", - "EXAMPLE.com": "example.com", - "foo.com/BAR": "foo.com/bar", - "/app": "app", - "app/": "app", - "-app": "app", - "app-": "app", - ".app": "app", - "app.": "app", - "_app": "app", - "app_": "app", - "~app": "app", - "app~": "app", - "app///": "app", - "-/.app..": "app", - "-/app.name-test/-/": "app.name-test", - "sub-domain.example.com/org/product/~alice/release-1.0.0": "sub-domain.example.com/org/product/~alice/release-1.0.0", - } - for in, ex := range tests { - o, err := SanitizeACIdentifier(in) - if err != nil { - t.Errorf("got err=%v, want nil", err) - } - if o != ex { - t.Errorf("got l=%s, want %s", o, ex) - } - } -} - -func TestACIdentifierSetGood(t *testing.T) { - tests := map[string]ACIdentifier{ - "blargh": ACIdentifier("blargh"), - "example-ourapp-1-0-0": ACIdentifier("example-ourapp-1-0-0"), - } - for in, w := range tests { - // Ensure an empty name is set appropriately - var a ACIdentifier - err := a.Set(in) - if err != nil { - t.Errorf("%v: got err=%v, want nil", in, err) - continue - } - if !reflect.DeepEqual(a, w) { - t.Errorf("%v: a=%v, want %v", in, a, w) - } - - // Ensure an existing name is overwritten - var b ACIdentifier = ACIdentifier("orig") - err = b.Set(in) - if err != nil { - t.Errorf("%v: got err=%v, want nil", in, err) - continue - } - if !reflect.DeepEqual(b, w) { - t.Errorf("%v: b=%v, want %v", in, b, w) - } - } -} - -func TestACIdentifierSetBad(t *testing.T) { - for i, in := range badIdentifiers { - // Ensure an empty name stays empty - var a ACIdentifier - err := a.Set(in) - if err == nil { - t.Errorf("#%d: err=%v, want nil", i, err) - continue - } - if w := ACIdentifier(""); !reflect.DeepEqual(a, w) { - t.Errorf("%d: a=%v, want %v", i, a, w) - } - - // Ensure an existing name is not overwritten - var b ACIdentifier = ACIdentifier("orig") - err = b.Set(in) - if err == nil { - t.Errorf("#%d: err=%v, want nil", i, err) - continue - } - if w := ACIdentifier("orig"); !reflect.DeepEqual(b, w) { - t.Errorf("%d: b=%v, want %v", i, b, w) - } - } -} - -func TestSanitizeACIdentifierBad(t *testing.T) { - tests := []string{ - "__", - "..", - "//", - "", - ".//-"} - for i, in := range tests { - l, err := SanitizeACIdentifier(in) - if l != "" { - t.Errorf("#%d: got l=%v, want nil", i, l) - } - if err == nil { - t.Errorf("#%d: got err=nil, want non-nil", i) - } - } -} - -func TestACIdentifierUnmarshalBad(t *testing.T) { - tests := []string{ - "", - "garbage", - `""`, - `"EXAMPLE"`, - `"example.com/app#1"`, - `"~example.com/app1"`, - } - for i, in := range tests { - var a, b ACIdentifier - err := a.UnmarshalJSON([]byte(in)) - if err == nil { - t.Errorf("#%d: err=nil, want non-nil", i) - } else if !reflect.DeepEqual(a, b) { - t.Errorf("#%d: a=%v, want empty", i, a) - } - } -} - -func TestACIdentifierUnmarshalGood(t *testing.T) { - tests := map[string]ACIdentifier{ - `"example"`: ACIdentifier("example"), - `"foo-bar"`: ACIdentifier("foo-bar"), - } - for in, w := range tests { - var a ACIdentifier - err := json.Unmarshal([]byte(in), &a) - if err != nil { - t.Errorf("%v: err=%v, want nil", in, err) - } else if !reflect.DeepEqual(a, w) { - t.Errorf("%v: a=%v, want %v", in, a, w) - } - } -} - -func TestACIdentifierMarshalBad(t *testing.T) { - tests := map[string]error{ - "Foo": ErrInvalidCharInACIdentifier, - "foo#": ErrInvalidCharInACIdentifier, - "-foo": ErrInvalidEdgeInACIdentifier, - "example-": ErrInvalidEdgeInACIdentifier, - "": ErrEmptyACIdentifier, - } - for in, werr := range tests { - a := ACIdentifier(in) - b, gerr := json.Marshal(a) - if b != nil { - t.Errorf("ACIdentifier(%q): want b=nil, got %v", in, b) - } - if jerr, ok := gerr.(*json.MarshalerError); !ok { - t.Errorf("expected JSONMarshalerError") - } else { - if e := jerr.Err; e != werr { - t.Errorf("err=%#v, want %#v", e, werr) - } - } - } -} - -func TestACIdentifierMarshalGood(t *testing.T) { - for i, in := range goodIdentifiers { - a := ACIdentifier(in) - b, err := json.Marshal(a) - if !reflect.DeepEqual(b, []byte(`"`+in+`"`)) { - t.Errorf("#%d: marshalled=%v, want %v", i, b, []byte(in)) - } - if err != nil { - t.Errorf("#%d: err=%v, want nil", i, err) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/ackind_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/ackind_test.go deleted file mode 100644 index 6522adb..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/ackind_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "reflect" - "testing" -) - -func TestACKindMarshalBad(t *testing.T) { - tests := map[string]error{ - "Foo": ACKindError("bad ACKind: Foo"), - "ApplicationManifest": ACKindError("bad ACKind: ApplicationManifest"), - "": ErrNoACKind, - } - for in, werr := range tests { - a := ACKind(in) - b, gerr := json.Marshal(a) - if b != nil { - t.Errorf("ACKind(%q): want b=nil, got %v", in, b) - } - if jerr, ok := gerr.(*json.MarshalerError); !ok { - t.Errorf("expected JSONMarshalerError") - } else { - if e := jerr.Err; e != werr { - t.Errorf("err=%#v, want %#v", e, werr) - } - } - } -} - -func TestACKindMarshalGood(t *testing.T) { - for i, in := range []string{ - "ImageManifest", - "PodManifest", - } { - a := ACKind(in) - b, err := json.Marshal(a) - if !reflect.DeepEqual(b, []byte(`"`+in+`"`)) { - t.Errorf("#%d: marshalled=%v, want %v", i, b, []byte(in)) - } - if err != nil { - t.Errorf("#%d: err=%v, want nil", i, err) - } - } -} - -func TestACKindUnmarshalBad(t *testing.T) { - tests := []string{ - "ImageManifest", // Not a valid JSON-encoded string - `"garbage"`, - `"AppManifest"`, - `""`, - } - for i, in := range tests { - var a, b ACKind - err := a.UnmarshalJSON([]byte(in)) - if err == nil { - t.Errorf("#%d: err=nil, want non-nil", i) - } else if !reflect.DeepEqual(a, b) { - t.Errorf("#%d: a=%v, want empty", i, a) - } - } -} - -func TestACKindUnmarshalGood(t *testing.T) { - tests := map[string]ACKind{ - `"PodManifest"`: ACKind("PodManifest"), - `"ImageManifest"`: ACKind("ImageManifest"), - } - for in, w := range tests { - var a ACKind - err := json.Unmarshal([]byte(in), &a) - if err != nil { - t.Errorf("%v: err=%v, want nil", in, err) - } else if !reflect.DeepEqual(a, w) { - t.Errorf("%v: a=%v, want %v", in, a, w) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/acname_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/acname_test.go deleted file mode 100644 index 11b8d2c..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/acname_test.go +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "reflect" - "testing" -) - -var ( - goodNames = []string{ - "asdf", - "foo-bar-baz", - "database", - } - badNames = []string{ - "", - "foo#", - "example.com", - "EXAMPLE.com", - "example/database", - "example/database-1.0.0", - "foo.com/BAR", - "example.com/app_1", - "/app", - "app/", - "-app", - "app-", - ".app", - "app.", - } -) - -func TestNewACName(t *testing.T) { - for i, in := range goodNames { - l, err := NewACName(in) - if err != nil { - t.Errorf("#%d: got err=%v, want nil", i, err) - } - if l == nil { - t.Errorf("#%d: got l=nil, want non-nil", i) - } - } -} - -func TestNewACNameBad(t *testing.T) { - for i, in := range badNames { - l, err := NewACName(in) - if l != nil { - t.Errorf("#%d: got l=%v, want nil", i, l) - } - if err == nil { - t.Errorf("#%d: got err=nil, want non-nil", i) - } - } -} - -func TestMustACName(t *testing.T) { - for i, in := range goodNames { - l := MustACName(in) - if l == nil { - t.Errorf("#%d: got l=nil, want non-nil", i) - } - } -} - -func expectPanicMustACName(i int, in string, t *testing.T) { - defer func() { - recover() - }() - _ = MustACName(in) - t.Errorf("#%d: panic expected", i) -} - -func TestMustACNameBad(t *testing.T) { - for i, in := range badNames { - expectPanicMustACName(i, in, t) - } -} - -func TestSanitizeACName(t *testing.T) { - tests := map[string]string{ - "foo#": "foo", - "EXAMPLE.com": "example-com", - "foo.com/BAR": "foo-com-bar", - "example.com/app_1": "example-com-app-1", - "/app": "app", - "app/": "app", - "-app": "app", - "app-": "app", - ".app": "app", - "app.": "app", - "app///": "app", - "-/.app..": "app", - "-/app.name-test/-/": "app-name-test", - "sub-domain.example.com/org/product/release-1.0.0": "sub-domain-example-com-org-product-release-1-0-0", - } - for in, ex := range tests { - o, err := SanitizeACName(in) - if err != nil { - t.Errorf("got err=%v, want nil", err) - } - if o != ex { - t.Errorf("got l=%s, want %s", o, ex) - } - } -} - -func TestACNameSetGood(t *testing.T) { - tests := map[string]ACName{ - "blargh": ACName("blargh"), - "example-ourapp-1-0-0": ACName("example-ourapp-1-0-0"), - } - for in, w := range tests { - // Ensure an empty name is set appropriately - var a ACName - err := a.Set(in) - if err != nil { - t.Errorf("%v: got err=%v, want nil", in, err) - continue - } - if !reflect.DeepEqual(a, w) { - t.Errorf("%v: a=%v, want %v", in, a, w) - } - - // Ensure an existing name is overwritten - var b ACName = ACName("orig") - err = b.Set(in) - if err != nil { - t.Errorf("%v: got err=%v, want nil", in, err) - continue - } - if !reflect.DeepEqual(b, w) { - t.Errorf("%v: b=%v, want %v", in, b, w) - } - } -} - -func TestACNameSetBad(t *testing.T) { - for i, in := range badNames { - // Ensure an empty name stays empty - var a ACName - err := a.Set(in) - if err == nil { - t.Errorf("#%d: err=%v, want nil", i, err) - continue - } - if w := ACName(""); !reflect.DeepEqual(a, w) { - t.Errorf("%d: a=%v, want %v", i, a, w) - } - - // Ensure an existing name is not overwritten - var b ACName = ACName("orig") - err = b.Set(in) - if err == nil { - t.Errorf("#%d: err=%v, want nil", i, err) - continue - } - if w := ACName("orig"); !reflect.DeepEqual(b, w) { - t.Errorf("%d: b=%v, want %v", i, b, w) - } - } -} - -func TestSanitizeACNameBad(t *testing.T) { - tests := []string{ - "__", - "..", - "//", - "", - ".//-"} - for i, in := range tests { - l, err := SanitizeACName(in) - if l != "" { - t.Errorf("#%d: got l=%v, want nil", i, l) - } - if err == nil { - t.Errorf("#%d: got err=nil, want non-nil", i) - } - } -} - -func TestACNameUnmarshalBad(t *testing.T) { - tests := []string{ - "", - "garbage", - `""`, - `"EXAMPLE"`, - `"example.com/app_1"`, - } - for i, in := range tests { - var a, b ACName - err := a.UnmarshalJSON([]byte(in)) - if err == nil { - t.Errorf("#%d: err=nil, want non-nil", i) - } else if !reflect.DeepEqual(a, b) { - t.Errorf("#%d: a=%v, want empty", i, a) - } - } -} - -func TestACNameUnmarshalGood(t *testing.T) { - tests := map[string]ACName{ - `"example"`: ACName("example"), - `"foo-bar"`: ACName("foo-bar"), - } - for in, w := range tests { - var a ACName - err := json.Unmarshal([]byte(in), &a) - if err != nil { - t.Errorf("%v: err=%v, want nil", in, err) - } else if !reflect.DeepEqual(a, w) { - t.Errorf("%v: a=%v, want %v", in, a, w) - } - } -} - -func TestACNameMarshalBad(t *testing.T) { - tests := map[string]error{ - "Foo": ErrInvalidCharInACName, - "foo#": ErrInvalidCharInACName, - "-foo": ErrInvalidEdgeInACName, - "example-": ErrInvalidEdgeInACName, - "": ErrEmptyACName, - } - for in, werr := range tests { - a := ACName(in) - b, gerr := json.Marshal(a) - if b != nil { - t.Errorf("ACName(%q): want b=nil, got %v", in, b) - } - if jerr, ok := gerr.(*json.MarshalerError); !ok { - t.Errorf("expected JSONMarshalerError") - } else { - if e := jerr.Err; e != werr { - t.Errorf("err=%#v, want %#v", e, werr) - } - } - } -} - -func TestACNameMarshalGood(t *testing.T) { - for i, in := range goodNames { - a := ACName(in) - b, err := json.Marshal(a) - if !reflect.DeepEqual(b, []byte(`"`+in+`"`)) { - t.Errorf("#%d: marshalled=%v, want %v", i, b, []byte(in)) - } - if err != nil { - t.Errorf("#%d: err=%v, want nil", i, err) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/annotations_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/annotations_test.go deleted file mode 100644 index 358fd18..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/annotations_test.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "testing" -) - -func makeAnno(n, v string) Annotation { - name, err := NewACIdentifier(n) - if err != nil { - panic(err) - } - return Annotation{ - Name: *name, - Value: v, - } -} - -func TestAnnotationsAssertValid(t *testing.T) { - tests := []struct { - in []Annotation - werr bool - }{ - // duplicate names should fail - { - []Annotation{ - makeAnno("foo", "bar"), - makeAnno("foo", "baz"), - }, - true, - }, - // bad created should fail - { - []Annotation{ - makeAnno("created", "garbage"), - }, - true, - }, - // bad homepage should fail - { - []Annotation{ - makeAnno("homepage", "not-A$@#URL"), - }, - true, - }, - // bad documentation should fail - { - []Annotation{ - makeAnno("documentation", "ftp://isnotallowed.com"), - }, - true, - }, - // good cases - { - []Annotation{ - makeAnno("created", "2004-05-14T23:11:14+00:00"), - makeAnno("documentation", "http://example.com/docs"), - }, - false, - }, - { - []Annotation{ - makeAnno("foo", "bar"), - makeAnno("homepage", "https://homepage.com"), - }, - false, - }, - // empty is OK - { - []Annotation{}, - false, - }, - } - for i, tt := range tests { - a := Annotations(tt.in) - err := a.assertValid() - if gerr := (err != nil); gerr != tt.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, tt.werr, err) - } - } -} - -func TestAnnotationsMarshal(t *testing.T) { - for i, tt := range []struct { - in []Annotation - wb []byte - werr bool - }{ - { - []Annotation{ - makeAnno("foo", "bar"), - makeAnno("foo", "baz"), - makeAnno("website", "http://example.com/anno"), - }, - nil, - true, - }, - { - []Annotation{ - makeAnno("a", "b"), - }, - []byte(`[{"name":"a","value":"b"}]`), - false, - }, - { - []Annotation{ - makeAnno("foo", "bar"), - makeAnno("website", "http://example.com/anno"), - }, - []byte(`[{"name":"foo","value":"bar"},{"name":"website","value":"http://example.com/anno"}]`), - false, - }, - } { - a := Annotations(tt.in) - b, err := a.MarshalJSON() - if !reflect.DeepEqual(b, tt.wb) { - t.Errorf("#%d: b=%s, want %s", i, b, tt.wb) - } - gerr := err != nil - if gerr != tt.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, tt.werr, err) - } - } -} - -func TestAnnotationsUnmarshal(t *testing.T) { - tests := []struct { - in string - wann *Annotations - werr bool - }{ - { - `garbage`, - &Annotations{}, - true, - }, - { - `[{"name":"a","value":"b"},{"name":"a","value":"b"}]`, - &Annotations{}, - true, - }, - { - `[{"name":"a","value":"b"}]`, - &Annotations{ - makeAnno("a", "b"), - }, - false, - }, - } - for i, tt := range tests { - a := &Annotations{} - err := a.UnmarshalJSON([]byte(tt.in)) - gerr := err != nil - if gerr != tt.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, tt.werr, err) - } - if !reflect.DeepEqual(a, tt.wann) { - t.Errorf("#%d: ann=%#v, want %#v", i, a, tt.wann) - } - } - -} - -func TestAnnotationsGet(t *testing.T) { - for i, tt := range []struct { - in string - wval string - wok bool - }{ - {"foo", "bar", true}, - {"website", "http://example.com/anno", true}, - {"baz", "", false}, - {"wuuf", "", false}, - } { - a := Annotations{ - makeAnno("foo", "bar"), - makeAnno("website", "http://example.com/anno"), - } - gval, gok := a.Get(tt.in) - if gval != tt.wval { - t.Errorf("#%d: val=%v, want %v", i, gval, tt.wval) - } - if gok != tt.wok { - t.Errorf("#%d: ok=%t, want %t", i, gok, tt.wok) - } - } -} - -func TestAnnotationsSet(t *testing.T) { - a := Annotations{} - - a.Set("foo", "bar") - w := Annotations{ - Annotation{ACIdentifier("foo"), "bar"}, - } - if !reflect.DeepEqual(w, a) { - t.Fatalf("want %v, got %v", w, a) - } - - a.Set("dog", "woof") - w = Annotations{ - Annotation{ACIdentifier("foo"), "bar"}, - Annotation{ACIdentifier("dog"), "woof"}, - } - if !reflect.DeepEqual(w, a) { - t.Fatalf("want %v, got %v", w, a) - } - - a.Set("foo", "baz") - a.Set("example.com/foo_bar", "quux") - w = Annotations{ - Annotation{ACIdentifier("foo"), "baz"}, - Annotation{ACIdentifier("dog"), "woof"}, - Annotation{ACIdentifier("example.com/foo_bar"), "quux"}, - } - if !reflect.DeepEqual(w, a) { - t.Fatalf("want %v, got %v", w, a) - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/app_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/app_test.go deleted file mode 100644 index 260e90e..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/app_test.go +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "testing" -) - -func TestAppValid(t *testing.T) { - tests := []App{ - { - Exec: []string{"/bin/httpd"}, - User: "0", - Group: "0", - WorkingDirectory: "/tmp", - }, - { - Exec: []string{"/app"}, - User: "0", - Group: "0", - EventHandlers: []EventHandler{ - {Name: "pre-start"}, - {Name: "post-stop"}, - }, - Environment: []EnvironmentVariable{ - {Name: "DEBUG", Value: "true"}, - }, - WorkingDirectory: "/tmp", - }, - { - Exec: []string{"/app", "arg1", "arg2"}, - User: "0", - Group: "0", - WorkingDirectory: "/tmp", - }, - } - for i, tt := range tests { - if err := tt.assertValid(); err != nil { - t.Errorf("#%d: err == %v, want nil", i, err) - } - } -} - -func TestAppExecInvalid(t *testing.T) { - tests := []App{ - { - Exec: nil, - }, - { - Exec: []string{}, - User: "0", - Group: "0", - }, - { - Exec: []string{"app"}, - User: "0", - Group: "0", - }, - { - Exec: []string{"bin/app", "arg1"}, - User: "0", - Group: "0", - }, - } - for i, tt := range tests { - if err := tt.assertValid(); err == nil { - t.Errorf("#%d: err == nil, want non-nil", i) - } - } -} - -func TestAppEventHandlersInvalid(t *testing.T) { - tests := []App{ - { - Exec: []string{"/bin/httpd"}, - User: "0", - Group: "0", - EventHandlers: []EventHandler{ - { - Name: "pre-start", - }, - { - Name: "pre-start", - }, - }, - }, - { - Exec: []string{"/bin/httpd"}, - User: "0", - Group: "0", - EventHandlers: []EventHandler{ - { - Name: "post-stop", - }, - { - Name: "pre-start", - }, - { - Name: "post-stop", - }, - }, - }, - } - for i, tt := range tests { - if err := tt.assertValid(); err == nil { - t.Errorf("#%d: err == nil, want non-nil", i) - } - } -} - -func TestUserGroupInvalid(t *testing.T) { - tests := []App{ - { - Exec: []string{"/app"}, - }, - { - Exec: []string{"/app"}, - User: "0", - }, - { - Exec: []string{"app"}, - Group: "0", - }, - } - for i, tt := range tests { - if err := tt.assertValid(); err == nil { - t.Errorf("#%d: err == nil, want non-nil", i) - } - } -} - -func TestAppWorkingDirectoryInvalid(t *testing.T) { - tests := []App{ - { - Exec: []string{"/app"}, - User: "foo", - Group: "bar", - WorkingDirectory: "stuff", - }, - { - Exec: []string{"/app"}, - User: "foo", - Group: "bar", - WorkingDirectory: "../home/fred", - }, - } - for i, tt := range tests { - if err := tt.assertValid(); err == nil { - t.Errorf("#%d: err == nil, want non-nil", i) - } - } -} - -func TestAppEnvironmentInvalid(t *testing.T) { - tests := []App{ - { - Exec: []string{"/app"}, - User: "foo", - Group: "bar", - Environment: Environment{ - EnvironmentVariable{"0DEBUG", "true"}, - }, - }, - } - for i, tt := range tests { - if err := tt.assertValid(); err == nil { - t.Errorf("#%d: err == nil, want non-nil", i) - } - } -} - -func TestAppUnmarshal(t *testing.T) { - tests := []struct { - in string - wann *App - werr bool - }{ - { - `garbage`, - &App{}, - true, - }, - { - `{"Exec":"not a list"}`, - &App{}, - true, - }, - { - `{"Exec":["notfullyqualified"]}`, - &App{}, - true, - }, - { - `{"Exec":["/a"],"User":"0","Group":"0"}`, - &App{ - Exec: Exec{ - "/a", - }, - User: "0", - Group: "0", - Environment: make(Environment, 0), - }, - false, - }, - } - for i, tt := range tests { - a := &App{} - err := a.UnmarshalJSON([]byte(tt.in)) - gerr := err != nil - if gerr != tt.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, tt.werr, err) - } - if !reflect.DeepEqual(a, tt.wann) { - t.Errorf("#%d: ann=%#v, want %#v", i, a, tt.wann) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/date_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/date_test.go deleted file mode 100644 index 9eb1183..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/date_test.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "testing" - "time" -) - -var ( - pst = time.FixedZone("Pacific", -8*60*60) -) - -func TestUnmarshalDate(t *testing.T) { - tests := []struct { - in string - - wt time.Time - }{ - { - `"2004-05-14T23:11:14+00:00"`, - - time.Date(2004, 05, 14, 23, 11, 14, 0, time.UTC), - }, - { - `"2001-02-03T04:05:06Z"`, - - time.Date(2001, 02, 03, 04, 05, 06, 0, time.UTC), - }, - { - `"2014-11-14T17:36:54-08:00"`, - - time.Date(2014, 11, 14, 17, 36, 54, 0, pst), - }, - { - `"2004-05-14T23:11:14+00:00"`, - - time.Date(2004, 05, 14, 23, 11, 14, 0, time.UTC), - }, - } - for i, tt := range tests { - var d Date - if err := json.Unmarshal([]byte(tt.in), &d); err != nil { - t.Errorf("#%d: got err=%v, want nil", i, err) - } - if gt := time.Time(d); !gt.Equal(tt.wt) { - t.Errorf("#%d: got time=%v, want %v", i, gt, tt.wt) - } - } -} - -func TestUnmarshalDateBad(t *testing.T) { - tests := []string{ - `not a json string`, - `2014-11-14T17:36:54-08:00`, - `"garbage"`, - `"1416015188"`, - `"Fri Nov 14 17:53:02 PST 2014"`, - `"2014-11-1417:36:54"`, - } - for i, tt := range tests { - var d Date - if err := json.Unmarshal([]byte(tt), &d); err == nil { - t.Errorf("#%d: unexpected nil err", i) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/dependencies_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/dependencies_test.go deleted file mode 100644 index ac3f1f9..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/dependencies_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import "testing" - -func TestEmptyHash(t *testing.T) { - dj := `{"imageName": "example.com/reduce-worker-base"}` - - var d Dependency - - err := d.UnmarshalJSON([]byte(dj)) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - // Marshal to verify that marshalling works without validation errors - buf, err := d.MarshalJSON() - if err != nil { - t.Fatalf("unexpected error: %v", err) - } - - // Unmarshal to verify that the generated json will not create wrong empty hash - err = d.UnmarshalJSON(buf) - if err != nil { - t.Fatalf("unexpected error: %v", err) - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/environment_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/environment_test.go deleted file mode 100644 index 8c51bea..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/environment_test.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "testing" -) - -func TestEnvironmentAssertValid(t *testing.T) { - tests := []struct { - env Environment - werr bool - }{ - // duplicate names should fail - { - Environment{ - EnvironmentVariable{"DEBUG", "true"}, - EnvironmentVariable{"DEBUG", "true"}, - }, - true, - }, - // empty name should fail - { - Environment{ - EnvironmentVariable{"", "value"}, - }, - true, - }, - // name beginning with digit should fail - { - Environment{ - EnvironmentVariable{"0DEBUG", "true"}, - }, - true, - }, - // name with non [A-Za-z0-9_] should fail - { - Environment{ - EnvironmentVariable{"VERBOSE-DEBUG", "true"}, - }, - true, - }, - // accepted environment variable forms - { - Environment{ - EnvironmentVariable{"DEBUG", "true"}, - }, - false, - }, - { - Environment{ - EnvironmentVariable{"_0_DEBUG_0_", "true"}, - }, - false, - }, - } - for i, test := range tests { - env := Environment(test.env) - err := env.assertValid() - if gerr := (err != nil); gerr != test.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, test.werr, err) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec_test.go deleted file mode 100644 index eb707d7..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import "testing" - -func TestExecValid(t *testing.T) { - tests := []Exec{ - {"/bin/httpd"}, - {"/app"}, - {"/app", "arg1", "arg2"}, - } - for i, tt := range tests { - if err := tt.assertValid(); err != nil { - t.Errorf("#%d: err == %v, want nil", i, err) - } - } -} - -func TestExecInvalid(t *testing.T) { - tests := []Exec{ - {}, - {"app"}, - } - for i, tt := range tests { - if err := tt.assertValid(); err == nil { - t.Errorf("#%d: err == nil, want non-nil", i) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/hash_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/hash_test.go deleted file mode 100644 index dc597ef..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/hash_test.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "testing" -) - -func TestMarshalHash(t *testing.T) { - tests := []struct { - typ string - val string - - wout string - }{ - { - "sha512", - "abcdefghi", - - `"sha512-abcdefghi"`, - }, - { - "sha512", - "06c733b1838136838e6d2d3e8fa5aea4c7905e92", - - `"sha512-06c733b1838136838e6d2d3e8fa5aea4c7905e92"`, - }, - } - for i, tt := range tests { - h := Hash{ - typ: tt.typ, - Val: tt.val, - } - b, err := json.Marshal(h) - if err != nil { - t.Errorf("#%d: unexpected err=%v", i, err) - } - if g := string(b); g != tt.wout { - t.Errorf("#%d: got string=%v, want %v", i, g, tt.wout) - } - } -} - -func TestMarshalHashBad(t *testing.T) { - tests := []struct { - typ string - val string - }{ - { - // empty value - "sha512", - "", - }, - { - // bad type - "sha1", - "abcdef", - }, - { - // empty type - "", - "abcdef", - }, - { - // empty empty - "", - "", - }, - } - for i, tt := range tests { - h := Hash{ - typ: tt.typ, - Val: tt.val, - } - g, err := json.Marshal(h) - if err == nil { - t.Errorf("#%d: unexpected nil err", i) - } - if g != nil { - t.Errorf("#%d: unexpected non-nil bytes: %v", i, g) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_test.go deleted file mode 100644 index 785c4f0..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_test.go +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "reflect" - "testing" -) - -func TestIsolatorUnmarshal(t *testing.T) { - tests := []struct { - msg string - werr bool - }{ - { - `{ - "name": "os/linux/capabilities-retain-set", - "value": {"set": ["CAP_KILL"]} - }`, - false, - }, - { - `{ - "name": "os/linux/capabilities-retain-set", - "value": {"set": ["CAP_PONIES"]} - }`, - false, - }, - { - `{ - "name": "os/linux/capabilities-retain-set", - "value": {"set": []} - }`, - true, - }, - { - `{ - "name": "os/linux/capabilities-retain-set", - "value": {"set": "CAP_PONIES"} - }`, - true, - }, - { - `{ - "name": "resource/block-bandwidth", - "value": {"default": true, "limit": "1G"} - }`, - false, - }, - { - `{ - "name": "resource/block-bandwidth", - "value": {"default": false, "limit": "1G"} - }`, - true, - }, - { - `{ - "name": "resource/block-bandwidth", - "value": {"request": "30G", "limit": "1G"} - }`, - true, - }, - { - `{ - "name": "resource/block-iops", - "value": {"default": true, "limit": "1G"} - }`, - false, - }, - { - `{ - "name": "resource/block-iops", - "value": {"default": false, "limit": "1G"} - }`, - true, - }, - { - `{ - "name": "resource/block-iops", - "value": {"request": "30G", "limit": "1G"} - }`, - true, - }, - { - `{ - "name": "resource/cpu", - "value": {"request": "30m", "limit": "1m"} - }`, - false, - }, - { - `{ - "name": "resource/memory", - "value": {"request": "1G", "limit": "2Gi"} - }`, - false, - }, - { - `{ - "name": "resource/memory", - "value": {"default": true, "request": "1G", "limit": "2G"} - }`, - true, - }, - { - `{ - "name": "resource/network-bandwidth", - "value": {"default": true, "limit": "1G"} - }`, - false, - }, - { - `{ - "name": "resource/network-bandwidth", - "value": {"default": false, "limit": "1G"} - }`, - true, - }, - { - `{ - "name": "resource/network-bandwidth", - "value": {"request": "30G", "limit": "1G"} - }`, - true, - }, - } - - for i, tt := range tests { - var ii Isolator - err := ii.UnmarshalJSON([]byte(tt.msg)) - if gerr := (err != nil); gerr != tt.werr { - t.Errorf("#%d: gerr=%t, want %t (err=%v)", i, gerr, tt.werr, err) - } - } -} - -func TestIsolatorsGetByName(t *testing.T) { - ex := ` - [ - { - "name": "resource/cpu", - "value": {"request": "30m", "limit": "1m"} - }, - { - "name": "resource/memory", - "value": {"request": "1G", "limit": "2Gi"} - }, - { - "name": "os/linux/capabilities-retain-set", - "value": {"set": ["CAP_KILL"]} - }, - { - "name": "os/linux/capabilities-remove-set", - "value": {"set": ["CAP_KILL"]} - } - ] - ` - - tests := []struct { - name ACIdentifier - wlimit int64 - wrequest int64 - wset []LinuxCapability - }{ - {"resource/cpu", 1, 30, nil}, - {"resource/memory", 2147483648, 1000000000, nil}, - {"os/linux/capabilities-retain-set", 0, 0, []LinuxCapability{"CAP_KILL"}}, - {"os/linux/capabilities-remove-set", 0, 0, []LinuxCapability{"CAP_KILL"}}, - } - - var is Isolators - err := json.Unmarshal([]byte(ex), &is) - if err != nil { - panic(err) - } - - if len(is) < 2 { - t.Fatalf("too few items %v", len(is)) - } - - for i, tt := range tests { - c := is.GetByName(tt.name) - if c == nil { - t.Fatalf("can't find item %v in %v items", tt.name, len(is)) - } - switch v := c.Value().(type) { - case Resource: - var r Resource = v - glimit := r.Limit() - grequest := r.Request() - - var vlimit, vrequest int64 - if tt.name == "resource/cpu" { - vlimit, vrequest = glimit.MilliValue(), grequest.MilliValue() - } else { - vlimit, vrequest = glimit.Value(), grequest.Value() - } - - if vlimit != tt.wlimit { - t.Errorf("#%d: glimit=%v, want %v", i, vlimit, tt.wlimit) - } - if vrequest != tt.wrequest { - t.Errorf("#%d: grequest=%v, want %v", i, vrequest, tt.wrequest) - } - - case LinuxCapabilitiesSet: - var s LinuxCapabilitiesSet = v - if !reflect.DeepEqual(s.Set(), tt.wset) { - t.Errorf("#%d: gset=%v, want %v", i, s.Set(), tt.wset) - } - - default: - panic("unexecpected type") - } - } -} - -func TestIsolatorUnrecognized(t *testing.T) { - msg := ` - [{ - "name": "resource/network-bandwidth", - "value": {"default": true, "limit": "1G"} - }, - { - "name": "resource/network-ponies", - "value": 0 - }]` - - ex := Isolators{ - {Name: "resource/network-ponies"}, - } - - is := Isolators{} - if err := json.Unmarshal([]byte(msg), &is); err != nil { - t.Fatalf("failed to unmarshal isolators: %v", err) - } - - u := is.Unrecognized() - if len(u) != len(ex) { - t.Errorf("unrecognized isolator list is wrong len: want %v, got %v", len(ex), len(u)) - } - - for i, e := range ex { - if e.Name != u[i].Name { - t.Errorf("unrecognized isolator list mismatch: want %v, got %v", e.Name, u[i].Name) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/labels_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/labels_test.go deleted file mode 100644 index 9759d88..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/labels_test.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "strings" - "testing" -) - -func TestLabels(t *testing.T) { - tests := []struct { - in string - errPrefix string - }{ - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "amd64"}]`, - "", - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "aarch64"}]`, - "", - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "arm64"}]`, - `bad arch "arm64" for linux`, - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "aarch64_be"}]`, - "", - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "arm64_be"}]`, - `bad arch "arm64_be" for linux`, - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "arm"}]`, - `bad arch "arm" for linux`, - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "armv6l"}]`, - "", - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "armv7l"}]`, - "", - }, - { - `[{"name": "os", "value": "linux"}, {"name": "arch", "value": "armv7b"}]`, - "", - }, - { - `[{"name": "os", "value": "freebsd"}, {"name": "arch", "value": "amd64"}]`, - "", - }, - { - `[{"name": "os", "value": "OS/360"}, {"name": "arch", "value": "S/360"}]`, - `bad os "OS/360"`, - }, - { - `[{"name": "os", "value": "freebsd"}, {"name": "arch", "value": "armv7b"}]`, - `bad arch "armv7b" for freebsd`, - }, - { - `[{"name": "name"}]`, - `invalid label name: "name"`, - }, - { - `[{"name": "os", "value": "linux"}, {"name": "os", "value": "freebsd"}]`, - `duplicate labels of name "os"`, - }, - { - `[{"name": "arch", "value": "amd64"}, {"name": "os", "value": "freebsd"}, {"name": "arch", "value": "x86_64"}]`, - `duplicate labels of name "arch"`, - }, - { - `[]`, - "", - }, - } - for i, tt := range tests { - var l Labels - if err := json.Unmarshal([]byte(tt.in), &l); err != nil { - if tt.errPrefix == "" { - t.Errorf("#%d: got err=%v, expected no error", i, err) - } else if !strings.HasPrefix(err.Error(), tt.errPrefix) { - t.Errorf("#%d: got err=%v, expected prefix %#v", i, err, tt.errPrefix) - } - } else { - t.Log(l) - if tt.errPrefix != "" { - t.Errorf("#%d: got no err, expected prefix %#v", i, tt.errPrefix) - } - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint_test.go deleted file mode 100644 index f7b216e..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint_test.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "testing" -) - -func TestMountPointFromString(t *testing.T) { - tests := []struct { - s string - mount MountPoint - }{ - { - "foobar,path=/tmp", - MountPoint{ - Name: "foobar", - Path: "/tmp", - ReadOnly: false, - }, - }, - { - "foobar,path=/tmp,readOnly=false", - MountPoint{ - Name: "foobar", - Path: "/tmp", - ReadOnly: false, - }, - }, - { - "foobar,path=/tmp,readOnly=true", - MountPoint{ - Name: "foobar", - Path: "/tmp", - ReadOnly: true, - }, - }, - } - for i, tt := range tests { - mount, err := MountPointFromString(tt.s) - if err != nil { - t.Errorf("#%d: got err=%v, want nil", i, err) - } - if !reflect.DeepEqual(*mount, tt.mount) { - t.Errorf("#%d: mount=%v, want %v", i, *mount, tt.mount) - } - } -} - -func TestMountPointFromStringBad(t *testing.T) { - tests := []string{ - "#foobar,path=/tmp", - "foobar,path=/tmp,readOnly=true,asdf=asdf", - "foobar,path=/tmp,readOnly=maybe", - "foobar,path=/tmp,readOnly=", - "foobar,path=", - "foobar", - "", - ",path=/", - } - for i, in := range tests { - l, err := MountPointFromString(in) - if l != nil { - t.Errorf("#%d: got l=%v, want nil", i, l) - } - if err == nil { - t.Errorf("#%d: got err=nil, want non-nil", i) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/port_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/port_test.go deleted file mode 100644 index 3462c0e..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/port_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "testing" -) - -func TestGoodPort(t *testing.T) { - p := Port{ - Port: 32456, - Count: 100, - } - if err := p.assertValid(); err != nil { - t.Errorf("good port assertion failed: %v", err) - } -} - -func TestBadPort(t *testing.T) { - p := Port{ - Port: 88888, - } - if p.assertValid() == nil { - t.Errorf("bad port asserted valid") - } -} - -func TestBadRange(t *testing.T) { - p := Port{ - Port: 32456, - Count: 45678, - } - if p.assertValid() == nil { - t.Errorf("bad port range asserted valid") - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/semver_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/semver_test.go deleted file mode 100644 index 6afb181..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/semver_test.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "reflect" - "testing" - - "github.com/coreos/go-semver/semver" -) - -func TestMarshalSemver(t *testing.T) { - tests := []struct { - sv SemVer - - wd []byte - }{ - { - SemVer(semver.Version{Major: 1}), - - []byte(`"1.0.0"`), - }, - { - SemVer(semver.Version{Major: 3, Minor: 2, Patch: 1}), - - []byte(`"3.2.1"`), - }, - { - SemVer(semver.Version{Major: 3, Minor: 2, Patch: 1, PreRelease: "foo"}), - - []byte(`"3.2.1-foo"`), - }, - { - SemVer(semver.Version{Major: 1, Minor: 2, Patch: 3, PreRelease: "alpha", Metadata: "git"}), - - []byte(`"1.2.3-alpha+git"`), - }, - } - for i, tt := range tests { - d, err := json.Marshal(tt.sv) - if !reflect.DeepEqual(d, tt.wd) { - t.Errorf("#%d: d=%v, want %v", i, string(d), string(tt.wd)) - } - if err != nil { - t.Errorf("#%d: err=%v, want nil", i, err) - } - } -} - -func TestUnmarshalSemver(t *testing.T) { - tests := []struct { - d []byte - - wsv SemVer - werr bool - }{ - { - []byte(`"1.0.0"`), - - SemVer(semver.Version{Major: 1}), - false, - }, - { - []byte(`"3.2.1"`), - SemVer(semver.Version{Major: 3, Minor: 2, Patch: 1}), - - false, - }, - { - []byte(`"3.2.1-foo"`), - - SemVer(semver.Version{Major: 3, Minor: 2, Patch: 1, PreRelease: "foo"}), - false, - }, - { - []byte(`"1.2.3-alpha+git"`), - - SemVer(semver.Version{Major: 1, Minor: 2, Patch: 3, PreRelease: "alpha", Metadata: "git"}), - false, - }, - { - []byte(`"1"`), - - SemVer{}, - true, - }, - { - []byte(`"1.2.3.4"`), - - SemVer{}, - true, - }, - { - []byte(`1.2.3`), - - SemVer{}, - true, - }, - { - []byte(`"v1.2.3"`), - - SemVer{}, - true, - }, - } - for i, tt := range tests { - var sv SemVer - err := json.Unmarshal(tt.d, &sv) - if !reflect.DeepEqual(sv, tt.wsv) { - t.Errorf("#%d: semver=%#v, want %#v", i, sv, tt.wsv) - } - if gerr := (err != nil); gerr != tt.werr { - t.Errorf("#%d: err==%v, want errstate %t", i, err, tt.werr) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/url_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/url_test.go deleted file mode 100644 index fa1e65d..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/url_test.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "encoding/json" - "net/url" - "reflect" - "testing" -) - -func mustParseURL(t *testing.T, s string) url.URL { - u, err := url.Parse(s) - if err != nil { - t.Fatalf("error parsing URL: %v", err) - } - return *u -} - -func TestMarshalURL(t *testing.T) { - tests := []struct { - u url.URL - - w string - }{ - { - mustParseURL(t, "http://foo.com"), - - `"http://foo.com"`, - }, - { - mustParseURL(t, "http://foo.com/huh/what?is=this"), - - `"http://foo.com/huh/what?is=this"`, - }, - { - mustParseURL(t, "https://example.com/bar"), - - `"https://example.com/bar"`, - }, - } - for i, tt := range tests { - u := URL(tt.u) - b, err := json.Marshal(u) - if g := string(b); g != tt.w { - t.Errorf("#%d: got %q, want %q", i, g, tt.w) - } - if err != nil { - t.Errorf("#%d: err=%v, want nil", i, err) - } - - } -} - -func TestMarshalURLBad(t *testing.T) { - tests := []url.URL{ - mustParseURL(t, "ftp://foo.com"), - mustParseURL(t, "unix:///hello"), - } - for i, tt := range tests { - u := URL(tt) - b, err := json.Marshal(u) - if b != nil { - t.Errorf("#%d: got %v, want nil", i, b) - } - if err == nil { - t.Errorf("#%d: got unexpected err=nil", i) - } - } -} - -func TestUnmarshalURL(t *testing.T) { - tests := []struct { - in string - - w URL - }{ - { - `"http://foo.com"`, - - URL(mustParseURL(t, "http://foo.com")), - }, - { - `"http://yis.com/hello?goodbye=yes"`, - - URL(mustParseURL(t, "http://yis.com/hello?goodbye=yes")), - }, - { - `"https://ohai.net"`, - - URL(mustParseURL(t, "https://ohai.net")), - }, - } - for i, tt := range tests { - var g URL - err := json.Unmarshal([]byte(tt.in), &g) - if err != nil { - t.Errorf("#%d: want err=nil, got %v", i, err) - } - if !reflect.DeepEqual(g, tt.w) { - t.Errorf("#%d: got url=%v, want %v", i, g, tt.w) - } - } -} - -func TestUnmarshalURLBad(t *testing.T) { - var empty = URL{} - tests := []string{ - "badjson", - "http://google.com", - `"ftp://example.com"`, - `"unix://file.net"`, - `"not a url"`, - } - for i, tt := range tests { - var g URL - err := json.Unmarshal([]byte(tt), &g) - if err == nil { - t.Errorf("#%d: want err, got nil", i) - } - if !reflect.DeepEqual(g, empty) { - t.Errorf("#%d: got %v, want %v", i, g, empty) - } - } -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/uuid_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/uuid_test.go deleted file mode 100644 index 03c9320..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/uuid_test.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import "testing" - -func TestNewUUID(t *testing.T) { - tests := []struct { - in string - ws string - }{ - { - "6733C088-A507-4694-AABF-EDBE4FC5266F", - - "6733c088-a507-4694-aabf-edbe4fc5266f", - }, - { - "6733C088A5074694AABFEDBE4FC5266F", - - "6733c088-a507-4694-aabf-edbe4fc5266f", - }, - { - "0aaf0a79-1a39-4d59-abbf-1bebca8209d2", - - "0aaf0a79-1a39-4d59-abbf-1bebca8209d2", - }, - { - "0aaf0a791a394d59abbf1bebca8209d2", - - "0aaf0a79-1a39-4d59-abbf-1bebca8209d2", - }, - } - for i, tt := range tests { - gu, err := NewUUID(tt.in) - if err != nil { - t.Errorf("#%d: err=%v, want %v", i, err, nil) - } - if gs := gu.String(); gs != tt.ws { - t.Errorf("#%d: String()=%v, want %v", i, gs, tt.ws) - } - } -} - -func TestNewUUIDBad(t *testing.T) { - tests := []string{ - "asdf", - "0AAF0A79-1A39-4D59-ABBF-1BEBCA8209D2ABC", - "", - } - for i, tt := range tests { - g, err := NewUUID(tt) - if err == nil { - t.Errorf("#%d: err=nil, want non-nil", i) - } - if g != nil { - t.Errorf("#%d: err=%v, want %v", i, g, nil) - - } - } - -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume_test.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume_test.go deleted file mode 100644 index 8094793..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume_test.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "testing" -) - -func TestVolumeFromString(t *testing.T) { - trueVar := true - falseVar := false - tests := []struct { - s string - v Volume - }{ - { - "foobar,kind=host,source=/tmp", - Volume{ - Name: "foobar", - Kind: "host", - Source: "/tmp", - ReadOnly: nil, - }, - }, - { - "foobar,kind=host,source=/tmp,readOnly=false", - Volume{ - Name: "foobar", - Kind: "host", - Source: "/tmp", - ReadOnly: &falseVar, - }, - }, - { - "foobar,kind=host,source=/tmp,readOnly=true", - Volume{ - Name: "foobar", - Kind: "host", - Source: "/tmp", - ReadOnly: &trueVar, - }, - }, - { - "foobar,kind=empty", - Volume{ - Name: "foobar", - Kind: "empty", - ReadOnly: nil, - }, - }, - { - "foobar,kind=empty,readOnly=true", - Volume{ - Name: "foobar", - Kind: "empty", - ReadOnly: &trueVar, - }, - }, - } - for i, tt := range tests { - v, err := VolumeFromString(tt.s) - if err != nil { - t.Errorf("#%d: got err=%v, want nil", i, err) - } - if !reflect.DeepEqual(*v, tt.v) { - t.Errorf("#%d: v=%v, want %v", i, *v, tt.v) - } - } -} - -func TestVolumeFromStringBad(t *testing.T) { - tests := []string{ - "#foobar,kind=host,source=/tmp", - "foobar,kind=host,source=/tmp,readOnly=true,asdf=asdf", - "foobar,kind=empty,source=/tmp", - } - for i, in := range tests { - l, err := VolumeFromString(in) - if l != nil { - t.Errorf("#%d: got l=%v, want nil", i, l) - } - if err == nil { - t.Errorf("#%d: got err=nil, want non-nil", i) - } - } -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/juju/errors/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/juju/errors/LICENSE new file mode 100644 index 0000000..ade9307 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/juju/errors/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE new file mode 100644 index 0000000..06ce0c3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) +Copyright (c) 2013 Mario L. Gutierrez + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE new file mode 100644 index 0000000..a68e67f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE @@ -0,0 +1,188 @@ + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml new file mode 100644 index 0000000..8da58fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml @@ -0,0 +1,31 @@ +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go b/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go deleted file mode 100644 index a903480..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package log - -import ( - "fmt" - "github.com/Sirupsen/logrus" - . "github.com/onsi/gomega" - "os" - "testing" -) - -func TestLog(t *testing.T) { - RegisterTestingT(t) - - logrus.SetOutput(os.Stdout) - logrus.SetFormatter(&BlaFormatter{}) - logrus.SetLevel(logrus.DebugLevel) - - defer func() { - if r := recover(); r != nil { - fmt.Println("Recovered in f", r) - } - }() - - logrus.WithField("yopla", "boom").Debug("salut") - logrus.WithField("yopla", "boom").Info("salut") - logrus.WithField("yopla", "boom").Warn("salut") - logrus.WithField("yopla", "boom").Error("salut") - logrus.WithField("yopla", "boom").Panic("salut") -} - -func TestReduce(t *testing.T) { - RegisterTestingT(t) - - format := BlaFormatter{} - - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 50)).To(Equal("com/blablacar/cnt/test.go")) - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 25)).To(Equal("com/blablacar/cnt/test.go")) - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 24)).To(Equal("c/blablacar/cnt/test.go")) - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 23)).To(Equal("c/blablacar/cnt/test.go")) - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 22)).To(Equal("c/b/cnt/test.go")) - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 12)).To(Equal("c/b/c/test.go")) - Expect(format.reduceFilePath("com/blablacar/cnt/test.go", 10)).To(Equal("c/b/c/test.go")) -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator_test.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator_test.go deleted file mode 100644 index 834b766..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator_test.go +++ /dev/null @@ -1,10 +0,0 @@ -package utils - -import ( - "testing" -) - -func TestVersionGenerator(t *testing.T) { - v := GenerateVersion() - println(v) -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_test.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_test.go deleted file mode 100644 index 80bc390..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package utils - -import ( - "testing" -) - -func assertVersion(t *testing.T, a, b string, result int) { - if r := Version(a).compareTo(Version(b)); r != result { - t.Fatalf("Unexpected version comparison result. Found %d, expected %d", r, result) - } -} - -func TestCompareVersion(t *testing.T) { - assertVersion(t, "1.12", "1.12", 0) - assertVersion(t, "1.0.0", "1", 0) - assertVersion(t, "1", "1.0.0", 0) - assertVersion(t, "1.05.00.0156", "1.0.221.9289", 1) - assertVersion(t, "1", "1.0.1", -1) - assertVersion(t, "1.0.1", "1", 1) - assertVersion(t, "1.0.1", "1.0.2", -1) - assertVersion(t, "1.0.2", "1.0.3", -1) - assertVersion(t, "1.0.3", "1.1", -1) - assertVersion(t, "1.1", "1.1.1", -1) - assertVersion(t, "1.1.1", "1.1.2", -1) - assertVersion(t, "1.1.2", "1.2", -1) - assertVersion(t, "1", "1", 0) - -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE new file mode 100644 index 0000000..385fac9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009-2011 Andreas Krennmair. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Andreas Krennmair nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS new file mode 100644 index 0000000..ff177f6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [2013] [the CloudFoundry Authors] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE new file mode 100644 index 0000000..004e77f --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ben Johnson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE new file mode 100644 index 0000000..2dc6853 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE @@ -0,0 +1,7 @@ +Copyright 2014 Google & the Go AUTHORS + +Go AUTHORS are: +See https://code.google.com/p/go/source/browse/AUTHORS + +Licensed under the terms of Go itself: +https://code.google.com/p/go/source/browse/LICENSE diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE new file mode 100644 index 0000000..13ef3fe --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE @@ -0,0 +1,12 @@ +Copyright (c) 2012, Sergey Cherepanov +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE new file mode 100644 index 0000000..cde8b8b --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Xiang Li + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE new file mode 100644 index 0000000..f4988b4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE @@ -0,0 +1,28 @@ +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS new file mode 100644 index 0000000..619f9db --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/NOTICE b/Godeps/_workspace/src/github.com/coreos/etcd/NOTICE new file mode 100644 index 0000000..b39ddfa --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/etcd/NOTICE @@ -0,0 +1,5 @@ +CoreOS Project +Copyright 2014 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go deleted file mode 100644 index b2b46d1..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/client_test.go +++ /dev/null @@ -1,896 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package client - -import ( - "errors" - "io" - "io/ioutil" - "math/rand" - "net/http" - "net/url" - "reflect" - "sort" - "strings" - "testing" - "time" - - "github.com/coreos/etcd/pkg/testutil" - "golang.org/x/net/context" -) - -type actionAssertingHTTPClient struct { - t *testing.T - num int - act httpAction - - resp http.Response - body []byte - err error -} - -func (a *actionAssertingHTTPClient) Do(_ context.Context, act httpAction) (*http.Response, []byte, error) { - if !reflect.DeepEqual(a.act, act) { - a.t.Errorf("#%d: unexpected httpAction: want=%#v got=%#v", a.num, a.act, act) - } - - return &a.resp, a.body, a.err -} - -type staticHTTPClient struct { - resp http.Response - body []byte - err error -} - -func (s *staticHTTPClient) Do(context.Context, httpAction) (*http.Response, []byte, error) { - return &s.resp, s.body, s.err -} - -type staticHTTPAction struct { - request http.Request -} - -func (s *staticHTTPAction) HTTPRequest(url.URL) *http.Request { - return &s.request -} - -type staticHTTPResponse struct { - resp http.Response - body []byte - err error -} - -type multiStaticHTTPClient struct { - responses []staticHTTPResponse - cur int -} - -func (s *multiStaticHTTPClient) Do(context.Context, httpAction) (*http.Response, []byte, error) { - r := s.responses[s.cur] - s.cur++ - return &r.resp, r.body, r.err -} - -func newStaticHTTPClientFactory(responses []staticHTTPResponse) httpClientFactory { - var cur int - return func(url.URL) httpClient { - r := responses[cur] - cur++ - return &staticHTTPClient{resp: r.resp, body: r.body, err: r.err} - } -} - -type fakeTransport struct { - respchan chan *http.Response - errchan chan error - startCancel chan struct{} - finishCancel chan struct{} -} - -func newFakeTransport() *fakeTransport { - return &fakeTransport{ - respchan: make(chan *http.Response, 1), - errchan: make(chan error, 1), - startCancel: make(chan struct{}, 1), - finishCancel: make(chan struct{}, 1), - } -} - -func (t *fakeTransport) CancelRequest(*http.Request) { - t.startCancel <- struct{}{} -} - -type fakeAction struct{} - -func (a *fakeAction) HTTPRequest(url.URL) *http.Request { - return &http.Request{} -} - -func TestSimpleHTTPClientDoSuccess(t *testing.T) { - tr := newFakeTransport() - c := &simpleHTTPClient{transport: tr} - - tr.respchan <- &http.Response{ - StatusCode: http.StatusTeapot, - Body: ioutil.NopCloser(strings.NewReader("foo")), - } - - resp, body, err := c.Do(context.Background(), &fakeAction{}) - if err != nil { - t.Fatalf("incorrect error value: want=nil got=%v", err) - } - - wantCode := http.StatusTeapot - if wantCode != resp.StatusCode { - t.Fatalf("invalid response code: want=%d got=%d", wantCode, resp.StatusCode) - } - - wantBody := []byte("foo") - if !reflect.DeepEqual(wantBody, body) { - t.Fatalf("invalid response body: want=%q got=%q", wantBody, body) - } -} - -func TestSimpleHTTPClientDoError(t *testing.T) { - tr := newFakeTransport() - c := &simpleHTTPClient{transport: tr} - - tr.errchan <- errors.New("fixture") - - _, _, err := c.Do(context.Background(), &fakeAction{}) - if err == nil { - t.Fatalf("expected non-nil error, got nil") - } -} - -func TestSimpleHTTPClientDoCancelContext(t *testing.T) { - tr := newFakeTransport() - c := &simpleHTTPClient{transport: tr} - - tr.startCancel <- struct{}{} - tr.finishCancel <- struct{}{} - - _, _, err := c.Do(context.Background(), &fakeAction{}) - if err == nil { - t.Fatalf("expected non-nil error, got nil") - } -} - -type checkableReadCloser struct { - io.ReadCloser - closed bool -} - -func (c *checkableReadCloser) Close() error { - if !c.closed { - c.closed = true - return c.ReadCloser.Close() - } - return nil -} - -func TestSimpleHTTPClientDoCancelContextResponseBodyClosed(t *testing.T) { - tr := newFakeTransport() - c := &simpleHTTPClient{transport: tr} - - // create an already-cancelled context - ctx, cancel := context.WithCancel(context.Background()) - cancel() - - body := &checkableReadCloser{ReadCloser: ioutil.NopCloser(strings.NewReader("foo"))} - go func() { - // wait that simpleHTTPClient knows the context is already timed out, - // and calls CancelRequest - testutil.WaitSchedule() - - // response is returned before cancel effects - tr.respchan <- &http.Response{Body: body} - }() - - _, _, err := c.Do(ctx, &fakeAction{}) - if err == nil { - t.Fatalf("expected non-nil error, got nil") - } - - if !body.closed { - t.Fatalf("expected closed body") - } -} - -type blockingBody struct { - c chan struct{} -} - -func (bb *blockingBody) Read(p []byte) (n int, err error) { - <-bb.c - return 0, errors.New("closed") -} - -func (bb *blockingBody) Close() error { - close(bb.c) - return nil -} - -func TestSimpleHTTPClientDoCancelContextResponseBodyClosedWithBlockingBody(t *testing.T) { - tr := newFakeTransport() - c := &simpleHTTPClient{transport: tr} - - ctx, cancel := context.WithCancel(context.Background()) - body := &checkableReadCloser{ReadCloser: &blockingBody{c: make(chan struct{})}} - go func() { - tr.respchan <- &http.Response{Body: body} - time.Sleep(2 * time.Millisecond) - // cancel after the body is received - cancel() - }() - - _, _, err := c.Do(ctx, &fakeAction{}) - if err != context.Canceled { - t.Fatalf("expected %+v, got %+v", context.Canceled, err) - } - - if !body.closed { - t.Fatalf("expected closed body") - } -} - -func TestSimpleHTTPClientDoCancelContextWaitForRoundTrip(t *testing.T) { - tr := newFakeTransport() - c := &simpleHTTPClient{transport: tr} - - donechan := make(chan struct{}) - ctx, cancel := context.WithCancel(context.Background()) - go func() { - c.Do(ctx, &fakeAction{}) - close(donechan) - }() - - // This should call CancelRequest and begin the cancellation process - cancel() - - select { - case <-donechan: - t.Fatalf("simpleHTTPClient.Do should not have exited yet") - default: - } - - tr.finishCancel <- struct{}{} - - select { - case <-donechan: - //expected behavior - return - case <-time.After(time.Second): - t.Fatalf("simpleHTTPClient.Do did not exit within 1s") - } -} - -func TestSimpleHTTPClientDoHeaderTimeout(t *testing.T) { - tr := newFakeTransport() - tr.finishCancel <- struct{}{} - c := &simpleHTTPClient{transport: tr, headerTimeout: time.Millisecond} - - errc := make(chan error) - go func() { - _, _, err := c.Do(context.Background(), &fakeAction{}) - errc <- err - }() - - select { - case err := <-errc: - if err == nil { - t.Fatalf("expected non-nil error, got nil") - } - case <-time.After(time.Second): - t.Fatalf("unexpected timeout when waitting for the test to finish") - } -} - -func TestHTTPClusterClientDo(t *testing.T) { - fakeErr := errors.New("fake!") - fakeURL := url.URL{} - tests := []struct { - client *httpClusterClient - wantCode int - wantErr error - wantPinned int - }{ - // first good response short-circuits Do - { - client: &httpClusterClient{ - endpoints: []url.URL{fakeURL, fakeURL}, - clientFactory: newStaticHTTPClientFactory( - []staticHTTPResponse{ - {resp: http.Response{StatusCode: http.StatusTeapot}}, - {err: fakeErr}, - }, - ), - rand: rand.New(rand.NewSource(0)), - }, - wantCode: http.StatusTeapot, - }, - - // fall through to good endpoint if err is arbitrary - { - client: &httpClusterClient{ - endpoints: []url.URL{fakeURL, fakeURL}, - clientFactory: newStaticHTTPClientFactory( - []staticHTTPResponse{ - {err: fakeErr}, - {resp: http.Response{StatusCode: http.StatusTeapot}}, - }, - ), - rand: rand.New(rand.NewSource(0)), - }, - wantCode: http.StatusTeapot, - wantPinned: 1, - }, - - // context.Canceled short-circuits Do - { - client: &httpClusterClient{ - endpoints: []url.URL{fakeURL, fakeURL}, - clientFactory: newStaticHTTPClientFactory( - []staticHTTPResponse{ - {err: context.Canceled}, - {resp: http.Response{StatusCode: http.StatusTeapot}}, - }, - ), - rand: rand.New(rand.NewSource(0)), - }, - wantErr: context.Canceled, - }, - - // return err if there are no endpoints - { - client: &httpClusterClient{ - endpoints: []url.URL{}, - clientFactory: newHTTPClientFactory(nil, nil, 0), - rand: rand.New(rand.NewSource(0)), - }, - wantErr: ErrNoEndpoints, - }, - - // return err if all endpoints return arbitrary errors - { - client: &httpClusterClient{ - endpoints: []url.URL{fakeURL, fakeURL}, - clientFactory: newStaticHTTPClientFactory( - []staticHTTPResponse{ - {err: fakeErr}, - {err: fakeErr}, - }, - ), - rand: rand.New(rand.NewSource(0)), - }, - wantErr: &ClusterError{Errors: []error{fakeErr, fakeErr}}, - }, - - // 500-level errors cause Do to fallthrough to next endpoint - { - client: &httpClusterClient{ - endpoints: []url.URL{fakeURL, fakeURL}, - clientFactory: newStaticHTTPClientFactory( - []staticHTTPResponse{ - {resp: http.Response{StatusCode: http.StatusBadGateway}}, - {resp: http.Response{StatusCode: http.StatusTeapot}}, - }, - ), - rand: rand.New(rand.NewSource(0)), - }, - wantCode: http.StatusTeapot, - wantPinned: 1, - }, - } - - for i, tt := range tests { - resp, _, err := tt.client.Do(context.Background(), nil) - if !reflect.DeepEqual(tt.wantErr, err) { - t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr) - continue - } - - if resp == nil { - if tt.wantCode != 0 { - t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode) - } - continue - } - - if resp.StatusCode != tt.wantCode { - t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode) - continue - } - - if tt.client.pinned != tt.wantPinned { - t.Errorf("#%d: pinned=%d, want=%d", i, tt.client.pinned, tt.wantPinned) - } - } -} - -func TestHTTPClusterClientDoDeadlineExceedContext(t *testing.T) { - fakeURL := url.URL{} - tr := newFakeTransport() - tr.finishCancel <- struct{}{} - c := &httpClusterClient{ - clientFactory: newHTTPClientFactory(tr, DefaultCheckRedirect, 0), - endpoints: []url.URL{fakeURL}, - } - - errc := make(chan error) - go func() { - ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond) - defer cancel() - _, _, err := c.Do(ctx, &fakeAction{}) - errc <- err - }() - - select { - case err := <-errc: - if err != context.DeadlineExceeded { - t.Errorf("err = %+v, want %+v", err, context.DeadlineExceeded) - } - case <-time.After(time.Second): - t.Fatalf("unexpected timeout when waitting for request to deadline exceed") - } -} - -func TestRedirectedHTTPAction(t *testing.T) { - act := &redirectedHTTPAction{ - action: &staticHTTPAction{ - request: http.Request{ - Method: "DELETE", - URL: &url.URL{ - Scheme: "https", - Host: "foo.example.com", - Path: "/ping", - }, - }, - }, - location: url.URL{ - Scheme: "https", - Host: "bar.example.com", - Path: "/pong", - }, - } - - want := &http.Request{ - Method: "DELETE", - URL: &url.URL{ - Scheme: "https", - Host: "bar.example.com", - Path: "/pong", - }, - } - got := act.HTTPRequest(url.URL{Scheme: "http", Host: "baz.example.com", Path: "/pang"}) - - if !reflect.DeepEqual(want, got) { - t.Fatalf("HTTPRequest is %#v, want %#v", want, got) - } -} - -func TestRedirectFollowingHTTPClient(t *testing.T) { - tests := []struct { - checkRedirect CheckRedirectFunc - client httpClient - wantCode int - wantErr error - }{ - // errors bubbled up - { - checkRedirect: func(int) error { return ErrTooManyRedirects }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - err: errors.New("fail!"), - }, - }, - }, - wantErr: errors.New("fail!"), - }, - - // no need to follow redirect if none given - { - checkRedirect: func(int) error { return ErrTooManyRedirects }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - }, - }, - wantCode: http.StatusTeapot, - }, - - // redirects if less than max - { - checkRedirect: func(via int) error { - if via >= 2 { - return ErrTooManyRedirects - } - return nil - }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{"http://example.com"}}, - }, - }, - { - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - }, - }, - wantCode: http.StatusTeapot, - }, - - // succeed after reaching max redirects - { - checkRedirect: func(via int) error { - if via >= 3 { - return ErrTooManyRedirects - } - return nil - }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{"http://example.com"}}, - }, - }, - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{"http://example.com"}}, - }, - }, - { - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - }, - }, - wantCode: http.StatusTeapot, - }, - - // fail if too many redirects - { - checkRedirect: func(via int) error { - if via >= 2 { - return ErrTooManyRedirects - } - return nil - }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{"http://example.com"}}, - }, - }, - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{"http://example.com"}}, - }, - }, - { - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - }, - }, - wantErr: ErrTooManyRedirects, - }, - - // fail if Location header not set - { - checkRedirect: func(int) error { return ErrTooManyRedirects }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - }, - }, - }, - }, - wantErr: errors.New("Location header not set"), - }, - - // fail if Location header is invalid - { - checkRedirect: func(int) error { return ErrTooManyRedirects }, - client: &multiStaticHTTPClient{ - responses: []staticHTTPResponse{ - { - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{":"}}, - }, - }, - }, - }, - wantErr: errors.New("Location header not valid URL: :"), - }, - - // fail if redirects checked way too many times - { - checkRedirect: func(int) error { return nil }, - client: &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusTemporaryRedirect, - Header: http.Header{"Location": []string{"http://example.com"}}, - }, - }, - wantErr: errTooManyRedirectChecks, - }, - } - - for i, tt := range tests { - client := &redirectFollowingHTTPClient{client: tt.client, checkRedirect: tt.checkRedirect} - resp, _, err := client.Do(context.Background(), nil) - if !reflect.DeepEqual(tt.wantErr, err) { - t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr) - continue - } - - if resp == nil { - if tt.wantCode != 0 { - t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode) - } - continue - } - - if resp.StatusCode != tt.wantCode { - t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode) - continue - } - } -} - -func TestDefaultCheckRedirect(t *testing.T) { - tests := []struct { - num int - err error - }{ - {0, nil}, - {5, nil}, - {10, nil}, - {11, ErrTooManyRedirects}, - {29, ErrTooManyRedirects}, - } - - for i, tt := range tests { - err := DefaultCheckRedirect(tt.num) - if !reflect.DeepEqual(tt.err, err) { - t.Errorf("#%d: want=%#v got=%#v", i, tt.err, err) - } - } -} - -func TestHTTPClusterClientSync(t *testing.T) { - cf := newStaticHTTPClientFactory([]staticHTTPResponse{ - { - resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, - body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), - }, - }) - - hc := &httpClusterClient{ - clientFactory: cf, - rand: rand.New(rand.NewSource(0)), - } - err := hc.reset([]string{"http://127.0.0.1:2379"}) - if err != nil { - t.Fatalf("unexpected error during setup: %#v", err) - } - - want := []string{"http://127.0.0.1:2379"} - got := hc.Endpoints() - if !reflect.DeepEqual(want, got) { - t.Fatalf("incorrect endpoints: want=%#v got=%#v", want, got) - } - - err = hc.Sync(context.Background()) - if err != nil { - t.Fatalf("unexpected error during Sync: %#v", err) - } - - want = []string{"http://127.0.0.1:2379", "http://127.0.0.1:4001", "http://127.0.0.1:4002", "http://127.0.0.1:4003"} - got = hc.Endpoints() - sort.Sort(sort.StringSlice(got)) - if !reflect.DeepEqual(want, got) { - t.Fatalf("incorrect endpoints post-Sync: want=%#v got=%#v", want, got) - } - - err = hc.reset([]string{"http://127.0.0.1:4009"}) - if err != nil { - t.Fatalf("unexpected error during reset: %#v", err) - } - - want = []string{"http://127.0.0.1:4009"} - got = hc.Endpoints() - if !reflect.DeepEqual(want, got) { - t.Fatalf("incorrect endpoints post-reset: want=%#v got=%#v", want, got) - } -} - -func TestHTTPClusterClientSyncFail(t *testing.T) { - cf := newStaticHTTPClientFactory([]staticHTTPResponse{ - {err: errors.New("fail!")}, - }) - - hc := &httpClusterClient{ - clientFactory: cf, - rand: rand.New(rand.NewSource(0)), - } - err := hc.reset([]string{"http://127.0.0.1:2379"}) - if err != nil { - t.Fatalf("unexpected error during setup: %#v", err) - } - - want := []string{"http://127.0.0.1:2379"} - got := hc.Endpoints() - if !reflect.DeepEqual(want, got) { - t.Fatalf("incorrect endpoints: want=%#v got=%#v", want, got) - } - - err = hc.Sync(context.Background()) - if err == nil { - t.Fatalf("got nil error during Sync") - } - - got = hc.Endpoints() - if !reflect.DeepEqual(want, got) { - t.Fatalf("incorrect endpoints after failed Sync: want=%#v got=%#v", want, got) - } -} - -func TestHTTPClusterClientAutoSyncCancelContext(t *testing.T) { - cf := newStaticHTTPClientFactory([]staticHTTPResponse{ - { - resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, - body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), - }, - }) - - hc := &httpClusterClient{ - clientFactory: cf, - rand: rand.New(rand.NewSource(0)), - } - err := hc.reset([]string{"http://127.0.0.1:2379"}) - if err != nil { - t.Fatalf("unexpected error during setup: %#v", err) - } - ctx, cancel := context.WithCancel(context.Background()) - cancel() - - err = hc.AutoSync(ctx, time.Hour) - if err != context.Canceled { - t.Fatalf("incorrect error value: want=%v got=%v", context.Canceled, err) - } -} - -func TestHTTPClusterClientAutoSyncFail(t *testing.T) { - cf := newStaticHTTPClientFactory([]staticHTTPResponse{ - {err: errors.New("fail!")}, - }) - - hc := &httpClusterClient{ - clientFactory: cf, - rand: rand.New(rand.NewSource(0)), - } - err := hc.reset([]string{"http://127.0.0.1:2379"}) - if err != nil { - t.Fatalf("unexpected error during setup: %#v", err) - } - - err = hc.AutoSync(context.Background(), time.Hour) - if err.Error() != ErrClusterUnavailable.Error() { - t.Fatalf("incorrect error value: want=%v got=%v", ErrClusterUnavailable, err) - } -} - -// TestHTTPClusterClientSyncPinEndpoint tests that Sync() pins the endpoint when -// it gets the exactly same member list as before. -func TestHTTPClusterClientSyncPinEndpoint(t *testing.T) { - cf := newStaticHTTPClientFactory([]staticHTTPResponse{ - { - resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, - body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), - }, - { - resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, - body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), - }, - { - resp: http.Response{StatusCode: http.StatusOK, Header: http.Header{"Content-Type": []string{"application/json"}}}, - body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), - }, - }) - - hc := &httpClusterClient{ - clientFactory: cf, - rand: rand.New(rand.NewSource(0)), - } - err := hc.reset([]string{"http://127.0.0.1:4003", "http://127.0.0.1:2379", "http://127.0.0.1:4001", "http://127.0.0.1:4002"}) - if err != nil { - t.Fatalf("unexpected error during setup: %#v", err) - } - pinnedEndpoint := hc.endpoints[hc.pinned] - - for i := 0; i < 3; i++ { - err = hc.Sync(context.Background()) - if err != nil { - t.Fatalf("#%d: unexpected error during Sync: %#v", i, err) - } - - if g := hc.endpoints[hc.pinned]; g != pinnedEndpoint { - t.Errorf("#%d: pinned endpoint = %s, want %s", i, g, pinnedEndpoint) - } - } -} - -func TestHTTPClusterClientResetFail(t *testing.T) { - tests := [][]string{ - // need at least one endpoint - {}, - - // urls must be valid - {":"}, - } - - for i, tt := range tests { - hc := &httpClusterClient{rand: rand.New(rand.NewSource(0))} - err := hc.reset(tt) - if err == nil { - t.Errorf("#%d: expected non-nil error", i) - } - } -} - -func TestHTTPClusterClientResetPinRandom(t *testing.T) { - round := 2000 - pinNum := 0 - for i := 0; i < round; i++ { - hc := &httpClusterClient{rand: rand.New(rand.NewSource(int64(i)))} - err := hc.reset([]string{"http://127.0.0.1:4001", "http://127.0.0.1:4002", "http://127.0.0.1:4003"}) - if err != nil { - t.Fatalf("#%d: reset error (%v)", i, err) - } - if hc.endpoints[hc.pinned].String() == "http://127.0.0.1:4001" { - pinNum++ - } - } - - min := 1.0/3.0 - 0.05 - max := 1.0/3.0 + 0.05 - if ratio := float64(pinNum) / float64(round); ratio > max || ratio < min { - t.Errorf("pinned ratio = %v, want [%v, %v]", ratio, min, max) - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go deleted file mode 100644 index 4a99a7d..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_go14_test.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build !go1.5 - -package client - -import ( - "errors" - "net/http" -) - -func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) { - select { - case resp := <-t.respchan: - return resp, nil - case err := <-t.errchan: - return nil, err - case <-t.startCancel: - select { - // this simulates that the request is finished before cancel effects - case resp := <-t.respchan: - return resp, nil - // wait on finishCancel to simulate taking some amount of - // time while calling CancelRequest - case <-t.finishCancel: - return nil, errors.New("cancelled") - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go deleted file mode 100644 index 06761e2..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/fake_transport_test.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build go1.5 - -package client - -import ( - "errors" - "net/http" -) - -func (t *fakeTransport) RoundTrip(req *http.Request) (*http.Response, error) { - select { - case resp := <-t.respchan: - return resp, nil - case err := <-t.errchan: - return nil, err - case <-t.startCancel: - case <-req.Cancel: - } - select { - // this simulates that the request is finished before cancel effects - case resp := <-t.respchan: - return resp, nil - // wait on finishCancel to simulate taking some amount of - // time while calling CancelRequest - case <-t.finishCancel: - return nil, errors.New("cancelled") - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go deleted file mode 100644 index 5b65415..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_bench_test.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package client - -import ( - "encoding/json" - "net/http" - "reflect" - "strings" - "testing" -) - -func createTestNode(size int) *Node { - return &Node{ - Key: strings.Repeat("a", 30), - Value: strings.Repeat("a", size), - CreatedIndex: 123456, - ModifiedIndex: 123456, - TTL: 123456789, - } -} - -func createTestNodeWithChildren(children, size int) *Node { - node := createTestNode(size) - for i := 0; i < children; i++ { - node.Nodes = append(node.Nodes, createTestNode(size)) - } - return node -} - -func createTestResponse(children, size int) *Response { - return &Response{ - Action: "aaaaa", - Node: createTestNodeWithChildren(children, size), - PrevNode: nil, - } -} - -func benchmarkResponseUnmarshalling(b *testing.B, children, size int) { - header := http.Header{} - header.Add("X-Etcd-Index", "123456") - response := createTestResponse(children, size) - body, err := json.Marshal(response) - if err != nil { - b.Fatal(err) - } - - b.ResetTimer() - newResponse := new(Response) - for i := 0; i < b.N; i++ { - if newResponse, err = unmarshalSuccessfulKeysResponse(header, body); err != nil { - b.Errorf("error unmarshaling response (%v)", err) - } - - } - if !reflect.DeepEqual(response.Node, newResponse.Node) { - b.Errorf("Unexpected difference in a parsed response: \n%+v\n%+v", response, newResponse) - } -} - -func BenchmarkSmallResponseUnmarshal(b *testing.B) { - benchmarkResponseUnmarshalling(b, 30, 20) -} - -func BenchmarkManySmallResponseUnmarshal(b *testing.B) { - benchmarkResponseUnmarshalling(b, 3000, 20) -} - -func BenchmarkMediumResponseUnmarshal(b *testing.B) { - benchmarkResponseUnmarshalling(b, 300, 200) -} - -func BenchmarkLargeResponseUnmarshal(b *testing.B) { - benchmarkResponseUnmarshalling(b, 3000, 2000) -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go deleted file mode 100644 index 80d7a55..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys_test.go +++ /dev/null @@ -1,1407 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package client - -import ( - "errors" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "reflect" - "testing" - "time" - - "golang.org/x/net/context" -) - -func TestV2KeysURLHelper(t *testing.T) { - tests := []struct { - endpoint url.URL - prefix string - key string - want url.URL - }{ - // key is empty, no problem - { - endpoint: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}, - prefix: "", - key: "", - want: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}, - }, - - // key is joined to path - { - endpoint: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"}, - prefix: "", - key: "/foo/bar", - want: url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys/foo/bar"}, - }, - - // key is joined to path when path is empty - { - endpoint: url.URL{Scheme: "http", Host: "example.com", Path: ""}, - prefix: "", - key: "/foo/bar", - want: url.URL{Scheme: "http", Host: "example.com", Path: "/foo/bar"}, - }, - - // Host field carries through with port - { - endpoint: url.URL{Scheme: "http", Host: "example.com:8080", Path: "/v2/keys"}, - prefix: "", - key: "", - want: url.URL{Scheme: "http", Host: "example.com:8080", Path: "/v2/keys"}, - }, - - // Scheme carries through - { - endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/v2/keys"}, - prefix: "", - key: "", - want: url.URL{Scheme: "https", Host: "example.com", Path: "/v2/keys"}, - }, - // Prefix is applied - { - endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"}, - prefix: "/bar", - key: "/baz", - want: url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar/baz"}, - }, - // Prefix is joined to path - { - endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"}, - prefix: "/bar", - key: "", - want: url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar"}, - }, - // Keep trailing slash - { - endpoint: url.URL{Scheme: "https", Host: "example.com", Path: "/foo"}, - prefix: "/bar", - key: "/baz/", - want: url.URL{Scheme: "https", Host: "example.com", Path: "/foo/bar/baz/"}, - }, - } - - for i, tt := range tests { - got := v2KeysURL(tt.endpoint, tt.prefix, tt.key) - if tt.want != *got { - t.Errorf("#%d: want=%#v, got=%#v", i, tt.want, *got) - } - } -} - -func TestGetAction(t *testing.T) { - ep := url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"} - baseWantURL := &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/v2/keys/foo/bar", - } - wantHeader := http.Header{} - - tests := []struct { - recursive bool - sorted bool - quorum bool - wantQuery string - }{ - { - recursive: false, - sorted: false, - quorum: false, - wantQuery: "quorum=false&recursive=false&sorted=false", - }, - { - recursive: true, - sorted: false, - quorum: false, - wantQuery: "quorum=false&recursive=true&sorted=false", - }, - { - recursive: false, - sorted: true, - quorum: false, - wantQuery: "quorum=false&recursive=false&sorted=true", - }, - { - recursive: true, - sorted: true, - quorum: false, - wantQuery: "quorum=false&recursive=true&sorted=true", - }, - { - recursive: false, - sorted: false, - quorum: true, - wantQuery: "quorum=true&recursive=false&sorted=false", - }, - } - - for i, tt := range tests { - f := getAction{ - Key: "/foo/bar", - Recursive: tt.recursive, - Sorted: tt.sorted, - Quorum: tt.quorum, - } - got := *f.HTTPRequest(ep) - - wantURL := baseWantURL - wantURL.RawQuery = tt.wantQuery - - err := assertRequest(got, "GET", wantURL, wantHeader, nil) - if err != nil { - t.Errorf("#%d: %v", i, err) - } - } -} - -func TestWaitAction(t *testing.T) { - ep := url.URL{Scheme: "http", Host: "example.com", Path: "/v2/keys"} - baseWantURL := &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/v2/keys/foo/bar", - } - wantHeader := http.Header{} - - tests := []struct { - waitIndex uint64 - recursive bool - wantQuery string - }{ - { - recursive: false, - waitIndex: uint64(0), - wantQuery: "recursive=false&wait=true&waitIndex=0", - }, - { - recursive: false, - waitIndex: uint64(12), - wantQuery: "recursive=false&wait=true&waitIndex=12", - }, - { - recursive: true, - waitIndex: uint64(12), - wantQuery: "recursive=true&wait=true&waitIndex=12", - }, - } - - for i, tt := range tests { - f := waitAction{ - Key: "/foo/bar", - WaitIndex: tt.waitIndex, - Recursive: tt.recursive, - } - got := *f.HTTPRequest(ep) - - wantURL := baseWantURL - wantURL.RawQuery = tt.wantQuery - - err := assertRequest(got, "GET", wantURL, wantHeader, nil) - if err != nil { - t.Errorf("#%d: unexpected error: %#v", i, err) - } - } -} - -func TestSetAction(t *testing.T) { - wantHeader := http.Header(map[string][]string{ - "Content-Type": {"application/x-www-form-urlencoded"}, - }) - - tests := []struct { - act setAction - wantURL string - wantBody string - }{ - // default prefix - { - act: setAction{ - Prefix: defaultV2KeysPrefix, - Key: "foo", - }, - wantURL: "http://example.com/v2/keys/foo", - wantBody: "value=", - }, - - // non-default prefix - { - act: setAction{ - Prefix: "/pfx", - Key: "foo", - }, - wantURL: "http://example.com/pfx/foo", - wantBody: "value=", - }, - - // no prefix - { - act: setAction{ - Key: "foo", - }, - wantURL: "http://example.com/foo", - wantBody: "value=", - }, - - // Key with path separators - { - act: setAction{ - Prefix: defaultV2KeysPrefix, - Key: "foo/bar/baz", - }, - wantURL: "http://example.com/v2/keys/foo/bar/baz", - wantBody: "value=", - }, - - // Key with leading slash, Prefix with trailing slash - { - act: setAction{ - Prefix: "/foo/", - Key: "/bar", - }, - wantURL: "http://example.com/foo/bar", - wantBody: "value=", - }, - - // Key with trailing slash - { - act: setAction{ - Key: "/foo/", - }, - wantURL: "http://example.com/foo/", - wantBody: "value=", - }, - - // Value is set - { - act: setAction{ - Key: "foo", - Value: "baz", - }, - wantURL: "http://example.com/foo", - wantBody: "value=baz", - }, - - // PrevExist set, but still ignored - { - act: setAction{ - Key: "foo", - PrevExist: PrevIgnore, - }, - wantURL: "http://example.com/foo", - wantBody: "value=", - }, - - // PrevExist set to true - { - act: setAction{ - Key: "foo", - PrevExist: PrevExist, - }, - wantURL: "http://example.com/foo?prevExist=true", - wantBody: "value=", - }, - - // PrevExist set to false - { - act: setAction{ - Key: "foo", - PrevExist: PrevNoExist, - }, - wantURL: "http://example.com/foo?prevExist=false", - wantBody: "value=", - }, - - // PrevValue is urlencoded - { - act: setAction{ - Key: "foo", - PrevValue: "bar baz", - }, - wantURL: "http://example.com/foo?prevValue=bar+baz", - wantBody: "value=", - }, - - // PrevIndex is set - { - act: setAction{ - Key: "foo", - PrevIndex: uint64(12), - }, - wantURL: "http://example.com/foo?prevIndex=12", - wantBody: "value=", - }, - - // TTL is set - { - act: setAction{ - Key: "foo", - TTL: 3 * time.Minute, - }, - wantURL: "http://example.com/foo", - wantBody: "ttl=180&value=", - }, - // Dir is set - { - act: setAction{ - Key: "foo", - Dir: true, - }, - wantURL: "http://example.com/foo?dir=true", - wantBody: "", - }, - // Dir is set with a value - { - act: setAction{ - Key: "foo", - Value: "bar", - Dir: true, - }, - wantURL: "http://example.com/foo?dir=true", - wantBody: "", - }, - // Dir is set with PrevExist set to true - { - act: setAction{ - Key: "foo", - PrevExist: PrevExist, - Dir: true, - }, - wantURL: "http://example.com/foo?dir=true&prevExist=true", - wantBody: "", - }, - // Dir is set with PrevValue - { - act: setAction{ - Key: "foo", - PrevValue: "bar", - Dir: true, - }, - wantURL: "http://example.com/foo?dir=true", - wantBody: "", - }, - } - - for i, tt := range tests { - u, err := url.Parse(tt.wantURL) - if err != nil { - t.Errorf("#%d: unable to use wantURL fixture: %v", i, err) - } - - got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"}) - if err := assertRequest(*got, "PUT", u, wantHeader, []byte(tt.wantBody)); err != nil { - t.Errorf("#%d: %v", i, err) - } - } -} - -func TestCreateInOrderAction(t *testing.T) { - wantHeader := http.Header(map[string][]string{ - "Content-Type": {"application/x-www-form-urlencoded"}, - }) - - tests := []struct { - act createInOrderAction - wantURL string - wantBody string - }{ - // default prefix - { - act: createInOrderAction{ - Prefix: defaultV2KeysPrefix, - Dir: "foo", - }, - wantURL: "http://example.com/v2/keys/foo", - wantBody: "value=", - }, - - // non-default prefix - { - act: createInOrderAction{ - Prefix: "/pfx", - Dir: "foo", - }, - wantURL: "http://example.com/pfx/foo", - wantBody: "value=", - }, - - // no prefix - { - act: createInOrderAction{ - Dir: "foo", - }, - wantURL: "http://example.com/foo", - wantBody: "value=", - }, - - // Key with path separators - { - act: createInOrderAction{ - Prefix: defaultV2KeysPrefix, - Dir: "foo/bar/baz", - }, - wantURL: "http://example.com/v2/keys/foo/bar/baz", - wantBody: "value=", - }, - - // Key with leading slash, Prefix with trailing slash - { - act: createInOrderAction{ - Prefix: "/foo/", - Dir: "/bar", - }, - wantURL: "http://example.com/foo/bar", - wantBody: "value=", - }, - - // Key with trailing slash - { - act: createInOrderAction{ - Dir: "/foo/", - }, - wantURL: "http://example.com/foo/", - wantBody: "value=", - }, - - // Value is set - { - act: createInOrderAction{ - Dir: "foo", - Value: "baz", - }, - wantURL: "http://example.com/foo", - wantBody: "value=baz", - }, - // TTL is set - { - act: createInOrderAction{ - Dir: "foo", - TTL: 3 * time.Minute, - }, - wantURL: "http://example.com/foo", - wantBody: "ttl=180&value=", - }, - } - - for i, tt := range tests { - u, err := url.Parse(tt.wantURL) - if err != nil { - t.Errorf("#%d: unable to use wantURL fixture: %v", i, err) - } - - got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"}) - if err := assertRequest(*got, "POST", u, wantHeader, []byte(tt.wantBody)); err != nil { - t.Errorf("#%d: %v", i, err) - } - } -} - -func TestDeleteAction(t *testing.T) { - wantHeader := http.Header(map[string][]string{ - "Content-Type": {"application/x-www-form-urlencoded"}, - }) - - tests := []struct { - act deleteAction - wantURL string - }{ - // default prefix - { - act: deleteAction{ - Prefix: defaultV2KeysPrefix, - Key: "foo", - }, - wantURL: "http://example.com/v2/keys/foo", - }, - - // non-default prefix - { - act: deleteAction{ - Prefix: "/pfx", - Key: "foo", - }, - wantURL: "http://example.com/pfx/foo", - }, - - // no prefix - { - act: deleteAction{ - Key: "foo", - }, - wantURL: "http://example.com/foo", - }, - - // Key with path separators - { - act: deleteAction{ - Prefix: defaultV2KeysPrefix, - Key: "foo/bar/baz", - }, - wantURL: "http://example.com/v2/keys/foo/bar/baz", - }, - - // Key with leading slash, Prefix with trailing slash - { - act: deleteAction{ - Prefix: "/foo/", - Key: "/bar", - }, - wantURL: "http://example.com/foo/bar", - }, - - // Key with trailing slash - { - act: deleteAction{ - Key: "/foo/", - }, - wantURL: "http://example.com/foo/", - }, - - // Recursive set to true - { - act: deleteAction{ - Key: "foo", - Recursive: true, - }, - wantURL: "http://example.com/foo?recursive=true", - }, - - // PrevValue is urlencoded - { - act: deleteAction{ - Key: "foo", - PrevValue: "bar baz", - }, - wantURL: "http://example.com/foo?prevValue=bar+baz", - }, - - // PrevIndex is set - { - act: deleteAction{ - Key: "foo", - PrevIndex: uint64(12), - }, - wantURL: "http://example.com/foo?prevIndex=12", - }, - } - - for i, tt := range tests { - u, err := url.Parse(tt.wantURL) - if err != nil { - t.Errorf("#%d: unable to use wantURL fixture: %v", i, err) - } - - got := tt.act.HTTPRequest(url.URL{Scheme: "http", Host: "example.com"}) - if err := assertRequest(*got, "DELETE", u, wantHeader, nil); err != nil { - t.Errorf("#%d: %v", i, err) - } - } -} - -func assertRequest(got http.Request, wantMethod string, wantURL *url.URL, wantHeader http.Header, wantBody []byte) error { - if wantMethod != got.Method { - return fmt.Errorf("want.Method=%#v got.Method=%#v", wantMethod, got.Method) - } - - if !reflect.DeepEqual(wantURL, got.URL) { - return fmt.Errorf("want.URL=%#v got.URL=%#v", wantURL, got.URL) - } - - if !reflect.DeepEqual(wantHeader, got.Header) { - return fmt.Errorf("want.Header=%#v got.Header=%#v", wantHeader, got.Header) - } - - if got.Body == nil { - if wantBody != nil { - return fmt.Errorf("want.Body=%v got.Body=%v", wantBody, got.Body) - } - } else { - if wantBody == nil { - return fmt.Errorf("want.Body=%v got.Body=%s", wantBody, got.Body) - } else { - gotBytes, err := ioutil.ReadAll(got.Body) - if err != nil { - return err - } - - if !reflect.DeepEqual(wantBody, gotBytes) { - return fmt.Errorf("want.Body=%s got.Body=%s", wantBody, gotBytes) - } - } - } - - return nil -} - -func TestUnmarshalSuccessfulResponse(t *testing.T) { - var expiration time.Time - expiration.UnmarshalText([]byte("2015-04-07T04:40:23.044979686Z")) - - tests := []struct { - hdr string - body string - wantRes *Response - wantErr bool - }{ - // Neither PrevNode or Node - { - hdr: "1", - body: `{"action":"delete"}`, - wantRes: &Response{Action: "delete", Index: 1}, - wantErr: false, - }, - - // PrevNode - { - hdr: "15", - body: `{"action":"delete", "prevNode": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10}}`, - wantRes: &Response{ - Action: "delete", - Index: 15, - Node: nil, - PrevNode: &Node{ - Key: "/foo", - Value: "bar", - ModifiedIndex: 12, - CreatedIndex: 10, - }, - }, - wantErr: false, - }, - - // Node - { - hdr: "15", - body: `{"action":"get", "node": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10, "ttl": 10, "expiration": "2015-04-07T04:40:23.044979686Z"}}`, - wantRes: &Response{ - Action: "get", - Index: 15, - Node: &Node{ - Key: "/foo", - Value: "bar", - ModifiedIndex: 12, - CreatedIndex: 10, - TTL: 10, - Expiration: &expiration, - }, - PrevNode: nil, - }, - wantErr: false, - }, - - // Node Dir - { - hdr: "15", - body: `{"action":"get", "node": {"key": "/foo", "dir": true, "modifiedIndex": 12, "createdIndex": 10}}`, - wantRes: &Response{ - Action: "get", - Index: 15, - Node: &Node{ - Key: "/foo", - Dir: true, - ModifiedIndex: 12, - CreatedIndex: 10, - }, - PrevNode: nil, - }, - wantErr: false, - }, - - // PrevNode and Node - { - hdr: "15", - body: `{"action":"update", "prevNode": {"key": "/foo", "value": "baz", "modifiedIndex": 10, "createdIndex": 10}, "node": {"key": "/foo", "value": "bar", "modifiedIndex": 12, "createdIndex": 10}}`, - wantRes: &Response{ - Action: "update", - Index: 15, - PrevNode: &Node{ - Key: "/foo", - Value: "baz", - ModifiedIndex: 10, - CreatedIndex: 10, - }, - Node: &Node{ - Key: "/foo", - Value: "bar", - ModifiedIndex: 12, - CreatedIndex: 10, - }, - }, - wantErr: false, - }, - - // Garbage in body - { - hdr: "", - body: `garbage`, - wantRes: nil, - wantErr: true, - }, - - // non-integer index - { - hdr: "poo", - body: `{}`, - wantRes: nil, - wantErr: true, - }, - } - - for i, tt := range tests { - h := make(http.Header) - h.Add("X-Etcd-Index", tt.hdr) - res, err := unmarshalSuccessfulKeysResponse(h, []byte(tt.body)) - if tt.wantErr != (err != nil) { - t.Errorf("#%d: wantErr=%t, err=%v", i, tt.wantErr, err) - } - - if (res == nil) != (tt.wantRes == nil) { - t.Errorf("#%d: received res=%#v, but expected res=%#v", i, res, tt.wantRes) - continue - } else if tt.wantRes == nil { - // expected and successfully got nil response - continue - } - - if res.Action != tt.wantRes.Action { - t.Errorf("#%d: Action=%s, expected %s", i, res.Action, tt.wantRes.Action) - } - if res.Index != tt.wantRes.Index { - t.Errorf("#%d: Index=%d, expected %d", i, res.Index, tt.wantRes.Index) - } - if !reflect.DeepEqual(res.Node, tt.wantRes.Node) { - t.Errorf("#%d: Node=%v, expected %v", i, res.Node, tt.wantRes.Node) - } - } -} - -func TestUnmarshalFailedKeysResponse(t *testing.T) { - body := []byte(`{"errorCode":100,"message":"Key not found","cause":"/foo","index":18}`) - - wantErr := Error{ - Code: 100, - Message: "Key not found", - Cause: "/foo", - Index: uint64(18), - } - - gotErr := unmarshalFailedKeysResponse(body) - if !reflect.DeepEqual(wantErr, gotErr) { - t.Errorf("unexpected error: want=%#v got=%#v", wantErr, gotErr) - } -} - -func TestUnmarshalFailedKeysResponseBadJSON(t *testing.T) { - err := unmarshalFailedKeysResponse([]byte(`{"er`)) - if err == nil { - t.Errorf("got nil error") - } else if _, ok := err.(Error); ok { - t.Errorf("error is of incorrect type *Error: %#v", err) - } -} - -func TestHTTPWatcherNextWaitAction(t *testing.T) { - initAction := waitAction{ - Prefix: "/pants", - Key: "/foo/bar", - Recursive: true, - WaitIndex: 19, - } - - client := &actionAssertingHTTPClient{ - t: t, - act: &initAction, - resp: http.Response{ - StatusCode: http.StatusOK, - Header: http.Header{"X-Etcd-Index": []string{"42"}}, - }, - body: []byte(`{"action":"update","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":21,"createdIndex":19},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`), - } - - wantResponse := &Response{ - Action: "update", - Node: &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(19), ModifiedIndex: uint64(21)}, - PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)}, - Index: uint64(42), - } - - wantNextWait := waitAction{ - Prefix: "/pants", - Key: "/foo/bar", - Recursive: true, - WaitIndex: 22, - } - - watcher := &httpWatcher{ - client: client, - nextWait: initAction, - } - - resp, err := watcher.Next(context.Background()) - if err != nil { - t.Errorf("non-nil error: %#v", err) - } - - if !reflect.DeepEqual(wantResponse, resp) { - t.Errorf("received incorrect Response: want=%#v got=%#v", wantResponse, resp) - } - - if !reflect.DeepEqual(wantNextWait, watcher.nextWait) { - t.Errorf("nextWait incorrect: want=%#v got=%#v", wantNextWait, watcher.nextWait) - } -} - -func TestHTTPWatcherNextFail(t *testing.T) { - tests := []httpClient{ - // generic HTTP client failure - &staticHTTPClient{ - err: errors.New("fail!"), - }, - - // unusable status code - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - - // etcd Error response - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusNotFound, - }, - body: []byte(`{"errorCode":100,"message":"Key not found","cause":"/foo","index":18}`), - }, - } - - for i, tt := range tests { - act := waitAction{ - Prefix: "/pants", - Key: "/foo/bar", - Recursive: true, - WaitIndex: 19, - } - - watcher := &httpWatcher{ - client: tt, - nextWait: act, - } - - resp, err := watcher.Next(context.Background()) - if err == nil { - t.Errorf("#%d: expected non-nil error", i) - } - if resp != nil { - t.Errorf("#%d: expected nil Response, got %#v", i, resp) - } - if !reflect.DeepEqual(act, watcher.nextWait) { - t.Errorf("#%d: nextWait changed: want=%#v got=%#v", i, act, watcher.nextWait) - } - } -} - -func TestHTTPKeysAPIWatcherAction(t *testing.T) { - tests := []struct { - key string - opts *WatcherOptions - want waitAction - }{ - { - key: "/foo", - opts: nil, - want: waitAction{ - Key: "/foo", - Recursive: false, - WaitIndex: 0, - }, - }, - - { - key: "/foo", - opts: &WatcherOptions{ - Recursive: false, - AfterIndex: 0, - }, - want: waitAction{ - Key: "/foo", - Recursive: false, - WaitIndex: 0, - }, - }, - - { - key: "/foo", - opts: &WatcherOptions{ - Recursive: true, - AfterIndex: 0, - }, - want: waitAction{ - Key: "/foo", - Recursive: true, - WaitIndex: 0, - }, - }, - - { - key: "/foo", - opts: &WatcherOptions{ - Recursive: false, - AfterIndex: 19, - }, - want: waitAction{ - Key: "/foo", - Recursive: false, - WaitIndex: 20, - }, - }, - } - - for i, tt := range tests { - kAPI := &httpKeysAPI{ - client: &staticHTTPClient{err: errors.New("fail!")}, - } - - want := &httpWatcher{ - client: &staticHTTPClient{err: errors.New("fail!")}, - nextWait: tt.want, - } - - got := kAPI.Watcher(tt.key, tt.opts) - if !reflect.DeepEqual(want, got) { - t.Errorf("#%d: incorrect watcher: want=%#v got=%#v", i, want, got) - } - } -} - -func TestHTTPKeysAPISetAction(t *testing.T) { - tests := []struct { - key string - value string - opts *SetOptions - wantAction httpAction - }{ - // nil SetOptions - { - key: "/foo", - value: "bar", - opts: nil, - wantAction: &setAction{ - Key: "/foo", - Value: "bar", - PrevValue: "", - PrevIndex: 0, - PrevExist: PrevIgnore, - TTL: 0, - }, - }, - // empty SetOptions - { - key: "/foo", - value: "bar", - opts: &SetOptions{}, - wantAction: &setAction{ - Key: "/foo", - Value: "bar", - PrevValue: "", - PrevIndex: 0, - PrevExist: PrevIgnore, - TTL: 0, - }, - }, - // populated SetOptions - { - key: "/foo", - value: "bar", - opts: &SetOptions{ - PrevValue: "baz", - PrevIndex: 13, - PrevExist: PrevExist, - TTL: time.Minute, - Dir: true, - }, - wantAction: &setAction{ - Key: "/foo", - Value: "bar", - PrevValue: "baz", - PrevIndex: 13, - PrevExist: PrevExist, - TTL: time.Minute, - Dir: true, - }, - }, - } - - for i, tt := range tests { - client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction} - kAPI := httpKeysAPI{client: client} - kAPI.Set(context.Background(), tt.key, tt.value, tt.opts) - } -} - -func TestHTTPKeysAPISetError(t *testing.T) { - tests := []httpClient{ - // generic HTTP client failure - &staticHTTPClient{ - err: errors.New("fail!"), - }, - - // unusable status code - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - - // etcd Error response - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusInternalServerError, - }, - body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`), - }, - } - - for i, tt := range tests { - kAPI := httpKeysAPI{client: tt} - resp, err := kAPI.Set(context.Background(), "/foo", "bar", nil) - if err == nil { - t.Errorf("#%d: received nil error", i) - } - if resp != nil { - t.Errorf("#%d: received non-nil Response: %#v", i, resp) - } - } -} - -func TestHTTPKeysAPISetResponse(t *testing.T) { - client := &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusOK, - Header: http.Header{"X-Etcd-Index": []string{"21"}}, - }, - body: []byte(`{"action":"set","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":21,"createdIndex":21},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`), - } - - wantResponse := &Response{ - Action: "set", - Node: &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(21), ModifiedIndex: uint64(21)}, - PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)}, - Index: uint64(21), - } - - kAPI := &httpKeysAPI{client: client, prefix: "/pants"} - resp, err := kAPI.Set(context.Background(), "/foo/bar/baz", "snarf", nil) - if err != nil { - t.Errorf("non-nil error: %#v", err) - } - if !reflect.DeepEqual(wantResponse, resp) { - t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp) - } -} - -func TestHTTPKeysAPIGetAction(t *testing.T) { - tests := []struct { - key string - opts *GetOptions - wantAction httpAction - }{ - // nil GetOptions - { - key: "/foo", - opts: nil, - wantAction: &getAction{ - Key: "/foo", - Sorted: false, - Recursive: false, - }, - }, - // empty GetOptions - { - key: "/foo", - opts: &GetOptions{}, - wantAction: &getAction{ - Key: "/foo", - Sorted: false, - Recursive: false, - }, - }, - // populated GetOptions - { - key: "/foo", - opts: &GetOptions{ - Sort: true, - Recursive: true, - Quorum: true, - }, - wantAction: &getAction{ - Key: "/foo", - Sorted: true, - Recursive: true, - Quorum: true, - }, - }, - } - - for i, tt := range tests { - client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction} - kAPI := httpKeysAPI{client: client} - kAPI.Get(context.Background(), tt.key, tt.opts) - } -} - -func TestHTTPKeysAPIGetError(t *testing.T) { - tests := []httpClient{ - // generic HTTP client failure - &staticHTTPClient{ - err: errors.New("fail!"), - }, - - // unusable status code - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - - // etcd Error response - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusInternalServerError, - }, - body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`), - }, - } - - for i, tt := range tests { - kAPI := httpKeysAPI{client: tt} - resp, err := kAPI.Get(context.Background(), "/foo", nil) - if err == nil { - t.Errorf("#%d: received nil error", i) - } - if resp != nil { - t.Errorf("#%d: received non-nil Response: %#v", i, resp) - } - } -} - -func TestHTTPKeysAPIGetResponse(t *testing.T) { - client := &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusOK, - Header: http.Header{"X-Etcd-Index": []string{"42"}}, - }, - body: []byte(`{"action":"get","node":{"key":"/pants/foo/bar","modifiedIndex":25,"createdIndex":19,"nodes":[{"key":"/pants/foo/bar/baz","value":"snarf","createdIndex":21,"modifiedIndex":25}]}}`), - } - - wantResponse := &Response{ - Action: "get", - Node: &Node{ - Key: "/pants/foo/bar", - Nodes: []*Node{ - {Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: 21, ModifiedIndex: 25}, - }, - CreatedIndex: uint64(19), - ModifiedIndex: uint64(25), - }, - Index: uint64(42), - } - - kAPI := &httpKeysAPI{client: client, prefix: "/pants"} - resp, err := kAPI.Get(context.Background(), "/foo/bar", &GetOptions{Recursive: true}) - if err != nil { - t.Errorf("non-nil error: %#v", err) - } - if !reflect.DeepEqual(wantResponse, resp) { - t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp) - } -} - -func TestHTTPKeysAPIDeleteAction(t *testing.T) { - tests := []struct { - key string - value string - opts *DeleteOptions - wantAction httpAction - }{ - // nil DeleteOptions - { - key: "/foo", - opts: nil, - wantAction: &deleteAction{ - Key: "/foo", - PrevValue: "", - PrevIndex: 0, - Recursive: false, - }, - }, - // empty DeleteOptions - { - key: "/foo", - opts: &DeleteOptions{}, - wantAction: &deleteAction{ - Key: "/foo", - PrevValue: "", - PrevIndex: 0, - Recursive: false, - }, - }, - // populated DeleteOptions - { - key: "/foo", - opts: &DeleteOptions{ - PrevValue: "baz", - PrevIndex: 13, - Recursive: true, - }, - wantAction: &deleteAction{ - Key: "/foo", - PrevValue: "baz", - PrevIndex: 13, - Recursive: true, - }, - }, - } - - for i, tt := range tests { - client := &actionAssertingHTTPClient{t: t, num: i, act: tt.wantAction} - kAPI := httpKeysAPI{client: client} - kAPI.Delete(context.Background(), tt.key, tt.opts) - } -} - -func TestHTTPKeysAPIDeleteError(t *testing.T) { - tests := []httpClient{ - // generic HTTP client failure - &staticHTTPClient{ - err: errors.New("fail!"), - }, - - // unusable status code - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusTeapot, - }, - }, - - // etcd Error response - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusInternalServerError, - }, - body: []byte(`{"errorCode":300,"message":"Raft internal error","cause":"/foo","index":18}`), - }, - } - - for i, tt := range tests { - kAPI := httpKeysAPI{client: tt} - resp, err := kAPI.Delete(context.Background(), "/foo", nil) - if err == nil { - t.Errorf("#%d: received nil error", i) - } - if resp != nil { - t.Errorf("#%d: received non-nil Response: %#v", i, resp) - } - } -} - -func TestHTTPKeysAPIDeleteResponse(t *testing.T) { - client := &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusOK, - Header: http.Header{"X-Etcd-Index": []string{"22"}}, - }, - body: []byte(`{"action":"delete","node":{"key":"/pants/foo/bar/baz","value":"snarf","modifiedIndex":22,"createdIndex":19},"prevNode":{"key":"/pants/foo/bar/baz","value":"snazz","modifiedIndex":20,"createdIndex":19}}`), - } - - wantResponse := &Response{ - Action: "delete", - Node: &Node{Key: "/pants/foo/bar/baz", Value: "snarf", CreatedIndex: uint64(19), ModifiedIndex: uint64(22)}, - PrevNode: &Node{Key: "/pants/foo/bar/baz", Value: "snazz", CreatedIndex: uint64(19), ModifiedIndex: uint64(20)}, - Index: uint64(22), - } - - kAPI := &httpKeysAPI{client: client, prefix: "/pants"} - resp, err := kAPI.Delete(context.Background(), "/foo/bar/baz", nil) - if err != nil { - t.Errorf("non-nil error: %#v", err) - } - if !reflect.DeepEqual(wantResponse, resp) { - t.Errorf("incorrect Response: want=%#v got=%#v", wantResponse, resp) - } -} - -func TestHTTPKeysAPICreateAction(t *testing.T) { - act := &setAction{ - Key: "/foo", - Value: "bar", - PrevExist: PrevNoExist, - PrevIndex: 0, - PrevValue: "", - TTL: 0, - } - - kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}} - kAPI.Create(context.Background(), "/foo", "bar") -} - -func TestHTTPKeysAPICreateInOrderAction(t *testing.T) { - act := &createInOrderAction{ - Dir: "/foo", - Value: "bar", - TTL: 0, - } - kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}} - kAPI.CreateInOrder(context.Background(), "/foo", "bar", nil) -} - -func TestHTTPKeysAPIUpdateAction(t *testing.T) { - act := &setAction{ - Key: "/foo", - Value: "bar", - PrevExist: PrevExist, - PrevIndex: 0, - PrevValue: "", - TTL: 0, - } - - kAPI := httpKeysAPI{client: &actionAssertingHTTPClient{t: t, act: act}} - kAPI.Update(context.Background(), "/foo", "bar") -} - -func TestNodeTTLDuration(t *testing.T) { - tests := []struct { - node *Node - want time.Duration - }{ - { - node: &Node{TTL: 0}, - want: 0, - }, - { - node: &Node{TTL: 97}, - want: 97 * time.Second, - }, - } - - for i, tt := range tests { - got := tt.node.TTLDuration() - if tt.want != got { - t.Errorf("#%d: incorrect duration: want=%v got=%v", i, tt.want, got) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go deleted file mode 100644 index e892b76..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/members_test.go +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package client - -import ( - "encoding/json" - "errors" - "net/http" - "net/url" - "reflect" - "testing" - - "golang.org/x/net/context" - - "github.com/coreos/etcd/pkg/types" -) - -func TestMembersAPIActionList(t *testing.T) { - ep := url.URL{Scheme: "http", Host: "example.com"} - act := &membersAPIActionList{} - - wantURL := &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/v2/members", - } - - got := *act.HTTPRequest(ep) - err := assertRequest(got, "GET", wantURL, http.Header{}, nil) - if err != nil { - t.Error(err.Error()) - } -} - -func TestMembersAPIActionAdd(t *testing.T) { - ep := url.URL{Scheme: "http", Host: "example.com"} - act := &membersAPIActionAdd{ - peerURLs: types.URLs([]url.URL{ - {Scheme: "https", Host: "127.0.0.1:8081"}, - {Scheme: "http", Host: "127.0.0.1:8080"}, - }), - } - - wantURL := &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/v2/members", - } - wantHeader := http.Header{ - "Content-Type": []string{"application/json"}, - } - wantBody := []byte(`{"peerURLs":["https://127.0.0.1:8081","http://127.0.0.1:8080"]}`) - - got := *act.HTTPRequest(ep) - err := assertRequest(got, "POST", wantURL, wantHeader, wantBody) - if err != nil { - t.Error(err.Error()) - } -} - -func TestMembersAPIActionUpdate(t *testing.T) { - ep := url.URL{Scheme: "http", Host: "example.com"} - act := &membersAPIActionUpdate{ - memberID: "0xabcd", - peerURLs: types.URLs([]url.URL{ - {Scheme: "https", Host: "127.0.0.1:8081"}, - {Scheme: "http", Host: "127.0.0.1:8080"}, - }), - } - - wantURL := &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/v2/members/0xabcd", - } - wantHeader := http.Header{ - "Content-Type": []string{"application/json"}, - } - wantBody := []byte(`{"peerURLs":["https://127.0.0.1:8081","http://127.0.0.1:8080"]}`) - - got := *act.HTTPRequest(ep) - err := assertRequest(got, "PUT", wantURL, wantHeader, wantBody) - if err != nil { - t.Error(err.Error()) - } -} - -func TestMembersAPIActionRemove(t *testing.T) { - ep := url.URL{Scheme: "http", Host: "example.com"} - act := &membersAPIActionRemove{memberID: "XXX"} - - wantURL := &url.URL{ - Scheme: "http", - Host: "example.com", - Path: "/v2/members/XXX", - } - - got := *act.HTTPRequest(ep) - err := assertRequest(got, "DELETE", wantURL, http.Header{}, nil) - if err != nil { - t.Error(err.Error()) - } -} - -func TestAssertStatusCode(t *testing.T) { - if err := assertStatusCode(404, 400); err == nil { - t.Errorf("assertStatusCode failed to detect conflict in 400 vs 404") - } - - if err := assertStatusCode(404, 400, 404); err != nil { - t.Errorf("assertStatusCode found conflict in (404,400) vs 400: %v", err) - } -} - -func TestV2MembersURL(t *testing.T) { - got := v2MembersURL(url.URL{ - Scheme: "http", - Host: "foo.example.com:4002", - Path: "/pants", - }) - want := &url.URL{ - Scheme: "http", - Host: "foo.example.com:4002", - Path: "/pants/v2/members", - } - - if !reflect.DeepEqual(want, got) { - t.Fatalf("v2MembersURL got %#v, want %#v", got, want) - } -} - -func TestMemberUnmarshal(t *testing.T) { - tests := []struct { - body []byte - wantMember Member - wantError bool - }{ - // no URLs, just check ID & Name - { - body: []byte(`{"id": "c", "name": "dungarees"}`), - wantMember: Member{ID: "c", Name: "dungarees", PeerURLs: nil, ClientURLs: nil}, - }, - - // both client and peer URLs - { - body: []byte(`{"peerURLs": ["http://127.0.0.1:2379"], "clientURLs": ["http://127.0.0.1:2379"]}`), - wantMember: Member{ - PeerURLs: []string{ - "http://127.0.0.1:2379", - }, - ClientURLs: []string{ - "http://127.0.0.1:2379", - }, - }, - }, - - // multiple peer URLs - { - body: []byte(`{"peerURLs": ["http://127.0.0.1:2379", "https://example.com"]}`), - wantMember: Member{ - PeerURLs: []string{ - "http://127.0.0.1:2379", - "https://example.com", - }, - ClientURLs: nil, - }, - }, - - // multiple client URLs - { - body: []byte(`{"clientURLs": ["http://127.0.0.1:2379", "https://example.com"]}`), - wantMember: Member{ - PeerURLs: nil, - ClientURLs: []string{ - "http://127.0.0.1:2379", - "https://example.com", - }, - }, - }, - - // invalid JSON - { - body: []byte(`{"peerU`), - wantError: true, - }, - } - - for i, tt := range tests { - got := Member{} - err := json.Unmarshal(tt.body, &got) - if tt.wantError != (err != nil) { - t.Errorf("#%d: want error %t, got %v", i, tt.wantError, err) - continue - } - - if !reflect.DeepEqual(tt.wantMember, got) { - t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.wantMember, got) - } - } -} - -func TestMemberCollectionUnmarshalFail(t *testing.T) { - mc := &memberCollection{} - if err := mc.UnmarshalJSON([]byte(`{`)); err == nil { - t.Errorf("got nil error") - } -} - -func TestMemberCollectionUnmarshal(t *testing.T) { - tests := []struct { - body []byte - want memberCollection - }{ - { - body: []byte(`{}`), - want: memberCollection([]Member{}), - }, - { - body: []byte(`{"members":[]}`), - want: memberCollection([]Member{}), - }, - { - body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`), - want: memberCollection( - []Member{ - { - ID: "2745e2525fce8fe", - Name: "node3", - PeerURLs: []string{ - "http://127.0.0.1:7003", - }, - ClientURLs: []string{ - "http://127.0.0.1:4003", - }, - }, - { - ID: "42134f434382925", - Name: "node1", - PeerURLs: []string{ - "http://127.0.0.1:2380", - "http://127.0.0.1:7001", - }, - ClientURLs: []string{ - "http://127.0.0.1:2379", - "http://127.0.0.1:4001", - }, - }, - { - ID: "94088180e21eb87b", - Name: "node2", - PeerURLs: []string{ - "http://127.0.0.1:7002", - }, - ClientURLs: []string{ - "http://127.0.0.1:4002", - }, - }, - }, - ), - }, - } - - for i, tt := range tests { - var got memberCollection - err := json.Unmarshal(tt.body, &got) - if err != nil { - t.Errorf("#%d: unexpected error: %v", i, err) - continue - } - - if !reflect.DeepEqual(tt.want, got) { - t.Errorf("#%d: incorrect output: want=%#v, got=%#v", i, tt.want, got) - } - } -} - -func TestMemberCreateRequestMarshal(t *testing.T) { - req := memberCreateOrUpdateRequest{ - PeerURLs: types.URLs([]url.URL{ - {Scheme: "http", Host: "127.0.0.1:8081"}, - {Scheme: "https", Host: "127.0.0.1:8080"}, - }), - } - want := []byte(`{"peerURLs":["http://127.0.0.1:8081","https://127.0.0.1:8080"]}`) - - got, err := json.Marshal(&req) - if err != nil { - t.Fatalf("Marshal returned unexpected err=%v", err) - } - - if !reflect.DeepEqual(want, got) { - t.Fatalf("Failed to marshal memberCreateRequest: want=%s, got=%s", want, got) - } -} - -func TestHTTPMembersAPIAddSuccess(t *testing.T) { - wantAction := &membersAPIActionAdd{ - peerURLs: types.URLs([]url.URL{ - {Scheme: "http", Host: "127.0.0.1:7002"}, - }), - } - - mAPI := &httpMembersAPI{ - client: &actionAssertingHTTPClient{ - t: t, - act: wantAction, - resp: http.Response{ - StatusCode: http.StatusCreated, - }, - body: []byte(`{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"]}`), - }, - } - - wantResponseMember := &Member{ - ID: "94088180e21eb87b", - PeerURLs: []string{"http://127.0.0.1:7002"}, - } - - m, err := mAPI.Add(context.Background(), "http://127.0.0.1:7002") - if err != nil { - t.Errorf("got non-nil err: %#v", err) - } - if !reflect.DeepEqual(wantResponseMember, m) { - t.Errorf("incorrect Member: want=%#v got=%#v", wantResponseMember, m) - } -} - -func TestHTTPMembersAPIAddError(t *testing.T) { - okPeer := "http://example.com:2379" - tests := []struct { - peerURL string - client httpClient - - // if wantErr == nil, assert that the returned error is non-nil - // if wantErr != nil, assert that the returned error matches - wantErr error - }{ - // malformed peer URL - { - peerURL: ":", - }, - - // generic httpClient failure - { - peerURL: okPeer, - client: &staticHTTPClient{err: errors.New("fail!")}, - }, - - // unrecognized HTTP status code - { - peerURL: okPeer, - client: &staticHTTPClient{ - resp: http.Response{StatusCode: http.StatusTeapot}, - }, - }, - - // unmarshal body into membersError on StatusConflict - { - peerURL: okPeer, - client: &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusConflict, - }, - body: []byte(`{"message":"fail!"}`), - }, - wantErr: membersError{Message: "fail!"}, - }, - - // fail to unmarshal body on StatusConflict - { - peerURL: okPeer, - client: &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusConflict, - }, - body: []byte(`{"`), - }, - }, - - // fail to unmarshal body on StatusCreated - { - peerURL: okPeer, - client: &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusCreated, - }, - body: []byte(`{"id":"XX`), - }, - }, - } - - for i, tt := range tests { - mAPI := &httpMembersAPI{client: tt.client} - m, err := mAPI.Add(context.Background(), tt.peerURL) - if err == nil { - t.Errorf("#%d: got nil err", i) - } - if tt.wantErr != nil && !reflect.DeepEqual(tt.wantErr, err) { - t.Errorf("#%d: incorrect error: want=%#v got=%#v", i, tt.wantErr, err) - } - if m != nil { - t.Errorf("#%d: got non-nil Member", i) - } - } -} - -func TestHTTPMembersAPIRemoveSuccess(t *testing.T) { - wantAction := &membersAPIActionRemove{ - memberID: "94088180e21eb87b", - } - - mAPI := &httpMembersAPI{ - client: &actionAssertingHTTPClient{ - t: t, - act: wantAction, - resp: http.Response{ - StatusCode: http.StatusNoContent, - }, - }, - } - - if err := mAPI.Remove(context.Background(), "94088180e21eb87b"); err != nil { - t.Errorf("got non-nil err: %#v", err) - } -} - -func TestHTTPMembersAPIRemoveFail(t *testing.T) { - tests := []httpClient{ - // generic error - &staticHTTPClient{ - err: errors.New("fail!"), - }, - - // unexpected HTTP status code - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusInternalServerError, - }, - }, - } - - for i, tt := range tests { - mAPI := &httpMembersAPI{client: tt} - if err := mAPI.Remove(context.Background(), "94088180e21eb87b"); err == nil { - t.Errorf("#%d: got nil err", i) - } - } -} - -func TestHTTPMembersAPIListSuccess(t *testing.T) { - wantAction := &membersAPIActionList{} - mAPI := &httpMembersAPI{ - client: &actionAssertingHTTPClient{ - t: t, - act: wantAction, - resp: http.Response{ - StatusCode: http.StatusOK, - }, - body: []byte(`{"members":[{"id":"94088180e21eb87b","name":"node2","peerURLs":["http://127.0.0.1:7002"],"clientURLs":["http://127.0.0.1:4002"]}]}`), - }, - } - - wantResponseMembers := []Member{ - { - ID: "94088180e21eb87b", - Name: "node2", - PeerURLs: []string{"http://127.0.0.1:7002"}, - ClientURLs: []string{"http://127.0.0.1:4002"}, - }, - } - - m, err := mAPI.List(context.Background()) - if err != nil { - t.Errorf("got non-nil err: %#v", err) - } - if !reflect.DeepEqual(wantResponseMembers, m) { - t.Errorf("incorrect Members: want=%#v got=%#v", wantResponseMembers, m) - } -} - -func TestHTTPMembersAPIListError(t *testing.T) { - tests := []httpClient{ - // generic httpClient failure - &staticHTTPClient{err: errors.New("fail!")}, - - // unrecognized HTTP status code - &staticHTTPClient{ - resp: http.Response{StatusCode: http.StatusTeapot}, - }, - - // fail to unmarshal body on StatusOK - &staticHTTPClient{ - resp: http.Response{ - StatusCode: http.StatusOK, - }, - body: []byte(`[{"id":"XX`), - }, - } - - for i, tt := range tests { - mAPI := &httpMembersAPI{client: tt} - ms, err := mAPI.List(context.Background()) - if err == nil { - t.Errorf("#%d: got nil err", i) - } - if ms != nil { - t.Errorf("#%d: got non-nil Member slice", i) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go deleted file mode 100644 index 7121f45..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/srv_test.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package client - -import ( - "errors" - "net" - "reflect" - "testing" -) - -func TestSRVDiscover(t *testing.T) { - defer func() { lookupSRV = net.LookupSRV }() - - tests := []struct { - withSSL []*net.SRV - withoutSSL []*net.SRV - expected []string - }{ - { - []*net.SRV{}, - []*net.SRV{}, - []string{}, - }, - { - []*net.SRV{ - {Target: "10.0.0.1", Port: 2480}, - {Target: "10.0.0.2", Port: 2480}, - {Target: "10.0.0.3", Port: 2480}, - }, - []*net.SRV{}, - []string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480"}, - }, - { - []*net.SRV{ - {Target: "10.0.0.1", Port: 2480}, - {Target: "10.0.0.2", Port: 2480}, - {Target: "10.0.0.3", Port: 2480}, - }, - []*net.SRV{ - {Target: "10.0.0.1", Port: 7001}, - }, - []string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480", "http://10.0.0.1:7001"}, - }, - { - []*net.SRV{ - {Target: "10.0.0.1", Port: 2480}, - {Target: "10.0.0.2", Port: 2480}, - {Target: "10.0.0.3", Port: 2480}, - }, - []*net.SRV{ - {Target: "10.0.0.1", Port: 7001}, - }, - []string{"https://10.0.0.1:2480", "https://10.0.0.2:2480", "https://10.0.0.3:2480", "http://10.0.0.1:7001"}, - }, - { - []*net.SRV{ - {Target: "a.example.com", Port: 2480}, - {Target: "b.example.com", Port: 2480}, - {Target: "c.example.com", Port: 2480}, - }, - []*net.SRV{}, - []string{"https://a.example.com:2480", "https://b.example.com:2480", "https://c.example.com:2480"}, - }, - } - - for i, tt := range tests { - lookupSRV = func(service string, proto string, domain string) (string, []*net.SRV, error) { - if service == "etcd-server-ssl" { - return "", tt.withSSL, nil - } - if service == "etcd-server" { - return "", tt.withoutSSL, nil - } - return "", nil, errors.New("Unknown service in mock") - } - - d := NewSRVDiscover() - - endpoints, err := d.Discover("example.com") - if err != nil { - t.Fatalf("%d: err: %#v", i, err) - } - - if !reflect.DeepEqual(endpoints, tt.expected) { - t.Errorf("#%d: endpoints = %v, want %v", i, endpoints, tt.expected) - } - - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go deleted file mode 100644 index 6d3d803..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path_test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pathutil - -import "testing" - -func TestCanonicalURLPath(t *testing.T) { - tests := []struct { - p string - wp string - }{ - {"/a", "/a"}, - {"", "/"}, - {"a", "/a"}, - {"//a", "/a"}, - {"/a/.", "/a"}, - {"/a/..", "/"}, - {"/a/", "/a/"}, - {"/a//", "/a/"}, - } - for i, tt := range tests { - if g := CanonicalURLPath(tt.p); g != tt.wp { - t.Errorf("#%d: canonical path = %s, want %s", i, g, tt.wp) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go deleted file mode 100644 index 97d168f..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "sort" - "testing" -) - -func TestIDString(t *testing.T) { - tests := []struct { - input ID - want string - }{ - { - input: 12, - want: "c", - }, - { - input: 4918257920282737594, - want: "444129853c343bba", - }, - } - - for i, tt := range tests { - got := tt.input.String() - if tt.want != got { - t.Errorf("#%d: ID.String failure: want=%v, got=%v", i, tt.want, got) - } - } -} - -func TestIDFromString(t *testing.T) { - tests := []struct { - input string - want ID - }{ - { - input: "17", - want: 23, - }, - { - input: "612840dae127353", - want: 437557308098245459, - }, - } - - for i, tt := range tests { - got, err := IDFromString(tt.input) - if err != nil { - t.Errorf("#%d: IDFromString failure: err=%v", i, err) - continue - } - if tt.want != got { - t.Errorf("#%d: IDFromString failure: want=%v, got=%v", i, tt.want, got) - } - } -} - -func TestIDFromStringFail(t *testing.T) { - tests := []string{ - "", - "XXX", - "612840dae127353612840dae127353", - } - - for i, tt := range tests { - _, err := IDFromString(tt) - if err == nil { - t.Fatalf("#%d: IDFromString expected error, but err=nil", i) - } - } -} - -func TestIDSlice(t *testing.T) { - g := []ID{10, 500, 5, 1, 100, 25} - w := []ID{1, 5, 10, 25, 100, 500} - sort.Sort(IDSlice(g)) - if !reflect.DeepEqual(g, w) { - t.Errorf("slice after sort = %#v, want %#v", g, w) - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go deleted file mode 100644 index ff1ecc6..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set_test.go +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "sort" - "testing" -) - -func TestUnsafeSet(t *testing.T) { - driveSetTests(t, NewUnsafeSet()) -} - -func TestThreadsafeSet(t *testing.T) { - driveSetTests(t, NewThreadsafeSet()) -} - -// Check that two slices contents are equal; order is irrelevant -func equal(a, b []string) bool { - as := sort.StringSlice(a) - bs := sort.StringSlice(b) - as.Sort() - bs.Sort() - return reflect.DeepEqual(as, bs) -} - -func driveSetTests(t *testing.T, s Set) { - // Verify operations on an empty set - eValues := []string{} - values := s.Values() - if !reflect.DeepEqual(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - if l := s.Length(); l != 0 { - t.Fatalf("Expected length=0, got %d", l) - } - for _, v := range []string{"foo", "bar", "baz"} { - if s.Contains(v) { - t.Fatalf("Expect s.Contains(%q) to be fale, got true", v) - } - } - - // Add three items, ensure they show up - s.Add("foo") - s.Add("bar") - s.Add("baz") - - eValues = []string{"foo", "bar", "baz"} - values = s.Values() - if !equal(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - - for _, v := range eValues { - if !s.Contains(v) { - t.Fatalf("Expect s.Contains(%q) to be true, got false", v) - } - } - - if l := s.Length(); l != 3 { - t.Fatalf("Expected length=3, got %d", l) - } - - // Add the same item a second time, ensuring it is not duplicated - s.Add("foo") - - values = s.Values() - if !equal(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - if l := s.Length(); l != 3 { - t.Fatalf("Expected length=3, got %d", l) - } - - // Remove all items, ensure they are gone - s.Remove("foo") - s.Remove("bar") - s.Remove("baz") - - eValues = []string{} - values = s.Values() - if !equal(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - - if l := s.Length(); l != 0 { - t.Fatalf("Expected length=0, got %d", l) - } - - // Create new copies of the set, and ensure they are unlinked to the - // original Set by making modifications - s.Add("foo") - s.Add("bar") - cp1 := s.Copy() - cp2 := s.Copy() - s.Remove("foo") - cp3 := s.Copy() - cp1.Add("baz") - - for i, tt := range []struct { - want []string - got []string - }{ - {[]string{"bar"}, s.Values()}, - {[]string{"foo", "bar", "baz"}, cp1.Values()}, - {[]string{"foo", "bar"}, cp2.Values()}, - {[]string{"bar"}, cp3.Values()}, - } { - if !equal(tt.want, tt.got) { - t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) - } - } - - for i, tt := range []struct { - want bool - got bool - }{ - {true, s.Equals(cp3)}, - {true, cp3.Equals(s)}, - {false, s.Equals(cp2)}, - {false, s.Equals(cp1)}, - {false, cp1.Equals(s)}, - {false, cp2.Equals(s)}, - {false, cp2.Equals(cp1)}, - } { - if tt.got != tt.want { - t.Fatalf("case %d: want %t, got %t", i, tt.want, tt.got) - - } - } - - // Subtract values from a Set, ensuring a new Set is created and - // the original Sets are unmodified - sub1 := cp1.Sub(s) - sub2 := cp2.Sub(cp1) - - for i, tt := range []struct { - want []string - got []string - }{ - {[]string{"foo", "bar", "baz"}, cp1.Values()}, - {[]string{"foo", "bar"}, cp2.Values()}, - {[]string{"bar"}, s.Values()}, - {[]string{"foo", "baz"}, sub1.Values()}, - {[]string{}, sub2.Values()}, - } { - if !equal(tt.want, tt.got) { - t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) - } - } -} - -func TestUnsafeSetContainsAll(t *testing.T) { - vals := []string{"foo", "bar", "baz"} - s := NewUnsafeSet(vals...) - - tests := []struct { - strs []string - wcontain bool - }{ - {[]string{}, true}, - {vals[:1], true}, - {vals[:2], true}, - {vals, true}, - {[]string{"cuz"}, false}, - {[]string{vals[0], "cuz"}, false}, - } - for i, tt := range tests { - if g := s.ContainsAll(tt.strs); g != tt.wcontain { - t.Errorf("#%d: ok = %v, want %v", i, g, tt.wcontain) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go deleted file mode 100644 index 95e37e0..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "sort" - "testing" -) - -func TestUint64Slice(t *testing.T) { - g := Uint64Slice{10, 500, 5, 1, 100, 25} - w := Uint64Slice{1, 5, 10, 25, 100, 500} - sort.Sort(g) - if !reflect.DeepEqual(g, w) { - t.Errorf("slice after sort = %#v, want %#v", g, w) - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go deleted file mode 100644 index ffa2cf0..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls_test.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "testing" - - "github.com/coreos/etcd/pkg/testutil" -) - -func TestNewURLs(t *testing.T) { - tests := []struct { - strs []string - wurls URLs - }{ - { - []string{"http://127.0.0.1:2379"}, - testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), - }, - // it can trim space - { - []string{" http://127.0.0.1:2379 "}, - testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), - }, - // it does sort - { - []string{ - "http://127.0.0.2:2379", - "http://127.0.0.1:2379", - }, - testutil.MustNewURLs(t, []string{ - "http://127.0.0.1:2379", - "http://127.0.0.2:2379", - }), - }, - } - for i, tt := range tests { - urls, _ := NewURLs(tt.strs) - if !reflect.DeepEqual(urls, tt.wurls) { - t.Errorf("#%d: urls = %+v, want %+v", i, urls, tt.wurls) - } - } -} - -func TestURLsString(t *testing.T) { - tests := []struct { - us URLs - wstr string - }{ - { - URLs{}, - "", - }, - { - testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), - "http://127.0.0.1:2379", - }, - { - testutil.MustNewURLs(t, []string{ - "http://127.0.0.1:2379", - "http://127.0.0.2:2379", - }), - "http://127.0.0.1:2379,http://127.0.0.2:2379", - }, - { - testutil.MustNewURLs(t, []string{ - "http://127.0.0.2:2379", - "http://127.0.0.1:2379", - }), - "http://127.0.0.2:2379,http://127.0.0.1:2379", - }, - } - for i, tt := range tests { - g := tt.us.String() - if g != tt.wstr { - t.Errorf("#%d: string = %s, want %s", i, g, tt.wstr) - } - } -} - -func TestURLsSort(t *testing.T) { - g := testutil.MustNewURLs(t, []string{ - "http://127.0.0.4:2379", - "http://127.0.0.2:2379", - "http://127.0.0.1:2379", - "http://127.0.0.3:2379", - }) - w := testutil.MustNewURLs(t, []string{ - "http://127.0.0.1:2379", - "http://127.0.0.2:2379", - "http://127.0.0.3:2379", - "http://127.0.0.4:2379", - }) - gurls := URLs(g) - gurls.Sort() - if !reflect.DeepEqual(g, w) { - t.Errorf("URLs after sort = %#v, want %#v", g, w) - } -} - -func TestURLsStringSlice(t *testing.T) { - tests := []struct { - us URLs - wstr []string - }{ - { - URLs{}, - []string{}, - }, - { - testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), - []string{"http://127.0.0.1:2379"}, - }, - { - testutil.MustNewURLs(t, []string{ - "http://127.0.0.1:2379", - "http://127.0.0.2:2379", - }), - []string{"http://127.0.0.1:2379", "http://127.0.0.2:2379"}, - }, - { - testutil.MustNewURLs(t, []string{ - "http://127.0.0.2:2379", - "http://127.0.0.1:2379", - }), - []string{"http://127.0.0.2:2379", "http://127.0.0.1:2379"}, - }, - } - for i, tt := range tests { - g := tt.us.StringSlice() - if !reflect.DeepEqual(g, tt.wstr) { - t.Errorf("#%d: string slice = %+v, want %+v", i, g, tt.wstr) - } - } -} - -func TestNewURLsFail(t *testing.T) { - tests := [][]string{ - // no urls given - {}, - // missing protocol scheme - {"://127.0.0.1:2379"}, - // unsupported scheme - {"mailto://127.0.0.1:2379"}, - // not conform to host:port - {"http://127.0.0.1"}, - // contain a path - {"http://127.0.0.1:2379/path"}, - } - for i, tt := range tests { - _, err := NewURLs(tt) - if err == nil { - t.Errorf("#%d: err = nil, but error", i) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go deleted file mode 100644 index 1955bb9..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_go15_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// +build go1.5 - -package types - -import ( - "reflect" - "testing" - - "github.com/coreos/etcd/pkg/testutil" -) - -// This is only tested in Go1.5+ because Go1.4 doesn't support literal IPv6 address with zone in -// URI (https://github.com/golang/go/issues/6530). -func TestNewURLsMapIPV6(t *testing.T) { - c, err := NewURLsMap("mem1=http://[2001:db8::1]:2380,mem1=http://[fe80::6e40:8ff:feb1:58e4%25en0]:2380,mem2=http://[fe80::92e2:baff:fe7c:3224%25ext0]:2380") - if err != nil { - t.Fatalf("unexpected parse error: %v", err) - } - wc := URLsMap(map[string]URLs{ - "mem1": testutil.MustNewURLs(t, []string{"http://[2001:db8::1]:2380", "http://[fe80::6e40:8ff:feb1:58e4%25en0]:2380"}), - "mem2": testutil.MustNewURLs(t, []string{"http://[fe80::92e2:baff:fe7c:3224%25ext0]:2380"}), - }) - if !reflect.DeepEqual(c, wc) { - t.Errorf("cluster = %#v, want %#v", c, wc) - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go b/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go deleted file mode 100644 index a01b5ef..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap_test.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package types - -import ( - "reflect" - "testing" - - "github.com/coreos/etcd/pkg/testutil" -) - -func TestParseInitialCluster(t *testing.T) { - c, err := NewURLsMap("mem1=http://10.0.0.1:2379,mem1=http://128.193.4.20:2379,mem2=http://10.0.0.2:2379,default=http://127.0.0.1:2379") - if err != nil { - t.Fatalf("unexpected parse error: %v", err) - } - wc := URLsMap(map[string]URLs{ - "mem1": testutil.MustNewURLs(t, []string{"http://10.0.0.1:2379", "http://128.193.4.20:2379"}), - "mem2": testutil.MustNewURLs(t, []string{"http://10.0.0.2:2379"}), - "default": testutil.MustNewURLs(t, []string{"http://127.0.0.1:2379"}), - }) - if !reflect.DeepEqual(c, wc) { - t.Errorf("cluster = %+v, want %+v", c, wc) - } -} - -func TestParseInitialClusterBad(t *testing.T) { - tests := []string{ - // invalid URL - "%^", - // no URL defined for member - "mem1=,mem2=http://128.193.4.20:2379,mem3=http://10.0.0.2:2379", - "mem1,mem2=http://128.193.4.20:2379,mem3=http://10.0.0.2:2379", - // bad URL for member - "default=http://localhost/", - } - for i, tt := range tests { - if _, err := NewURLsMap(tt); err == nil { - t.Errorf("#%d: unexpected successful parse, want err", i) - } - } -} - -func TestNameURLPairsString(t *testing.T) { - cls := URLsMap(map[string]URLs{ - "abc": testutil.MustNewURLs(t, []string{"http://1.1.1.1:1111", "http://0.0.0.0:0000"}), - "def": testutil.MustNewURLs(t, []string{"http://2.2.2.2:2222"}), - "ghi": testutil.MustNewURLs(t, []string{"http://3.3.3.3:1234", "http://127.0.0.1:2380"}), - // no PeerURLs = not included - "four": testutil.MustNewURLs(t, []string{}), - "five": testutil.MustNewURLs(t, nil), - }) - w := "abc=http://0.0.0.0:0000,abc=http://1.1.1.1:1111,def=http://2.2.2.2:2222,ghi=http://127.0.0.1:2380,ghi=http://3.3.3.3:1234" - if g := cls.String(); g != w { - t.Fatalf("NameURLPairs.String():\ngot %#v\nwant %#v", g, w) - } -} - -func TestParse(t *testing.T) { - tests := []struct { - s string - wm map[string][]string - }{ - { - "", - map[string][]string{}, - }, - { - "a=b", - map[string][]string{"a": {"b"}}, - }, - { - "a=b,a=c", - map[string][]string{"a": {"b", "c"}}, - }, - { - "a=b,a1=c", - map[string][]string{"a": {"b"}, "a1": {"c"}}, - }, - } - for i, tt := range tests { - m := parse(tt.s) - if !reflect.DeepEqual(m, tt.wm) { - t.Errorf("#%d: m = %+v, want %+v", i, m, tt.wm) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..670d88f --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/NOTICE b/Godeps/_workspace/src/github.com/coreos/fleet/NOTICE new file mode 100644 index 0000000..b39ddfa --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/NOTICE @@ -0,0 +1,5 @@ +CoreOS Project +Copyright 2014 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go deleted file mode 100644 index bde2af3..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import "testing" - -func TestTrimToDashes(t *testing.T) { - var argtests = []struct { - input []string - output []string - }{ - {[]string{"foo", "bar", "baz"}, []string{"foo", "bar", "baz"}}, - {[]string{"abc", "def", "--", "ghi"}, []string{"ghi"}}, - {[]string{"abc", "def", "--"}, []string{}}, - {[]string{"--"}, []string{}}, - {[]string{"--", "abc", "def", "ghi"}, []string{"abc", "def", "ghi"}}, - {[]string{"--", "bar", "--", "baz"}, []string{"bar", "--", "baz"}}, - {[]string{"--flagname", "--", "ghi"}, []string{"ghi"}}, - {[]string{"--", "--flagname", "ghi"}, []string{"--flagname", "ghi"}}, - } - for _, test := range argtests { - args := TrimToDashes(test.input) - if len(test.output) != len(args) { - t.Fatalf("error trimming dashes: expected %s, got %s", test.output, args) - } - for i, v := range args { - if v != test.output[i] { - t.Fatalf("error trimming dashes: expected %s, got %s", test.output, args) - } - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go deleted file mode 100644 index 0322fed..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "testing" - "time" -) - -func TestExpBackoff(t *testing.T) { - tests := []struct { - last time.Duration - max time.Duration - next time.Duration - }{ - {1 * time.Second, 10 * time.Second, 2 * time.Second}, - {8 * time.Second, 10 * time.Second, 10 * time.Second}, - {10 * time.Second, 10 * time.Second, 10 * time.Second}, - {20 * time.Second, 10 * time.Second, 10 * time.Second}, - } - - for i, tt := range tests { - next := ExpBackoff(tt.last, tt.max) - if next != tt.next { - t.Errorf("case %d: last=%v, max=%v, next=%v; got next=%v", i, tt.last, tt.max, tt.next, next) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go deleted file mode 100644 index 449730d..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath_test.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "os" - "strings" - "testing" -) - -var pathtests = []struct { - in string - home string - prefix string - suffix string - full string -}{ - {"~/a", "", "/", "/a", ""}, - {"~", "", "/", "", ""}, - {"~~", "", "", "", "~~"}, - {"~/a", "/home/foo", "", "", "/home/foo/a"}, -} - -// TestParseFilepath tests parsing filepath -func TestParseFilepath(t *testing.T) { - for _, test := range pathtests { - oldHome := os.Getenv("HOME") - if err := os.Setenv("HOME", test.home); err != nil { - t.Fatalf("Failed setting $HOME") - } - path := ParseFilepath(test.in) - if !strings.HasPrefix(path, test.prefix) { - t.Errorf("Failed parsing out prefix %v for %v", test.prefix, test.in) - } - if !strings.HasSuffix(path, test.suffix) { - t.Errorf("Failed parsing out suffix %v for %v", test.suffix, test.in) - } - if test.full != "" && path != test.full { - t.Errorf("Failed parsing out %v for %v", test.full, test.in) - } - if err := os.Setenv("HOME", oldHome); err != nil { - t.Fatalf("Failed recovering $HOME") - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go deleted file mode 100644 index 58fdc43..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem_test.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "io/ioutil" - "os" - "path" - "reflect" - "testing" -) - -func TestListDirectory(t *testing.T) { - dir, err := ioutil.TempDir("", "fleet-testing-") - if err != nil { - t.Fatal(err.Error()) - } - - defer os.RemoveAll(dir) - - for _, name := range []string{"ping", "pong", "foo", "bar", "baz"} { - err := ioutil.WriteFile(path.Join(dir, name), []byte{}, 0400) - if err != nil { - t.Fatal(err.Error()) - } - } - - filterFunc := func(name string) bool { - return name == "foo" || name == "bar" - } - - got, err := ListDirectory(dir, filterFunc) - if err != nil { - t.Fatal(err.Error()) - } - - want := []string{"baz", "ping", "pong"} - if !reflect.DeepEqual(want, got) { - t.Fatalf("ListDirectory output incorrect: want=%v, got=%v", want, got) - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go deleted file mode 100644 index 60c8547..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag_test.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "reflect" - "testing" -) - -func TestStringSlice(t *testing.T) { - tests := []struct { - input string - output []string - }{ - {`["a"]`, []string{"a"}}, - {`["a","b"]`, []string{"a", "b"}}, - } - - for _, tt := range tests { - var ss StringSlice - ss.Set(tt.input) - r := ss.Value() - if !reflect.DeepEqual(r, tt.output) { - t.Errorf("error setting StringSlice: expected %+v, got %+v", tt.output, r) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go deleted file mode 100644 index 9ed5237..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd_test.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lease - -import ( - "reflect" - "testing" - "time" - - etcd "github.com/coreos/etcd/client" -) - -func TestSerializeLeaseMetadata(t *testing.T) { - tests := []struct { - machID string - ver int - want string - }{ - { - machID: "XXX", - ver: 9, - want: `{"MachineID":"XXX","Version":9}`, - }, - { - machID: "XXX", - ver: 0, - want: `{"MachineID":"XXX","Version":0}`, - }, - } - - for i, tt := range tests { - got, err := serializeLeaseMetadata(tt.machID, tt.ver) - if err != nil { - t.Errorf("case %d: unexpected err=%v", i, err) - continue - } - if tt.want != got { - t.Errorf("case %d: incorrect output from serializeLeaseMetadata\nwant=%s\ngot=%s", i, tt.want, got) - } - } -} - -func TestLeaseFromResponse(t *testing.T) { - tests := []struct { - res etcd.Response - want etcdLease - }{ - // typical case - { - res: etcd.Response{ - Node: &etcd.Node{ - Key: "/foo/bar", - ModifiedIndex: 12, - TTL: 9, - Value: `{"MachineID":"XXX","Version":19}`, - }, - }, - want: etcdLease{ - key: "/foo/bar", - idx: 12, - ttl: time.Second * 9, - meta: etcdLeaseMetadata{ - MachineID: "XXX", - Version: 19, - }, - }, - }, - - // backwards-compatibility with unversioned engines - { - res: etcd.Response{ - Node: &etcd.Node{ - Key: "/foo/bar", - ModifiedIndex: 12, - TTL: 9, - Value: "XXX", - }, - }, - want: etcdLease{ - key: "/foo/bar", - idx: 12, - ttl: time.Second * 9, - meta: etcdLeaseMetadata{ - MachineID: "XXX", - Version: 0, - }, - }, - }, - - // json decode failures are treated like a nonversioned lease - { - res: etcd.Response{ - Node: &etcd.Node{ - Key: "/foo/bar", - ModifiedIndex: 12, - TTL: 9, - Value: `{"MachineID":"XXX","Ver`, - }, - }, - want: etcdLease{ - key: "/foo/bar", - idx: 12, - ttl: time.Second * 9, - meta: etcdLeaseMetadata{ - MachineID: `{"MachineID":"XXX","Ver`, - Version: 0, - }, - }, - }, - } - - for i, tt := range tests { - var r *etcdLeaseManager - got := r.leaseFromResponse(&tt.res) - if !reflect.DeepEqual(tt.want, *got) { - t.Errorf("case %d: incorrect output from leaseFromResponse\nwant=%#v\ngot=%#vs", i, tt.want, *got) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go deleted file mode 100644 index a86eb6a..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile_test.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "testing" - "time" - - "github.com/jonboulle/clockwork" -) - -type fakeEventStream struct { - ret chan Event -} - -func (f *fakeEventStream) Next(chan struct{}) chan Event { - return f.ret -} - -func (f *fakeEventStream) trigger() { - go func() { - f.ret <- Event("asdf") - }() -} - -// TestPeriodicReconcilerRun attempts to validate the behaviour of the central Run -// loop of the PeriodicReconciler -func TestPeriodicReconcilerRun(t *testing.T) { - ival := 5 * time.Hour - fclock := clockwork.NewFakeClock() - fes := &fakeEventStream{make(chan Event)} - called := make(chan struct{}) - rec := func() { - go func() { - called <- struct{}{} - }() - } - pr := &reconciler{ - ival: ival, - rFunc: rec, - eStream: fes, - clock: fclock, - } - // launch the PeriodicReconciler in the background - prDone := make(chan bool) - stop := make(chan bool) - go func() { - pr.Run(stop) - prDone <- true - }() - // reconcile should have occurred once at start-up - select { - case <-called: - case <-time.After(time.Second): - t.Fatalf("rFunc() not called at start-up as expected!") - } - // no further reconciles yet expected - select { - case <-called: - t.Fatalf("rFunc() called unexpectedly!") - default: - } - // now, send an event on the EventStream and ensure rFunc occurs - fes.trigger() - select { - case <-called: - case <-time.After(time.Second): - t.Fatalf("rFunc() not called after trigger!") - } - // assert rFunc was only called once - select { - case <-called: - t.Fatalf("rFunc() called unexpectedly!") - default: - } - // another event should work OK - fes.trigger() - select { - case <-called: - case <-time.After(time.Second): - t.Fatalf("rFunc() not called after trigger!") - } - // again, assert rFunc was only called once - select { - case <-called: - t.Fatalf("rFunc() called unexpectedly!") - default: - } - // now check that time changes have the expected effect - fclock.Advance(2 * time.Hour) - select { - case <-called: - t.Fatalf("rFunc() called unexpectedly!") - default: - } - fclock.Advance(3 * time.Hour) - select { - case <-called: - case <-time.After(time.Second): - t.Fatalf("rFunc() not called after time event!") - } - - // stop the PeriodicReconciler - close(stop) - - // now, sending an event should do nothing - fes.trigger() - select { - case <-called: - t.Fatalf("rFunc() called unexpectedly!") - default: - } - // and nor should changes in time - fclock.Advance(10 * time.Hour) - select { - case <-called: - t.Fatalf("rFunc() called unexpectedly!") - default: - } - // and the PeriodicReconciler should have shut down - select { - case <-prDone: - case <-time.After(time.Second): - t.Fatalf("PeriodicReconciler.Run did not return after stop signal!") - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go deleted file mode 100644 index dbf2082..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set_test.go +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "reflect" - "sort" - "testing" -) - -func TestUnsafeSet(t *testing.T) { - driveSetTests(t, NewUnsafeSet()) -} - -func TestThreadsafeSet(t *testing.T) { - driveSetTests(t, NewThreadsafeSet()) -} - -// Check that two slices contents are equal; order is irrelevant -func equal(a, b []string) bool { - as := sort.StringSlice(a) - bs := sort.StringSlice(b) - as.Sort() - bs.Sort() - return reflect.DeepEqual(as, bs) -} - -func driveSetTests(t *testing.T, s Set) { - // Verify operations on an empty set - eValues := []string{} - values := s.Values() - if !reflect.DeepEqual(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - if l := s.Length(); l != 0 { - t.Fatalf("Expected length=0, got %d", l) - } - for _, v := range []string{"foo", "bar", "baz"} { - if s.Contains(v) { - t.Fatalf("Expect s.Contains(%q) to be fale, got true", v) - } - } - - // Add three items, ensure they show up - s.Add("foo") - s.Add("bar") - s.Add("baz") - - eValues = []string{"foo", "bar", "baz"} - values = s.Values() - if !equal(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - - for _, v := range eValues { - if !s.Contains(v) { - t.Fatalf("Expect s.Contains(%q) to be true, got false", v) - } - } - - if l := s.Length(); l != 3 { - t.Fatalf("Expected length=3, got %d", l) - } - - // Add the same item a second time, ensuring it is not duplicated - s.Add("foo") - - values = s.Values() - if !equal(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - if l := s.Length(); l != 3 { - t.Fatalf("Expected length=3, got %d", l) - } - - // Remove all items, ensure they are gone - s.Remove("foo") - s.Remove("bar") - s.Remove("baz") - - eValues = []string{} - values = s.Values() - if !equal(values, eValues) { - t.Fatalf("Expect values=%v got %v", eValues, values) - } - - if l := s.Length(); l != 0 { - t.Fatalf("Expected length=0, got %d", l) - } - - // Create new copies of the set, and ensure they are unlinked to the - // original Set by making modifications - s.Add("foo") - s.Add("bar") - cp1 := s.Copy() - cp2 := s.Copy() - s.Remove("foo") - cp3 := s.Copy() - cp1.Add("baz") - - for i, tt := range []struct { - want []string - got []string - }{ - {[]string{"bar"}, s.Values()}, - {[]string{"foo", "bar", "baz"}, cp1.Values()}, - {[]string{"foo", "bar"}, cp2.Values()}, - {[]string{"bar"}, cp3.Values()}, - } { - if !equal(tt.want, tt.got) { - t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) - } - } - - for i, tt := range []struct { - want bool - got bool - }{ - {true, s.Equals(cp3)}, - {true, cp3.Equals(s)}, - {false, s.Equals(cp2)}, - {false, s.Equals(cp1)}, - {false, cp1.Equals(s)}, - {false, cp2.Equals(s)}, - {false, cp2.Equals(cp1)}, - } { - if tt.got != tt.want { - t.Fatalf("case %d: want %t, got %t", i, tt.want, tt.got) - - } - } - - // Subtract values from a Set, ensuring a new Set is created and - // the original Sets are unmodified - sub1 := cp1.Sub(s) - sub2 := cp2.Sub(cp1) - - for i, tt := range []struct { - want []string - got []string - }{ - {[]string{"foo", "bar", "baz"}, cp1.Values()}, - {[]string{"foo", "bar"}, cp2.Values()}, - {[]string{"bar"}, s.Values()}, - {[]string{"foo", "baz"}, sub1.Values()}, - {[]string{}, sub2.Values()}, - } { - if !equal(tt.want, tt.got) { - t.Fatalf("case %d: expect values=%v got %v", i, tt.want, tt.got) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go deleted file mode 100644 index 1e84f74..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls_test.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package pkg - -import ( - "crypto/tls" - "errors" - "testing" -) - -var ( - validCA = []byte(`-----BEGIN CERTIFICATE----- -MIIFNDCCAx6gAwIBAgIBATALBgkqhkiG9w0BAQUwLTEMMAoGA1UEBhMDVVNBMRAw -DgYDVQQKEwdldGNkLWNhMQswCQYDVQQLEwJDQTAeFw0xNDAzMTMwMjA5MDlaFw0y -NDAzMTMwMjA5MDlaMC0xDDAKBgNVBAYTA1VTQTEQMA4GA1UEChMHZXRjZC1jYTEL -MAkGA1UECxMCQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDdlBlw -Jiakc4C1UpMUvQ+2fttyBMfMLivQgj51atpKd8qIBvpZwz1wtpzdRG0hSYMF0IUk -MfBqyg+T5tt2Lfs3Gx3cYKS7G0HTfmABC7GdG8gNvEVNl/efxqvhis7p7hur765e -J+N2GR4oOOP5Wa8O5flv10cp3ZJLhAguc2CONLzfh/iAYAItFgktGHXJ/AnUhhaj -KWdKlK9Cv71YsRPOiB1hCV+LKfNSqrXPMvQ4sarz3yECIBhpV/KfskJoDyeNMaJd -gabX/S7gUCd2FvuOpGWdSIsDwyJf0tnYmQX5XIQwBZJib/IFMmmoVNYc1bFtYvRH -j0g0Ax4tHeXU/0mglqEcaTuMejnx8jlxZAM8Z94wHLfKbtaP0zFwMXkaM4nmfZqh -vLZwowDGMv9M0VRFEhLGYIc3xQ8G2u8cFAGw1UqTxKhwAdRmrcFaQ38sk4kziy0u -AkpGavS7PKcFjjB/fdDFO/kwGQOthX/oTn9nP3BT+IK2h1A6ATMPI4lVnhb5/KBt -9M/fGgbiU+I9QT0Ilz/LlrcCuzyRXREvIZvoUL77Id+JT3qQxqPn/XMKLN4WEFII -112MFGqCD85JZzNoC4RkZd8kFlR4YJWsS4WqJlWprESr5cCDuLviK+31cnIRF4fJ -mz0gPsVgY7GFEan3JJnL8oRUVzdTPKfPt0atsQIDAQABo2MwYTAOBgNVHQ8BAf8E -BAMCAAQwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUnVlVvktY+zlLpG43nTpG -AWmUkrYwHwYDVR0jBBgwFoAUnVlVvktY+zlLpG43nTpGAWmUkrYwCwYJKoZIhvcN -AQEFA4ICAQAqIcPFux3V4h1N0aGM4fCS/iT50TzDnRb5hwILKbmyA6LFnH4YF7PZ -aA0utDNo1XSRDMpR38HWk0weh5Sfx6f2danaKZHAsea8oVEtdrz16ZMOvoh0CPIM -/hn0CGQOoXDADDNFASuExhhpoyYkDqTVTCQ/zbhZg1mjBljJ+BBzlSgeoE4rUDpn -nuDcmD9LtjpsVQL+J662rd51xV4Z6a7aZLvN9GfO8tYkfCGCD9+fGh1Cpz0IL7qw -VRie+p/XpjoHemswnRhYJ4wn10a1UkVSR++wld6Gvjb9ikyr9xVyU5yrRM55pP2J -VguhzjhTIDE1eDfIMMxv3Qj8+BdVQwtKFD+zQYQcbcjsvjTErlS7oCbM2DVlPnRT -QaCM0q0yorfzc4hmml5P95ngz2xlohavgNMhsYIlcWyq3NVbm7mIXz2pjqa16Iit -vL7WX6OVupv/EOMRx5cVcLqqEaYJmAlNd/CCD8ihDQCwoJ6DJhczPRexrVp+iZHK -SnIUONdXb/g8ungXUGL1jGNQrWuq49clpI5sLWNjMDMFAQo0qu5bLkOIMlK/evCt -gctOjXDvGXCk5h6Adf14q9zDGFdLoxw0/aciUSn9IekdzYPmkYUTifuzkVRsPKzS -nmI4dQvz0rHIh4FBUKWWrJhRWhrv9ty/YFuJXVUHeAwr5nz6RFZ4wQ== ------END CERTIFICATE-----`) - validKey = []byte(`-----BEGIN RSA PRIVATE KEY----- -MIIJKAIBAAKCAgEAyNxL6iay1rJz24wE/BDYjEcgSDYYWn7m4uTW/oJRM5GwtpL9 -s15FZKZAbmw0cMod3qJkm3cCmJN8s/iKKU++d7XibnkaTD6vQMq//j2ZeGNbRtOC -nI3zrzpbOsz7A3x85bkfExO9OSH+cMGbtwXcMc3bcfU9ETsyBIEbdAMbnHuapIPd -yFjcTqyK/uCwsWH06b6U1zttJc9CLkDZtTqaPT1aFp+z13Tprgs0htoVtQ3Cqksk -D+yJKZQSUtBIaKLyLF2r0pDyibLL0I+92RSAVYCoV7h5jzXa8qWkJArcbKm1XTjp -aIyLamE0wwImncEUFpGIAzkkAhiYj6mFScfqx+DJc8UOp/cdqiHJ3pXzK/lRQxHN -WLx7tVyzIOW9SJg+gobrWFtEYRSdwkFXUEdouJCfE9Q0iWCyEjDg2bsdXGWlKEi/ -xJKwuf/DzlmZj/JyVzugOMK2Qxxd9P6lqaPk+T77AOnAAX19Y5HE8TwVxitajmfK -06E8aayds3N87mTcUoDN9p843D1IJ+efTIHZdB0eHOCXk2RrHm1psTFppM//wVeH -lGhh6gqc0UB392CMcrLwwtl3+M9gJZPAJS0V6e/5LGrXcQLcnPsvPjFgnOjdGGyP -c47/nswgakfprtT+U29B3mzxc93TnSKYgt5FPEMjBGoMPLucZYmbOAMcHTcCAwEA -AQKCAgBS1vCESKOXgo/f61ae8v+skyUQQyc2I4Jr739wBiUhRKQCGIuDr4ylHyAR -qpTSM7mv+X/O0n2CmcljnEy3Dwl568zQTSf4bB3xde1LGPKzwR6DDnaexLjM+x9n -F+UqoewM/pV/U7PF3WxH6sGi8UrIS6OG02L1OVm+m9TLuwBnQF8eHLiaiXOLCwRk -bBzTe5f70zslrX+tiVY9J0fiw6GbQjNmg0UzxicePcbTGxy6yEsR2t2rp51GRahs -+TPz28hPXe6gcGFnQxNmF/JvllH7cY18aDvSQZ7kVkZlCwmv0ypWoUM6eESDgkW1 -a6yrgVccm7bhxW5BYw2AqqSrMkV0oMcCUjh2rYvex7w6dM374Ok3DD/dXjTHLNV5 -+0tHMxXUiCKwe7hVEg+iGD4E1jap5n5c4RzpEtAXsGEK5WUBksHi9qOBv+lubjZn -Kcfbos+BbnmUCU3MmU48EZwyFQIu9djkLXfJV2Cbbg9HmkrIOYgi4tFjoBKeQLE4 -6GCucMWnNfMO7Kq/z7c+7sfWOAA55pu0Ojel8VH6US+Y/1mEuSUhQudrJn8GxAmc -4t+C2Ie1Q1bK3iJbd0NUqtlwd9xI9wQgCbaxfQceUmBBjuTUu3YFctZ7Jia7h18I -gZ3wsKfySDhW29XTFvnT3FUpc+AN9Pv4sB7uobm6qOBV8/AdKQKCAQEA1zwIuJki -bSgXxsD4cfKgQsyIk0eMj8bDOlf/A8AFursXliH3rRASoixXNgzWrMhaEIE2BeeT -InE13YCUjNCKoz8oZJqKYpjh3o/diZf1vCo6m/YUSR+4amynWE4FEAa58Og2WCJ3 -Nx8/IMpmch2VZ+hSQuNr5uvpH84+eZADQ1GB6ypzqxb5HjIEeryLJecDQGe4ophd -JCo3loezq/K0XJQI8GTBe2GQPjXSmLMZKksyZoWEXAaC1Q+sdJWZvBpm3GfVQbXu -q7wyqTMknVIlEOy0sHxstsbayysSFFQ/fcgKjyQb8f4efOkyQg8mH5vQOZghbHJ+ -7I8wVSSBt+bE2wKCAQEA7udRoo2NIoIpJH+2+SPqJJVq1gw/FHMM4oXNZp+AAjR1 -hTWcIzIXleMyDATl5ZFzZIY1U2JMifS5u2R7fDZEu9vfZk4e6BJUJn+5/ahjYFU8 -m8WV4rFWR6XN0SZxPb43Mn6OO7EoMqr8InRufiN4LwIqnPqDm2D9Fdijb9QFJ2UG -QLKNnIkLTcUfx1RYP4T48CHkeZdxV8Cp49SzSSV8PbhIVBx32bm/yO6nLHoro7Wl -YqXGW0wItf2BUA5a5eYNO0ezVkOkTp2aj/p9i+0rqbsYa480hzlnOzYI5F72Z8V2 -iPltUAeQn53Vg1azySa1x8/0Xp5nVsgQSh18CH3p1QKCAQBxZv4pVPXgkXlFjTLZ -xr5Ns7pZ7x7OOiluuiJw9WGPazgYMDlxA8DtlXM11Tneu4lInOu73LGXOhLpa+/Y -6Z/CN2qu5wX2wRpwy1gsQNaGl7FdryAtDvt5h1n8ms7sDL83gQHxGee6MUpvmnSz -t4aawrtk5rJZbv7bdS1Rm2E8vNs47psXD/mdwTi++kxOYhNCgeO0N5cLkPrM4x71 -f+ErzguPrWaL/XGkdXNKZULjF8+sWLjOS9fvLlzs6E2h4D9F7addAeCIt5XxtDKc -eUVyT2U8f7I/8zIgTccu0tzJBvcZSCs5K20g3zVNvPGXQd9KGS+zFfht51vN4HhA -TuR1AoIBAGuQBKZeexP1bJa9VeF4dRxBldeHrgMEBeIbgi5ZU+YqPltaltEV5Z6b -q1XUArpIsZ6p+mpvkKxwXgtsI1j6ihnW1g+Wzr2IOxEWYuQ9I3klB2PPIzvswj8B -/NfVKhk1gl6esmVXzxR4/Yp5x6HNUHhBznPdKtITaf+jCXr5B9UD3DvW6IF5Bnje -bv9tD0qSEQ71A4xnTiXHXfZxNsOROA4F4bLVGnUR97J9GRGic/GCgFMY9mT2p9lg -qQ8lV3G5EW4GS01kqR6oQQXgLxSIFSeXUFhlIq5bfwoeuwQvaVuxgTwMqVXmAgyL -oK1ApTPE1QWAsLLFORvOed8UxVqBbn0CggEBALfr/wheXCKLdzFzm03sO1i9qVz2 -vnpxzexXW3V/TtM6Dff2ojgkDC+CVximtAiLA/Wj60hXnQxw53g5VVT5rESx0J3c -pq+azbi1eWzFeOrqJvKQhMfYc0nli7YuGnPkKzeepJJtWZHYkAjL4QZAn1jt0RqV -DQmlGPGiOuGP8uh59c23pbjgh4eSJnvhOT2BFKhKZpBdTBYeiQiZBqIyme8rNTFr -NmpBxtUr77tccVTrcWWhhViG36UNpetAP7b5QCHScIXZJXrEqyK5HaePqi5UMH8o -alSz6s2REG/xP7x54574TvRG/3cIamv1AfZAOjin7BwhlSLhPl2eeh4Cgas= ------END RSA PRIVATE KEY-----`) - validCert = []byte(`-----BEGIN CERTIFICATE----- -MIIFWzCCA0WgAwIBAgIBAjALBgkqhkiG9w0BAQUwLTEMMAoGA1UEBhMDVVNBMRAw -DgYDVQQKEwdldGNkLWNhMQswCQYDVQQLEwJDQTAeFw0xNDAzMTMwMjA5MjJaFw0y -NDAzMTMwMjA5MjJaMEUxDDAKBgNVBAYTA1VTQTEQMA4GA1UEChMHZXRjZC1jYTEP -MA0GA1UECxMGc2VydmVyMRIwEAYDVQQDEwkxMjcuMC4wLjEwggIiMA0GCSqGSIb3 -DQEBAQUAA4ICDwAwggIKAoICAQDI3EvqJrLWsnPbjAT8ENiMRyBINhhafubi5Nb+ -glEzkbC2kv2zXkVkpkBubDRwyh3eomSbdwKYk3yz+IopT753teJueRpMPq9Ayr/+ -PZl4Y1tG04KcjfOvOls6zPsDfHzluR8TE705If5wwZu3Bdwxzdtx9T0ROzIEgRt0 -Axuce5qkg93IWNxOrIr+4LCxYfTpvpTXO20lz0IuQNm1Opo9PVoWn7PXdOmuCzSG -2hW1DcKqSyQP7IkplBJS0EhoovIsXavSkPKJssvQj73ZFIBVgKhXuHmPNdrypaQk -CtxsqbVdOOlojItqYTTDAiadwRQWkYgDOSQCGJiPqYVJx+rH4MlzxQ6n9x2qIcne -lfMr+VFDEc1YvHu1XLMg5b1ImD6ChutYW0RhFJ3CQVdQR2i4kJ8T1DSJYLISMODZ -ux1cZaUoSL/EkrC5/8POWZmP8nJXO6A4wrZDHF30/qWpo+T5PvsA6cABfX1jkcTx -PBXGK1qOZ8rToTxprJ2zc3zuZNxSgM32nzjcPUgn559Mgdl0HR4c4JeTZGsebWmx -MWmkz//BV4eUaGHqCpzRQHf3YIxysvDC2Xf4z2Alk8AlLRXp7/ksatdxAtyc+y8+ -MWCc6N0YbI9zjv+ezCBqR+mu1P5Tb0HebPFz3dOdIpiC3kU8QyMEagw8u5xliZs4 -AxwdNwIDAQABo3IwcDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHQYD -VR0OBBYEFD6UrVN8uolWz6et79jVeZetjd4XMB8GA1UdIwQYMBaAFJ1ZVb5LWPs5 -S6RuN506RgFplJK2MA8GA1UdEQQIMAaHBH8AAAEwCwYJKoZIhvcNAQEFA4ICAQCo -sKn1Rjx0tIVWAZAZB4lCWvkQDp/txnb5zzQUlKhIW2o98IklASmOYYyZbE2PXlda -/n8TwKIzWgIoNh5AcgLWhtASrnZdGFXY88n5jGk6CVZ1+Dl+IX99h+r+YHQzf1jU -BjGrZHGv3pPjwhFGDS99lM/TEBk/eLI2Kx5laL+nWMTwa8M1OwSIh6ZxYPVlWUqb -rurk5l/YqW+UkYIXIQhe6LwtB7tBjr6nDIWBfHQ7uN8IdB8VIAF6lejr22VmERTW -j+zJ5eTzuQN1f0s930mEm8pW7KgGxlEqrUlSJtxlMFCv6ZHZk1Y4yEiOCBKlPNme -X3B+lhj//PH3gLNm3+ZRr5ena3k+wL9Dd3d3GDCIx0ERQyrGS/rJpqNPI+8ZQlG0 -nrFlm7aP6UznESQnJoSFbydiD0EZ4hXSdmDdXQkTklRpeXfMcrYBGN7JrGZOZ2T2 -WtXBMx2bgPeEH50KRrwUMFe122bchh0Fr+hGvNK2Q9/gRyQPiYHq6vSF4GzorzLb -aDuWA9JRH8/c0z8tMvJ7KjmmmIxd39WWGZqiBrGQR7utOJjpQl+HCsDIQM6yZ/Bu -RpwKj2yBz0OQg4tWbtqUuFkRMTkCR6vo3PadgO1VWokM7UFUXlScnYswcM5EwnzJ -/IsYJ2s1V706QVUzAGIbi3+wYi3enk7JfYoGIqa2oA== ------END CERTIFICATE-----`) - corruptedKey = []byte(`-----BEGIN RSA PRIVATE KEY----- - Corrupted ------END RSA PRIVATE KEY-----`) - corruptedCert = []byte(`-----BEGIN CERTIFICATE----- - Corrupted ------END CERTIFICATE-----`) -) - -func newDummyKeyParser(cert tls.Certificate, err error) keypairFunc { - return func(certPEMBlock, keyPEMBlock []byte) (tls.Certificate, error) { - return cert, err - } -} - -func TestBuildTLSClientConfigNoCertificate(t *testing.T) { - parser := newDummyKeyParser(tls.Certificate{}, nil) - config, err := buildTLSClientConfig([]byte{}, []byte{}, []byte{}, parser) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if !config.InsecureSkipVerify { - t.Errorf("insecureSkipVerify not set") - } - if len(config.Certificates) != 0 { - t.Errorf("unexpected certificates") - } - if config.RootCAs != nil { - t.Errorf("unexpected root CA") - } -} - -func TestBuildTLSClientConfigWithValidCertificateAndWithCA(t *testing.T) { - parser := newDummyKeyParser(tls.Certificate{}, nil) - config, err := buildTLSClientConfig(validCA, validCert, validKey, parser) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if config.InsecureSkipVerify { - t.Errorf("insecureSkipVerify should not be set") - } - if len(config.Certificates) == 0 { - t.Errorf("missing certificates") - } - if config.RootCAs == nil { - t.Errorf("missing root CA") - } -} - -func TestBuildTLSClientConfigWithValidCertificateAndWithoutCA(t *testing.T) { - parser := newDummyKeyParser(tls.Certificate{}, nil) - config, err := buildTLSClientConfig([]byte{}, validCert, validKey, parser) - if err != nil { - t.Errorf("unexpected error: %v", err) - } - if config.InsecureSkipVerify { - t.Errorf("insecureSkipVerify should not be set") - } - if len(config.Certificates) == 0 { - t.Errorf("missing certificates") - } - if config.RootCAs != nil { - t.Errorf("unexpected root CA") - } -} - -func TestBuildTLSClientConfigWithInvalidParameters(t *testing.T) { - parser := newDummyKeyParser(tls.Certificate{}, errors.New("err")) - config, err := buildTLSClientConfig([]byte{}, validCert, validKey, parser) - if err == nil { - t.Errorf("error expected") - } - if config != nil { - t.Errorf("config should be nil") - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE new file mode 100644 index 0000000..e321c9b --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE @@ -0,0 +1,42 @@ +Portions of fleet's ssh package (particularly related to known_hosts handling) +are derived from the OpenSSH source, the copyright notices and licenses for +which follow below. + +/* + * Author: Tatu Ylonen + * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland + * All rights reserved + * Simple pattern matching, with '*' and '?' as wildcards. + * Functions for manipulating the known hosts files. + * + * As far as I am concerned, the code I have written for this software + * can be used freely for any purpose. Any derived versions of this + * software must be clearly marked as such, and if the derived work is + * incompatible with the protocol description in the RFC file, it must be + * called by a name other than "ssh" or "Secure Shell". + */ + +/* + * Copyright (c) 2000 Markus Friedl. All rights reserved. + * Copyright (c) 1999 Niels Provos. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go deleted file mode 100644 index 74adfe0..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake_test.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "reflect" - "testing" - - "github.com/coreos/fleet/pkg" -) - -func TestFakeUnitManagerEmpty(t *testing.T) { - fum := NewFakeUnitManager() - - units, err := fum.Units() - if err != nil { - t.Errorf("Expected no error from Units(), got %v", err) - } - - if !reflect.DeepEqual([]string{}, units) { - t.Errorf("Expected no units, found %v", units) - } -} - -func TestFakeUnitManagerLoadUnload(t *testing.T) { - fum := NewFakeUnitManager() - - err := fum.Load("hello.service", UnitFile{}) - if err != nil { - t.Fatalf("Expected no error from Load(), got %v", err) - } - - units, err := fum.Units() - if err != nil { - t.Fatalf("Expected no error from Units(), got %v", err) - } - eu := []string{"hello.service"} - if !reflect.DeepEqual(eu, units) { - t.Fatalf("Expected units %v, found %v", eu, units) - } - - us, err := fum.GetUnitState("hello.service") - if err != nil { - t.Errorf("Expected no error from GetUnitState, got %v", err) - } - - if us == nil { - t.Fatalf("Expected non-nil UnitState") - } - - eus := NewUnitState("loaded", "active", "running", "") - if !reflect.DeepEqual(*us, *eus) { - t.Fatalf("Expected UnitState %v, got %v", eus, *us) - } - - fum.Unload("hello.service") - - units, err = fum.Units() - if err != nil { - t.Errorf("Expected no error from Units(), got %v", err) - } - - if !reflect.DeepEqual([]string{}, units) { - t.Errorf("Expected no units, found %v", units) - } - - us, err = fum.GetUnitState("hello.service") - if err != nil { - t.Errorf("Expected no error from GetUnitState, got %v", err) - } - - if us != nil { - t.Fatalf("Expected nil UnitState") - } -} - -func TestFakeUnitManagerGetUnitStates(t *testing.T) { - fum := NewFakeUnitManager() - - err := fum.Load("hello.service", UnitFile{}) - if err != nil { - t.Fatalf("Expected no error from Load(), got %v", err) - } - - states, err := fum.GetUnitStates(pkg.NewUnsafeSet("hello.service", "goodbye.service")) - if err != nil { - t.Fatalf("Failed calling GetUnitStates: %v", err) - } - - expectStates := map[string]*UnitState{ - "hello.service": { - LoadState: "loaded", - ActiveState: "active", - SubState: "running", - UnitName: "hello.service", - }, - } - - if !reflect.DeepEqual(expectStates, states) { - t.Fatalf("Received unexpected collection of UnitStates: %#v\nExpected: %#v", states, expectStates) - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go deleted file mode 100644 index b8dab18..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator_test.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "reflect" - "testing" -) - -func assertGenerateUnitStateHeartbeats(t *testing.T, um UnitManager, gen *UnitStateGenerator, expect []UnitStateHeartbeat) { - beatchan, err := gen.Generate() - if err != nil { - t.Fatalf("Unexpected error from Generate(): %v", err) - } - - got := []UnitStateHeartbeat{} - for beat := range beatchan { - beat := beat - got = append(got, *beat) - } - - if !reflect.DeepEqual(got, expect) { - t.Fatalf("got %#v, expected %#v", got, expect) - } -} - -func TestUnitStateGeneratorSubscribeLifecycle(t *testing.T) { - um := NewFakeUnitManager() - um.Load("foo.service", UnitFile{}) - - gen := NewUnitStateGenerator(um) - - // not subscribed to anything yet, so no heartbeats - assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) - - gen.Subscribe("foo.service") - - // subscribed to foo.service so we should get a heartbeat - expect := []UnitStateHeartbeat{ - {Name: "foo.service", State: &UnitState{"loaded", "active", "running", "", "", "foo.service"}}, - } - assertGenerateUnitStateHeartbeats(t, um, gen, expect) - - gen.Unsubscribe("foo.service") - - // heartbeat for foo.service should have nil State since we have not called Generate since Unsubscribe - expect = []UnitStateHeartbeat{ - {Name: "foo.service", State: nil}, - } - assertGenerateUnitStateHeartbeats(t, um, gen, expect) - - // since the nil-State heartbeat for foo.service was sent for the last Generate, it can be forgotten - assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) -} - -func TestUnitStateGeneratorNoState(t *testing.T) { - um := NewFakeUnitManager() - gen := NewUnitStateGenerator(um) - - // not subscribed to anything yet, so no heartbeats - assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) - - gen.Subscribe("foo.service") - - // subscribed to foo.service but no underlying state so no heartbeat - assertGenerateUnitStateHeartbeats(t, um, gen, []UnitStateHeartbeat{}) -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go b/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go deleted file mode 100644 index 9590f4e..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit_test.go +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "reflect" - "testing" -) - -func TestUnitHash(t *testing.T) { - u, err := NewUnitFile("[Service]\nExecStart=/bin/sleep 100\n") - if err != nil { - t.Fatalf("Unexpected error encountered creating unit: %v", err) - } - - gotHash := u.Hash() - gotHashString := gotHash.String() - expectHashString := "1c6fb6f3684bafb0c173d8b8b957ceff031180c1" - if gotHashString != expectHashString { - t.Fatalf("Unit Hash (%s) does not match expected (%s)", gotHashString, expectHashString) - } - - expectHashShort := "1c6fb6f" - gotHashShort := gotHash.Short() - if gotHashShort != expectHashShort { - t.Fatalf("Unit Hash short (%s) does not match expected (%s)", gotHashShort, expectHashShort) - } - - eh := &Hash{} - if !eh.Empty() { - t.Fatalf("Empty hash check failed: %v", eh.Empty()) - } -} - -func TestHashFromHexString(t *testing.T) { - u, err := NewUnitFile("[Service]\nExecStart=/bin/sleep 100\n") - if err != nil { - t.Fatalf("Unexpected error encountered creating unit: %v", err) - } - gotHash := u.Hash() - - expectHashString := "1c6fb6f3684bafb0c173d8b8b957ceff031180c1" - rehashed, err := HashFromHexString(expectHashString) - if err != nil { - t.Fatalf("HashFromHexString failed with: %v", err) - } - if rehashed != gotHash { - t.Fatalf("HashFromHexString not equal to original hash") - } -} - -func TestRecognizedUnitTypes(t *testing.T) { - tts := []struct { - name string - ok bool - }{ - {"foo.service", true}, - {"foo.socket", true}, - {"foo.path", true}, - {"foo.timer", true}, - {"foo.mount", true}, - {"foo.automount", true}, - {"foo.device", true}, - {"foo.swap", false}, - {"foo.target", false}, - {"foo.snapshot", false}, - {"foo.network", false}, - {"foo.netdev", false}, - {"foo.link", false}, - {"foo.unknown", false}, - } - - for _, tt := range tts { - ok := RecognizedUnitType(tt.name) - if ok != tt.ok { - t.Errorf("Case failed: name=%s expect=%t result=%t", tt.name, tt.ok, ok) - } - } -} - -func TestDefaultUnitType(t *testing.T) { - tts := []struct { - name string - out string - }{ - {"foo", "foo.service"}, - {"foo.service", "foo.service.service"}, - {"foo.link", "foo.link.service"}, - } - - for _, tt := range tts { - out := DefaultUnitType(tt.name) - if out != tt.out { - t.Errorf("Case failed: name=%s expect=%s result=%s", tt.name, tt.out, out) - } - } -} - -func TestNewUnitState(t *testing.T) { - want := &UnitState{ - LoadState: "ls", - ActiveState: "as", - SubState: "ss", - MachineID: "id", - } - - got := NewUnitState("ls", "as", "ss", "id") - if !reflect.DeepEqual(got, want) { - t.Fatalf("NewUnitState did not create a correct UnitState: got %s, want %s", got, want) - } - -} - -func TestNamedUnit(t *testing.T) { - tts := []struct { - fname string - name string - pref string - tmpl string - inst string - isinst bool - istmpl bool - }{ - {"foo.service", "foo", "foo", "", "", false, false}, - {"foo@.service", "foo@", "foo", "foo@.service", "", false, true}, - {"foo@bar.service", "foo@bar", "foo", "foo@.service", "bar", true, false}, - {"foo@bar@baz.service", "foo@bar@baz", "foo", "foo@.service", "bar@baz", true, false}, - {"foo.1@.service", "foo.1@", "foo.1", "foo.1@.service", "", false, true}, - {"foo.1@2.service", "foo.1@2", "foo.1", "foo.1@.service", "2", true, false}, - {"ssh@.socket", "ssh@", "ssh", "ssh@.socket", "", false, true}, - {"ssh@1.socket", "ssh@1", "ssh", "ssh@.socket", "1", true, false}, - } - for _, tt := range tts { - u := NewUnitNameInfo(tt.fname) - if u == nil { - t.Errorf("NewUnitNameInfo(%s) returned nil InstanceUnit!", tt.name) - continue - } - if u.FullName != tt.fname { - t.Errorf("NewUnitNameInfo(%s) returned bad fullname: got %s, want %s", tt.name, u.FullName, tt.fname) - } - if u.Name != tt.name { - t.Errorf("NewUnitNameInfo(%s) returned bad name: got %s, want %s", tt.name, u.Name, tt.name) - } - if u.Template != tt.tmpl { - t.Errorf("NewUnitNameInfo(%s) returned bad template name: got %s, want %s", tt.name, u.Template, tt.tmpl) - } - if u.Prefix != tt.pref { - t.Errorf("NewUnitNameInfo(%s) returned bad prefix name: got %s, want %s", tt.name, u.Prefix, tt.pref) - } - if u.Instance != tt.inst { - t.Errorf("NewUnitNameInfo(%s) returned bad instance name: got %s, want %s", tt.name, u.Instance, tt.inst) - } - i := u.IsInstance() - if i != tt.isinst { - t.Errorf("NewUnitNameInfo(%s).IsInstance returned %t, want %t", tt.name, i, tt.isinst) - } - i = u.IsTemplate() - if i != tt.istmpl { - t.Errorf("NewUnitNameInfo(%s).IsTemplate returned %t, want %t", tt.name, i, tt.istmpl) - } - } - - bad := []string{"foo", "bar@baz"} - for _, tt := range bad { - if NewUnitNameInfo(tt) != nil { - t.Errorf("NewUnitNameInfo returned non-nil InstanceUnit unexpectedly") - } - } - -} - -func TestDeserialize(t *testing.T) { - contents := ` -This=Ignored -[Unit] -;ignore this guy -Description = Foo - -[Service] -ExecStart=echo "ping"; -ExecStop=echo "pong" -# ignore me, too -ExecStop=echo post - -[X-Fleet] -MachineMetadata=foo=bar -MachineMetadata=baz=qux -` - - expected := map[string]map[string][]string{ - "Unit": { - "Description": {"Foo"}, - }, - "Service": { - "ExecStart": {`echo "ping";`}, - "ExecStop": {`echo "pong"`, "echo post"}, - }, - "X-Fleet": { - "MachineMetadata": {"foo=bar", "baz=qux"}, - }, - } - - unitFile, err := NewUnitFile(contents) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) - } - - if !reflect.DeepEqual(expected, unitFile.Contents) { - t.Fatalf("Map func did not produce expected output.\nActual=%v\nExpected=%v", unitFile.Contents, expected) - } -} - -func TestDeserializedUnitGarbage(t *testing.T) { - contents := ` ->>>>>>>>>>>>> -[Service] -ExecStart=jim -# As long as a line has an equals sign, systemd is happy, so we should pass it through -<<<<<<<<<<<=bar -` - expected := map[string]map[string][]string{ - "Service": { - "ExecStart": {"jim"}, - "<<<<<<<<<<<": {"bar"}, - }, - } - unitFile, err := NewUnitFile(contents) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) - } - - if !reflect.DeepEqual(expected, unitFile.Contents) { - t.Fatalf("Map func did not produce expected output.\nActual=%v\nExpected=%v", unitFile.Contents, expected) - } -} - -func TestDeserializeEscapedMultilines(t *testing.T) { - contents := ` -[Service] -ExecStart=echo \ - "pi\ - ng" -ExecStop=\ -echo "po\ -ng" -# comments within continuation should not be ignored -ExecStopPre=echo\ -#pang -ExecStopPost=echo\ -#peng\ -pung -` - expected := map[string]map[string][]string{ - "Service": { - "ExecStart": {`echo "pi ng"`}, - "ExecStop": {`echo "po ng"`}, - "ExecStopPre": {`echo #pang`}, - "ExecStopPost": {`echo #peng pung`}, - }, - } - unitFile, err := NewUnitFile(contents) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) - } - - if !reflect.DeepEqual(expected, unitFile.Contents) { - t.Fatalf("Map func did not produce expected output.\nActual=%v\nExpected=%v", unitFile.Contents, expected) - } -} - -func TestSerializeDeserialize(t *testing.T) { - contents := ` -[Unit] -Description = Foo -` - deserialized, err := NewUnitFile(contents) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) - } - section := deserialized.Contents["Unit"] - if val, ok := section["Description"]; !ok || val[0] != "Foo" { - t.Errorf("Failed to persist data through serialize/deserialize: %v", val) - } - - serialized := deserialized.String() - deserialized, err = NewUnitFile(serialized) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", serialized, err) - } - - section = deserialized.Contents["Unit"] - if val, ok := section["Description"]; !ok || val[0] != "Foo" { - t.Errorf("Failed to persist data through serialize/deserialize: %v", val) - } -} - -func TestDescription(t *testing.T) { - contents := ` -[Unit] -Description = Foo - -[Service] -ExecStart=echo "ping"; -ExecStop=echo "pong"; -` - - unitFile, err := NewUnitFile(contents) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) - } - if unitFile.Description() != "Foo" { - t.Fatalf("Unit.Description is incorrect") - } -} - -func TestDescriptionNotDefined(t *testing.T) { - contents := ` -[Unit] - -[Service] -ExecStart=echo "ping"; -ExecStop=echo "pong"; -` - - unitFile, err := NewUnitFile(contents) - if err != nil { - t.Fatalf("Unexpected error parsing unit %q: %v", contents, err) - } - if unitFile.Description() != "" { - t.Fatalf("Unit.Description is incorrect") - } -} - -func TestBadUnitsFail(t *testing.T) { - bad := []string{ - ` -[Unit] - -[Service] -<<<<<<<<<<<<<<<< -`, - ` -[Unit] -nonsense upon stilts -`, - } - for _, tt := range bad { - if _, err := NewUnitFile(tt); err == nil { - t.Fatalf("Did not get expected error creating Unit from %q", tt) - } - } -} - -func TestParseMultivalueLine(t *testing.T) { - tests := []struct { - in string - out []string - }{ - {`"bar" "ping" "pong"`, []string{`bar`, `ping`, `pong`}}, - {`"bar"`, []string{`bar`}}, - {``, []string{""}}, - {`""`, []string{``}}, - {`"bar`, []string{`"bar`}}, - {`bar"`, []string{`bar"`}}, - {`foo\"bar`, []string{`foo\"bar`}}, - - { - `"bar" "`, - []string{`bar`, ``}, - //TODO(bcwaldon): should be something like this: - // []string{`bar`}, - }, - - { - `"foo\"bar"`, - []string{`foo\bar`}, - //TODO(bcwaldon): should be something like this: - // []string{`foo\"bar`}, - }, - } - for i, tt := range tests { - out := parseMultivalueLine(tt.in) - if !reflect.DeepEqual(tt.out, out) { - t.Errorf("case %d:, epected %v, got %v", i, tt.out, out) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver_test.go b/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver_test.go deleted file mode 100644 index 6d0caa1..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver_test.go +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright 2013-2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package semver - -import ( - "bytes" - "encoding/json" - "errors" - "math/rand" - "reflect" - "testing" - "time" -) - -type fixture struct { - GreaterVersion string - LesserVersion string -} - -var fixtures = []fixture{ - {"0.0.0", "0.0.0-foo"}, - {"0.0.1", "0.0.0"}, - {"1.0.0", "0.9.9"}, - {"0.10.0", "0.9.0"}, - {"0.99.0", "0.10.0"}, - {"2.0.0", "1.2.3"}, - {"0.0.0", "0.0.0-foo"}, - {"0.0.1", "0.0.0"}, - {"1.0.0", "0.9.9"}, - {"0.10.0", "0.9.0"}, - {"0.99.0", "0.10.0"}, - {"2.0.0", "1.2.3"}, - {"0.0.0", "0.0.0-foo"}, - {"0.0.1", "0.0.0"}, - {"1.0.0", "0.9.9"}, - {"0.10.0", "0.9.0"}, - {"0.99.0", "0.10.0"}, - {"2.0.0", "1.2.3"}, - {"1.2.3", "1.2.3-asdf"}, - {"1.2.3", "1.2.3-4"}, - {"1.2.3", "1.2.3-4-foo"}, - {"1.2.3-5-foo", "1.2.3-5"}, - {"1.2.3-5", "1.2.3-4"}, - {"1.2.3-5-foo", "1.2.3-5-Foo"}, - {"3.0.0", "2.7.2+asdf"}, - {"3.0.0+foobar", "2.7.2"}, - {"1.2.3-a.10", "1.2.3-a.5"}, - {"1.2.3-a.b", "1.2.3-a.5"}, - {"1.2.3-a.b", "1.2.3-a"}, - {"1.2.3-a.b.c.10.d.5", "1.2.3-a.b.c.5.d.100"}, - {"1.0.0", "1.0.0-rc.1"}, - {"1.0.0-rc.2", "1.0.0-rc.1"}, - {"1.0.0-rc.1", "1.0.0-beta.11"}, - {"1.0.0-beta.11", "1.0.0-beta.2"}, - {"1.0.0-beta.2", "1.0.0-beta"}, - {"1.0.0-beta", "1.0.0-alpha.beta"}, - {"1.0.0-alpha.beta", "1.0.0-alpha.1"}, - {"1.0.0-alpha.1", "1.0.0-alpha"}, -} - -func TestCompare(t *testing.T) { - for _, v := range fixtures { - gt, err := NewVersion(v.GreaterVersion) - if err != nil { - t.Error(err) - } - - lt, err := NewVersion(v.LesserVersion) - if err != nil { - t.Error(err) - } - - if gt.LessThan(*lt) == true { - t.Errorf("%s should not be less than %s", gt, lt) - } - } -} - -func testString(t *testing.T, orig string, version *Version) { - if orig != version.String() { - t.Errorf("%s != %s", orig, version) - } -} - -func TestString(t *testing.T) { - for _, v := range fixtures { - gt, err := NewVersion(v.GreaterVersion) - if err != nil { - t.Error(err) - } - testString(t, v.GreaterVersion, gt) - - lt, err := NewVersion(v.LesserVersion) - if err != nil { - t.Error(err) - } - testString(t, v.LesserVersion, lt) - } -} - -func shuffleStringSlice(src []string) []string { - dest := make([]string, len(src)) - rand.Seed(time.Now().Unix()) - perm := rand.Perm(len(src)) - for i, v := range perm { - dest[v] = src[i] - } - return dest -} - -func TestSort(t *testing.T) { - sortedVersions := []string{"1.0.0", "1.0.2", "1.2.0", "3.1.1"} - unsortedVersions := shuffleStringSlice(sortedVersions) - - semvers := []*Version{} - for _, v := range unsortedVersions { - sv, err := NewVersion(v) - if err != nil { - t.Fatal(err) - } - semvers = append(semvers, sv) - } - - Sort(semvers) - - for idx, sv := range semvers { - if sv.String() != sortedVersions[idx] { - t.Fatalf("incorrect sort at index %v", idx) - } - } -} - -func TestBumpMajor(t *testing.T) { - version, _ := NewVersion("1.0.0") - version.BumpMajor() - if version.Major != 2 { - t.Fatalf("bumping major on 1.0.0 resulted in %v", version) - } - - version, _ = NewVersion("1.5.2") - version.BumpMajor() - if version.Minor != 0 && version.Patch != 0 { - t.Fatalf("bumping major on 1.5.2 resulted in %v", version) - } - - version, _ = NewVersion("1.0.0+build.1-alpha.1") - version.BumpMajor() - if version.PreRelease != "" && version.PreRelease != "" { - t.Fatalf("bumping major on 1.0.0+build.1-alpha.1 resulted in %v", version) - } -} - -func TestBumpMinor(t *testing.T) { - version, _ := NewVersion("1.0.0") - version.BumpMinor() - - if version.Major != 1 { - t.Fatalf("bumping minor on 1.0.0 resulted in %v", version) - } - - if version.Minor != 1 { - t.Fatalf("bumping major on 1.0.0 resulted in %v", version) - } - - version, _ = NewVersion("1.0.0+build.1-alpha.1") - version.BumpMinor() - if version.PreRelease != "" && version.PreRelease != "" { - t.Fatalf("bumping major on 1.0.0+build.1-alpha.1 resulted in %v", version) - } -} - -func TestBumpPatch(t *testing.T) { - version, _ := NewVersion("1.0.0") - version.BumpPatch() - - if version.Major != 1 { - t.Fatalf("bumping minor on 1.0.0 resulted in %v", version) - } - - if version.Minor != 0 { - t.Fatalf("bumping major on 1.0.0 resulted in %v", version) - } - - if version.Patch != 1 { - t.Fatalf("bumping major on 1.0.0 resulted in %v", version) - } - - version, _ = NewVersion("1.0.0+build.1-alpha.1") - version.BumpPatch() - if version.PreRelease != "" && version.PreRelease != "" { - t.Fatalf("bumping major on 1.0.0+build.1-alpha.1 resulted in %v", version) - } -} - -func TestMust(t *testing.T) { - tests := []struct { - versionStr string - - version *Version - recov interface{} - }{ - { - versionStr: "1.0.0", - version: &Version{Major: 1}, - }, - { - versionStr: "version number", - recov: errors.New("version number is not in dotted-tri format"), - }, - } - - for _, tt := range tests { - func() { - defer func() { - recov := recover() - if !reflect.DeepEqual(tt.recov, recov) { - t.Fatalf("incorrect panic for %q: want %v, got %v", tt.versionStr, tt.recov, recov) - } - }() - - version := Must(NewVersion(tt.versionStr)) - if !reflect.DeepEqual(tt.version, version) { - t.Fatalf("incorrect version for %q: want %+v, got %+v", tt.versionStr, tt.version, version) - } - }() - } -} - -type fixtureJSON struct { - GreaterVersion *Version - LesserVersion *Version -} - -func TestJSON(t *testing.T) { - fj := make([]fixtureJSON, len(fixtures)) - for i, v := range fixtures { - var err error - fj[i].GreaterVersion, err = NewVersion(v.GreaterVersion) - if err != nil { - t.Fatal(err) - } - fj[i].LesserVersion, err = NewVersion(v.LesserVersion) - if err != nil { - t.Fatal(err) - } - } - - fromStrings, err := json.Marshal(fixtures) - if err != nil { - t.Fatal(err) - } - fromVersions, err := json.Marshal(fj) - if err != nil { - t.Fatal(err) - } - if !bytes.Equal(fromStrings, fromVersions) { - t.Errorf("Expected: %s", fromStrings) - t.Errorf("Unexpected: %s", fromVersions) - } - - fromJson := make([]fixtureJSON, 0, len(fj)) - err = json.Unmarshal(fromStrings, &fromJson) - if err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(fromJson, fj) { - t.Error("Expected: ", fj) - t.Error("Unexpected: ", fromJson) - } -} - -func TestBadInput(t *testing.T) { - bad := []string{ - "1.2", - "1.2.3x", - "0x1.3.4", - "-1.2.3", - "1.2.3.4", - } - for _, b := range bad { - if _, err := NewVersion(b); err == nil { - t.Error("Improperly accepted value: ", b) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go deleted file mode 100644 index b1f40e8..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize_test.go +++ /dev/null @@ -1,381 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "bytes" - "fmt" - "reflect" - "testing" -) - -func TestDeserialize(t *testing.T) { - tests := []struct { - input []byte - output []*UnitOption - }{ - // multiple options underneath a section - { - []byte(`[Unit] -Description=Foo -Description=Bar -Requires=baz.service -After=baz.service -`), - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Unit", "Description", "Bar"}, - {"Unit", "Requires", "baz.service"}, - {"Unit", "After", "baz.service"}, - }, - }, - - // multiple sections - { - []byte(`[Unit] -Description=Foo - -[Service] -ExecStart=/usr/bin/sleep infinity - -[X-Third-Party] -Pants=on - -`), - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Service", "ExecStart", "/usr/bin/sleep infinity"}, - {"X-Third-Party", "Pants", "on"}, - }, - }, - - // multiple sections with no options - { - []byte(`[Unit] -[Service] -[X-Third-Party] -`), - []*UnitOption{}, - }, - - // multiple values not special-cased - { - []byte(`[Service] -Environment= "FOO=BAR" "BAZ=QUX" -`), - []*UnitOption{ - {"Service", "Environment", "\"FOO=BAR\" \"BAZ=QUX\""}, - }, - }, - - // line continuations unmodified - { - []byte(`[Unit] -Description= Unnecessarily wrapped \ - words here -`), - []*UnitOption{ - {"Unit", "Description", `Unnecessarily wrapped \ - words here`}, - }, - }, - - // comments ignored - { - []byte(`; comment alpha -# comment bravo -[Unit] -; comment charlie -# comment delta -#Description=Foo -Description=Bar -; comment echo -# comment foxtrot -`), - []*UnitOption{ - {"Unit", "Description", "Bar"}, - }, - }, - - // apparent comment lines inside of line continuations not ignored - { - []byte(`[Unit] -Description=Bar\ -# comment alpha - -Description=Bar\ -# comment bravo \ -Baz -`), - []*UnitOption{ - {"Unit", "Description", "Bar\\\n# comment alpha"}, - {"Unit", "Description", "Bar\\\n# comment bravo \\\nBaz"}, - }, - }, - - // options outside of sections are ignored - { - []byte(`Description=Foo -[Unit] -Description=Bar -`), - []*UnitOption{ - {"Unit", "Description", "Bar"}, - }, - }, - - // garbage outside of sections are ignored - { - []byte(`<<<<<<<< -[Unit] -Description=Bar -`), - []*UnitOption{ - {"Unit", "Description", "Bar"}, - }, - }, - - // garbage used as unit option - { - []byte(`[Unit] -<<<<<<<<=Bar -`), - []*UnitOption{ - {"Unit", "<<<<<<<<", "Bar"}, - }, - }, - - // option name with spaces are valid - { - []byte(`[Unit] -Some Thing = Bar -`), - []*UnitOption{ - {"Unit", "Some Thing", "Bar"}, - }, - }, - - // lack of trailing newline doesn't cause problem for non-continued file - { - []byte(`[Unit] -Description=Bar`), - []*UnitOption{ - {"Unit", "Description", "Bar"}, - }, - }, - - // unit file with continuation but no following line is ok, too - { - []byte(`[Unit] -Description=Bar \`), - []*UnitOption{ - {"Unit", "Description", "Bar \\"}, - }, - }, - - // Assert utf8 characters are preserved - { - []byte(`[©] -µ☃=ÇôrèÕ$`), - []*UnitOption{ - {"©", "µ☃", "ÇôrèÕ$"}, - }, - }, - - // whitespace removed around option name - { - []byte(`[Unit] - Description =words here -`), - []*UnitOption{ - {"Unit", "Description", "words here"}, - }, - }, - - // whitespace around option value stripped - { - []byte(`[Unit] -Description= words here `), - []*UnitOption{ - {"Unit", "Description", "words here"}, - }, - }, - - // whitespace around option value stripped, regardless of continuation - { - []byte(`[Unit] -Description= words here \ - `), - []*UnitOption{ - {"Unit", "Description", "words here \\\n"}, - }, - }, - - // backslash not considered continuation if followed by text - { - []byte(`[Service] -ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" -`), - []*UnitOption{ - {"Service", "ExecStart", `/bin/bash -c "while true; do echo \"ping\"; sleep 1; done"`}, - }, - }, - - // backslash not considered continuation if followed by whitespace, but still trimmed - { - []byte(`[Service] -ExecStart=/bin/bash echo poof \ `), - []*UnitOption{ - {"Service", "ExecStart", `/bin/bash echo poof \`}, - }, - }, - // a long unit file line that's just equal to the maximum permitted length - { - []byte(`[Service] -ExecStart=/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`), - []*UnitOption{ - {"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, - }, - }, - // the same, but with a trailing newline - { - []byte(`[Service] -ExecStart=/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................." -Option=value -`), - []*UnitOption{ - {"Service", "ExecStart", `/bin/bash -c "echo ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................."`}, - {"Service", "Option", "value"}, - }, - }, - } - - assert := func(expect, output []*UnitOption) error { - if len(expect) != len(output) { - return fmt.Errorf("expected %d items, got %d", len(expect), len(output)) - } - - for i := range expect { - if !reflect.DeepEqual(expect[i], output[i]) { - return fmt.Errorf("item %d: expected %v, got %v", i, expect[i], output[i]) - } - } - - return nil - } - - for i, tt := range tests { - output, err := Deserialize(bytes.NewReader(tt.input)) - if err != nil { - t.Errorf("case %d: unexpected error parsing unit: %v", i, err) - continue - } - - err = assert(tt.output, output) - if err != nil { - t.Errorf("case %d: %v", i, err) - t.Log("Expected options:") - logUnitOptionSlice(t, tt.output) - t.Log("Actual options:") - logUnitOptionSlice(t, output) - } - } -} - -func TestDeserializeFail(t *testing.T) { - tests := [][]byte{ - // malformed section header - []byte(`[Unit -Description=Foo -`), - - // garbage following section header - []byte(`[Unit] pants -Description=Foo -`), - - // option without value - []byte(`[Unit] -Description -`), - - // garbage inside of section - []byte(`[Unit] -<<<<<< -Description=Foo -`), - } - - for i, tt := range tests { - output, err := Deserialize(bytes.NewReader(tt)) - if err == nil { - t.Errorf("case %d: unexpected nil error", i) - t.Log("Output:") - logUnitOptionSlice(t, output) - } - } -} - -func logUnitOptionSlice(t *testing.T, opts []*UnitOption) { - for idx, opt := range opts { - t.Logf("%d: %v", idx, opt) - } -} - -func TestDeserializeLineTooLong(t *testing.T) { - tests := [][]byte{ - // section header that's far too long - []byte(`[Seeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeervice] -`), - // sane-looking unit file with a line just greater than the maximum allowed (currently, 2048) - []byte(`[Service] -ExecStart=/bin/bash -c "echo ..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................." -`), - // sane-looking unit file with option value way too long - []byte(` -# test unit file - -[Service] -ExecStartPre=-/usr/bin/docker rm %p -ExecStartPre=-/usr/bin/docker pull busybox -ExecStart=/usr/bin/docker run --rm --name %p --net=host \ - -e "test=1123t" \ - -e "test=1123t" \ - -e "fiz=1123t" \ - -e "buz=1123t" \ - -e "FOO=BARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBABARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARRBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBAR"BARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBABARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARRBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBARBAR" \ - busybox sleep 10 -ExecStop=-/usr/bin/docker kill %p -SyslogIdentifier=busybox -Restart=always -RestartSec=10s -`), - // single arbitrary line that's way too long - []byte(`arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 character arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters arbitrary and extraordinarily long line that is far greater than 2048 characters`), - // sane-looking unit file with option name way too long - []byte(`[Service] -ExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStartExecStart=/bin/true -`), - } - - for i, tt := range tests { - output, err := Deserialize(bytes.NewReader(tt)) - if err != ErrLineTooLong { - t.Errorf("case %d: unexpected err: %v", i, err) - t.Log("Output:") - logUnitOptionSlice(t, output) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go deleted file mode 100644 index 7182327..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/end_to_end_test.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "bytes" - "io/ioutil" - "testing" -) - -func TestDeserializeAndReserialize(t *testing.T) { - tests := []struct { - in string - wout string - }{ - { - `[Service] -ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" -`, - `[Service] -ExecStart=/bin/bash -c "while true; do echo \"ping\"; sleep 1; done" -`}, - { - `[Unit] -Description= Unnecessarily wrapped \ - words here`, - `[Unit] -Description=Unnecessarily wrapped \ - words here -`, - }, - { - `[Unit] -Description=Demo \ - -Requires=docker.service -`, - `[Unit] -Description=Demo \ - -Requires=docker.service -`, - }, - { - `; comment alpha -# comment bravo -[Unit] -; comment charlie -# comment delta -#Description=Foo -Description=Bar -; comment echo -# comment foxtrot -`, - `[Unit] -Description=Bar -`}, - } - for i, tt := range tests { - ds, err := Deserialize(bytes.NewBufferString(tt.in)) - if err != nil { - t.Errorf("case %d: unexpected error parsing unit: %v", i, err) - continue - } - out, err := ioutil.ReadAll(Serialize(ds)) - if err != nil { - t.Errorf("case %d: unexpected error serializing unit: %v", i, err) - continue - } - if g := string(out); g != tt.wout { - t.Errorf("case %d: incorrect output", i) - t.Logf("Expected:\n%#v", tt.wout) - t.Logf("Actual:\n%#v", g) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go deleted file mode 100644 index 36b1a7d..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape_test.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "testing" -) - -func TestUnitNameEscape(t *testing.T) { - tests := []struct { - in string - out string - isPath bool - }{ - // turn empty string path into escaped / - { - in: "", - out: "-", - isPath: true, - }, - // turn redundant ////s into single escaped / - { - in: "/////////", - out: "-", - isPath: true, - }, - // remove all redundant ////s - { - in: "///foo////bar/////tail//////", - out: "foo-bar-tail", - isPath: true, - }, - // leave empty string empty - { - in: "", - out: "", - isPath: false, - }, - // escape leading dot - { - in: ".", - out: `\x2e`, - isPath: true, - }, - // escape leading dot - { - in: "/.", - out: `\x2e`, - isPath: true, - }, - // escape leading dot - { - in: "/////////.", - out: `\x2e`, - isPath: true, - }, - // escape leading dot - { - in: "/////////.///////////////", - out: `\x2e`, - isPath: true, - }, - // escape leading dot - { - in: ".....", - out: `\x2e....`, - isPath: true, - }, - // escape leading dot - { - in: "/.foo/.bar", - out: `\x2efoo-.bar`, - isPath: true, - }, - // escape leading dot - { - in: ".foo/.bar", - out: `\x2efoo-.bar`, - isPath: true, - }, - // escape leading dot - { - in: ".foo/.bar", - out: `\x2efoo-.bar`, - isPath: false, - }, - // escape disallowed - { - in: `///..\-!#??///`, - out: `---..\x5c\x2d\x21\x23\x3f\x3f---`, - isPath: false, - }, - // escape disallowed - { - in: `///..\-!#??///`, - out: `\x2e.\x5c\x2d\x21\x23\x3f\x3f`, - isPath: true, - }, - // escape real-world example - { - in: `user-cloudinit@/var/lib/coreos/vagrant/vagrantfile-user-data.service`, - out: `user\x2dcloudinit\x40-var-lib-coreos-vagrant-vagrantfile\x2duser\x2ddata.service`, - isPath: false, - }, - } - - for i, tt := range tests { - var s string - if tt.isPath { - s = UnitNamePathEscape(tt.in) - } else { - s = UnitNameEscape(tt.in) - } - if s != tt.out { - t.Errorf("case %d: failed escaping %v isPath: %v - expected %v, got %v", i, tt.in, tt.isPath, tt.out, s) - } - } -} - -func TestUnitNameUnescape(t *testing.T) { - tests := []struct { - in string - out string - isPath bool - }{ - // turn empty string path into / - { - in: "", - out: "/", - isPath: true, - }, - // leave empty string empty - { - in: "", - out: "", - isPath: false, - }, - // turn ////s into - { - in: "---------", - out: "/////////", - isPath: true, - }, - // unescape hex - { - in: `---..\x5c\x2d\x21\x23\x3f\x3f---`, - out: `///..\-!#??///`, - isPath: false, - }, - // unescape hex - { - in: `\x2e.\x5c\x2d\x21\x23\x3f\x3f`, - out: `/..\-!#??`, - isPath: true, - }, - // unescape hex, retain invalids - { - in: `\x2e.\x5c\x2d\xaZ\x.o\x21\x23\x3f\x3f`, - out: `/..\-\xaZ\x.o!#??`, - isPath: true, - }, - // unescape hex, retain invalids, partial tail - { - in: `\x2e.\x5c\x\x2d\xaZ\x.o\x21\x23\x3f\x3f\x3`, - out: `/..\\x-\xaZ\x.o!#??\x3`, - isPath: true, - }, - // unescape hex, retain invalids, partial tail - { - in: `\x2e.\x5c\x\x2d\xaZ\x.o\x21\x23\x3f\x3f\x`, - out: `/..\\x-\xaZ\x.o!#??\x`, - isPath: true, - }, - // unescape hex, retain invalids, partial tail - { - in: `\x2e.\x5c\x\x2d\xaZ\x.o\x21\x23\x3f\x3f\`, - out: `/..\\x-\xaZ\x.o!#??\`, - isPath: true, - }, - // unescape real-world example - { - in: `user\x2dcloudinit\x40-var-lib-coreos-vagrant-vagrantfile\x2duser\x2ddata.service`, - out: `user-cloudinit@/var/lib/coreos/vagrant/vagrantfile-user-data.service`, - isPath: false, - }, - } - - for i, tt := range tests { - var s string - if tt.isPath { - s = UnitNamePathUnescape(tt.in) - } else { - s = UnitNameUnescape(tt.in) - } - if s != tt.out { - t.Errorf("case %d: failed unescaping %v isPath: %v - expected %v, got %v", i, tt.in, tt.isPath, tt.out, s) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go deleted file mode 100644 index 0765f03..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option_test.go +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "testing" -) - -func TestAllMatch(t *testing.T) { - tests := []struct { - u1 []*UnitOption - u2 []*UnitOption - match bool - }{ - // empty lists match - { - u1: []*UnitOption{}, - u2: []*UnitOption{}, - match: true, - }, - - // simple match of a single option - { - u1: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - }, - u2: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - }, - match: true, - }, - - // single option mismatched - { - u1: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - }, - u2: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "BAR"}, - }, - match: false, - }, - - // multiple options match - { - u1: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - }, - u2: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - }, - match: true, - }, - - // mismatch length - { - u1: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, - }, - u2: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - }, - match: false, - }, - - // multiple options misordered - { - u1: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - }, - u2: []*UnitOption{ - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - {Section: "Unit", Name: "Description", Value: "FOO"}, - }, - match: false, - }, - - // interleaved sections mismatch - { - u1: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - {Section: "Service", Name: "ExecStop", Value: "/bin/true"}, - }, - u2: []*UnitOption{ - {Section: "Unit", Name: "Description", Value: "FOO"}, - {Section: "Service", Name: "ExecStart", Value: "/bin/true"}, - {Section: "Unit", Name: "BindsTo", Value: "bar.service"}, - {Section: "Service", Name: "ExecStop", Value: "/bin/true"}, - }, - match: false, - }, - } - - for i, tt := range tests { - match := AllMatch(tt.u1, tt.u2) - if match != tt.match { - t.Errorf("case %d: failed comparing u1 to u2 - expected match=%t, got %t", i, tt.match, match) - } - - match = AllMatch(tt.u2, tt.u1) - if match != tt.match { - t.Errorf("case %d: failed comparing u2 to u1 - expected match=%t, got %t", i, tt.match, match) - } - } -} - -func TestMatch(t *testing.T) { - tests := []struct { - o1 *UnitOption - o2 *UnitOption - match bool - }{ - // empty options match - { - o1: &UnitOption{}, - o2: &UnitOption{}, - match: true, - }, - - // all fields match - { - o1: &UnitOption{ - Section: "Unit", - Name: "Description", - Value: "FOO", - }, - o2: &UnitOption{ - Section: "Unit", - Name: "Description", - Value: "FOO", - }, - match: true, - }, - - // Section mismatch - { - o1: &UnitOption{ - Section: "Unit", - Name: "Description", - Value: "FOO", - }, - o2: &UnitOption{ - Section: "X-Other", - Name: "Description", - Value: "FOO", - }, - match: false, - }, - - // Name mismatch - { - o1: &UnitOption{ - Section: "Unit", - Name: "Description", - Value: "FOO", - }, - o2: &UnitOption{ - Section: "Unit", - Name: "BindsTo", - Value: "FOO", - }, - match: false, - }, - - // Value mismatch - { - o1: &UnitOption{ - Section: "Unit", - Name: "Description", - Value: "FOO", - }, - o2: &UnitOption{ - Section: "Unit", - Name: "Description", - Value: "BAR", - }, - match: false, - }, - } - - for i, tt := range tests { - match := tt.o1.Match(tt.o2) - if match != tt.match { - t.Errorf("case %d: failed comparing o1 to o2 - expected match=%t, got %t", i, tt.match, match) - } - - match = tt.o2.Match(tt.o1) - if match != tt.match { - t.Errorf("case %d: failed comparing o2 to o1 - expected match=%t, got %t", i, tt.match, match) - } - } -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go deleted file mode 100644 index 76bf394..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize_test.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "io/ioutil" - "testing" -) - -func TestSerialize(t *testing.T) { - tests := []struct { - input []*UnitOption - output string - }{ - // no options results in empty file - { - []*UnitOption{}, - ``, - }, - - // options with same section share the header - { - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Unit", "BindsTo", "bar.service"}, - }, - `[Unit] -Description=Foo -BindsTo=bar.service -`, - }, - - // options with same name are not combined - { - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Unit", "Description", "Bar"}, - }, - `[Unit] -Description=Foo -Description=Bar -`, - }, - - // multiple options printed under different section headers - { - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Service", "ExecStart", "/usr/bin/sleep infinity"}, - }, - `[Unit] -Description=Foo - -[Service] -ExecStart=/usr/bin/sleep infinity -`, - }, - - // options are grouped into sections - { - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Service", "ExecStart", "/usr/bin/sleep infinity"}, - {"Unit", "BindsTo", "bar.service"}, - }, - `[Unit] -Description=Foo -BindsTo=bar.service - -[Service] -ExecStart=/usr/bin/sleep infinity -`, - }, - - // options are ordered within groups, and sections are ordered in the order in which they were first seen - { - []*UnitOption{ - {"Unit", "Description", "Foo"}, - {"Service", "ExecStart", "/usr/bin/sleep infinity"}, - {"Unit", "BindsTo", "bar.service"}, - {"X-Foo", "Bar", "baz"}, - {"Service", "ExecStop", "/usr/bin/sleep 1"}, - {"Unit", "Documentation", "https://foo.com"}, - }, - `[Unit] -Description=Foo -BindsTo=bar.service -Documentation=https://foo.com - -[Service] -ExecStart=/usr/bin/sleep infinity -ExecStop=/usr/bin/sleep 1 - -[X-Foo] -Bar=baz -`, - }, - - // utf8 characters are not a problem - { - []*UnitOption{ - {"©", "µ☃", "ÇôrèÕ$"}, - }, - `[©] -µ☃=ÇôrèÕ$ -`, - }, - - // no verification is done on section names - { - []*UnitOption{ - {"Un\nit", "Description", "Foo"}, - }, - `[Un -it] -Description=Foo -`, - }, - - // no verification is done on option names - { - []*UnitOption{ - {"Unit", "Desc\nription", "Foo"}, - }, - `[Unit] -Desc -ription=Foo -`, - }, - - // no verification is done on option values - { - []*UnitOption{ - {"Unit", "Description", "Fo\no"}, - }, - `[Unit] -Description=Fo -o -`, - }, - } - - for i, tt := range tests { - outReader := Serialize(tt.input) - outBytes, err := ioutil.ReadAll(outReader) - if err != nil { - t.Errorf("case %d: encountered error while reading output: %v", i, err) - continue - } - - output := string(outBytes) - if tt.output != output { - t.Errorf("case %d: incorrect output", i) - t.Logf("Expected:\n%s", tt.output) - t.Logf("Actual:\n%s", output) - } - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE new file mode 100644 index 0000000..902306b --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 Sean Dolphin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE new file mode 100644 index 0000000..9e4bd4d --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2015 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE new file mode 100644 index 0000000..dc91298 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE @@ -0,0 +1,16 @@ +libcontainer +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (http://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see http://www.bis.doc.gov + +See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke () +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE new file mode 100644 index 0000000..1b1b192 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE @@ -0,0 +1,31 @@ +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE new file mode 100644 index 0000000..4e11de1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke () +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License new file mode 100644 index 0000000..05c783c --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License new file mode 100644 index 0000000..480a328 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License @@ -0,0 +1,19 @@ +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md new file mode 100644 index 0000000..2199945 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md @@ -0,0 +1,23 @@ +objx - by Mat Ryer and Tyler Bunnell + +The MIT License (MIT) + +Copyright (c) 2014 Stretchr, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE new file mode 100644 index 0000000..8b22cdb --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright © 2012-2015 Oliver Eilhard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE new file mode 100644 index 0000000..97cec18 --- /dev/null +++ b/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE @@ -0,0 +1,190 @@ + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo deleted file mode 100644 index ca2b722..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/testdata/cpuinfo +++ /dev/null @@ -1,251 +0,0 @@ -processor : 0 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 0 -siblings : 6 -core id : 0 -cpu cores : 6 -apicid : 0 -initial apicid : 0 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 1 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 0 -siblings : 6 -core id : 1 -cpu cores : 6 -apicid : 2 -initial apicid : 2 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 2 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 0 -siblings : 6 -core id : 2 -cpu cores : 6 -apicid : 4 -initial apicid : 4 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 3 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 1 -siblings : 6 -core id : 3 -cpu cores : 6 -apicid : 16 -initial apicid : 16 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 4 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 1 -siblings : 6 -core id : 4 -cpu cores : 6 -apicid : 18 -initial apicid : 18 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 5 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 1 -siblings : 6 -core id : 5 -cpu cores : 6 -apicid : 20 -initial apicid : 20 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 6 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 2661.000 -cache size : 12288 KB -physical id : 0 -siblings : 6 -core id : 0 -cpu cores : 6 -apicid : 1 -initial apicid : 1 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 7 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 2661.000 -cache size : 12288 KB -physical id : 0 -siblings : 6 -core id : 1 -cpu cores : 6 -apicid : 3 -initial apicid : 3 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 8 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 0 -siblings : 6 -core id : 2 -cpu cores : 6 -apicid : 5 -initial apicid : 5 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 9 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 2661.000 -cache size : 12288 KB -physical id : 1 -siblings : 6 -core id : 3 -cpu cores : 6 -apicid : 17 -initial apicid : 17 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - -processor : 10 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 1596.000 -cache size : 12288 KB -physical id : 1 -siblings : 6 -core id : 4 -cpu cores : 6 -apicid : 19 -initial apicid : 19 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual -processor : 11 -cpu family : 6 -stepping : 2 -microcode : 0x10 -cpu MHz : 2661.000 -cache size : 12288 KB -physical id : 1 -siblings : 6 -core id : 5 -cpu cores : 6 -apicid : 21 -initial apicid : 21 -fpu : yes -fpu_exception : yes -cpuid level : 11 -wp : yes -bogomips : 5333.60 -clflush size : 64 -cache_alignment : 64 -address sizes : 40 bits physical, 48 bits virtual - diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go deleted file mode 100644 index 0c3f158..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/topology_test.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package machine - -import ( - "io/ioutil" - "reflect" - "testing" - - info "github.com/google/cadvisor/info/v1" - "github.com/google/cadvisor/utils/sysfs" - "github.com/google/cadvisor/utils/sysfs/fakesysfs" -) - -func TestTopology(t *testing.T) { - testfile := "./testdata/cpuinfo" - testcpuinfo, err := ioutil.ReadFile(testfile) - if err != nil { - t.Fatalf("unable to read input test file %s", testfile) - } - sysFs := &fakesysfs.FakeSysFs{} - c := sysfs.CacheInfo{ - Size: 32 * 1024, - Type: "unified", - Level: 1, - Cpus: 2, - } - sysFs.SetCacheInfo(c) - topology, numCores, err := GetTopology(sysFs, string(testcpuinfo)) - if err != nil { - t.Errorf("failed to get topology for sample cpuinfo %s", string(testcpuinfo)) - } - - if numCores != 12 { - t.Errorf("Expected 12 cores, found %d", numCores) - } - expected_topology := []info.Node{} - numNodes := 2 - numCoresPerNode := 3 - numThreads := 2 - cache := info.Cache{ - Size: 32 * 1024, - Type: "unified", - Level: 1, - } - for i := 0; i < numNodes; i++ { - node := info.Node{Id: i} - // Copy over Memory from result. TODO(rjnagal): Use memory from fake. - node.Memory = topology[i].Memory - for j := 0; j < numCoresPerNode; j++ { - core := info.Core{Id: i*numCoresPerNode + j} - core.Caches = append(core.Caches, cache) - for k := 0; k < numThreads; k++ { - core.Threads = append(core.Threads, k*numCoresPerNode*numNodes+core.Id) - } - node.Cores = append(node.Cores, core) - } - expected_topology = append(expected_topology, node) - } - - if !reflect.DeepEqual(topology, expected_topology) { - t.Errorf("Expected topology %+v, got %+v", expected_topology, topology) - } -} - -func TestTopologyWithSimpleCpuinfo(t *testing.T) { - sysFs := &fakesysfs.FakeSysFs{} - c := sysfs.CacheInfo{ - Size: 32 * 1024, - Type: "unified", - Level: 1, - Cpus: 1, - } - sysFs.SetCacheInfo(c) - topology, numCores, err := GetTopology(sysFs, "processor\t: 0\n") - if err != nil { - t.Errorf("Expected cpuinfo with no topology data to succeed.") - } - node := info.Node{Id: 0} - core := info.Core{Id: 0} - core.Threads = append(core.Threads, 0) - cache := info.Cache{ - Size: 32 * 1024, - Type: "unified", - Level: 1, - } - core.Caches = append(core.Caches, cache) - node.Cores = append(node.Cores, core) - // Copy over Memory from result. TODO(rjnagal): Use memory from fake. - node.Memory = topology[0].Memory - expected := []info.Node{node} - if !reflect.DeepEqual(topology, expected) { - t.Errorf("Expected topology %+v, got %+v", expected, topology) - } - if numCores != 1 { - t.Errorf("Expected 1 core, found %d", numCores) - } -} - -func TestTopologyEmptyCpuinfo(t *testing.T) { - _, _, err := GetTopology(&fakesysfs.FakeSysFs{}, "") - if err == nil { - t.Errorf("Expected empty cpuinfo to fail.") - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go deleted file mode 100644 index 7da55e6..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser_test.go +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package oomparser - -import ( - "bufio" - "os" - "reflect" - "testing" - "time" -) - -const startLine = "Jan 21 22:01:49 localhost kernel: [62278.816267] ruby invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0" -const endLine = "Jan 21 22:01:49 localhost kernel: [62279.421192] Killed process 19667 (evilprogram2) total-vm:1460016kB, anon-rss:1414008kB, file-rss:4kB" -const containerLine = "Jan 26 14:10:07 kateknister0.mtv.corp.google.com kernel: [1814368.465205] Task in /mem2 killed as a result of limit of /mem3" -const containerLogFile = "containerOomExampleLog.txt" -const systemLogFile = "systemOomExampleLog.txt" - -func createExpectedContainerOomInstance(t *testing.T) *OomInstance { - const longForm = "Jan _2 15:04:05 2006" - deathTime, err := time.ParseInLocation(longForm, "Jan 5 15:19:27 2015", time.Local) - if err != nil { - t.Fatalf("could not parse expected time when creating expected container oom instance. Had error %v", err) - return nil - } - return &OomInstance{ - Pid: 13536, - ProcessName: "memorymonster", - TimeOfDeath: deathTime, - ContainerName: "/mem2", - VictimContainerName: "/mem3", - } -} - -func createExpectedSystemOomInstance(t *testing.T) *OomInstance { - const longForm = "Jan _2 15:04:05 2006" - deathTime, err := time.ParseInLocation(longForm, "Jan 28 19:58:45 2015", time.Local) - if err != nil { - t.Fatalf("could not parse expected time when creating expected system oom instance. Had error %v", err) - return nil - } - return &OomInstance{ - Pid: 1532, - ProcessName: "badsysprogram", - TimeOfDeath: deathTime, - ContainerName: "/", - VictimContainerName: "/", - } -} - -func TestGetContainerName(t *testing.T) { - currentOomInstance := new(OomInstance) - err := getContainerName(startLine, currentOomInstance) - if err != nil { - t.Errorf("bad line fed to getContainerName should yield no error, but had error %v", err) - } - if currentOomInstance.ContainerName != "" { - t.Errorf("bad line fed to getContainerName yielded no container name but set it to %s", currentOomInstance.ContainerName) - } - err = getContainerName(containerLine, currentOomInstance) - if err != nil { - t.Errorf("container line fed to getContainerName should yield no error, but had error %v", err) - } - if currentOomInstance.ContainerName != "/mem2" { - t.Errorf("getContainerName should have set containerName to /mem2, not %s", currentOomInstance.ContainerName) - } - if currentOomInstance.VictimContainerName != "/mem3" { - t.Errorf("getContainerName should have set victimContainerName to /mem3, not %s", currentOomInstance.VictimContainerName) - } -} - -func TestGetProcessNamePid(t *testing.T) { - currentOomInstance := new(OomInstance) - couldParseLine, err := getProcessNamePid(startLine, currentOomInstance) - if err != nil { - t.Errorf("bad line fed to getProcessNamePid should yield no error, but had error %v", err) - } - if couldParseLine { - t.Errorf("bad line fed to getProcessNamePid should return false but returned %v", couldParseLine) - } - - const longForm = "Jan _2 15:04:05 2006" - correctTime, err := time.ParseInLocation(longForm, "Jan 21 22:01:49 2015", time.Local) - couldParseLine, err = getProcessNamePid(endLine, currentOomInstance) - if err != nil { - t.Errorf("good line fed to getProcessNamePid should yield no error, but had error %v", err) - } - if !couldParseLine { - t.Errorf("good line fed to getProcessNamePid should return true but returned %v", couldParseLine) - } - if currentOomInstance.ProcessName != "evilprogram2" { - t.Errorf("getProcessNamePid should have set processName to evilprogram2, not %s", currentOomInstance.ProcessName) - } - if currentOomInstance.Pid != 19667 { - t.Errorf("getProcessNamePid should have set PID to 19667, not %d", currentOomInstance.Pid) - } - if !correctTime.Equal(currentOomInstance.TimeOfDeath) { - t.Errorf("getProcessNamePid should have set date to %v, not %v", correctTime, currentOomInstance.TimeOfDeath) - } -} - -func TestCheckIfStartOfMessages(t *testing.T) { - couldParseLine := checkIfStartOfOomMessages(endLine) - if couldParseLine { - t.Errorf("bad line fed to checkIfStartOfMessages should return false but returned %v", couldParseLine) - } - couldParseLine = checkIfStartOfOomMessages(startLine) - if !couldParseLine { - t.Errorf("start line fed to checkIfStartOfMessages should return true but returned %v", couldParseLine) - } -} - -func TestStreamOomsContainer(t *testing.T) { - expectedContainerOomInstance := createExpectedContainerOomInstance(t) - helpTestStreamOoms(expectedContainerOomInstance, containerLogFile, t) -} - -func TestStreamOomsSystem(t *testing.T) { - expectedSystemOomInstance := createExpectedSystemOomInstance(t) - helpTestStreamOoms(expectedSystemOomInstance, systemLogFile, t) -} - -func helpTestStreamOoms(oomCheckInstance *OomInstance, sysFile string, t *testing.T) { - outStream := make(chan *OomInstance) - oomLog := mockOomParser(sysFile, t) - timeout := make(chan bool, 1) - go func() { - time.Sleep(1 * time.Second) - timeout <- true - }() - - go oomLog.StreamOoms(outStream) - - select { - case oomInstance := <-outStream: - if reflect.DeepEqual(*oomCheckInstance, *oomInstance) { - t.Errorf("wrong instance returned. Expected %v and got %v", - oomCheckInstance, oomInstance) - } - case <-timeout: - t.Error( - "timeout happened before oomInstance was found in test file") - } -} - -func mockOomParser(sysFile string, t *testing.T) *OomParser { - file, err := os.Open(sysFile) - if err != nil { - t.Errorf("had an error opening file: %v", err) - } - return &OomParser{ - ioreader: bufio.NewReader(file), - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go deleted file mode 100644 index 97df16b..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo_test.go +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sysinfo - -import ( - "testing" - - info "github.com/google/cadvisor/info/v1" - "github.com/google/cadvisor/utils/sysfs" - "github.com/google/cadvisor/utils/sysfs/fakesysfs" -) - -func TestGetBlockDeviceInfo(t *testing.T) { - fakeSys := fakesysfs.FakeSysFs{} - disks, err := GetBlockDeviceInfo(&fakeSys) - if err != nil { - t.Errorf("expected call to GetBlockDeviceInfo() to succeed. Failed with %s", err) - } - if len(disks) != 1 { - t.Errorf("expected to get one disk entry. Got %d", len(disks)) - } - key := "8:0" - disk, ok := disks[key] - if !ok { - t.Fatalf("expected key 8:0 to exist in the disk map.") - } - if disk.Name != "sda" { - t.Errorf("expected to get disk named sda. Got %q", disk.Name) - } - size := uint64(1234567 * 512) - if disk.Size != size { - t.Errorf("expected to get disk size of %d. Got %d", size, disk.Size) - } - if disk.Scheduler != "cfq" { - t.Errorf("expected to get scheduler type of cfq. Got %q", disk.Scheduler) - } -} - -func TestGetNetworkDevices(t *testing.T) { - fakeSys := fakesysfs.FakeSysFs{} - fakeSys.SetEntryName("eth0") - devs, err := GetNetworkDevices(&fakeSys) - if err != nil { - t.Errorf("expected call to GetNetworkDevices() to succeed. Failed with %s", err) - } - if len(devs) != 1 { - t.Errorf("expected to get one network device. Got %d", len(devs)) - } - eth := devs[0] - if eth.Name != "eth0" { - t.Errorf("expected to find device with name eth0. Found name %q", eth.Name) - } - if eth.Mtu != 1024 { - t.Errorf("expected mtu to be set to 1024. Found %d", eth.Mtu) - } - if eth.Speed != 1000 { - t.Errorf("expected device speed to be set to 1000. Found %d", eth.Speed) - } - if eth.MacAddress != "42:01:02:03:04:f4" { - t.Errorf("expected mac address to be '42:01:02:03:04:f4'. Found %q", eth.MacAddress) - } -} - -func TestIgnoredNetworkDevices(t *testing.T) { - fakeSys := fakesysfs.FakeSysFs{} - ignoredDevices := []string{"veth1234", "lo", "docker0"} - for _, name := range ignoredDevices { - fakeSys.SetEntryName(name) - devs, err := GetNetworkDevices(&fakeSys) - if err != nil { - t.Errorf("expected call to GetNetworkDevices() to succeed. Failed with %s", err) - } - if len(devs) != 0 { - t.Errorf("expected dev %s to be ignored, but got info %+v", name, devs) - } - } -} - -func TestGetCacheInfo(t *testing.T) { - fakeSys := &fakesysfs.FakeSysFs{} - cacheInfo := sysfs.CacheInfo{ - Size: 1024, - Type: "Data", - Level: 3, - Cpus: 16, - } - fakeSys.SetCacheInfo(cacheInfo) - caches, err := GetCacheInfo(fakeSys, 0) - if err != nil { - t.Errorf("expected call to GetCacheInfo() to succeed. Failed with %s", err) - } - if len(caches) != 1 { - t.Errorf("expected to get one cache. Got %d", len(caches)) - } - if caches[0] != cacheInfo { - t.Errorf("expected to find cacheinfo %+v. Got %+v", cacheInfo, caches[0]) - } -} - -func TestGetNetworkStats(t *testing.T) { - expected_stats := info.InterfaceStats{ - Name: "eth0", - RxBytes: 1024, - RxPackets: 1024, - RxErrors: 1024, - RxDropped: 1024, - TxBytes: 1024, - TxPackets: 1024, - TxErrors: 1024, - TxDropped: 1024, - } - fakeSys := &fakesysfs.FakeSysFs{} - netStats, err := getNetworkStats("eth0", fakeSys) - if err != nil { - t.Errorf("call to getNetworkStats() failed with %s", err) - } - if expected_stats != netStats { - t.Errorf("expected to get stats %+v, got %+v", expected_stats, netStats) - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go deleted file mode 100644 index 76b7778..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store_test.go +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package utils - -import ( - "testing" - "time" - - "github.com/stretchr/testify/assert" -) - -func createTime(id int) time.Time { - var zero time.Time - return zero.Add(time.Duration(id+1) * time.Second) -} - -func expectSize(t *testing.T, sb *TimedStore, expectedSize int) { - if sb.Size() != expectedSize { - t.Errorf("Expected size %v, got %v", expectedSize, sb.Size()) - } -} - -func expectAllElements(t *testing.T, sb *TimedStore, expected []int) { - size := sb.Size() - els := make([]interface{}, size) - for i := 0; i < size; i++ { - els[i] = sb.Get(size - i - 1) - } - expectElements(t, []interface{}(els), expected) -} - -func expectElements(t *testing.T, actual []interface{}, expected []int) { - if len(actual) != len(expected) { - t.Errorf("Expected elements %v, got %v", expected, actual) - return - } - for i, el := range actual { - if el.(int) != expected[i] { - t.Errorf("Expected elements %v, got %v", expected, actual) - return - } - } -} - -func TestAdd(t *testing.T) { - sb := NewTimedStore(5*time.Second, 100) - - // Add 1. - sb.Add(createTime(0), 0) - expectSize(t, sb, 1) - expectAllElements(t, sb, []int{0}) - - // Fill the buffer. - for i := 1; i <= 5; i++ { - expectSize(t, sb, i) - sb.Add(createTime(i), i) - } - expectSize(t, sb, 5) - expectAllElements(t, sb, []int{1, 2, 3, 4, 5}) - - // Add more than is available in the buffer - sb.Add(createTime(6), 6) - expectSize(t, sb, 5) - expectAllElements(t, sb, []int{2, 3, 4, 5, 6}) - - // Replace all elements. - for i := 7; i <= 10; i++ { - sb.Add(createTime(i), i) - } - expectSize(t, sb, 5) - expectAllElements(t, sb, []int{6, 7, 8, 9, 10}) -} - -func TestGet(t *testing.T) { - sb := NewTimedStore(5*time.Second, -1) - sb.Add(createTime(1), 1) - sb.Add(createTime(2), 2) - sb.Add(createTime(3), 3) - expectSize(t, sb, 3) - - assert := assert.New(t) - assert.Equal(sb.Get(0).(int), 3) - assert.Equal(sb.Get(1).(int), 2) - assert.Equal(sb.Get(2).(int), 1) -} - -func TestInTimeRange(t *testing.T) { - sb := NewTimedStore(5*time.Second, -1) - assert := assert.New(t) - - var empty time.Time - - // No elements. - assert.Empty(sb.InTimeRange(createTime(0), createTime(5), 10)) - assert.Empty(sb.InTimeRange(createTime(0), empty, 10)) - assert.Empty(sb.InTimeRange(empty, createTime(5), 10)) - assert.Empty(sb.InTimeRange(empty, empty, 10)) - - // One element. - sb.Add(createTime(1), 1) - expectSize(t, sb, 1) - expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 10), []int{1}) - expectElements(t, sb.InTimeRange(createTime(0), createTime(1), 10), []int{1}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(1), 10), []int{1}) - assert.Empty(sb.InTimeRange(createTime(2), createTime(5), 10)) - - // Two element. - sb.Add(createTime(2), 2) - expectSize(t, sb, 2) - expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(createTime(0), createTime(2), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(2), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(1), 10), []int{1}) - expectElements(t, sb.InTimeRange(createTime(2), createTime(2), 10), []int{2}) - assert.Empty(sb.InTimeRange(createTime(3), createTime(5), 10)) - - // Many elements. - sb.Add(createTime(3), 3) - sb.Add(createTime(4), 4) - expectSize(t, sb, 4) - expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(0), createTime(5), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(0), createTime(4), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(4), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(0), createTime(2), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(createTime(1), createTime(2), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(createTime(2), createTime(3), 10), []int{2, 3}) - expectElements(t, sb.InTimeRange(createTime(3), createTime(4), 10), []int{3, 4}) - expectElements(t, sb.InTimeRange(createTime(3), createTime(5), 10), []int{3, 4}) - assert.Empty(sb.InTimeRange(createTime(5), createTime(5), 10)) - - // Start and end time ignores maxResults. - expectElements(t, sb.InTimeRange(createTime(1), createTime(5), 1), []int{1, 2, 3, 4}) - - // No start time. - expectElements(t, sb.InTimeRange(empty, createTime(5), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(empty, createTime(4), 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(empty, createTime(3), 10), []int{1, 2, 3}) - expectElements(t, sb.InTimeRange(empty, createTime(2), 10), []int{1, 2}) - expectElements(t, sb.InTimeRange(empty, createTime(1), 10), []int{1}) - - // No end time. - expectElements(t, sb.InTimeRange(createTime(0), empty, 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(1), empty, 10), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(2), empty, 10), []int{2, 3, 4}) - expectElements(t, sb.InTimeRange(createTime(3), empty, 10), []int{3, 4}) - expectElements(t, sb.InTimeRange(createTime(4), empty, 10), []int{4}) - - // No start or end time. - expectElements(t, sb.InTimeRange(empty, empty, 10), []int{1, 2, 3, 4}) - - // Start after data. - assert.Empty(sb.InTimeRange(createTime(5), createTime(5), 10)) - assert.Empty(sb.InTimeRange(createTime(5), empty, 10)) - - // End before data. - assert.Empty(sb.InTimeRange(createTime(0), createTime(0), 10)) - assert.Empty(sb.InTimeRange(empty, createTime(0), 10)) -} - -func TestInTimeRangeWithLimit(t *testing.T) { - sb := NewTimedStore(5*time.Second, -1) - sb.Add(createTime(1), 1) - sb.Add(createTime(2), 2) - sb.Add(createTime(3), 3) - sb.Add(createTime(4), 4) - expectSize(t, sb, 4) - - var empty time.Time - - // Limit cuts off from latest timestamp. - expectElements(t, sb.InTimeRange(empty, empty, 4), []int{1, 2, 3, 4}) - expectElements(t, sb.InTimeRange(empty, empty, 3), []int{2, 3, 4}) - expectElements(t, sb.InTimeRange(empty, empty, 2), []int{3, 4}) - expectElements(t, sb.InTimeRange(empty, empty, 1), []int{4}) - assert.Empty(t, sb.InTimeRange(empty, empty, 0)) -} - -func TestLimitedSize(t *testing.T) { - sb := NewTimedStore(time.Hour, 5) - - // Add 1. - sb.Add(createTime(0), 0) - expectSize(t, sb, 1) - expectAllElements(t, sb, []int{0}) - - // Fill the buffer. - for i := 1; i <= 5; i++ { - expectSize(t, sb, i) - sb.Add(createTime(i), i) - } - expectSize(t, sb, 5) - expectAllElements(t, sb, []int{1, 2, 3, 4, 5}) - - // Add more than is available in the buffer - sb.Add(createTime(6), 6) - expectSize(t, sb, 5) - expectAllElements(t, sb, []int{2, 3, 4, 5, 6}) - - // Replace all elements. - for i := 7; i <= 10; i++ { - sb.Add(createTime(i), i) - } - expectSize(t, sb, 5) - expectAllElements(t, sb, []int{6, 7, 8, 9, 10}) -} diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go b/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go deleted file mode 100644 index 21c8f16..0000000 --- a/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork_test.go +++ /dev/null @@ -1,129 +0,0 @@ -package clockwork - -import ( - "reflect" - "testing" - "time" -) - -func TestFakeClockAfter(t *testing.T) { - fc := &fakeClock{} - - zero := fc.After(0) - select { - case <-zero: - default: - t.Errorf("zero did not return!") - } - one := fc.After(1) - two := fc.After(2) - six := fc.After(6) - ten := fc.After(10) - fc.Advance(1) - select { - case <-one: - default: - t.Errorf("one did not return!") - } - select { - case <-two: - t.Errorf("two returned prematurely!") - case <-six: - t.Errorf("six returned prematurely!") - case <-ten: - t.Errorf("ten returned prematurely!") - default: - } - fc.Advance(1) - select { - case <-two: - default: - t.Errorf("two did not return!") - } - select { - case <-six: - t.Errorf("six returned prematurely!") - case <-ten: - t.Errorf("ten returned prematurely!") - default: - } - fc.Advance(1) - select { - case <-six: - t.Errorf("six returned prematurely!") - case <-ten: - t.Errorf("ten returned prematurely!") - default: - } - fc.Advance(3) - select { - case <-six: - default: - t.Errorf("six did not return!") - } - select { - case <-ten: - t.Errorf("ten returned prematurely!") - default: - } - fc.Advance(100) - select { - case <-ten: - default: - t.Errorf("ten did not return!") - } -} - -func TestNotifyBlockers(t *testing.T) { - b1 := &blocker{1, make(chan struct{})} - b2 := &blocker{2, make(chan struct{})} - b3 := &blocker{5, make(chan struct{})} - b4 := &blocker{10, make(chan struct{})} - b5 := &blocker{10, make(chan struct{})} - bs := []*blocker{b1, b2, b3, b4, b5} - bs1 := notifyBlockers(bs, 2) - if n := len(bs1); n != 4 { - t.Fatalf("got %d blockers, want %d", n, 4) - } - select { - case <-b2.ch: - case <-time.After(time.Second): - t.Fatalf("timed out waiting for channel close!") - } - bs2 := notifyBlockers(bs1, 10) - if n := len(bs2); n != 2 { - t.Fatalf("got %d blockers, want %d", n, 2) - } - select { - case <-b4.ch: - case <-time.After(time.Second): - t.Fatalf("timed out waiting for channel close!") - } - select { - case <-b5.ch: - case <-time.After(time.Second): - t.Fatalf("timed out waiting for channel close!") - } -} - -func TestNewFakeClock(t *testing.T) { - fc := NewFakeClock() - now := fc.Now() - if now.IsZero() { - t.Fatalf("fakeClock.Now() fulfills IsZero") - } - - now2 := fc.Now() - if !reflect.DeepEqual(now, now2) { - t.Fatalf("fakeClock.Now() returned different value: want=%#v got=%#v", now, now2) - } -} - -func TestNewFakeClockAt(t *testing.T) { - t1 := time.Date(1999, time.February, 3, 4, 5, 6, 7, time.UTC) - fc := NewFakeClockAt(t1) - now := fc.Now() - if !reflect.DeepEqual(now, t1) { - t.Fatalf("fakeClock.Now() returned unexpected non-initialised value: want=%#v, got %#v", t1, now) - } -} diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go b/Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go deleted file mode 100644 index 6a41bd8..0000000 --- a/Godeps/_workspace/src/github.com/jonboulle/clockwork/example_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package clockwork - -import ( - "sync" - "testing" - "time" -) - -// my_func is an example of a time-dependent function, using an -// injected clock -func my_func(clock Clock, i *int) { - clock.Sleep(3 * time.Second) - *i += 1 -} - -// assert_state is an example of a state assertion in a test -func assert_state(t *testing.T, i, j int) { - if i != j { - t.Fatalf("i %d, j %d", i, j) - } -} - -// TestMyFunc tests my_func's behaviour with a FakeClock -func TestMyFunc(t *testing.T) { - var i int - c := NewFakeClock() - - var wg sync.WaitGroup - wg.Add(1) - go func() { - my_func(c, &i) - wg.Done() - }() - - // Wait until my_func is actually sleeping on the clock - c.BlockUntil(1) - - // Assert the initial state - assert_state(t, i, 0) - - // Now advance the clock forward in time - c.Advance(1 * time.Hour) - - // Wait until the function completes - wg.Wait() - - // Assert the final state - assert_state(t, i, 1) -} diff --git a/Godeps/_workspace/src/github.com/juju/errors/error_test.go b/Godeps/_workspace/src/github.com/juju/errors/error_test.go deleted file mode 100644 index ac1d2b4..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/error_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors_test - -import ( - "fmt" - "runtime" - - jc "github.com/juju/testing/checkers" - gc "gopkg.in/check.v1" - - "github.com/juju/errors" -) - -type errorsSuite struct{} - -var _ = gc.Suite(&errorsSuite{}) - -var someErr = errors.New("some error") //err varSomeErr - -func (*errorsSuite) TestErrorString(c *gc.C) { - for i, test := range []struct { - message string - generator func() error - expected string - }{ - { - message: "uncomparable errors", - generator: func() error { - err := errors.Annotatef(newNonComparableError("uncomparable"), "annotation") - return errors.Annotatef(err, "another") - }, - expected: "another: annotation: uncomparable", - }, { - message: "Errorf", - generator: func() error { - return errors.Errorf("first error") - }, - expected: "first error", - }, { - message: "annotated error", - generator: func() error { - err := errors.Errorf("first error") - return errors.Annotatef(err, "annotation") - }, - expected: "annotation: first error", - }, { - message: "test annotation format", - generator: func() error { - err := errors.Errorf("first %s", "error") - return errors.Annotatef(err, "%s", "annotation") - }, - expected: "annotation: first error", - }, { - message: "wrapped error", - generator: func() error { - err := newError("first error") - return errors.Wrap(err, newError("detailed error")) - }, - expected: "detailed error", - }, { - message: "wrapped annotated error", - generator: func() error { - err := errors.Errorf("first error") - err = errors.Annotatef(err, "annotated") - return errors.Wrap(err, fmt.Errorf("detailed error")) - }, - expected: "detailed error", - }, { - message: "annotated wrapped error", - generator: func() error { - err := errors.Errorf("first error") - err = errors.Wrap(err, fmt.Errorf("detailed error")) - return errors.Annotatef(err, "annotated") - }, - expected: "annotated: detailed error", - }, { - message: "traced, and annotated", - generator: func() error { - err := errors.New("first error") - err = errors.Trace(err) - err = errors.Annotate(err, "some context") - err = errors.Trace(err) - err = errors.Annotate(err, "more context") - return errors.Trace(err) - }, - expected: "more context: some context: first error", - }, { - message: "traced, and annotated, masked and annotated", - generator: func() error { - err := errors.New("first error") - err = errors.Trace(err) - err = errors.Annotate(err, "some context") - err = errors.Maskf(err, "masked") - err = errors.Annotate(err, "more context") - return errors.Trace(err) - }, - expected: "more context: masked: some context: first error", - }, - } { - c.Logf("%v: %s", i, test.message) - err := test.generator() - ok := c.Check(err.Error(), gc.Equals, test.expected) - if !ok { - c.Logf("%#v", test.generator()) - } - } -} - -type embed struct { - errors.Err -} - -func newEmbed(format string, args ...interface{}) *embed { - err := &embed{errors.NewErr(format, args...)} - err.SetLocation(1) - return err -} - -func (*errorsSuite) TestNewErr(c *gc.C) { - if runtime.Compiler == "gccgo" { - c.Skip("gccgo can't determine the location") - } - err := newEmbed("testing %d", 42) //err embedErr - c.Assert(err.Error(), gc.Equals, "testing 42") - c.Assert(errors.Cause(err), gc.Equals, err) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["embedErr"].String()) -} - -var _ error = (*embed)(nil) - -// This is an uncomparable error type, as it is a struct that supports the -// error interface (as opposed to a pointer type). -type error_ struct { - info string - slice []string -} - -// Create a non-comparable error -func newNonComparableError(message string) error { - return error_{info: message} -} - -func (e error_) Error() string { - return e.info -} - -func newError(message string) error { - return testError{message} -} - -// The testError is a value type error for ease of seeing results -// when the test fails. -type testError struct { - message string -} - -func (e testError) Error() string { - return e.message -} diff --git a/Godeps/_workspace/src/github.com/juju/errors/errortypes_test.go b/Godeps/_workspace/src/github.com/juju/errors/errortypes_test.go deleted file mode 100644 index 7de9810..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/errortypes_test.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2013, 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors_test - -import ( - stderrors "errors" - "fmt" - "reflect" - "runtime" - - "github.com/juju/errors" - jc "github.com/juju/testing/checkers" - gc "gopkg.in/check.v1" -) - -// errorInfo holds information about a single error type: a satisfier -// function, wrapping and variable arguments constructors and message -// suffix. -type errorInfo struct { - satisfier func(error) bool - argsConstructor func(string, ...interface{}) error - wrapConstructor func(error, string) error - suffix string -} - -// allErrors holds information for all defined errors. When adding new -// errors, add them here as well to include them in tests. -var allErrors = []*errorInfo{ - {errors.IsNotFound, errors.NotFoundf, errors.NewNotFound, " not found"}, - {errors.IsUserNotFound, errors.UserNotFoundf, errors.NewUserNotFound, " user not found"}, - {errors.IsUnauthorized, errors.Unauthorizedf, errors.NewUnauthorized, ""}, - {errors.IsNotImplemented, errors.NotImplementedf, errors.NewNotImplemented, " not implemented"}, - {errors.IsAlreadyExists, errors.AlreadyExistsf, errors.NewAlreadyExists, " already exists"}, - {errors.IsNotSupported, errors.NotSupportedf, errors.NewNotSupported, " not supported"}, - {errors.IsNotValid, errors.NotValidf, errors.NewNotValid, " not valid"}, - {errors.IsNotProvisioned, errors.NotProvisionedf, errors.NewNotProvisioned, " not provisioned"}, - {errors.IsNotAssigned, errors.NotAssignedf, errors.NewNotAssigned, " not assigned"}, - {errors.IsMethodNotAllowed, errors.MethodNotAllowedf, errors.NewMethodNotAllowed, ""}, - {errors.IsBadRequest, errors.BadRequestf, errors.NewBadRequest, ""}, -} - -type errorTypeSuite struct{} - -var _ = gc.Suite(&errorTypeSuite{}) - -func (t *errorInfo) satisfierName() string { - value := reflect.ValueOf(t.satisfier) - f := runtime.FuncForPC(value.Pointer()) - return f.Name() -} - -func (t *errorInfo) equal(t0 *errorInfo) bool { - if t0 == nil { - return false - } - return t.satisfierName() == t0.satisfierName() -} - -type errorTest struct { - err error - message string - errInfo *errorInfo -} - -func deferredAnnotatef(err error, format string, args ...interface{}) error { - errors.DeferredAnnotatef(&err, format, args...) - return err -} - -func mustSatisfy(c *gc.C, err error, errInfo *errorInfo) { - if errInfo != nil { - msg := fmt.Sprintf("%#v must satisfy %v", err, errInfo.satisfierName()) - c.Check(err, jc.Satisfies, errInfo.satisfier, gc.Commentf(msg)) - } -} - -func mustNotSatisfy(c *gc.C, err error, errInfo *errorInfo) { - if errInfo != nil { - msg := fmt.Sprintf("%#v must not satisfy %v", err, errInfo.satisfierName()) - c.Check(err, gc.Not(jc.Satisfies), errInfo.satisfier, gc.Commentf(msg)) - } -} - -func checkErrorMatches(c *gc.C, err error, message string, errInfo *errorInfo) { - if message == "" { - c.Check(err, gc.IsNil) - c.Check(errInfo, gc.IsNil) - } else { - c.Check(err, gc.ErrorMatches, message) - } -} - -func runErrorTests(c *gc.C, errorTests []errorTest, checkMustSatisfy bool) { - for i, t := range errorTests { - c.Logf("test %d: %T: %v", i, t.err, t.err) - checkErrorMatches(c, t.err, t.message, t.errInfo) - if checkMustSatisfy { - mustSatisfy(c, t.err, t.errInfo) - } - - // Check all other satisfiers to make sure none match. - for _, otherErrInfo := range allErrors { - if checkMustSatisfy && otherErrInfo.equal(t.errInfo) { - continue - } - mustNotSatisfy(c, t.err, otherErrInfo) - } - } -} - -func (*errorTypeSuite) TestDeferredAnnotatef(c *gc.C) { - // Ensure DeferredAnnotatef annotates the errors. - errorTests := []errorTest{} - for _, errInfo := range allErrors { - errorTests = append(errorTests, []errorTest{{ - deferredAnnotatef(nil, "comment"), - "", - nil, - }, { - deferredAnnotatef(stderrors.New("blast"), "comment"), - "comment: blast", - nil, - }, { - deferredAnnotatef(errInfo.argsConstructor("foo %d", 42), "comment %d", 69), - "comment 69: foo 42" + errInfo.suffix, - errInfo, - }, { - deferredAnnotatef(errInfo.argsConstructor(""), "comment"), - "comment: " + errInfo.suffix, - errInfo, - }, { - deferredAnnotatef(errInfo.wrapConstructor(stderrors.New("pow!"), "woo"), "comment"), - "comment: woo: pow!", - errInfo, - }}...) - } - - runErrorTests(c, errorTests, true) -} - -func (*errorTypeSuite) TestAllErrors(c *gc.C) { - errorTests := []errorTest{} - for _, errInfo := range allErrors { - errorTests = append(errorTests, []errorTest{{ - nil, - "", - nil, - }, { - errInfo.argsConstructor("foo %d", 42), - "foo 42" + errInfo.suffix, - errInfo, - }, { - errInfo.argsConstructor(""), - errInfo.suffix, - errInfo, - }, { - errInfo.wrapConstructor(stderrors.New("pow!"), "prefix"), - "prefix: pow!", - errInfo, - }, { - errInfo.wrapConstructor(stderrors.New("pow!"), ""), - "pow!", - errInfo, - }, { - errInfo.wrapConstructor(nil, "prefix"), - "prefix", - errInfo, - }}...) - } - - runErrorTests(c, errorTests, true) -} diff --git a/Godeps/_workspace/src/github.com/juju/errors/example_test.go b/Godeps/_workspace/src/github.com/juju/errors/example_test.go deleted file mode 100644 index 2a79cf4..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/example_test.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2013, 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors_test - -import ( - "fmt" - - "github.com/juju/errors" -) - -func ExampleTrace() { - var err1 error = fmt.Errorf("something wicked this way comes") - var err2 error = nil - - // Tracing a non nil error will return an error - fmt.Println(errors.Trace(err1)) - // Tracing nil will return nil - fmt.Println(errors.Trace(err2)) - - // Output: something wicked this way comes - // -} diff --git a/Godeps/_workspace/src/github.com/juju/errors/export_test.go b/Godeps/_workspace/src/github.com/juju/errors/export_test.go deleted file mode 100644 index db57ec8..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/export_test.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2013, 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors - -// Since variables are declared before the init block, in order to get the goPath -// we need to return it rather than just reference it. -func GoPath() string { - return goPath -} - -var TrimGoPath = trimGoPath diff --git a/Godeps/_workspace/src/github.com/juju/errors/functions_test.go b/Godeps/_workspace/src/github.com/juju/errors/functions_test.go deleted file mode 100644 index 7b1e43b..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/functions_test.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors_test - -import ( - "fmt" - "os" - "path/filepath" - "runtime" - "strings" - - jc "github.com/juju/testing/checkers" - gc "gopkg.in/check.v1" - - "github.com/juju/errors" -) - -type functionSuite struct { -} - -var _ = gc.Suite(&functionSuite{}) - -func (*functionSuite) TestNew(c *gc.C) { - err := errors.New("testing") //err newTest - c.Assert(err.Error(), gc.Equals, "testing") - c.Assert(errors.Cause(err), gc.Equals, err) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["newTest"].String()) -} - -func (*functionSuite) TestErrorf(c *gc.C) { - err := errors.Errorf("testing %d", 42) //err errorfTest - c.Assert(err.Error(), gc.Equals, "testing 42") - c.Assert(errors.Cause(err), gc.Equals, err) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["errorfTest"].String()) -} - -func (*functionSuite) TestTrace(c *gc.C) { - first := errors.New("first") - err := errors.Trace(first) //err traceTest - c.Assert(err.Error(), gc.Equals, "first") - c.Assert(errors.Cause(err), gc.Equals, first) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["traceTest"].String()) - - c.Assert(errors.Trace(nil), gc.IsNil) -} - -func (*functionSuite) TestAnnotate(c *gc.C) { - first := errors.New("first") - err := errors.Annotate(first, "annotation") //err annotateTest - c.Assert(err.Error(), gc.Equals, "annotation: first") - c.Assert(errors.Cause(err), gc.Equals, first) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["annotateTest"].String()) - - c.Assert(errors.Annotate(nil, "annotate"), gc.IsNil) -} - -func (*functionSuite) TestAnnotatef(c *gc.C) { - first := errors.New("first") - err := errors.Annotatef(first, "annotation %d", 2) //err annotatefTest - c.Assert(err.Error(), gc.Equals, "annotation 2: first") - c.Assert(errors.Cause(err), gc.Equals, first) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["annotatefTest"].String()) - - c.Assert(errors.Annotatef(nil, "annotate"), gc.IsNil) -} - -func (*functionSuite) TestDeferredAnnotatef(c *gc.C) { - // NOTE: this test fails with gccgo - if runtime.Compiler == "gccgo" { - c.Skip("gccgo can't determine the location") - } - first := errors.New("first") - test := func() (err error) { - defer errors.DeferredAnnotatef(&err, "deferred %s", "annotate") - return first - } //err deferredAnnotate - err := test() - c.Assert(err.Error(), gc.Equals, "deferred annotate: first") - c.Assert(errors.Cause(err), gc.Equals, first) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["deferredAnnotate"].String()) - - err = nil - errors.DeferredAnnotatef(&err, "deferred %s", "annotate") - c.Assert(err, gc.IsNil) -} - -func (*functionSuite) TestWrap(c *gc.C) { - first := errors.New("first") //err wrapFirst - detailed := errors.New("detailed") - err := errors.Wrap(first, detailed) //err wrapTest - c.Assert(err.Error(), gc.Equals, "detailed") - c.Assert(errors.Cause(err), gc.Equals, detailed) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["wrapFirst"].String()) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["wrapTest"].String()) -} - -func (*functionSuite) TestWrapOfNil(c *gc.C) { - detailed := errors.New("detailed") - err := errors.Wrap(nil, detailed) //err nilWrapTest - c.Assert(err.Error(), gc.Equals, "detailed") - c.Assert(errors.Cause(err), gc.Equals, detailed) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["nilWrapTest"].String()) -} - -func (*functionSuite) TestWrapf(c *gc.C) { - first := errors.New("first") //err wrapfFirst - detailed := errors.New("detailed") - err := errors.Wrapf(first, detailed, "value %d", 42) //err wrapfTest - c.Assert(err.Error(), gc.Equals, "value 42: detailed") - c.Assert(errors.Cause(err), gc.Equals, detailed) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["wrapfFirst"].String()) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["wrapfTest"].String()) -} - -func (*functionSuite) TestWrapfOfNil(c *gc.C) { - detailed := errors.New("detailed") - err := errors.Wrapf(nil, detailed, "value %d", 42) //err nilWrapfTest - c.Assert(err.Error(), gc.Equals, "value 42: detailed") - c.Assert(errors.Cause(err), gc.Equals, detailed) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["nilWrapfTest"].String()) -} - -func (*functionSuite) TestMask(c *gc.C) { - first := errors.New("first") - err := errors.Mask(first) //err maskTest - c.Assert(err.Error(), gc.Equals, "first") - c.Assert(errors.Cause(err), gc.Equals, err) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["maskTest"].String()) - - c.Assert(errors.Mask(nil), gc.IsNil) -} - -func (*functionSuite) TestMaskf(c *gc.C) { - first := errors.New("first") - err := errors.Maskf(first, "masked %d", 42) //err maskfTest - c.Assert(err.Error(), gc.Equals, "masked 42: first") - c.Assert(errors.Cause(err), gc.Equals, err) - c.Assert(errors.Details(err), jc.Contains, tagToLocation["maskfTest"].String()) - - c.Assert(errors.Maskf(nil, "mask"), gc.IsNil) -} - -func (*functionSuite) TestCause(c *gc.C) { - c.Assert(errors.Cause(nil), gc.IsNil) - c.Assert(errors.Cause(someErr), gc.Equals, someErr) - - fmtErr := fmt.Errorf("simple") - c.Assert(errors.Cause(fmtErr), gc.Equals, fmtErr) - - err := errors.Wrap(someErr, fmtErr) - c.Assert(errors.Cause(err), gc.Equals, fmtErr) - - err = errors.Annotate(err, "annotated") - c.Assert(errors.Cause(err), gc.Equals, fmtErr) - - err = errors.Maskf(err, "maksed") - c.Assert(errors.Cause(err), gc.Equals, err) - - // Look for a file that we know isn't there. - dir := c.MkDir() - _, err = os.Stat(filepath.Join(dir, "not-there")) - c.Assert(os.IsNotExist(err), jc.IsTrue) - - err = errors.Annotatef(err, "wrap it") - // Now the error itself isn't a 'IsNotExist'. - c.Assert(os.IsNotExist(err), jc.IsFalse) - // However if we use the Check method, it is. - c.Assert(os.IsNotExist(errors.Cause(err)), jc.IsTrue) -} - -func (s *functionSuite) TestDetails(c *gc.C) { - if runtime.Compiler == "gccgo" { - c.Skip("gccgo can't determine the location") - } - c.Assert(errors.Details(nil), gc.Equals, "[]") - - otherErr := fmt.Errorf("other") - checkDetails(c, otherErr, "[{other}]") - - err0 := newEmbed("foo") //err TestStack#0 - checkDetails(c, err0, "[{$TestStack#0$: foo}]") - - err1 := errors.Annotate(err0, "bar") //err TestStack#1 - checkDetails(c, err1, "[{$TestStack#1$: bar} {$TestStack#0$: foo}]") - - err2 := errors.Trace(err1) //err TestStack#2 - checkDetails(c, err2, "[{$TestStack#2$: } {$TestStack#1$: bar} {$TestStack#0$: foo}]") -} - -type tracer interface { - StackTrace() []string -} - -func (*functionSuite) TestErrorStack(c *gc.C) { - for i, test := range []struct { - message string - generator func() error - expected string - tracer bool - }{ - { - message: "nil", - generator: func() error { - return nil - }, - }, { - message: "raw error", - generator: func() error { - return fmt.Errorf("raw") - }, - expected: "raw", - }, { - message: "single error stack", - generator: func() error { - return errors.New("first error") //err single - }, - expected: "$single$: first error", - tracer: true, - }, { - message: "annotated error", - generator: func() error { - err := errors.New("first error") //err annotated-0 - return errors.Annotate(err, "annotation") //err annotated-1 - }, - expected: "" + - "$annotated-0$: first error\n" + - "$annotated-1$: annotation", - tracer: true, - }, { - message: "wrapped error", - generator: func() error { - err := errors.New("first error") //err wrapped-0 - return errors.Wrap(err, newError("detailed error")) //err wrapped-1 - }, - expected: "" + - "$wrapped-0$: first error\n" + - "$wrapped-1$: detailed error", - tracer: true, - }, { - message: "annotated wrapped error", - generator: func() error { - err := errors.Errorf("first error") //err ann-wrap-0 - err = errors.Wrap(err, fmt.Errorf("detailed error")) //err ann-wrap-1 - return errors.Annotatef(err, "annotated") //err ann-wrap-2 - }, - expected: "" + - "$ann-wrap-0$: first error\n" + - "$ann-wrap-1$: detailed error\n" + - "$ann-wrap-2$: annotated", - tracer: true, - }, { - message: "traced, and annotated", - generator: func() error { - err := errors.New("first error") //err stack-0 - err = errors.Trace(err) //err stack-1 - err = errors.Annotate(err, "some context") //err stack-2 - err = errors.Trace(err) //err stack-3 - err = errors.Annotate(err, "more context") //err stack-4 - return errors.Trace(err) //err stack-5 - }, - expected: "" + - "$stack-0$: first error\n" + - "$stack-1$: \n" + - "$stack-2$: some context\n" + - "$stack-3$: \n" + - "$stack-4$: more context\n" + - "$stack-5$: ", - tracer: true, - }, { - message: "uncomparable, wrapped with a value error", - generator: func() error { - err := newNonComparableError("first error") //err mixed-0 - err = errors.Trace(err) //err mixed-1 - err = errors.Wrap(err, newError("value error")) //err mixed-2 - err = errors.Maskf(err, "masked") //err mixed-3 - err = errors.Annotate(err, "more context") //err mixed-4 - return errors.Trace(err) //err mixed-5 - }, - expected: "" + - "first error\n" + - "$mixed-1$: \n" + - "$mixed-2$: value error\n" + - "$mixed-3$: masked\n" + - "$mixed-4$: more context\n" + - "$mixed-5$: ", - tracer: true, - }, - } { - c.Logf("%v: %s", i, test.message) - err := test.generator() - expected := replaceLocations(test.expected) - stack := errors.ErrorStack(err) - ok := c.Check(stack, gc.Equals, expected) - if !ok { - c.Logf("%#v", err) - } - tracer, ok := err.(tracer) - c.Check(ok, gc.Equals, test.tracer) - if ok { - stackTrace := tracer.StackTrace() - c.Check(stackTrace, gc.DeepEquals, strings.Split(stack, "\n")) - } - } -} diff --git a/Godeps/_workspace/src/github.com/juju/errors/package_test.go b/Godeps/_workspace/src/github.com/juju/errors/package_test.go deleted file mode 100644 index 5bbb8f0..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/package_test.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2013, 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors_test - -import ( - "fmt" - "io/ioutil" - "strings" - "testing" - - gc "gopkg.in/check.v1" - - "github.com/juju/errors" -) - -func Test(t *testing.T) { - gc.TestingT(t) -} - -func checkDetails(c *gc.C, err error, details string) { - c.Assert(err, gc.NotNil) - expectedDetails := replaceLocations(details) - c.Assert(errors.Details(err), gc.Equals, expectedDetails) -} - -func checkErr(c *gc.C, err, cause error, msg string, details string) { - c.Assert(err, gc.NotNil) - c.Assert(err.Error(), gc.Equals, msg) - c.Assert(errors.Cause(err), gc.Equals, cause) - expectedDetails := replaceLocations(details) - c.Assert(errors.Details(err), gc.Equals, expectedDetails) -} - -func replaceLocations(line string) string { - result := "" - for { - i := strings.Index(line, "$") - if i == -1 { - break - } - result += line[0:i] - line = line[i+1:] - i = strings.Index(line, "$") - if i == -1 { - panic("no second $") - } - result += location(line[0:i]).String() - line = line[i+1:] - } - result += line - return result -} - -func location(tag string) Location { - loc, ok := tagToLocation[tag] - if !ok { - panic(fmt.Sprintf("tag %q not found", tag)) - } - return loc -} - -type Location struct { - file string - line int -} - -func (loc Location) String() string { - return fmt.Sprintf("%s:%d", loc.file, loc.line) -} - -var tagToLocation = make(map[string]Location) - -func setLocationsForErrorTags(filename string) { - data, err := ioutil.ReadFile(filename) - if err != nil { - panic(err) - } - filename = "github.com/juju/errors/" + filename - lines := strings.Split(string(data), "\n") - for i, line := range lines { - if j := strings.Index(line, "//err "); j >= 0 { - tag := line[j+len("//err "):] - if _, found := tagToLocation[tag]; found { - panic(fmt.Sprintf("tag %q already processed previously", tag)) - } - tagToLocation[tag] = Location{file: filename, line: i + 1} - } - } -} - -func init() { - setLocationsForErrorTags("error_test.go") - setLocationsForErrorTags("functions_test.go") -} diff --git a/Godeps/_workspace/src/github.com/juju/errors/path_test.go b/Godeps/_workspace/src/github.com/juju/errors/path_test.go deleted file mode 100644 index ef4f34f..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/path_test.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2013, 2014 Canonical Ltd. -// Licensed under the LGPLv3, see LICENCE file for details. - -package errors_test - -import ( - "path" - - gc "gopkg.in/check.v1" - - "github.com/juju/errors" -) - -type pathSuite struct{} - -var _ = gc.Suite(&pathSuite{}) - -func (*pathSuite) TestGoPathSet(c *gc.C) { - c.Assert(errors.GoPath(), gc.Not(gc.Equals), "") -} - -func (*pathSuite) TestTrimGoPath(c *gc.C) { - relativeImport := "github.com/foo/bar/baz.go" - filename := path.Join(errors.GoPath(), relativeImport) - c.Assert(errors.TrimGoPath(filename), gc.Equals, relativeImport) - - absoluteImport := "/usr/share/foo/bar/baz.go" - c.Assert(errors.TrimGoPath(absoluteImport), gc.Equals, absoluteImport) -} diff --git a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/store_test.go b/Godeps/_workspace/src/github.com/kelseyhightower/memkv/store_test.go deleted file mode 100644 index ea1ce6a..0000000 --- a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/store_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package memkv - -import ( - "path/filepath" - "reflect" - "testing" -) - -var gettests = []struct { - key string - value string - err error - want KVPair -}{ - {"/db/user", "admin", nil, KVPair{"/db/user", "admin"}}, - {"/db/pass", "foo", nil, KVPair{"/db/pass", "foo"}}, - {"/missing", "", ErrNotExist, KVPair{}}, -} - -func TestGet(t *testing.T) { - for _, tt := range gettests { - s := New() - if tt.err == nil { - s.Set(tt.key, tt.value) - } - got, err := s.Get(tt.key) - if got != tt.want || err != tt.err { - t.Errorf("Get(%q) = %v, %v, want %v, %v", tt.key, got, err, tt.want, tt.err) - } - } -} - -var getalltestinput = map[string]string{ - "/app/db/pass": "foo", - "/app/db/user": "admin", - "/app/port": "443", - "/app/url": "app.example.com", - "/app/vhosts/host1": "app.example.com", - "/app/upstream/host1": "203.0.113.0.1:8080", - "/app/upstream/host1/domain": "app.example.com", - "/app/upstream/host2": "203.0.113.0.2:8080", - "/app/upstream/host2/domain": "app.example.com", -} - -var getalltests = []struct { - pattern string - err error - want []KVPair -}{ - {"/app/db/*", nil, - []KVPair{ - {"/app/db/pass", "foo"}, - {"/app/db/user", "admin"}}}, - {"/app/*/host1", nil, - []KVPair{ - {"/app/upstream/host1", "203.0.113.0.1:8080"}, - {"/app/vhosts/host1", "app.example.com"}}}, - - {"/app/upstream/*", nil, - []KVPair{ - {"/app/upstream/host1", "203.0.113.0.1:8080"}, - {"/app/upstream/host2", "203.0.113.0.2:8080"}}}, - {"[]a]", filepath.ErrBadPattern, nil}, - {"/app/missing/*", nil, []KVPair{}}, -} - -func TestGetAll(t *testing.T) { - s := New() - for k, v := range getalltestinput { - s.Set(k, v) - } - for _, tt := range getalltests { - got, err := s.GetAll(tt.pattern) - if !reflect.DeepEqual([]KVPair(got), []KVPair(tt.want)) || err != tt.err { - t.Errorf("GetAll(%q) = %v, %v, want %v, %v", tt.pattern, got, err, tt.want, tt.err) - } - } -} - -func TestDel(t *testing.T) { - s := New() - s.Set("/app/port", "8080") - want := KVPair{"/app/port", "8080"} - got, err := s.Get("/app/port") - if err != nil || got != want { - t.Errorf("Get(%q) = %v, %v, want %v, %v", "/app/port", got, err, want, true) - } - s.Del("/app/port") - want = KVPair{} - got, err = s.Get("/app/port") - if err != ErrNotExist || got != want { - t.Errorf("Get(%q) = %v, %v, want %v, %v", "/app/port", got, err, want, false) - } - s.Del("/app/port") -} - -func TestPurge(t *testing.T) { - s := New() - s.Set("/app/port", "8080") - want := KVPair{"/app/port", "8080"} - got, err := s.Get("/app/port") - if err != nil || got != want { - t.Errorf("Get(%q) = %v, %v, want %v, %v", "/app/port", got, err, want, true) - } - s.Purge() - want = KVPair{} - got, err = s.Get("/app/port") - if err != ErrNotExist || got != want { - t.Errorf("Get(%q) = %v, %v, want %v, %v", "/app/port", got, err, want, false) - } - s.Set("/app/port", "8080") - want = KVPair{"/app/port", "8080"} - got, err = s.Get("/app/port") - if err != nil || got != want { - t.Errorf("Get(%q) = %v, %v, want %v, %v", "/app/port", got, err, want, true) - } -} - -var listTestMap = map[string]string{ - "/deis/database/user": "user", - "/deis/database/pass": "pass", - "/deis/services/key": "value", - "/deis/services/notaservice/foo": "bar", - "/deis/services/srv1/node1": "10.244.1.1:80", - "/deis/services/srv1/node2": "10.244.1.2:80", - "/deis/services/srv1/node3": "10.244.1.3:80", - "/deis/services/srv2/node1": "10.244.2.1:80", - "/deis/services/srv2/node2": "10.244.2.2:80", -} - -func TestList(t *testing.T) { - s := New() - for k, v := range listTestMap { - s.Set(k, v) - } - want := []string{"key", "notaservice", "srv1", "srv2"} - paths := []string{ - "/deis/services", - "/deis/services/", - } - for _, filePath := range paths { - got := s.List(filePath) - if !reflect.DeepEqual(got, want) { - t.Errorf("List(%s) = %v, want %v", filePath, got, want) - } - } -} - -func TestListForFile(t *testing.T) { - s := New() - for k, v := range listTestMap { - s.Set(k, v) - } - want := []string{"key"} - got := s.List("/deis/services/key") - if !reflect.DeepEqual(got, want) { - t.Errorf("List(%s) = %v, want %v", "/deis/services", got, want) - } -} - -func TestListDir(t *testing.T) { - s := New() - for k, v := range listTestMap { - s.Set(k, v) - } - want := []string{"notaservice", "srv1", "srv2"} - paths := []string{ - "/deis/services", - "/deis/services/", - } - for _, filePath := range paths { - got := s.ListDir(filePath) - if !reflect.DeepEqual(got, want) { - t.Errorf("List(%s) = %v, want %v", filePath, got, want) - } - } -} diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/ansi_test.go b/Godeps/_workspace/src/github.com/mgutz/ansi/ansi_test.go deleted file mode 100644 index d601e11..0000000 --- a/Godeps/_workspace/src/github.com/mgutz/ansi/ansi_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package ansi - -import ( - "fmt" - "testing" -) - -func TestPlain(t *testing.T) { - DisableColors(true) - bgColors := []string{ - "", - ":black", - ":red", - ":green", - ":yellow", - ":blue", - ":magenta", - ":cyan", - ":white", - } - for fg := range Colors { - for _, bg := range bgColors { - println(padColor(fg, []string{"" + bg, "+b" + bg, "+bh" + bg, "+u" + bg})) - println(padColor(fg, []string{"+uh" + bg, "+B" + bg, "+Bb" + bg /* backgrounds */, "" + bg + "+h"})) - println(padColor(fg, []string{"+b" + bg + "+h", "+bh" + bg + "+h", "+u" + bg + "+h", "+uh" + bg + "+h"})) - } - } -} - -func TestStyles(t *testing.T) { - PrintStyles() - DisableColors(false) - buf := colorCode("off") - if buf.String() != "" { - t.Fail() - } -} - -func ExampleColorFunc() { - brightGreen := ColorFunc("green+h") - fmt.Println(brightGreen("lime")) -} diff --git a/Godeps/_workspace/src/github.com/mitchellh/go-homedir/homedir_test.go b/Godeps/_workspace/src/github.com/mitchellh/go-homedir/homedir_test.go deleted file mode 100644 index ddc24ee..0000000 --- a/Godeps/_workspace/src/github.com/mitchellh/go-homedir/homedir_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package homedir - -import ( - "fmt" - "os" - "os/user" - "testing" -) - -func patchEnv(key, value string) func() { - bck := os.Getenv(key) - deferFunc := func() { - os.Setenv(key, bck) - } - - os.Setenv(key, value) - return deferFunc -} - -func TestDir(t *testing.T) { - u, err := user.Current() - if err != nil { - t.Fatalf("err: %s", err) - } - - dir, err := Dir() - if err != nil { - t.Fatalf("err: %s", err) - } - - if u.HomeDir != dir { - t.Fatalf("%#v != %#v", u.HomeDir, dir) - } -} - -func TestExpand(t *testing.T) { - u, err := user.Current() - if err != nil { - t.Fatalf("err: %s", err) - } - - cases := []struct { - Input string - Output string - Err bool - }{ - { - "/foo", - "/foo", - false, - }, - - { - "~/foo", - fmt.Sprintf("%s/foo", u.HomeDir), - false, - }, - - { - "", - "", - false, - }, - - { - "~", - u.HomeDir, - false, - }, - - { - "~foo/foo", - "", - true, - }, - } - - for _, tc := range cases { - actual, err := Expand(tc.Input) - if (err != nil) != tc.Err { - t.Fatalf("Input: %#v\n\nErr: %s", tc.Input, err) - } - - if actual != tc.Output { - t.Fatalf("Input: %#v\n\nOutput: %#v", tc.Input, actual) - } - } - - defer patchEnv("HOME", "/custom/path/")() - expected := "/custom/path/foo/bar" - actual, err := Expand("~/foo/bar") - - if err != nil { - t.Errorf("No error is expected, got: %v", err) - } else if actual != "/custom/path/foo/bar" { - t.Errorf("Expected: %v; actual: %v", expected, actual) - } -} diff --git a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/mergemap_test.go b/Godeps/_workspace/src/github.com/peterbourgon/mergemap/mergemap_test.go deleted file mode 100644 index 0c142cb..0000000 --- a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/mergemap_test.go +++ /dev/null @@ -1,89 +0,0 @@ -package mergemap - -import ( - "bytes" - "encoding/json" - "testing" -) - -func TestMerge(t *testing.T) { - for _, tuple := range []struct { - src string - dst string - expected string - }{ - { - src: `{}`, - dst: `{}`, - expected: `{}`, - }, - { - src: `{"b":2}`, - dst: `{"a":1}`, - expected: `{"a":1,"b":2}`, - }, - { - src: `{"a":0}`, - dst: `{"a":1}`, - expected: `{"a":0}`, - }, - { - src: `{"a":{ "y":2}}`, - dst: `{"a":{"x":1 }}`, - expected: `{"a":{"x":1, "y":2}}`, - }, - { - src: `{"a":{"x":2}}`, - dst: `{"a":{"x":1}}`, - expected: `{"a":{"x":2}}`, - }, - { - src: `{"a":{ "y":7, "z":8}}`, - dst: `{"a":{"x":1, "y":2 }}`, - expected: `{"a":{"x":1, "y":7, "z":8}}`, - }, - { - src: `{"1": { "b":1, "2": { "3": { "b":3, "n":[1,2]} } }}`, - dst: `{"1": { "2": { "3": {"a":"A", "n":"xxx"} }, "a":3 }}`, - expected: `{"1": { "b":1, "2": { "3": {"a":"A", "b":3, "n":[1,2]} }, "a":3 }}`, - }, - } { - var dst map[string]interface{} - if err := json.Unmarshal([]byte(tuple.dst), &dst); err != nil { - t.Error(err) - continue - } - - var src map[string]interface{} - if err := json.Unmarshal([]byte(tuple.src), &src); err != nil { - t.Error(err) - continue - } - - var expected map[string]interface{} - if err := json.Unmarshal([]byte(tuple.expected), &expected); err != nil { - t.Error(err) - continue - } - - got := Merge(dst, src) - assert(t, expected, got) - } -} - -func assert(t *testing.T, expected, got map[string]interface{}) { - expectedBuf, err := json.Marshal(expected) - if err != nil { - t.Error(err) - return - } - gotBuf, err := json.Marshal(got) - if err != nil { - t.Error(err) - return - } - if bytes.Compare(expectedBuf, gotBuf) != 0 { - t.Errorf("expected %s, got %s", string(expectedBuf), string(gotBuf)) - return - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/bash_completions_test.go b/Godeps/_workspace/src/github.com/spf13/cobra/bash_completions_test.go deleted file mode 100644 index acb6d81..0000000 --- a/Godeps/_workspace/src/github.com/spf13/cobra/bash_completions_test.go +++ /dev/null @@ -1,80 +0,0 @@ -package cobra - -import ( - "bytes" - "fmt" - "os" - "strings" - "testing" -) - -var _ = fmt.Println -var _ = os.Stderr - -func checkOmit(t *testing.T, found, unexpected string) { - if strings.Contains(found, unexpected) { - t.Errorf("Unexpected response.\nGot: %q\nBut should not have!\n", unexpected) - } -} - -func check(t *testing.T, found, expected string) { - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } -} - -// World worst custom function, just keep telling you to enter hello! -const ( - bash_completion_func = `__custom_func() { -COMPREPLY=( "hello" ) -} -` -) - -func TestBashCompletions(t *testing.T) { - c := initializeWithRootCmd() - cmdEcho.AddCommand(cmdTimes) - c.AddCommand(cmdEcho, cmdPrint, cmdDeprecated) - - // custom completion function - c.BashCompletionFunction = bash_completion_func - - // required flag - c.MarkFlagRequired("introot") - - // valid nouns - validArgs := []string{"pods", "nodes", "services", "replicationControllers"} - c.ValidArgs = validArgs - - // filename - var flagval string - c.Flags().StringVar(&flagval, "filename", "", "Enter a filename") - c.MarkFlagFilename("filename", "json", "yaml", "yml") - - // filename extensions - var flagvalExt string - c.Flags().StringVar(&flagvalExt, "filename-ext", "", "Enter a filename (extension limited)") - c.MarkFlagFilename("filename-ext") - - out := new(bytes.Buffer) - c.GenBashCompletion(out) - str := out.String() - - check(t, str, "_cobra-test") - check(t, str, "_cobra-test_echo") - check(t, str, "_cobra-test_echo_times") - check(t, str, "_cobra-test_print") - - // check for required flags - check(t, str, `must_have_one_flag+=("--introot=")`) - // check for custom completion function - check(t, str, `COMPREPLY=( "hello" )`) - // check for required nouns - check(t, str, `must_have_one_noun+=("pods")`) - // check for filename extension flags - check(t, str, `flags_completion+=("_filedir")`) - // check for filename extension flags - check(t, str, `flags_completion+=("__handle_filename_extension_flag json|yaml|yml")`) - - checkOmit(t, str, cmdDeprecated.Name()) -} diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go b/Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go deleted file mode 100644 index 7cb4917..0000000 --- a/Godeps/_workspace/src/github.com/spf13/cobra/cobra_test.go +++ /dev/null @@ -1,965 +0,0 @@ -package cobra - -import ( - "bytes" - "fmt" - "os" - "reflect" - "runtime" - "strings" - "testing" - - "github.com/spf13/pflag" -) - -var _ = fmt.Println -var _ = os.Stderr - -var tp, te, tt, t1, tr []string -var rootPersPre, echoPre, echoPersPre, timesPersPre []string -var flagb1, flagb2, flagb3, flagbr, flagbp bool -var flags1, flags2a, flags2b, flags3 string -var flagi1, flagi2, flagi3, flagir int -var globalFlag1 bool -var flagEcho, rootcalled bool -var versionUsed int - -const strtwoParentHelp = "help message for parent flag strtwo" -const strtwoChildHelp = "help message for child flag strtwo" - -var cmdPrint = &Command{ - Use: "print [string to print]", - Short: "Print anything to the screen", - Long: `an absolutely utterly useless command for testing.`, - Run: func(cmd *Command, args []string) { - tp = args - }, -} - -var cmdEcho = &Command{ - Use: "echo [string to echo]", - Aliases: []string{"say"}, - Short: "Echo anything to the screen", - Long: `an utterly useless command for testing.`, - Example: "Just run cobra-test echo", - PersistentPreRun: func(cmd *Command, args []string) { - echoPersPre = args - }, - PreRun: func(cmd *Command, args []string) { - echoPre = args - }, - Run: func(cmd *Command, args []string) { - te = args - }, -} - -var cmdEchoSub = &Command{ - Use: "echosub [string to print]", - Short: "second sub command for echo", - Long: `an absolutely utterly useless command for testing gendocs!.`, - Run: func(cmd *Command, args []string) { - }, -} - -var cmdDeprecated = &Command{ - Use: "deprecated [can't do anything here]", - Short: "A command which is deprecated", - Long: `an absolutely utterly useless command for testing deprecation!.`, - Deprecated: "Please use echo instead", - Run: func(cmd *Command, args []string) { - }, -} - -var cmdTimes = &Command{ - Use: "times [# times] [string to echo]", - Short: "Echo anything to the screen more times", - Long: `a slightly useless command for testing.`, - PersistentPreRun: func(cmd *Command, args []string) { - timesPersPre = args - }, - Run: func(cmd *Command, args []string) { - tt = args - }, -} - -var cmdRootNoRun = &Command{ - Use: "cobra-test", - Short: "The root can run it's own function", - Long: "The root description for help", - PersistentPreRun: func(cmd *Command, args []string) { - rootPersPre = args - }, -} - -var cmdRootSameName = &Command{ - Use: "print", - Short: "Root with the same name as a subcommand", - Long: "The root description for help", -} - -var cmdRootWithRun = &Command{ - Use: "cobra-test", - Short: "The root can run it's own function", - Long: "The root description for help", - Run: func(cmd *Command, args []string) { - tr = args - rootcalled = true - }, -} - -var cmdSubNoRun = &Command{ - Use: "subnorun", - Short: "A subcommand without a Run function", - Long: "A long output about a subcommand without a Run function", -} - -var cmdVersion1 = &Command{ - Use: "version", - Short: "Print the version number", - Long: `First version of the version command`, - Run: func(cmd *Command, args []string) { - versionUsed = 1 - }, -} - -var cmdVersion2 = &Command{ - Use: "version", - Short: "Print the version number", - Long: `Second version of the version command`, - Run: func(cmd *Command, args []string) { - versionUsed = 2 - }, -} - -func flagInit() { - cmdEcho.ResetFlags() - cmdPrint.ResetFlags() - cmdTimes.ResetFlags() - cmdRootNoRun.ResetFlags() - cmdRootSameName.ResetFlags() - cmdRootWithRun.ResetFlags() - cmdSubNoRun.ResetFlags() - cmdRootNoRun.PersistentFlags().StringVarP(&flags2a, "strtwo", "t", "two", strtwoParentHelp) - cmdEcho.Flags().IntVarP(&flagi1, "intone", "i", 123, "help message for flag intone") - cmdTimes.Flags().IntVarP(&flagi2, "inttwo", "j", 234, "help message for flag inttwo") - cmdPrint.Flags().IntVarP(&flagi3, "intthree", "i", 345, "help message for flag intthree") - cmdEcho.PersistentFlags().StringVarP(&flags1, "strone", "s", "one", "help message for flag strone") - cmdEcho.PersistentFlags().BoolVarP(&flagbp, "persistentbool", "p", false, "help message for flag persistentbool") - cmdTimes.PersistentFlags().StringVarP(&flags2b, "strtwo", "t", "2", strtwoChildHelp) - cmdPrint.PersistentFlags().StringVarP(&flags3, "strthree", "s", "three", "help message for flag strthree") - cmdEcho.Flags().BoolVarP(&flagb1, "boolone", "b", true, "help message for flag boolone") - cmdTimes.Flags().BoolVarP(&flagb2, "booltwo", "c", false, "help message for flag booltwo") - cmdPrint.Flags().BoolVarP(&flagb3, "boolthree", "b", true, "help message for flag boolthree") - cmdVersion1.ResetFlags() - cmdVersion2.ResetFlags() -} - -func commandInit() { - cmdEcho.ResetCommands() - cmdPrint.ResetCommands() - cmdTimes.ResetCommands() - cmdRootNoRun.ResetCommands() - cmdRootSameName.ResetCommands() - cmdRootWithRun.ResetCommands() - cmdSubNoRun.ResetCommands() -} - -func initialize() *Command { - tt, tp, te = nil, nil, nil - rootPersPre, echoPre, echoPersPre, timesPersPre = nil, nil, nil, nil - - var c = cmdRootNoRun - flagInit() - commandInit() - return c -} - -func initializeWithSameName() *Command { - tt, tp, te = nil, nil, nil - rootPersPre, echoPre, echoPersPre, timesPersPre = nil, nil, nil, nil - var c = cmdRootSameName - flagInit() - commandInit() - return c -} - -func initializeWithRootCmd() *Command { - cmdRootWithRun.ResetCommands() - tt, tp, te, tr, rootcalled = nil, nil, nil, nil, false - flagInit() - cmdRootWithRun.Flags().BoolVarP(&flagbr, "boolroot", "b", false, "help message for flag boolroot") - cmdRootWithRun.Flags().IntVarP(&flagir, "introot", "i", 321, "help message for flag introot") - commandInit() - return cmdRootWithRun -} - -type resulter struct { - Error error - Output string - Command *Command -} - -func fullSetupTest(input string) resulter { - c := initializeWithRootCmd() - - return fullTester(c, input) -} - -func noRRSetupTest(input string) resulter { - c := initialize() - - return fullTester(c, input) -} - -func rootOnlySetupTest(input string) resulter { - c := initializeWithRootCmd() - - return simpleTester(c, input) -} - -func simpleTester(c *Command, input string) resulter { - buf := new(bytes.Buffer) - // Testing flag with invalid input - c.SetOutput(buf) - c.SetArgs(strings.Split(input, " ")) - - err := c.Execute() - output := buf.String() - - return resulter{err, output, c} -} - -func fullTester(c *Command, input string) resulter { - buf := new(bytes.Buffer) - // Testing flag with invalid input - c.SetOutput(buf) - cmdEcho.AddCommand(cmdTimes) - c.AddCommand(cmdPrint, cmdEcho, cmdSubNoRun, cmdDeprecated) - c.SetArgs(strings.Split(input, " ")) - - err := c.Execute() - output := buf.String() - - return resulter{err, output, c} -} - -func logErr(t *testing.T, found, expected string) { - out := new(bytes.Buffer) - - _, _, line, ok := runtime.Caller(2) - if ok { - fmt.Fprintf(out, "Line: %d ", line) - } - fmt.Fprintf(out, "Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - t.Errorf(out.String()) -} - -func checkResultContains(t *testing.T, x resulter, check string) { - if !strings.Contains(x.Output, check) { - logErr(t, x.Output, check) - } -} - -func checkResultOmits(t *testing.T, x resulter, check string) { - if strings.Contains(x.Output, check) { - logErr(t, x.Output, check) - } -} - -func checkOutputContains(t *testing.T, c *Command, check string) { - buf := new(bytes.Buffer) - c.SetOutput(buf) - c.Execute() - - if !strings.Contains(buf.String(), check) { - logErr(t, buf.String(), check) - } -} - -func TestSingleCommand(t *testing.T) { - noRRSetupTest("print one two") - - if te != nil || tt != nil { - t.Error("Wrong command called") - } - if tp == nil { - t.Error("Wrong command called") - } - if strings.Join(tp, " ") != "one two" { - t.Error("Command didn't parse correctly") - } -} - -func TestChildCommand(t *testing.T) { - noRRSetupTest("echo times one two") - - if te != nil || tp != nil { - t.Error("Wrong command called") - } - if tt == nil { - t.Error("Wrong command called") - } - if strings.Join(tt, " ") != "one two" { - t.Error("Command didn't parse correctly") - } -} - -func TestCommandAlias(t *testing.T) { - noRRSetupTest("say times one two") - - if te != nil || tp != nil { - t.Error("Wrong command called") - } - if tt == nil { - t.Error("Wrong command called") - } - if strings.Join(tt, " ") != "one two" { - t.Error("Command didn't parse correctly") - } -} - -func TestPrefixMatching(t *testing.T) { - EnablePrefixMatching = true - noRRSetupTest("ech times one two") - - if te != nil || tp != nil { - t.Error("Wrong command called") - } - if tt == nil { - t.Error("Wrong command called") - } - if strings.Join(tt, " ") != "one two" { - t.Error("Command didn't parse correctly") - } - - EnablePrefixMatching = false -} - -func TestNoPrefixMatching(t *testing.T) { - EnablePrefixMatching = false - - noRRSetupTest("ech times one two") - - if !(tt == nil && te == nil && tp == nil) { - t.Error("Wrong command called") - } -} - -func TestAliasPrefixMatching(t *testing.T) { - EnablePrefixMatching = true - noRRSetupTest("sa times one two") - - if te != nil || tp != nil { - t.Error("Wrong command called") - } - if tt == nil { - t.Error("Wrong command called") - } - if strings.Join(tt, " ") != "one two" { - t.Error("Command didn't parse correctly") - } - EnablePrefixMatching = false -} - -func TestChildSameName(t *testing.T) { - c := initializeWithSameName() - c.AddCommand(cmdPrint, cmdEcho) - c.SetArgs(strings.Split("print one two", " ")) - c.Execute() - - if te != nil || tt != nil { - t.Error("Wrong command called") - } - if tp == nil { - t.Error("Wrong command called") - } - if strings.Join(tp, " ") != "one two" { - t.Error("Command didn't parse correctly") - } -} - -func TestGrandChildSameName(t *testing.T) { - c := initializeWithSameName() - cmdTimes.AddCommand(cmdPrint) - c.AddCommand(cmdTimes) - c.SetArgs(strings.Split("times print one two", " ")) - c.Execute() - - if te != nil || tt != nil { - t.Error("Wrong command called") - } - if tp == nil { - t.Error("Wrong command called") - } - if strings.Join(tp, " ") != "one two" { - t.Error("Command didn't parse correctly") - } -} - -func TestFlagLong(t *testing.T) { - noRRSetupTest("echo --intone=13 something here") - - if strings.Join(te, " ") != "something here" { - t.Errorf("flags didn't leave proper args remaining..%s given", te) - } - if flagi1 != 13 { - t.Errorf("int flag didn't get correct value, had %d", flagi1) - } - if flagi2 != 234 { - t.Errorf("default flag value changed, 234 expected, %d given", flagi2) - } -} - -func TestFlagShort(t *testing.T) { - noRRSetupTest("echo -i13 something here") - - if strings.Join(te, " ") != "something here" { - t.Errorf("flags didn't leave proper args remaining..%s given", te) - } - if flagi1 != 13 { - t.Errorf("int flag didn't get correct value, had %d", flagi1) - } - if flagi2 != 234 { - t.Errorf("default flag value changed, 234 expected, %d given", flagi2) - } - - noRRSetupTest("echo -i 13 something here") - - if strings.Join(te, " ") != "something here" { - t.Errorf("flags didn't leave proper args remaining..%s given", te) - } - if flagi1 != 13 { - t.Errorf("int flag didn't get correct value, had %d", flagi1) - } - if flagi2 != 234 { - t.Errorf("default flag value changed, 234 expected, %d given", flagi2) - } - - noRRSetupTest("print -i99 one two") - - if strings.Join(tp, " ") != "one two" { - t.Errorf("flags didn't leave proper args remaining..%s given", tp) - } - if flagi3 != 99 { - t.Errorf("int flag didn't get correct value, had %d", flagi3) - } - if flagi1 != 123 { - t.Errorf("default flag value changed on different command with same shortname, 234 expected, %d given", flagi2) - } -} - -func TestChildCommandFlags(t *testing.T) { - noRRSetupTest("echo times -j 99 one two") - - if strings.Join(tt, " ") != "one two" { - t.Errorf("flags didn't leave proper args remaining..%s given", tt) - } - - // Testing with flag that shouldn't be persistent - r := noRRSetupTest("echo times -j 99 -i77 one two") - - if r.Error == nil { - t.Errorf("invalid flag should generate error") - } - - if !strings.Contains(r.Output, "unknown shorthand") { - t.Errorf("Wrong error message displayed, \n %s", r.Output) - } - - if flagi2 != 99 { - t.Errorf("flag value should be 99, %d given", flagi2) - } - - if flagi1 != 123 { - t.Errorf("unset flag should have default value, expecting 123, given %d", flagi1) - } - - // Testing with flag only existing on child - r = noRRSetupTest("echo -j 99 -i77 one two") - - if r.Error == nil { - t.Errorf("invalid flag should generate error") - } - - if !strings.Contains(r.Output, "unknown shorthand flag") { - t.Errorf("Wrong error message displayed, \n %s", r.Output) - } - - // Testing with persistent flag overwritten by child - noRRSetupTest("echo times --strtwo=child one two") - - if flags2b != "child" { - t.Errorf("flag value should be child, %s given", flags2b) - } - - if flags2a != "two" { - t.Errorf("unset flag should have default value, expecting two, given %s", flags2a) - } - - // Testing flag with invalid input - r = noRRSetupTest("echo -i10E") - - if r.Error == nil { - t.Errorf("invalid input should generate error") - } - - if !strings.Contains(r.Output, "invalid argument \"10E\" for i10E") { - t.Errorf("Wrong error message displayed, \n %s", r.Output) - } -} - -func TestTrailingCommandFlags(t *testing.T) { - x := fullSetupTest("echo two -x") - - if x.Error == nil { - t.Errorf("invalid flag should generate error") - } -} - -func TestInvalidSubcommandFlags(t *testing.T) { - cmd := initializeWithRootCmd() - cmd.AddCommand(cmdTimes) - - result := simpleTester(cmd, "times --inttwo=2 --badflag=bar") - - checkResultContains(t, result, "unknown flag: --badflag") - - if strings.Contains(result.Output, "unknown flag: --inttwo") { - t.Errorf("invalid --badflag flag shouldn't fail on 'unknown' --inttwo flag") - } - -} - -func TestSubcommandArgEvaluation(t *testing.T) { - cmd := initializeWithRootCmd() - - first := &Command{ - Use: "first", - Run: func(cmd *Command, args []string) { - }, - } - cmd.AddCommand(first) - - second := &Command{ - Use: "second", - Run: func(cmd *Command, args []string) { - fmt.Fprintf(cmd.Out(), "%v", args) - }, - } - first.AddCommand(second) - - result := simpleTester(cmd, "first second first third") - - expectedOutput := fmt.Sprintf("%v", []string{"first third"}) - if result.Output != expectedOutput { - t.Errorf("exptected %v, got %v", expectedOutput, result.Output) - } -} - -func TestPersistentFlags(t *testing.T) { - fullSetupTest("echo -s something -p more here") - - // persistentFlag should act like normal flag on it's own command - if strings.Join(te, " ") != "more here" { - t.Errorf("flags didn't leave proper args remaining..%s given", te) - } - if flags1 != "something" { - t.Errorf("string flag didn't get correct value, had %v", flags1) - } - if !flagbp { - t.Errorf("persistent bool flag not parsed correctly. Expected true, had %v", flagbp) - } - - // persistentFlag should act like normal flag on it's own command - fullSetupTest("echo times -s again -c -p test here") - - if strings.Join(tt, " ") != "test here" { - t.Errorf("flags didn't leave proper args remaining..%s given", tt) - } - - if flags1 != "again" { - t.Errorf("string flag didn't get correct value, had %v", flags1) - } - - if !flagb2 { - t.Errorf("local flag not parsed correctly. Expected true, had %v", flagb2) - } - if !flagbp { - t.Errorf("persistent bool flag not parsed correctly. Expected true, had %v", flagbp) - } -} - -func TestHelpCommand(t *testing.T) { - x := fullSetupTest("help") - checkResultContains(t, x, cmdRootWithRun.Long) - - x = fullSetupTest("help echo") - checkResultContains(t, x, cmdEcho.Long) - - x = fullSetupTest("help echo times") - checkResultContains(t, x, cmdTimes.Long) -} - -func TestChildCommandHelp(t *testing.T) { - c := noRRSetupTest("print --help") - checkResultContains(t, c, strtwoParentHelp) - r := noRRSetupTest("echo times --help") - checkResultContains(t, r, strtwoChildHelp) -} - -func TestNonRunChildHelp(t *testing.T) { - x := noRRSetupTest("subnorun") - checkResultContains(t, x, cmdSubNoRun.Long) -} - -func TestRunnableRootCommand(t *testing.T) { - fullSetupTest("") - - if rootcalled != true { - t.Errorf("Root Function was not called") - } -} - -func TestRunnableRootCommandNilInput(t *testing.T) { - empty_arg := make([]string, 0) - c := initializeWithRootCmd() - - buf := new(bytes.Buffer) - // Testing flag with invalid input - c.SetOutput(buf) - cmdEcho.AddCommand(cmdTimes) - c.AddCommand(cmdPrint, cmdEcho) - c.SetArgs(empty_arg) - - c.Execute() - - if rootcalled != true { - t.Errorf("Root Function was not called") - } -} - -func TestRunnableRootCommandEmptyInput(t *testing.T) { - args := make([]string, 3) - args[0] = "" - args[1] = "--introot=12" - args[2] = "" - c := initializeWithRootCmd() - - buf := new(bytes.Buffer) - // Testing flag with invalid input - c.SetOutput(buf) - cmdEcho.AddCommand(cmdTimes) - c.AddCommand(cmdPrint, cmdEcho) - c.SetArgs(args) - - c.Execute() - - if rootcalled != true { - t.Errorf("Root Function was not called.\n\nOutput was:\n\n%s\n", buf) - } -} - -func TestInvalidSubcommandWhenArgsAllowed(t *testing.T) { - fullSetupTest("echo invalid-sub") - - if te[0] != "invalid-sub" { - t.Errorf("Subcommand didn't work...") - } -} - -func TestRootFlags(t *testing.T) { - fullSetupTest("-i 17 -b") - - if flagbr != true { - t.Errorf("flag value should be true, %v given", flagbr) - } - - if flagir != 17 { - t.Errorf("flag value should be 17, %d given", flagir) - } -} - -func TestRootHelp(t *testing.T) { - x := fullSetupTest("--help") - - checkResultContains(t, x, "Available Commands:") - checkResultContains(t, x, "for more information about a command") - - if strings.Contains(x.Output, "unknown flag: --help") { - t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) - } - - if strings.Contains(x.Output, cmdEcho.Use) { - t.Errorf("--help shouldn't display subcommand's usage, Got: \n %s", x.Output) - } - - x = fullSetupTest("echo --help") - - if strings.Contains(x.Output, cmdTimes.Use) { - t.Errorf("--help shouldn't display subsubcommand's usage, Got: \n %s", x.Output) - } - - checkResultContains(t, x, "Available Commands:") - checkResultContains(t, x, "for more information about a command") - - if strings.Contains(x.Output, "unknown flag: --help") { - t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) - } - -} - -func TestFlagAccess(t *testing.T) { - initialize() - - local := cmdTimes.LocalFlags() - inherited := cmdTimes.InheritedFlags() - - for _, f := range []string{"inttwo", "strtwo", "booltwo"} { - if local.Lookup(f) == nil { - t.Errorf("LocalFlags expected to contain %s, Got: nil", f) - } - } - if inherited.Lookup("strone") == nil { - t.Errorf("InheritedFlags expected to contain strone, Got: nil") - } - if inherited.Lookup("strtwo") != nil { - t.Errorf("InheritedFlags shouldn not contain overwritten flag strtwo") - - } -} - -func TestNoNRunnableRootCommandNilInput(t *testing.T) { - args := make([]string, 0) - c := initialize() - - buf := new(bytes.Buffer) - // Testing flag with invalid input - c.SetOutput(buf) - cmdEcho.AddCommand(cmdTimes) - c.AddCommand(cmdPrint, cmdEcho) - c.SetArgs(args) - - c.Execute() - - if !strings.Contains(buf.String(), cmdRootNoRun.Long) { - t.Errorf("Expected to get help output, Got: \n %s", buf) - } -} - -func TestRootNoCommandHelp(t *testing.T) { - x := rootOnlySetupTest("--help") - - checkResultOmits(t, x, "Available Commands:") - checkResultOmits(t, x, "for more information about a command") - - if strings.Contains(x.Output, "unknown flag: --help") { - t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) - } - - x = rootOnlySetupTest("echo --help") - - checkResultOmits(t, x, "Available Commands:") - checkResultOmits(t, x, "for more information about a command") - - if strings.Contains(x.Output, "unknown flag: --help") { - t.Errorf("--help shouldn't trigger an error, Got: \n %s", x.Output) - } -} - -func TestRootUnknownCommand(t *testing.T) { - r := noRRSetupTest("bogus") - s := "Error: unknown command \"bogus\" for \"cobra-test\"\nRun 'cobra-test --help' for usage.\n" - - if r.Output != s { - t.Errorf("Unexpected response.\nExpecting to be:\n %q\nGot:\n %q\n", s, r.Output) - } - - r = noRRSetupTest("--strtwo=a bogus") - if r.Output != s { - t.Errorf("Unexpected response.\nExpecting to be:\n %q\nGot:\n %q\n", s, r.Output) - } -} - -func TestFlagsBeforeCommand(t *testing.T) { - // short without space - x := fullSetupTest("-i10 echo") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error) - } - - // short (int) with equals - // It appears that pflags doesn't support this... - // Commenting out until support can be added - - //x = noRRSetupTest("echo -i=10") - //if x.Error != nil { - //t.Errorf("Valid Input shouldn't have errors, got:\n %s", x.Error) - //} - - // long with equals - x = noRRSetupTest("--intone=123 echo one two") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %s", x.Error) - } - - // With parsing error properly reported - x = fullSetupTest("-i10E echo") - if !strings.Contains(x.Output, "invalid argument \"10E\" for i10E") { - t.Errorf("Wrong error message displayed, \n %s", x.Output) - } - - //With quotes - x = fullSetupTest("-s=\"walking\" echo") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error) - } - - //With quotes and space - x = fullSetupTest("-s=\"walking fast\" echo") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error) - } - - //With inner quote - x = fullSetupTest("-s=\"walking \\\"Inner Quote\\\" fast\" echo") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error) - } - - //With quotes and space - x = fullSetupTest("-s=\"walking \\\"Inner Quote\\\" fast\" echo") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error) - } - -} - -func TestRemoveCommand(t *testing.T) { - versionUsed = 0 - c := initializeWithRootCmd() - c.AddCommand(cmdVersion1) - c.RemoveCommand(cmdVersion1) - x := fullTester(c, "version") - if x.Error == nil { - t.Errorf("Removed command should not have been called\n") - return - } -} - -func TestCommandWithoutSubcommands(t *testing.T) { - c := initializeWithRootCmd() - - x := simpleTester(c, "") - if x.Error != nil { - t.Errorf("Calling command without subcommands should not have error: %v", x.Error) - return - } -} - -func TestCommandWithoutSubcommandsWithArg(t *testing.T) { - c := initializeWithRootCmd() - expectedArgs := []string{"arg"} - - x := simpleTester(c, "arg") - if x.Error != nil { - t.Errorf("Calling command without subcommands but with arg should not have error: %v", x.Error) - return - } - if !reflect.DeepEqual(expectedArgs, tr) { - t.Errorf("Calling command without subcommands but with arg has wrong args: expected: %v, actual: %v", expectedArgs, tr) - return - } -} - -func TestReplaceCommandWithRemove(t *testing.T) { - versionUsed = 0 - c := initializeWithRootCmd() - c.AddCommand(cmdVersion1) - c.RemoveCommand(cmdVersion1) - c.AddCommand(cmdVersion2) - x := fullTester(c, "version") - if x.Error != nil { - t.Errorf("Valid Input shouldn't have errors, got:\n %q", x.Error) - return - } - if versionUsed == 1 { - t.Errorf("Removed command shouldn't be called\n") - } - if versionUsed != 2 { - t.Errorf("Replacing command should have been called but didn't\n") - } -} - -func TestDeprecatedSub(t *testing.T) { - c := fullSetupTest("deprecated") - - checkResultContains(t, c, cmdDeprecated.Deprecated) -} - -func TestPreRun(t *testing.T) { - noRRSetupTest("echo one two") - if echoPre == nil || echoPersPre == nil { - t.Error("PreRun or PersistentPreRun not called") - } - if rootPersPre != nil || timesPersPre != nil { - t.Error("Wrong *Pre functions called!") - } - - noRRSetupTest("echo times one two") - if timesPersPre == nil { - t.Error("PreRun or PersistentPreRun not called") - } - if echoPre != nil || echoPersPre != nil || rootPersPre != nil { - t.Error("Wrong *Pre functions called!") - } - - noRRSetupTest("print one two") - if rootPersPre == nil { - t.Error("Parent PersistentPreRun not called but should not have been") - } - if echoPre != nil || echoPersPre != nil || timesPersPre != nil { - t.Error("Wrong *Pre functions called!") - } -} - -// Check if cmdEchoSub gets PersistentPreRun from rootCmd even if is added last -func TestPeristentPreRunPropagation(t *testing.T) { - rootCmd := initialize() - - // First add the cmdEchoSub to cmdPrint - cmdPrint.AddCommand(cmdEchoSub) - // Now add cmdPrint to rootCmd - rootCmd.AddCommand(cmdPrint) - - rootCmd.SetArgs(strings.Split("print echosub lala", " ")) - rootCmd.Execute() - - if rootPersPre == nil || len(rootPersPre) == 0 || rootPersPre[0] != "lala" { - t.Error("RootCmd PersistentPreRun not called but should have been") - } -} - -func TestGlobalNormFuncPropagation(t *testing.T) { - normFunc := func(f *pflag.FlagSet, name string) pflag.NormalizedName { - return pflag.NormalizedName(name) - } - - rootCmd := initialize() - rootCmd.SetGlobalNormalizationFunc(normFunc) - if reflect.ValueOf(normFunc) != reflect.ValueOf(rootCmd.GlobalNormalizationFunc()) { - t.Error("rootCmd seems to have a wrong normalization function") - } - - // First add the cmdEchoSub to cmdPrint - cmdPrint.AddCommand(cmdEchoSub) - if cmdPrint.GlobalNormalizationFunc() != nil && cmdEchoSub.GlobalNormalizationFunc() != nil { - t.Error("cmdPrint and cmdEchoSub should had no normalization functions") - } - - // Now add cmdPrint to rootCmd - rootCmd.AddCommand(cmdPrint) - if reflect.ValueOf(cmdPrint.GlobalNormalizationFunc()).Pointer() != reflect.ValueOf(rootCmd.GlobalNormalizationFunc()).Pointer() || - reflect.ValueOf(cmdEchoSub.GlobalNormalizationFunc()).Pointer() != reflect.ValueOf(rootCmd.GlobalNormalizationFunc()).Pointer() { - t.Error("cmdPrint and cmdEchoSub should had the normalization function of rootCmd") - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/command_test.go b/Godeps/_workspace/src/github.com/spf13/cobra/command_test.go deleted file mode 100644 index 477d84e..0000000 --- a/Godeps/_workspace/src/github.com/spf13/cobra/command_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package cobra - -import ( - "reflect" - "testing" -) - -func TestStripFlags(t *testing.T) { - tests := []struct { - input []string - output []string - }{ - { - []string{"foo", "bar"}, - []string{"foo", "bar"}, - }, - { - []string{"foo", "--bar", "-b"}, - []string{"foo"}, - }, - { - []string{"-b", "foo", "--bar", "bar"}, - []string{}, - }, - { - []string{"-i10", "echo"}, - []string{"echo"}, - }, - { - []string{"-i=10", "echo"}, - []string{"echo"}, - }, - { - []string{"--int=100", "echo"}, - []string{"echo"}, - }, - { - []string{"-ib", "echo", "-bfoo", "baz"}, - []string{"echo", "baz"}, - }, - { - []string{"-i=baz", "bar", "-i", "foo", "blah"}, - []string{"bar", "blah"}, - }, - { - []string{"--int=baz", "-bbar", "-i", "foo", "blah"}, - []string{"blah"}, - }, - { - []string{"--cat", "bar", "-i", "foo", "blah"}, - []string{"bar", "blah"}, - }, - { - []string{"-c", "bar", "-i", "foo", "blah"}, - []string{"bar", "blah"}, - }, - { - []string{"--persist", "bar"}, - []string{"bar"}, - }, - { - []string{"-p", "bar"}, - []string{"bar"}, - }, - } - - cmdPrint := &Command{ - Use: "print [string to print]", - Short: "Print anything to the screen", - Long: `an utterly useless command for testing.`, - Run: func(cmd *Command, args []string) { - tp = args - }, - } - - var flagi int - var flagstr string - var flagbool bool - cmdPrint.PersistentFlags().BoolVarP(&flagbool, "persist", "p", false, "help for persistent one") - cmdPrint.Flags().IntVarP(&flagi, "int", "i", 345, "help message for flag int") - cmdPrint.Flags().StringVarP(&flagstr, "bar", "b", "bar", "help message for flag string") - cmdPrint.Flags().BoolVarP(&flagbool, "cat", "c", false, "help message for flag bool") - - for _, test := range tests { - output := stripFlags(test.input, cmdPrint) - if !reflect.DeepEqual(test.output, output) { - t.Errorf("expected: %v, got: %v", test.output, output) - } - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/md_docs_test.go b/Godeps/_workspace/src/github.com/spf13/cobra/md_docs_test.go deleted file mode 100644 index defc941..0000000 --- a/Godeps/_workspace/src/github.com/spf13/cobra/md_docs_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package cobra - -import ( - "bytes" - "fmt" - "os" - "strings" - "testing" -) - -var _ = fmt.Println -var _ = os.Stderr - -func TestGenMdDoc(t *testing.T) { - c := initializeWithRootCmd() - // Need two commands to run the command alphabetical sort - cmdEcho.AddCommand(cmdTimes, cmdEchoSub, cmdDeprecated) - c.AddCommand(cmdPrint, cmdEcho) - cmdRootWithRun.PersistentFlags().StringVarP(&flags2a, "rootflag", "r", "two", strtwoParentHelp) - - out := new(bytes.Buffer) - - // We generate on s subcommand so we have both subcommands and parents - GenMarkdown(cmdEcho, out) - found := out.String() - - // Our description - expected := cmdEcho.Long - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } - - // Better have our example - expected = cmdEcho.Example - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } - - // A local flag - expected = "boolone" - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } - - // persistent flag on parent - expected = "rootflag" - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } - - // We better output info about our parent - expected = cmdRootWithRun.Short - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } - - // And about subcommands - expected = cmdEchoSub.Short - if !strings.Contains(found, expected) { - t.Errorf("Unexpected response.\nExpecting to contain: \n %q\nGot:\n %q\n", expected, found) - } - - unexpected := cmdDeprecated.Short - if strings.Contains(found, unexpected) { - t.Errorf("Unexpected response.\nFound: %v\nBut should not have!!\n", unexpected) - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/bool_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/bool_test.go deleted file mode 100644 index febf667..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/bool_test.go +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "bytes" - "fmt" - "strconv" - "testing" -) - -// This value can be a boolean ("true", "false") or "maybe" -type triStateValue int - -const ( - triStateFalse triStateValue = 0 - triStateTrue triStateValue = 1 - triStateMaybe triStateValue = 2 -) - -const strTriStateMaybe = "maybe" - -func (v *triStateValue) IsBoolFlag() bool { - return true -} - -func (v *triStateValue) Get() interface{} { - return triStateValue(*v) -} - -func (v *triStateValue) Set(s string) error { - if s == strTriStateMaybe { - *v = triStateMaybe - return nil - } - boolVal, err := strconv.ParseBool(s) - if boolVal { - *v = triStateTrue - } else { - *v = triStateFalse - } - return err -} - -func (v *triStateValue) String() string { - if *v == triStateMaybe { - return strTriStateMaybe - } - return fmt.Sprintf("%v", bool(*v == triStateTrue)) -} - -// The type of the flag as requred by the pflag.Value interface -func (v *triStateValue) Type() string { - return "version" -} - -func setUpFlagSet(tristate *triStateValue) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - *tristate = triStateFalse - flag := f.VarPF(tristate, "tristate", "t", "tristate value (true, maybe or false)") - flag.NoOptDefVal = "true" - return f -} - -func TestExplicitTrue(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=true"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } -} - -func TestImplicitTrue(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } -} - -func TestShortFlag(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"-t"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } -} - -func TestShortFlagExtraArgument(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - // The"maybe"turns into an arg, since short boolean options will only do true/false - err := f.Parse([]string{"-t", "maybe"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateTrue { - t.Fatal("expected", triStateTrue, "(triStateTrue) but got", tristate, "instead") - } - args := f.Args() - if len(args) != 1 || args[0] != "maybe" { - t.Fatal("expected an extra 'maybe' argument to stick around") - } -} - -func TestExplicitMaybe(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=maybe"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateMaybe { - t.Fatal("expected", triStateMaybe, "(triStateMaybe) but got", tristate, "instead") - } -} - -func TestExplicitFalse(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{"--tristate=false"}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateFalse { - t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead") - } -} - -func TestImplicitFalse(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - err := f.Parse([]string{}) - if err != nil { - t.Fatal("expected no error; got", err) - } - if tristate != triStateFalse { - t.Fatal("expected", triStateFalse, "(triStateFalse) but got", tristate, "instead") - } -} - -func TestInvalidValue(t *testing.T) { - var tristate triStateValue - f := setUpFlagSet(&tristate) - var buf bytes.Buffer - f.SetOutput(&buf) - err := f.Parse([]string{"--tristate=invalid"}) - if err == nil { - t.Fatal("expected an error but did not get any, tristate has value", tristate) - } -} - -func TestBoolP(t *testing.T) { - b := BoolP("bool", "b", false, "bool value in CommandLine") - c := BoolP("c", "c", false, "other bool value") - args := []string{"--bool"} - if err := CommandLine.Parse(args); err != nil { - t.Error("expected no error, got ", err) - } - if *b != true { - t.Errorf("expected b=true got b=%s", b) - } - if *c != false { - t.Errorf("expect c=false got c=%s", c) - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/example_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/example_test.go deleted file mode 100644 index 9be7a49..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/example_test.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// These examples demonstrate more intricate uses of the flag package. -package pflag_test - -import ( - "errors" - "fmt" - "strings" - "time" - - flag "github.com/spf13/pflag" -) - -// Example 1: A single string flag called "species" with default value "gopher". -var species = flag.String("species", "gopher", "the species we are studying") - -// Example 2: A flag with a shorthand letter. -var gopherType = flag.StringP("gopher_type", "g", "pocket", "the variety of gopher") - -// Example 3: A user-defined flag type, a slice of durations. -type interval []time.Duration - -// String is the method to format the flag's value, part of the flag.Value interface. -// The String method's output will be used in diagnostics. -func (i *interval) String() string { - return fmt.Sprint(*i) -} - -func (i *interval) Type() string { - return "interval" -} - -// Set is the method to set the flag value, part of the flag.Value interface. -// Set's argument is a string to be parsed to set the flag. -// It's a comma-separated list, so we split it. -func (i *interval) Set(value string) error { - // If we wanted to allow the flag to be set multiple times, - // accumulating values, we would delete this if statement. - // That would permit usages such as - // -deltaT 10s -deltaT 15s - // and other combinations. - if len(*i) > 0 { - return errors.New("interval flag already set") - } - for _, dt := range strings.Split(value, ",") { - duration, err := time.ParseDuration(dt) - if err != nil { - return err - } - *i = append(*i, duration) - } - return nil -} - -// Define a flag to accumulate durations. Because it has a special type, -// we need to use the Var function and therefore create the flag during -// init. - -var intervalFlag interval - -func init() { - // Tie the command-line flag to the intervalFlag variable and - // set a usage message. - flag.Var(&intervalFlag, "deltaT", "comma-separated list of intervals to use between events") -} - -func Example() { - // All the interesting pieces are with the variables declared above, but - // to enable the flag package to see the flags defined there, one must - // execute, typically at the start of main (not init!): - // flag.Parse() - // We don't run it here because this is not a main function and - // the testing suite has already parsed the flags. -} diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/export_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/export_test.go deleted file mode 100644 index 9318fee..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/export_test.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "io/ioutil" - "os" -) - -// Additional routines compiled into the package only during testing. - -// ResetForTesting clears all flag state and sets the usage function as directed. -// After calling ResetForTesting, parse errors in flag handling will not -// exit the program. -func ResetForTesting(usage func()) { - CommandLine = &FlagSet{ - name: os.Args[0], - errorHandling: ContinueOnError, - output: ioutil.Discard, - } - Usage = usage -} - -// GetCommandLine returns the default FlagSet. -func GetCommandLine() *FlagSet { - return CommandLine -} diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go deleted file mode 100644 index a5928e5..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/flag_test.go +++ /dev/null @@ -1,755 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "net" - "os" - "reflect" - "sort" - "strings" - "testing" - "time" -) - -var ( - test_bool = Bool("test_bool", false, "bool value") - test_int = Int("test_int", 0, "int value") - test_int64 = Int64("test_int64", 0, "int64 value") - test_uint = Uint("test_uint", 0, "uint value") - test_uint64 = Uint64("test_uint64", 0, "uint64 value") - test_string = String("test_string", "0", "string value") - test_float64 = Float64("test_float64", 0, "float64 value") - test_duration = Duration("test_duration", 0, "time.Duration value") - test_optional_int = Int("test_optional_int", 0, "optional int value") - normalizeFlagNameInvocations = 0 -) - -func boolString(s string) string { - if s == "0" { - return "false" - } - return "true" -} - -func TestEverything(t *testing.T) { - m := make(map[string]*Flag) - desired := "0" - visitor := func(f *Flag) { - if len(f.Name) > 5 && f.Name[0:5] == "test_" { - m[f.Name] = f - ok := false - switch { - case f.Value.String() == desired: - ok = true - case f.Name == "test_bool" && f.Value.String() == boolString(desired): - ok = true - case f.Name == "test_duration" && f.Value.String() == desired+"s": - ok = true - } - if !ok { - t.Error("Visit: bad value", f.Value.String(), "for", f.Name) - } - } - } - VisitAll(visitor) - if len(m) != 9 { - t.Error("VisitAll misses some flags") - for k, v := range m { - t.Log(k, *v) - } - } - m = make(map[string]*Flag) - Visit(visitor) - if len(m) != 0 { - t.Errorf("Visit sees unset flags") - for k, v := range m { - t.Log(k, *v) - } - } - // Now set all flags - Set("test_bool", "true") - Set("test_int", "1") - Set("test_int64", "1") - Set("test_uint", "1") - Set("test_uint64", "1") - Set("test_string", "1") - Set("test_float64", "1") - Set("test_duration", "1s") - Set("test_optional_int", "1") - desired = "1" - Visit(visitor) - if len(m) != 9 { - t.Error("Visit fails after set") - for k, v := range m { - t.Log(k, *v) - } - } - // Now test they're visited in sort order. - var flagNames []string - Visit(func(f *Flag) { flagNames = append(flagNames, f.Name) }) - if !sort.StringsAreSorted(flagNames) { - t.Errorf("flag names not sorted: %v", flagNames) - } -} - -func TestUsage(t *testing.T) { - called := false - ResetForTesting(func() { called = true }) - if GetCommandLine().Parse([]string{"--x"}) == nil { - t.Error("parse did not fail for unknown flag") - } - if !called { - t.Error("did not call Usage for unknown flag") - } -} - -func TestAnnotation(t *testing.T) { - f := NewFlagSet("shorthand", ContinueOnError) - - if err := f.SetAnnotation("missing-flag", "key", nil); err == nil { - t.Errorf("Expected error setting annotation on non-existent flag") - } - - f.StringP("stringa", "a", "", "string value") - if err := f.SetAnnotation("stringa", "key", nil); err != nil { - t.Errorf("Unexpected error setting new nil annotation: %v", err) - } - if annotation := f.Lookup("stringa").Annotations["key"]; annotation != nil { - t.Errorf("Unexpected annotation: %v", annotation) - } - - f.StringP("stringb", "b", "", "string2 value") - if err := f.SetAnnotation("stringb", "key", []string{"value1"}); err != nil { - t.Errorf("Unexpected error setting new annotation: %v", err) - } - if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value1"}) { - t.Errorf("Unexpected annotation: %v", annotation) - } - - if err := f.SetAnnotation("stringb", "key", []string{"value2"}); err != nil { - t.Errorf("Unexpected error updating annotation: %v", err) - } - if annotation := f.Lookup("stringb").Annotations["key"]; !reflect.DeepEqual(annotation, []string{"value2"}) { - t.Errorf("Unexpected annotation: %v", annotation) - } -} - -func testParse(f *FlagSet, t *testing.T) { - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - boolFlag := f.Bool("bool", false, "bool value") - bool2Flag := f.Bool("bool2", false, "bool2 value") - bool3Flag := f.Bool("bool3", false, "bool3 value") - intFlag := f.Int("int", 0, "int value") - int8Flag := f.Int8("int8", 0, "int value") - int32Flag := f.Int32("int32", 0, "int value") - int64Flag := f.Int64("int64", 0, "int64 value") - uintFlag := f.Uint("uint", 0, "uint value") - uint8Flag := f.Uint8("uint8", 0, "uint value") - uint16Flag := f.Uint16("uint16", 0, "uint value") - uint32Flag := f.Uint32("uint32", 0, "uint value") - uint64Flag := f.Uint64("uint64", 0, "uint64 value") - stringFlag := f.String("string", "0", "string value") - float32Flag := f.Float32("float32", 0, "float32 value") - float64Flag := f.Float64("float64", 0, "float64 value") - ipFlag := f.IP("ip", net.ParseIP("127.0.0.1"), "ip value") - maskFlag := f.IPMask("mask", ParseIPv4Mask("0.0.0.0"), "mask value") - durationFlag := f.Duration("duration", 5*time.Second, "time.Duration value") - optionalIntNoValueFlag := f.Int("optional-int-no-value", 0, "int value") - f.Lookup("optional-int-no-value").NoOptDefVal = "9" - optionalIntWithValueFlag := f.Int("optional-int-with-value", 0, "int value") - f.Lookup("optional-int-no-value").NoOptDefVal = "9" - extra := "one-extra-argument" - args := []string{ - "--bool", - "--bool2=true", - "--bool3=false", - "--int=22", - "--int8=-8", - "--int32=-32", - "--int64=0x23", - "--uint", "24", - "--uint8=8", - "--uint16=16", - "--uint32=32", - "--uint64=25", - "--string=hello", - "--float32=-172e12", - "--float64=2718e28", - "--ip=10.11.12.13", - "--mask=255.255.255.0", - "--duration=2m", - "--optional-int-no-value", - "--optional-int-with-value=42", - extra, - } - if err := f.Parse(args); err != nil { - t.Fatal(err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *boolFlag != true { - t.Error("bool flag should be true, is ", *boolFlag) - } - if v, err := f.GetBool("bool"); err != nil || v != *boolFlag { - t.Error("GetBool does not work.") - } - if *bool2Flag != true { - t.Error("bool2 flag should be true, is ", *bool2Flag) - } - if *bool3Flag != false { - t.Error("bool3 flag should be false, is ", *bool2Flag) - } - if *intFlag != 22 { - t.Error("int flag should be 22, is ", *intFlag) - } - if v, err := f.GetInt("int"); err != nil || v != *intFlag { - t.Error("GetInt does not work.") - } - if *int8Flag != -8 { - t.Error("int8 flag should be 0x23, is ", *int8Flag) - } - if v, err := f.GetInt8("int8"); err != nil || v != *int8Flag { - t.Error("GetInt8 does not work.") - } - if *int32Flag != -32 { - t.Error("int32 flag should be 0x23, is ", *int32Flag) - } - if v, err := f.GetInt32("int32"); err != nil || v != *int32Flag { - t.Error("GetInt32 does not work.") - } - if *int64Flag != 0x23 { - t.Error("int64 flag should be 0x23, is ", *int64Flag) - } - if v, err := f.GetInt64("int64"); err != nil || v != *int64Flag { - t.Error("GetInt64 does not work.") - } - if *uintFlag != 24 { - t.Error("uint flag should be 24, is ", *uintFlag) - } - if v, err := f.GetUint("uint"); err != nil || v != *uintFlag { - t.Error("GetUint does not work.") - } - if *uint8Flag != 8 { - t.Error("uint8 flag should be 8, is ", *uint8Flag) - } - if v, err := f.GetUint8("uint8"); err != nil || v != *uint8Flag { - t.Error("GetUint8 does not work.") - } - if *uint16Flag != 16 { - t.Error("uint16 flag should be 16, is ", *uint16Flag) - } - if v, err := f.GetUint16("uint16"); err != nil || v != *uint16Flag { - t.Error("GetUint16 does not work.") - } - if *uint32Flag != 32 { - t.Error("uint32 flag should be 32, is ", *uint32Flag) - } - if v, err := f.GetUint32("uint32"); err != nil || v != *uint32Flag { - t.Error("GetUint32 does not work.") - } - if *uint64Flag != 25 { - t.Error("uint64 flag should be 25, is ", *uint64Flag) - } - if v, err := f.GetUint64("uint64"); err != nil || v != *uint64Flag { - t.Error("GetUint64 does not work.") - } - if *stringFlag != "hello" { - t.Error("string flag should be `hello`, is ", *stringFlag) - } - if v, err := f.GetString("string"); err != nil || v != *stringFlag { - t.Error("GetString does not work.") - } - if *float32Flag != -172e12 { - t.Error("float32 flag should be -172e12, is ", *float32Flag) - } - if v, err := f.GetFloat32("float32"); err != nil || v != *float32Flag { - t.Errorf("GetFloat32 returned %v but float32Flag was %v", v, *float32Flag) - } - if *float64Flag != 2718e28 { - t.Error("float64 flag should be 2718e28, is ", *float64Flag) - } - if v, err := f.GetFloat64("float64"); err != nil || v != *float64Flag { - t.Errorf("GetFloat64 returned %v but float64Flag was %v", v, *float64Flag) - } - if !(*ipFlag).Equal(net.ParseIP("10.11.12.13")) { - t.Error("ip flag should be 10.11.12.13, is ", *ipFlag) - } - if v, err := f.GetIP("ip"); err != nil || !v.Equal(*ipFlag) { - t.Errorf("GetIP returned %v but ipFlag was %v", v, *ipFlag) - } - if (*maskFlag).String() != ParseIPv4Mask("255.255.255.0").String() { - t.Error("mask flag should be 255.255.255.0, is ", (*maskFlag).String()) - } - if v, err := f.GetIPv4Mask("mask"); err != nil || v.String() != (*maskFlag).String() { - t.Errorf("GetIP returned %v but maskFlag was %v", v, *maskFlag, err) - } - if *durationFlag != 2*time.Minute { - t.Error("duration flag should be 2m, is ", *durationFlag) - } - if v, err := f.GetDuration("duration"); err != nil || v != *durationFlag { - t.Error("GetDuration does not work.") - } - if _, err := f.GetInt("duration"); err == nil { - t.Error("GetInt parsed a time.Duration?!?!") - } - if *optionalIntNoValueFlag != 9 { - t.Error("optional int flag should be the default value, is ", *optionalIntNoValueFlag) - } - if *optionalIntWithValueFlag != 42 { - t.Error("optional int flag should be 42, is ", *optionalIntWithValueFlag) - } - if len(f.Args()) != 1 { - t.Error("expected one argument, got", len(f.Args())) - } else if f.Args()[0] != extra { - t.Errorf("expected argument %q got %q", extra, f.Args()[0]) - } -} - -func TestShorthand(t *testing.T) { - f := NewFlagSet("shorthand", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - boolaFlag := f.BoolP("boola", "a", false, "bool value") - boolbFlag := f.BoolP("boolb", "b", false, "bool2 value") - boolcFlag := f.BoolP("boolc", "c", false, "bool3 value") - booldFlag := f.BoolP("boold", "d", false, "bool4 value") - stringaFlag := f.StringP("stringa", "s", "0", "string value") - stringzFlag := f.StringP("stringz", "z", "0", "string value") - extra := "interspersed-argument" - notaflag := "--i-look-like-a-flag" - args := []string{ - "-ab", - extra, - "-cs", - "hello", - "-z=something", - "-d=true", - "--", - notaflag, - } - f.SetOutput(ioutil.Discard) - if err := f.Parse(args); err != nil { - t.Error("expected no error, got ", err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *boolaFlag != true { - t.Error("boola flag should be true, is ", *boolaFlag) - } - if *boolbFlag != true { - t.Error("boolb flag should be true, is ", *boolbFlag) - } - if *boolcFlag != true { - t.Error("boolc flag should be true, is ", *boolcFlag) - } - if *booldFlag != true { - t.Error("boold flag should be true, is ", *booldFlag) - } - if *stringaFlag != "hello" { - t.Error("stringa flag should be `hello`, is ", *stringaFlag) - } - if *stringzFlag != "something" { - t.Error("stringz flag should be `something`, is ", *stringzFlag) - } - if len(f.Args()) != 2 { - t.Error("expected one argument, got", len(f.Args())) - } else if f.Args()[0] != extra { - t.Errorf("expected argument %q got %q", extra, f.Args()[0]) - } else if f.Args()[1] != notaflag { - t.Errorf("expected argument %q got %q", notaflag, f.Args()[1]) - } -} - -func TestParse(t *testing.T) { - ResetForTesting(func() { t.Error("bad parse") }) - testParse(GetCommandLine(), t) -} - -func TestFlagSetParse(t *testing.T) { - testParse(NewFlagSet("test", ContinueOnError), t) -} - -func replaceSeparators(name string, from []string, to string) string { - result := name - for _, sep := range from { - result = strings.Replace(result, sep, to, -1) - } - // Type convert to indicate normalization has been done. - return result -} - -func wordSepNormalizeFunc(f *FlagSet, name string) NormalizedName { - seps := []string{"-", "_"} - name = replaceSeparators(name, seps, ".") - normalizeFlagNameInvocations++ - - return NormalizedName(name) -} - -func testWordSepNormalizedNames(args []string, t *testing.T) { - f := NewFlagSet("normalized", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - withDashFlag := f.Bool("with-dash-flag", false, "bool value") - // Set this after some flags have been added and before others. - f.SetNormalizeFunc(wordSepNormalizeFunc) - withUnderFlag := f.Bool("with_under_flag", false, "bool value") - withBothFlag := f.Bool("with-both_flag", false, "bool value") - if err := f.Parse(args); err != nil { - t.Fatal(err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *withDashFlag != true { - t.Error("withDashFlag flag should be true, is ", *withDashFlag) - } - if *withUnderFlag != true { - t.Error("withUnderFlag flag should be true, is ", *withUnderFlag) - } - if *withBothFlag != true { - t.Error("withBothFlag flag should be true, is ", *withBothFlag) - } -} - -func TestWordSepNormalizedNames(t *testing.T) { - args := []string{ - "--with-dash-flag", - "--with-under-flag", - "--with-both-flag", - } - testWordSepNormalizedNames(args, t) - - args = []string{ - "--with_dash_flag", - "--with_under_flag", - "--with_both_flag", - } - testWordSepNormalizedNames(args, t) - - args = []string{ - "--with-dash_flag", - "--with-under_flag", - "--with-both_flag", - } - testWordSepNormalizedNames(args, t) -} - -func aliasAndWordSepFlagNames(f *FlagSet, name string) NormalizedName { - seps := []string{"-", "_"} - - oldName := replaceSeparators("old-valid_flag", seps, ".") - newName := replaceSeparators("valid-flag", seps, ".") - - name = replaceSeparators(name, seps, ".") - switch name { - case oldName: - name = newName - break - } - - return NormalizedName(name) -} - -func TestCustomNormalizedNames(t *testing.T) { - f := NewFlagSet("normalized", ContinueOnError) - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - - validFlag := f.Bool("valid-flag", false, "bool value") - f.SetNormalizeFunc(aliasAndWordSepFlagNames) - someOtherFlag := f.Bool("some-other-flag", false, "bool value") - - args := []string{"--old_valid_flag", "--some-other_flag"} - if err := f.Parse(args); err != nil { - t.Fatal(err) - } - - if *validFlag != true { - t.Errorf("validFlag is %v even though we set the alias --old_valid_falg", *validFlag) - } - if *someOtherFlag != true { - t.Error("someOtherFlag should be true, is ", *someOtherFlag) - } -} - -// Every flag we add, the name (displayed also in usage) should normalized -func TestNormalizationFuncShouldChangeFlagName(t *testing.T) { - // Test normalization after addition - f := NewFlagSet("normalized", ContinueOnError) - - f.Bool("valid_flag", false, "bool value") - if f.Lookup("valid_flag").Name != "valid_flag" { - t.Error("The new flag should have the name 'valid_flag' instead of ", f.Lookup("valid_flag").Name) - } - - f.SetNormalizeFunc(wordSepNormalizeFunc) - if f.Lookup("valid_flag").Name != "valid.flag" { - t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name) - } - - // Test normalization before addition - f = NewFlagSet("normalized", ContinueOnError) - f.SetNormalizeFunc(wordSepNormalizeFunc) - - f.Bool("valid_flag", false, "bool value") - if f.Lookup("valid_flag").Name != "valid.flag" { - t.Error("The new flag should have the name 'valid.flag' instead of ", f.Lookup("valid_flag").Name) - } -} - -// Declare a user-defined flag type. -type flagVar []string - -func (f *flagVar) String() string { - return fmt.Sprint([]string(*f)) -} - -func (f *flagVar) Set(value string) error { - *f = append(*f, value) - return nil -} - -func (f *flagVar) Type() string { - return "flagVar" -} - -func TestUserDefined(t *testing.T) { - var flags FlagSet - flags.Init("test", ContinueOnError) - var v flagVar - flags.VarP(&v, "v", "v", "usage") - if err := flags.Parse([]string{"--v=1", "-v2", "-v", "3"}); err != nil { - t.Error(err) - } - if len(v) != 3 { - t.Fatal("expected 3 args; got ", len(v)) - } - expect := "[1 2 3]" - if v.String() != expect { - t.Errorf("expected value %q got %q", expect, v.String()) - } -} - -func TestSetOutput(t *testing.T) { - var flags FlagSet - var buf bytes.Buffer - flags.SetOutput(&buf) - flags.Init("test", ContinueOnError) - flags.Parse([]string{"--unknown"}) - if out := buf.String(); !strings.Contains(out, "--unknown") { - t.Logf("expected output mentioning unknown; got %q", out) - } -} - -// This tests that one can reset the flags. This still works but not well, and is -// superseded by FlagSet. -func TestChangingArgs(t *testing.T) { - ResetForTesting(func() { t.Fatal("bad parse") }) - oldArgs := os.Args - defer func() { os.Args = oldArgs }() - os.Args = []string{"cmd", "--before", "subcmd"} - before := Bool("before", false, "") - if err := GetCommandLine().Parse(os.Args[1:]); err != nil { - t.Fatal(err) - } - cmd := Arg(0) - os.Args = []string{"subcmd", "--after", "args"} - after := Bool("after", false, "") - Parse() - args := Args() - - if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" { - t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args) - } -} - -// Test that -help invokes the usage message and returns ErrHelp. -func TestHelp(t *testing.T) { - var helpCalled = false - fs := NewFlagSet("help test", ContinueOnError) - fs.Usage = func() { helpCalled = true } - var flag bool - fs.BoolVar(&flag, "flag", false, "regular flag") - // Regular flag invocation should work - err := fs.Parse([]string{"--flag=true"}) - if err != nil { - t.Fatal("expected no error; got ", err) - } - if !flag { - t.Error("flag was not set by --flag") - } - if helpCalled { - t.Error("help called for regular flag") - helpCalled = false // reset for next test - } - // Help flag should work as expected. - err = fs.Parse([]string{"--help"}) - if err == nil { - t.Fatal("error expected") - } - if err != ErrHelp { - t.Fatal("expected ErrHelp; got ", err) - } - if !helpCalled { - t.Fatal("help was not called") - } - // If we define a help flag, that should override. - var help bool - fs.BoolVar(&help, "help", false, "help flag") - helpCalled = false - err = fs.Parse([]string{"--help"}) - if err != nil { - t.Fatal("expected no error for defined --help; got ", err) - } - if helpCalled { - t.Fatal("help was called; should not have been for defined help flag") - } -} - -func TestNoInterspersed(t *testing.T) { - f := NewFlagSet("test", ContinueOnError) - f.SetInterspersed(false) - f.Bool("true", true, "always true") - f.Bool("false", false, "always false") - err := f.Parse([]string{"--true", "break", "--false"}) - if err != nil { - t.Fatal("expected no error; got ", err) - } - args := f.Args() - if len(args) != 2 || args[0] != "break" || args[1] != "--false" { - t.Fatal("expected interspersed options/non-options to fail") - } -} - -func TestTermination(t *testing.T) { - f := NewFlagSet("termination", ContinueOnError) - boolFlag := f.BoolP("bool", "l", false, "bool value") - if f.Parsed() { - t.Error("f.Parse() = true before Parse") - } - arg1 := "ls" - arg2 := "-l" - args := []string{ - "--", - arg1, - arg2, - } - f.SetOutput(ioutil.Discard) - if err := f.Parse(args); err != nil { - t.Fatal("expected no error; got ", err) - } - if !f.Parsed() { - t.Error("f.Parse() = false after Parse") - } - if *boolFlag { - t.Error("expected boolFlag=false, got true") - } - if len(f.Args()) != 2 { - t.Errorf("expected 2 arguments, got %d: %v", len(f.Args()), f.Args()) - } - if f.Args()[0] != arg1 { - t.Errorf("expected argument %q got %q", arg1, f.Args()[0]) - } - if f.Args()[1] != arg2 { - t.Errorf("expected argument %q got %q", arg2, f.Args()[1]) - } -} - -func TestDeprecatedFlagInDocs(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("badflag", true, "always true") - f.MarkDeprecated("badflag", "use --good-flag instead") - - out := new(bytes.Buffer) - f.SetOutput(out) - f.PrintDefaults() - - if strings.Contains(out.String(), "badflag") { - t.Errorf("found deprecated flag in usage!") - } -} - -func parseReturnStderr(t *testing.T, f *FlagSet, args []string) (string, error) { - oldStderr := os.Stderr - r, w, _ := os.Pipe() - os.Stderr = w - - err := f.Parse(args) - - outC := make(chan string) - // copy the output in a separate goroutine so printing can't block indefinitely - go func() { - var buf bytes.Buffer - io.Copy(&buf, r) - outC <- buf.String() - }() - - w.Close() - os.Stderr = oldStderr - out := <-outC - - return out, err -} - -func TestDeprecatedFlagUsage(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("badflag", true, "always true") - usageMsg := "use --good-flag instead" - f.MarkDeprecated("badflag", usageMsg) - - args := []string{"--badflag"} - out, err := parseReturnStderr(t, f, args) - if err != nil { - t.Fatal("expected no error; got ", err) - } - - if !strings.Contains(out, usageMsg) { - t.Errorf("usageMsg not printed when using a deprecated flag!") - } -} - -func TestDeprecatedFlagUsageNormalized(t *testing.T) { - f := NewFlagSet("bob", ContinueOnError) - f.Bool("bad-double_flag", true, "always true") - f.SetNormalizeFunc(wordSepNormalizeFunc) - usageMsg := "use --good-flag instead" - f.MarkDeprecated("bad_double-flag", usageMsg) - - args := []string{"--bad_double_flag"} - out, err := parseReturnStderr(t, f, args) - if err != nil { - t.Fatal("expected no error; got ", err) - } - - if !strings.Contains(out, usageMsg) { - t.Errorf("usageMsg not printed when using a deprecated flag!") - } -} - -// Name normalization function should be called only once on flag addition -func TestMultipleNormalizeFlagNameInvocations(t *testing.T) { - normalizeFlagNameInvocations = 0 - - f := NewFlagSet("normalized", ContinueOnError) - f.SetNormalizeFunc(wordSepNormalizeFunc) - f.Bool("with_under_flag", false, "bool value") - - if normalizeFlagNameInvocations != 1 { - t.Fatal("Expected normalizeFlagNameInvocations to be 1; got ", normalizeFlagNameInvocations) - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int_slice_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/int_slice_test.go deleted file mode 100644 index d162e86..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/int_slice_test.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "fmt" - "strconv" - "strings" - "testing" -) - -func setUpISFlagSet(isp *[]int) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.IntSliceVar(isp, "is", []int{}, "Command seperated list!") - return f -} - -func TestIS(t *testing.T) { - var is []int - f := setUpISFlagSet(&is) - - vals := []string{"1", "2", "4", "3"} - arg := fmt.Sprintf("--is=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range is { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %s but got: %d", i, vals[i], v) - } - } - getIS, err := f.GetIntSlice("is") - for i, v := range getIS { - d, err := strconv.Atoi(vals[i]) - if err != nil { - t.Fatalf("got error: %v", err) - } - if d != v { - t.Fatalf("expected is[%d] to be %s but got: %d from GetIntSlice", i, vals[i], v) - } - } -} diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/string_slice_test.go b/Godeps/_workspace/src/github.com/spf13/pflag/string_slice_test.go deleted file mode 100644 index c37a91a..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/string_slice_test.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package pflag - -import ( - "fmt" - "strings" - "testing" -) - -func setUpSSFlagSet(ssp *[]string) *FlagSet { - f := NewFlagSet("test", ContinueOnError) - f.StringSliceVar(ssp, "ss", []string{}, "Command seperated list!") - return f -} - -func TestSS(t *testing.T) { - var ss []string - f := setUpSSFlagSet(&ss) - - vals := []string{"one", "two", "4", "3"} - arg := fmt.Sprintf("--ss=%s", strings.Join(vals, ",")) - err := f.Parse([]string{arg}) - if err != nil { - t.Fatal("expected no error; got", err) - } - for i, v := range ss { - if vals[i] != v { - t.Fatal("expected ss[%d] to be %s but got: %s", i, vals[i], v) - } - } - - getSS, err := f.GetStringSlice("ss") - if err != nil { - t.Fatal("got an error from GetStringSlice(): %v", err) - } - for i, v := range getSS { - if vals[i] != v { - t.Fatal("expected ss[%d] to be %s from GetStringSlice but got: %s", i, vals[i], v) - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/golang.org/x/net/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/golang.org/x/net/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context_test.go b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go deleted file mode 100644 index e64afa6..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/context/context_test.go +++ /dev/null @@ -1,575 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package context - -import ( - "fmt" - "math/rand" - "runtime" - "strings" - "sync" - "testing" - "time" -) - -// otherContext is a Context that's not one of the types defined in context.go. -// This lets us test code paths that differ based on the underlying type of the -// Context. -type otherContext struct { - Context -} - -func TestBackground(t *testing.T) { - c := Background() - if c == nil { - t.Fatalf("Background returned nil") - } - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - if got, want := fmt.Sprint(c), "context.Background"; got != want { - t.Errorf("Background().String() = %q want %q", got, want) - } -} - -func TestTODO(t *testing.T) { - c := TODO() - if c == nil { - t.Fatalf("TODO returned nil") - } - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - if got, want := fmt.Sprint(c), "context.TODO"; got != want { - t.Errorf("TODO().String() = %q want %q", got, want) - } -} - -func TestWithCancel(t *testing.T) { - c1, cancel := WithCancel(Background()) - - if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { - t.Errorf("c1.String() = %q want %q", got, want) - } - - o := otherContext{c1} - c2, _ := WithCancel(o) - contexts := []Context{c1, o, c2} - - for i, c := range contexts { - if d := c.Done(); d == nil { - t.Errorf("c[%d].Done() == %v want non-nil", i, d) - } - if e := c.Err(); e != nil { - t.Errorf("c[%d].Err() == %v want nil", i, e) - } - - select { - case x := <-c.Done(): - t.Errorf("<-c.Done() == %v want nothing (it should block)", x) - default: - } - } - - cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate - - for i, c := range contexts { - select { - case <-c.Done(): - default: - t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) - } - if e := c.Err(); e != Canceled { - t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) - } - } -} - -func TestParentFinishesChild(t *testing.T) { - // Context tree: - // parent -> cancelChild - // parent -> valueChild -> timerChild - parent, cancel := WithCancel(Background()) - cancelChild, stop := WithCancel(parent) - defer stop() - valueChild := WithValue(parent, "key", "value") - timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) - defer stop() - - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - case x := <-cancelChild.Done(): - t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) - case x := <-timerChild.Done(): - t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) - case x := <-valueChild.Done(): - t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) - default: - } - - // The parent's children should contain the two cancelable children. - pc := parent.(*cancelCtx) - cc := cancelChild.(*cancelCtx) - tc := timerChild.(*timerCtx) - pc.mu.Lock() - if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { - t.Errorf("bad linkage: pc.children = %v, want %v and %v", - pc.children, cc, tc) - } - pc.mu.Unlock() - - if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { - t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) - } - if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { - t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) - } - - cancel() - - pc.mu.Lock() - if len(pc.children) != 0 { - t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) - } - pc.mu.Unlock() - - // parent and children should all be finished. - check := func(ctx Context, name string) { - select { - case <-ctx.Done(): - default: - t.Errorf("<-%s.Done() blocked, but shouldn't have", name) - } - if e := ctx.Err(); e != Canceled { - t.Errorf("%s.Err() == %v want %v", name, e, Canceled) - } - } - check(parent, "parent") - check(cancelChild, "cancelChild") - check(valueChild, "valueChild") - check(timerChild, "timerChild") - - // WithCancel should return a canceled context on a canceled parent. - precanceledChild := WithValue(parent, "key", "value") - select { - case <-precanceledChild.Done(): - default: - t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") - } - if e := precanceledChild.Err(); e != Canceled { - t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) - } -} - -func TestChildFinishesFirst(t *testing.T) { - cancelable, stop := WithCancel(Background()) - defer stop() - for _, parent := range []Context{Background(), cancelable} { - child, cancel := WithCancel(parent) - - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - case x := <-child.Done(): - t.Errorf("<-child.Done() == %v want nothing (it should block)", x) - default: - } - - cc := child.(*cancelCtx) - pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() - if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { - t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) - } - - if pcok { - pc.mu.Lock() - if len(pc.children) != 1 || !pc.children[cc] { - t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) - } - pc.mu.Unlock() - } - - cancel() - - if pcok { - pc.mu.Lock() - if len(pc.children) != 0 { - t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) - } - pc.mu.Unlock() - } - - // child should be finished. - select { - case <-child.Done(): - default: - t.Errorf("<-child.Done() blocked, but shouldn't have") - } - if e := child.Err(); e != Canceled { - t.Errorf("child.Err() == %v want %v", e, Canceled) - } - - // parent should not be finished. - select { - case x := <-parent.Done(): - t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) - default: - } - if e := parent.Err(); e != nil { - t.Errorf("parent.Err() == %v want nil", e) - } - } -} - -func testDeadline(c Context, wait time.Duration, t *testing.T) { - select { - case <-time.After(wait): - t.Fatalf("context should have timed out") - case <-c.Done(): - } - if e := c.Err(); e != DeadlineExceeded { - t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) - } -} - -func TestDeadline(t *testing.T) { - c, _ := WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) - if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { - t.Errorf("c.String() = %q want prefix %q", got, prefix) - } - testDeadline(c, 200*time.Millisecond, t) - - c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) - o := otherContext{c} - testDeadline(o, 200*time.Millisecond, t) - - c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) - o = otherContext{c} - c, _ = WithDeadline(o, time.Now().Add(300*time.Millisecond)) - testDeadline(c, 200*time.Millisecond, t) -} - -func TestTimeout(t *testing.T) { - c, _ := WithTimeout(Background(), 100*time.Millisecond) - if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { - t.Errorf("c.String() = %q want prefix %q", got, prefix) - } - testDeadline(c, 200*time.Millisecond, t) - - c, _ = WithTimeout(Background(), 100*time.Millisecond) - o := otherContext{c} - testDeadline(o, 200*time.Millisecond, t) - - c, _ = WithTimeout(Background(), 100*time.Millisecond) - o = otherContext{c} - c, _ = WithTimeout(o, 300*time.Millisecond) - testDeadline(c, 200*time.Millisecond, t) -} - -func TestCanceledTimeout(t *testing.T) { - c, _ := WithTimeout(Background(), 200*time.Millisecond) - o := otherContext{c} - c, cancel := WithTimeout(o, 400*time.Millisecond) - cancel() - time.Sleep(100 * time.Millisecond) // let cancelation propagate - select { - case <-c.Done(): - default: - t.Errorf("<-c.Done() blocked, but shouldn't have") - } - if e := c.Err(); e != Canceled { - t.Errorf("c.Err() == %v want %v", e, Canceled) - } -} - -type key1 int -type key2 int - -var k1 = key1(1) -var k2 = key2(1) // same int as k1, different type -var k3 = key2(3) // same type as k2, different int - -func TestValues(t *testing.T) { - check := func(c Context, nm, v1, v2, v3 string) { - if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { - t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) - } - if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { - t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) - } - if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { - t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) - } - } - - c0 := Background() - check(c0, "c0", "", "", "") - - c1 := WithValue(Background(), k1, "c1k1") - check(c1, "c1", "c1k1", "", "") - - if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { - t.Errorf("c.String() = %q want %q", got, want) - } - - c2 := WithValue(c1, k2, "c2k2") - check(c2, "c2", "c1k1", "c2k2", "") - - c3 := WithValue(c2, k3, "c3k3") - check(c3, "c2", "c1k1", "c2k2", "c3k3") - - c4 := WithValue(c3, k1, nil) - check(c4, "c4", "", "c2k2", "c3k3") - - o0 := otherContext{Background()} - check(o0, "o0", "", "", "") - - o1 := otherContext{WithValue(Background(), k1, "c1k1")} - check(o1, "o1", "c1k1", "", "") - - o2 := WithValue(o1, k2, "o2k2") - check(o2, "o2", "c1k1", "o2k2", "") - - o3 := otherContext{c4} - check(o3, "o3", "", "c2k2", "c3k3") - - o4 := WithValue(o3, k3, nil) - check(o4, "o4", "", "c2k2", "") -} - -func TestAllocs(t *testing.T) { - bg := Background() - for _, test := range []struct { - desc string - f func() - limit float64 - gccgoLimit float64 - }{ - { - desc: "Background()", - f: func() { Background() }, - limit: 0, - gccgoLimit: 0, - }, - { - desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), - f: func() { - c := WithValue(bg, k1, nil) - c.Value(k1) - }, - limit: 3, - gccgoLimit: 3, - }, - { - desc: "WithTimeout(bg, 15*time.Millisecond)", - f: func() { - c, _ := WithTimeout(bg, 15*time.Millisecond) - <-c.Done() - }, - limit: 8, - gccgoLimit: 15, - }, - { - desc: "WithCancel(bg)", - f: func() { - c, cancel := WithCancel(bg) - cancel() - <-c.Done() - }, - limit: 5, - gccgoLimit: 8, - }, - { - desc: "WithTimeout(bg, 100*time.Millisecond)", - f: func() { - c, cancel := WithTimeout(bg, 100*time.Millisecond) - cancel() - <-c.Done() - }, - limit: 8, - gccgoLimit: 25, - }, - } { - limit := test.limit - if runtime.Compiler == "gccgo" { - // gccgo does not yet do escape analysis. - // TOOD(iant): Remove this when gccgo does do escape analysis. - limit = test.gccgoLimit - } - if n := testing.AllocsPerRun(100, test.f); n > limit { - t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) - } - } -} - -func TestSimultaneousCancels(t *testing.T) { - root, cancel := WithCancel(Background()) - m := map[Context]CancelFunc{root: cancel} - q := []Context{root} - // Create a tree of contexts. - for len(q) != 0 && len(m) < 100 { - parent := q[0] - q = q[1:] - for i := 0; i < 4; i++ { - ctx, cancel := WithCancel(parent) - m[ctx] = cancel - q = append(q, ctx) - } - } - // Start all the cancels in a random order. - var wg sync.WaitGroup - wg.Add(len(m)) - for _, cancel := range m { - go func(cancel CancelFunc) { - cancel() - wg.Done() - }(cancel) - } - // Wait on all the contexts in a random order. - for ctx := range m { - select { - case <-ctx.Done(): - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) - } - } - // Wait for all the cancel functions to return. - done := make(chan struct{}) - go func() { - wg.Wait() - close(done) - }() - select { - case <-done: - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) - } -} - -func TestInterlockedCancels(t *testing.T) { - parent, cancelParent := WithCancel(Background()) - child, cancelChild := WithCancel(parent) - go func() { - parent.Done() - cancelChild() - }() - cancelParent() - select { - case <-child.Done(): - case <-time.After(1 * time.Second): - buf := make([]byte, 10<<10) - n := runtime.Stack(buf, true) - t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) - } -} - -func TestLayersCancel(t *testing.T) { - testLayers(t, time.Now().UnixNano(), false) -} - -func TestLayersTimeout(t *testing.T) { - testLayers(t, time.Now().UnixNano(), true) -} - -func testLayers(t *testing.T, seed int64, testTimeout bool) { - rand.Seed(seed) - errorf := func(format string, a ...interface{}) { - t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) - } - const ( - timeout = 200 * time.Millisecond - minLayers = 30 - ) - type value int - var ( - vals []*value - cancels []CancelFunc - numTimers int - ctx = Background() - ) - for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { - switch rand.Intn(3) { - case 0: - v := new(value) - ctx = WithValue(ctx, v, v) - vals = append(vals, v) - case 1: - var cancel CancelFunc - ctx, cancel = WithCancel(ctx) - cancels = append(cancels, cancel) - case 2: - var cancel CancelFunc - ctx, cancel = WithTimeout(ctx, timeout) - cancels = append(cancels, cancel) - numTimers++ - } - } - checkValues := func(when string) { - for _, key := range vals { - if val := ctx.Value(key).(*value); key != val { - errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) - } - } - } - select { - case <-ctx.Done(): - errorf("ctx should not be canceled yet") - default: - } - if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { - t.Errorf("ctx.String() = %q want prefix %q", s, prefix) - } - t.Log(ctx) - checkValues("before cancel") - if testTimeout { - select { - case <-ctx.Done(): - case <-time.After(timeout + timeout/10): - errorf("ctx should have timed out") - } - checkValues("after timeout") - } else { - cancel := cancels[rand.Intn(len(cancels))] - cancel() - select { - case <-ctx.Done(): - default: - errorf("ctx should be canceled") - } - checkValues("after cancel") - } -} - -func TestCancelRemoves(t *testing.T) { - checkChildren := func(when string, ctx Context, want int) { - if got := len(ctx.(*cancelCtx).children); got != want { - t.Errorf("%s: context has %d children, want %d", when, got, want) - } - } - - ctx, _ := WithCancel(Background()) - checkChildren("after creation", ctx, 0) - _, cancel := WithCancel(ctx) - checkChildren("with WithCancel child ", ctx, 1) - cancel() - checkChildren("after cancelling WithCancel child", ctx, 0) - - ctx, _ = WithCancel(Background()) - checkChildren("after creation", ctx, 0) - _, cancel = WithTimeout(ctx, 60*time.Minute) - checkChildren("with WithTimeout child ", ctx, 1) - cancel() - checkChildren("after cancelling WithTimeout child", ctx, 0) -} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go deleted file mode 100644 index 47b53d7..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp_test.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package ctxhttp - -import ( - "io/ioutil" - "net/http" - "net/http/httptest" - "testing" - "time" - - "golang.org/x/net/context" -) - -const ( - requestDuration = 100 * time.Millisecond - requestBody = "ok" -) - -func TestNoTimeout(t *testing.T) { - ctx := context.Background() - resp, err := doRequest(ctx) - - if resp == nil || err != nil { - t.Fatalf("error received from client: %v %v", err, resp) - } -} -func TestCancel(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - go func() { - time.Sleep(requestDuration / 2) - cancel() - }() - - resp, err := doRequest(ctx) - - if resp != nil || err == nil { - t.Fatalf("expected error, didn't get one. resp: %v", resp) - } - if err != ctx.Err() { - t.Fatalf("expected error from context but got: %v", err) - } -} - -func TestCancelAfterRequest(t *testing.T) { - ctx, cancel := context.WithCancel(context.Background()) - - resp, err := doRequest(ctx) - - // Cancel before reading the body. - // Request.Body should still be readable after the context is canceled. - cancel() - - b, err := ioutil.ReadAll(resp.Body) - if err != nil || string(b) != requestBody { - t.Fatalf("could not read body: %q %v", b, err) - } -} - -func doRequest(ctx context.Context) (*http.Response, error) { - var okHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - time.Sleep(requestDuration) - w.Write([]byte(requestBody)) - }) - - serv := httptest.NewServer(okHandler) - defer serv.Close() - - return Get(ctx, nil, serv.URL) -} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go deleted file mode 100644 index a6754dc..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package context_test - -import ( - "fmt" - "time" - - "golang.org/x/net/context" -) - -func ExampleWithTimeout() { - // Pass a context with a timeout to tell a blocking function that it - // should abandon its work after the timeout elapses. - ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) - select { - case <-time.After(200 * time.Millisecond): - fmt.Println("overslept") - case <-ctx.Done(): - fmt.Println(ctx.Err()) // prints "context deadline exceeded" - } - // Output: - // context deadline exceeded -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/atom_test.go b/Godeps/_workspace/src/golang.org/x/net/html/atom/atom_test.go deleted file mode 100644 index 6e33704..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/atom/atom_test.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package atom - -import ( - "sort" - "testing" -) - -func TestKnown(t *testing.T) { - for _, s := range testAtomList { - if atom := Lookup([]byte(s)); atom.String() != s { - t.Errorf("Lookup(%q) = %#x (%q)", s, uint32(atom), atom.String()) - } - } -} - -func TestHits(t *testing.T) { - for _, a := range table { - if a == 0 { - continue - } - got := Lookup([]byte(a.String())) - if got != a { - t.Errorf("Lookup(%q) = %#x, want %#x", a.String(), uint32(got), uint32(a)) - } - } -} - -func TestMisses(t *testing.T) { - testCases := []string{ - "", - "\x00", - "\xff", - "A", - "DIV", - "Div", - "dIV", - "aa", - "a\x00", - "ab", - "abb", - "abbr0", - "abbr ", - " abbr", - " a", - "acceptcharset", - "acceptCharset", - "accept_charset", - "h0", - "h1h2", - "h7", - "onClick", - "λ", - // The following string has the same hash (0xa1d7fab7) as "onmouseover". - "\x00\x00\x00\x00\x00\x50\x18\xae\x38\xd0\xb7", - } - for _, tc := range testCases { - got := Lookup([]byte(tc)) - if got != 0 { - t.Errorf("Lookup(%q): got %d, want 0", tc, got) - } - } -} - -func TestForeignObject(t *testing.T) { - const ( - afo = Foreignobject - afO = ForeignObject - sfo = "foreignobject" - sfO = "foreignObject" - ) - if got := Lookup([]byte(sfo)); got != afo { - t.Errorf("Lookup(%q): got %#v, want %#v", sfo, got, afo) - } - if got := Lookup([]byte(sfO)); got != afO { - t.Errorf("Lookup(%q): got %#v, want %#v", sfO, got, afO) - } - if got := afo.String(); got != sfo { - t.Errorf("Atom(%#v).String(): got %q, want %q", afo, got, sfo) - } - if got := afO.String(); got != sfO { - t.Errorf("Atom(%#v).String(): got %q, want %q", afO, got, sfO) - } -} - -func BenchmarkLookup(b *testing.B) { - sortedTable := make([]string, 0, len(table)) - for _, a := range table { - if a != 0 { - sortedTable = append(sortedTable, a.String()) - } - } - sort.Strings(sortedTable) - - x := make([][]byte, 1000) - for i := range x { - x[i] = []byte(sortedTable[i%len(sortedTable)]) - } - - b.ResetTimer() - for i := 0; i < b.N; i++ { - for _, s := range x { - Lookup(s) - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/table_test.go b/Godeps/_workspace/src/golang.org/x/net/html/atom/table_test.go deleted file mode 100644 index 0f2ecce..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/atom/table_test.go +++ /dev/null @@ -1,351 +0,0 @@ -// generated by go run gen.go -test; DO NOT EDIT - -package atom - -var testAtomList = []string{ - "a", - "abbr", - "abbr", - "accept", - "accept-charset", - "accesskey", - "action", - "address", - "align", - "alt", - "annotation", - "annotation-xml", - "applet", - "area", - "article", - "aside", - "async", - "audio", - "autocomplete", - "autofocus", - "autoplay", - "b", - "base", - "basefont", - "bdi", - "bdo", - "bgsound", - "big", - "blink", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "center", - "challenge", - "charset", - "checked", - "cite", - "cite", - "class", - "code", - "col", - "colgroup", - "color", - "cols", - "colspan", - "command", - "command", - "content", - "contenteditable", - "contextmenu", - "controls", - "coords", - "crossorigin", - "data", - "data", - "datalist", - "datetime", - "dd", - "default", - "defer", - "del", - "desc", - "details", - "dfn", - "dialog", - "dir", - "dirname", - "disabled", - "div", - "dl", - "download", - "draggable", - "dropzone", - "dt", - "em", - "embed", - "enctype", - "face", - "fieldset", - "figcaption", - "figure", - "font", - "footer", - "for", - "foreignObject", - "foreignobject", - "form", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "frame", - "frameset", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "headers", - "height", - "hgroup", - "hidden", - "high", - "hr", - "href", - "hreflang", - "html", - "http-equiv", - "i", - "icon", - "id", - "iframe", - "image", - "img", - "input", - "inputmode", - "ins", - "isindex", - "ismap", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "kbd", - "keygen", - "keytype", - "kind", - "label", - "label", - "lang", - "legend", - "li", - "link", - "list", - "listing", - "loop", - "low", - "malignmark", - "manifest", - "map", - "mark", - "marquee", - "math", - "max", - "maxlength", - "media", - "mediagroup", - "menu", - "menuitem", - "meta", - "meter", - "method", - "mglyph", - "mi", - "min", - "minlength", - "mn", - "mo", - "ms", - "mtext", - "multiple", - "muted", - "name", - "nav", - "nobr", - "noembed", - "noframes", - "noscript", - "novalidate", - "object", - "ol", - "onabort", - "onafterprint", - "onautocomplete", - "onautocompleteerror", - "onbeforeprint", - "onbeforeunload", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "onhashchange", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onlanguagechange", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmessage", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onoffline", - "ononline", - "onpagehide", - "onpageshow", - "onpause", - "onplay", - "onplaying", - "onpopstate", - "onprogress", - "onratechange", - "onreset", - "onresize", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onsort", - "onstalled", - "onstorage", - "onsubmit", - "onsuspend", - "ontimeupdate", - "ontoggle", - "onunload", - "onvolumechange", - "onwaiting", - "open", - "optgroup", - "optimum", - "option", - "output", - "p", - "param", - "pattern", - "ping", - "placeholder", - "plaintext", - "poster", - "pre", - "preload", - "progress", - "prompt", - "public", - "q", - "radiogroup", - "readonly", - "rel", - "required", - "reversed", - "rows", - "rowspan", - "rp", - "rt", - "ruby", - "s", - "samp", - "sandbox", - "scope", - "scoped", - "script", - "seamless", - "section", - "select", - "selected", - "shape", - "size", - "sizes", - "small", - "sortable", - "sorted", - "source", - "spacer", - "span", - "span", - "spellcheck", - "src", - "srcdoc", - "srclang", - "start", - "step", - "strike", - "strong", - "style", - "style", - "sub", - "summary", - "sup", - "svg", - "system", - "tabindex", - "table", - "target", - "tbody", - "td", - "template", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "title", - "tr", - "track", - "translate", - "tt", - "type", - "typemustmatch", - "u", - "ul", - "usemap", - "value", - "var", - "video", - "wbr", - "width", - "wrap", - "xmp", -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/charset_test.go b/Godeps/_workspace/src/golang.org/x/net/html/charset/charset_test.go deleted file mode 100644 index 8b10399..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/charset_test.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package charset - -import ( - "bytes" - "encoding/xml" - "io/ioutil" - "runtime" - "strings" - "testing" - - "golang.org/x/text/transform" -) - -func transformString(t transform.Transformer, s string) (string, error) { - r := transform.NewReader(strings.NewReader(s), t) - b, err := ioutil.ReadAll(r) - return string(b), err -} - -var testCases = []struct { - utf8, other, otherEncoding string -}{ - {"Résumé", "Résumé", "utf8"}, - {"Résumé", "R\xe9sum\xe9", "latin1"}, - {"これは漢字です。", "S0\x8c0o0\"oW[g0Y0\x020", "UTF-16LE"}, - {"これは漢字です。", "0S0\x8c0oo\"[W0g0Y0\x02", "UTF-16BE"}, - {"Hello, world", "Hello, world", "ASCII"}, - {"Gdańsk", "Gda\xf1sk", "ISO-8859-2"}, - {"Ââ Čč Đđ Ŋŋ Õõ Šš Žž Åå Ää", "\xc2\xe2 \xc8\xe8 \xa9\xb9 \xaf\xbf \xd5\xf5 \xaa\xba \xac\xbc \xc5\xe5 \xc4\xe4", "ISO-8859-10"}, - {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "ISO-8859-11"}, - {"latviešu", "latvie\xf0u", "ISO-8859-13"}, - {"Seònaid", "Se\xf2naid", "ISO-8859-14"}, - {"€1 is cheap", "\xa41 is cheap", "ISO-8859-15"}, - {"românește", "rom\xe2ne\xbate", "ISO-8859-16"}, - {"nutraĵo", "nutra\xbco", "ISO-8859-3"}, - {"Kalâdlit", "Kal\xe2dlit", "ISO-8859-4"}, - {"русский", "\xe0\xe3\xe1\xe1\xda\xd8\xd9", "ISO-8859-5"}, - {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "ISO-8859-7"}, - {"Kağan", "Ka\xf0an", "ISO-8859-9"}, - {"Résumé", "R\x8esum\x8e", "macintosh"}, - {"Gdańsk", "Gda\xf1sk", "windows-1250"}, - {"русский", "\xf0\xf3\xf1\xf1\xea\xe8\xe9", "windows-1251"}, - {"Résumé", "R\xe9sum\xe9", "windows-1252"}, - {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "windows-1253"}, - {"Kağan", "Ka\xf0an", "windows-1254"}, - {"עִבְרִית", "\xf2\xc4\xe1\xc0\xf8\xc4\xe9\xfa", "windows-1255"}, - {"العربية", "\xc7\xe1\xda\xd1\xc8\xed\xc9", "windows-1256"}, - {"latviešu", "latvie\xf0u", "windows-1257"}, - {"Việt", "Vi\xea\xf2t", "windows-1258"}, - {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "windows-874"}, - {"русский", "\xd2\xd5\xd3\xd3\xcb\xc9\xca", "KOI8-R"}, - {"українська", "\xd5\xcb\xd2\xc1\xa7\xce\xd3\xd8\xcb\xc1", "KOI8-U"}, - {"Hello 常用國字標準字體表", "Hello \xb1`\xa5\u03b0\xea\xa6r\xbc\u0437\u01e6r\xc5\xe9\xaa\xed", "big5"}, - {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gbk"}, - {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gb18030"}, - {"עִבְרִית", "\x81\x30\xfb\x30\x81\x30\xf6\x34\x81\x30\xf9\x33\x81\x30\xf6\x30\x81\x30\xfb\x36\x81\x30\xf6\x34\x81\x30\xfa\x31\x81\x30\xfb\x38", "gb18030"}, - {"㧯", "\x82\x31\x89\x38", "gb18030"}, - {"これは漢字です。", "\x82\xb1\x82\xea\x82\xcd\x8a\xbf\x8e\x9a\x82\xc5\x82\xb7\x81B", "SJIS"}, - {"Hello, 世界!", "Hello, \x90\xa2\x8aE!", "SJIS"}, - {"イウエオカ", "\xb2\xb3\xb4\xb5\xb6", "SJIS"}, - {"これは漢字です。", "\xa4\xb3\xa4\xec\xa4\u03f4\xc1\xbb\xfa\xa4\u01e4\xb9\xa1\xa3", "EUC-JP"}, - {"Hello, 世界!", "Hello, \x1b$B@$3&\x1b(B!", "ISO-2022-JP"}, - {"네이트 | 즐거움의 시작, 슈파스(Spaβ) NATE", "\xb3\xd7\xc0\xcc\xc6\xae | \xc1\xf1\xb0\xc5\xbf\xf2\xc0\xc7 \xbd\xc3\xc0\xdb, \xbd\xb4\xc6\xc4\xbd\xba(Spa\xa5\xe2) NATE", "EUC-KR"}, -} - -func TestDecode(t *testing.T) { - for _, tc := range testCases { - e, _ := Lookup(tc.otherEncoding) - if e == nil { - t.Errorf("%s: not found", tc.otherEncoding) - continue - } - s, err := transformString(e.NewDecoder(), tc.other) - if err != nil { - t.Errorf("%s: decode %q: %v", tc.otherEncoding, tc.other, err) - continue - } - if s != tc.utf8 { - t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.utf8) - } - } -} - -func TestEncode(t *testing.T) { - for _, tc := range testCases { - e, _ := Lookup(tc.otherEncoding) - if e == nil { - t.Errorf("%s: not found", tc.otherEncoding) - continue - } - s, err := transformString(e.NewEncoder(), tc.utf8) - if err != nil { - t.Errorf("%s: encode %q: %s", tc.otherEncoding, tc.utf8, err) - continue - } - if s != tc.other { - t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.other) - } - } -} - -// TestNames verifies that you can pass an encoding's name to Lookup and get -// the same encoding back (except for "replacement"). -func TestNames(t *testing.T) { - for _, e := range encodings { - if e.name == "replacement" { - continue - } - _, got := Lookup(e.name) - if got != e.name { - t.Errorf("got %q, want %q", got, e.name) - continue - } - } -} - -var sniffTestCases = []struct { - filename, declared, want string -}{ - {"HTTP-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, - {"UTF-16LE-BOM.html", "", "utf-16le"}, - {"UTF-16BE-BOM.html", "", "utf-16be"}, - {"meta-content-attribute.html", "text/html", "iso-8859-15"}, - {"meta-charset-attribute.html", "text/html", "iso-8859-15"}, - {"No-encoding-declaration.html", "text/html", "utf-8"}, - {"HTTP-vs-UTF-8-BOM.html", "text/html; charset=iso-8859-15", "utf-8"}, - {"HTTP-vs-meta-content.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, - {"HTTP-vs-meta-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, - {"UTF-8-BOM-vs-meta-content.html", "text/html", "utf-8"}, - {"UTF-8-BOM-vs-meta-charset.html", "text/html", "utf-8"}, -} - -func TestSniff(t *testing.T) { - switch runtime.GOOS { - case "nacl": // platforms that don't permit direct file system access - t.Skipf("not supported on %q", runtime.GOOS) - } - - for _, tc := range sniffTestCases { - content, err := ioutil.ReadFile("testdata/" + tc.filename) - if err != nil { - t.Errorf("%s: error reading file: %v", tc.filename, err) - continue - } - - _, name, _ := DetermineEncoding(content, tc.declared) - if name != tc.want { - t.Errorf("%s: got %q, want %q", tc.filename, name, tc.want) - continue - } - } -} - -func TestReader(t *testing.T) { - switch runtime.GOOS { - case "nacl": // platforms that don't permit direct file system access - t.Skipf("not supported on %q", runtime.GOOS) - } - - for _, tc := range sniffTestCases { - content, err := ioutil.ReadFile("testdata/" + tc.filename) - if err != nil { - t.Errorf("%s: error reading file: %v", tc.filename, err) - continue - } - - r, err := NewReader(bytes.NewReader(content), tc.declared) - if err != nil { - t.Errorf("%s: error creating reader: %v", tc.filename, err) - continue - } - - got, err := ioutil.ReadAll(r) - if err != nil { - t.Errorf("%s: error reading from charset.NewReader: %v", tc.filename, err) - continue - } - - e, _ := Lookup(tc.want) - want, err := ioutil.ReadAll(transform.NewReader(bytes.NewReader(content), e.NewDecoder())) - if err != nil { - t.Errorf("%s: error decoding with hard-coded charset name: %v", tc.filename, err) - continue - } - - if !bytes.Equal(got, want) { - t.Errorf("%s: got %q, want %q", tc.filename, got, want) - continue - } - } -} - -var metaTestCases = []struct { - meta, want string -}{ - {"", ""}, - {"text/html", ""}, - {"text/html; charset utf-8", ""}, - {"text/html; charset=latin-2", "latin-2"}, - {"text/html; charset; charset = utf-8", "utf-8"}, - {`charset="big5"`, "big5"}, - {"charset='shift_jis'", "shift_jis"}, -} - -func TestFromMeta(t *testing.T) { - for _, tc := range metaTestCases { - got := fromMetaElement(tc.meta) - if got != tc.want { - t.Errorf("%q: got %q, want %q", tc.meta, got, tc.want) - } - } -} - -func TestXML(t *testing.T) { - const s = "r\xe9sum\xe9" - - d := xml.NewDecoder(strings.NewReader(s)) - d.CharsetReader = NewReaderLabel - - var a struct { - Word string - } - err := d.Decode(&a) - if err != nil { - t.Fatalf("Decode: %v", err) - } - - want := "résumé" - if a.Word != want { - t.Errorf("got %q, want %q", a.Word, want) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-charset.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-charset.html deleted file mode 100644 index 9915fa0..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-charset.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - HTTP charset - - - - - - - - - - - -

HTTP charset

- - -
- - -
 
- - - - - -
-

The character encoding of a page can be set using the HTTP header charset declaration.

-

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

The only character encoding declaration for this HTML file is in the HTTP header, which sets the encoding to ISO 8859-15.

-
-
-
HTML5
-

the-input-byte-stream-001
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html deleted file mode 100644 index 26e5d8b..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - HTTP vs UTF-8 BOM - - - - - - - - - - - -

HTTP vs UTF-8 BOM

- - -
- - -
 
- - - - - -
-

A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.

-

The HTTP header attempts to set the character encoding to ISO 8859-15. The page starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

If the test is unsuccessful, the characters  should appear at the top of the page. These represent the bytes that make up the UTF-8 signature when encountered in the ISO 8859-15 encoding.

-
-
-
HTML5
-

the-input-byte-stream-034
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html deleted file mode 100644 index 2f07e95..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - HTTP vs meta charset - - - - - - - - - - - -

HTTP vs meta charset

- - -
- - -
 
- - - - - -
-

The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.

-

The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-1.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-018
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html deleted file mode 100644 index 6853cdd..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - HTTP vs meta content - - - - - - - - - - - -

HTTP vs meta content

- - -
- - -
 
- - - - - -
-

The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.

-

The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-1.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-016
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html deleted file mode 100644 index 612e26c..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - No encoding declaration - - - - - - - - - - - -

No encoding declaration

- - -
- - -
 
- - - - - -
-

A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.

-

The test on this page contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-015
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/README b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/README deleted file mode 100644 index 38ef0f9..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/README +++ /dev/null @@ -1,9 +0,0 @@ -These test cases come from -http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics - -Distributed under both the W3C Test Suite License -(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) -and the W3C 3-clause BSD License -(http://www.w3.org/Consortium/Legal/2008/03-bsd-license). -To contribute to a W3C Test Suite, see the policies and contribution -forms (http://www.w3.org/2004/10/27-testcases). diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html deleted file mode 100644 index 3abf7a9343c20518e57dfea58b374fb0f4fb58a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2670 zcmcJR?QRoS5Qc}JAoU&=BQ-(7b^;2j8i*i3RV1JlO@;VXIsPurV!WHiDdLW}i`*CO z^UnC>tih=KsVr;H&Y7?C&O3AV(?534uG?e##U9y_y|!QNi4``n+D>d{2lky^LnFNx z?9HrarH$>rwQR_$g)Hk0*&STI*EYq|47~&U9sfUB+ji})9eR{QqCUra7oDsZ5obtB zdxP%<)-$4Q;rSHJiM>U(#ZI=;?n^BC?Dp6lu=~_1-lnX3u03&2BlmQIY>L+!Uq7XoytKw^Q#oZSM?3*J?)&ojG&yzQRkC!Ml5JE?ax;lp_NYEcdUht`ZswOviB~L5hmJ|pXI71nn20w;>vG! zQGB$EE9&wC``&J#_Ym~PgRu-Bd>1!pOp0||k`kr=VJ zfH6I6rmRaeHA7U-A^OTsT+|d2a^i(>DePzZ{)ibXoCBvJnuYrd-3kkN$uy{qQK;=*Y;S87ro12aTgu^i*%f8zC3>a}9DIe4cfxOzsCw&(cqvP9{ud{N6f` z#TNDY(B6@Gpr|uN+%&x^XZjBHdc@2vsM(Tyc2=vshHQ5w+obmp>tuWT(t4BTUGAQw zxeI$UGSLUBg=WFbF;4f@4=^P2AgY@CFn8A`bcC=_&~)fiDe)#cUARRBzJ^k|%X)69 z+{Cb`wq}Rsg%B62CC_tK!AV(W{(MV?#mndR46CU#BUN<{8e?*oT+!pE5wF#O#TR#a z$9qRT)tpbw8zAI~QQJg2C3|6$I%(T(;`zOMy6SO+&;pG=c#2P|P-WZn$$DpWJlC3U z3*nvmz zwP{u~r$L?-m3uqp9I1+#3yE|3M$(s-BEtih=LQ>`qYoiktOop(wi%!;yh%+Rm z{e|xntY<{q!1F1Z6MKtngPm-p-4|H&+3m4AVE3_AyiHm6Tzlf4M(*ht*%YrezJ6kr zHGj45pc?64*$Cm%-zseWMA`x;)v*~jA=i}szqts9xmQkS`M11|(H7bTXAycsXU53+ zJ?120SRZeyiFjW7enPN`bxk$IaWV3o48oJF7D&2ysoY;6(s6%6vVfaYd&mC=erK!) zNGI^7upQgN)53OHe_VE<@J+G8*Y|p*)zB2Thdi}+YR<5QWHm!|a_*AoZXuv7)$xe| zm3Q$D7{|#}{m4X&UY!6(ZhyYi2(5JLzGE$H)W6BQklnjPMwn<Yvv7Z*TVWwD*=E3QpH37* z#lqXJA0A~J9T_<^W5smspmDg2p6ac5Bjn+~LAoow%1TCdZ*$K8`O zw_$HaCi+0N&@7la#_7KL5r$+QL{)Pi=I&aDjt~|Knht#`CEi4*3%97i_fSfASlwUz0=3V0GCxY}z81UC-nP=CGt2OqYV$ zoRCo+qM9YX*3FFORLC=E3B~S@+KROyk4r5 yX7?DaslDfIebqXgC!KKp4IYy+W~X?ddE6o=`A+x#x0AK&6MF#W&AXxbRrv+SX}PNa diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html deleted file mode 100644 index 83de433..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - UTF-8 BOM vs meta charset - - - - - - - - - - - -

UTF-8 BOM vs meta charset

- - -
- - -
 
- - - - - -
-

A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.

-

The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-038
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html deleted file mode 100644 index 501aac2..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - UTF-8 BOM vs meta content - - - - - - - - - - - -

UTF-8 BOM vs meta content

- - -
- - -
 
- - - - - -
-

A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.

-

The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-037
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html deleted file mode 100644 index 2d7d25a..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - meta charset attribute - - - - - - - - - - - -

meta charset attribute

- - -
- - -
 
- - - - - -
-

The character encoding of the page can be set by a meta element with charset attribute.

-

The only character encoding declaration for this HTML file is in the charset attribute of the meta element, which declares the encoding to be ISO 8859-15.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-009
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-content-attribute.html b/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-content-attribute.html deleted file mode 100644 index 1c3f228..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/testdata/meta-content-attribute.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - meta content attribute - - - - - - - - - - - -

meta content attribute

- - -
- - -
 
- - - - - -
-

The character encoding of the page can be set by a meta element with http-equiv and content attributes.

-

The only character encoding declaration for this HTML file is in the content attribute of the meta element, which declares the encoding to be ISO 8859-15.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

-
-
-
HTML5
-

the-input-byte-stream-007
Result summary & related tests
Detailed results for this test
Link to spec

-
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • -
  • The test is read from a server that supports HTTP.
-
- - - - - - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/entity_test.go b/Godeps/_workspace/src/golang.org/x/net/html/entity_test.go deleted file mode 100644 index b53f866..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/entity_test.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package html - -import ( - "testing" - "unicode/utf8" -) - -func TestEntityLength(t *testing.T) { - // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key). - // The +1 comes from the leading "&". This property implies that the length of - // unescaped text is <= the length of escaped text. - for k, v := range entity { - if 1+len(k) < utf8.RuneLen(v) { - t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v)) - } - if len(k) > longestEntityWithoutSemicolon && k[len(k)-1] != ';' { - t.Errorf("entity name %s is %d characters, but longestEntityWithoutSemicolon=%d", k, len(k), longestEntityWithoutSemicolon) - } - } - for k, v := range entity2 { - if 1+len(k) < utf8.RuneLen(v[0])+utf8.RuneLen(v[1]) { - t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v[0]) + string(v[1])) - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/escape_test.go b/Godeps/_workspace/src/golang.org/x/net/html/escape_test.go deleted file mode 100644 index b405d4b..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/escape_test.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package html - -import "testing" - -type unescapeTest struct { - // A short description of the test case. - desc string - // The HTML text. - html string - // The unescaped text. - unescaped string -} - -var unescapeTests = []unescapeTest{ - // Handle no entities. - { - "copy", - "A\ttext\nstring", - "A\ttext\nstring", - }, - // Handle simple named entities. - { - "simple", - "& > <", - "& > <", - }, - // Handle hitting the end of the string. - { - "stringEnd", - "& &", - "& &", - }, - // Handle entities with two codepoints. - { - "multiCodepoint", - "text ⋛︀ blah", - "text \u22db\ufe00 blah", - }, - // Handle decimal numeric entities. - { - "decimalEntity", - "Delta = Δ ", - "Delta = Δ ", - }, - // Handle hexadecimal numeric entities. - { - "hexadecimalEntity", - "Lambda = λ = λ ", - "Lambda = λ = λ ", - }, - // Handle numeric early termination. - { - "numericEnds", - "&# &#x €43 © = ©f = ©", - "&# &#x €43 © = ©f = ©", - }, - // Handle numeric ISO-8859-1 entity replacements. - { - "numericReplacements", - "Footnote‡", - "Footnote‡", - }, -} - -func TestUnescape(t *testing.T) { - for _, tt := range unescapeTests { - unescaped := UnescapeString(tt.html) - if unescaped != tt.unescaped { - t.Errorf("TestUnescape %s: want %q, got %q", tt.desc, tt.unescaped, unescaped) - } - } -} - -func TestUnescapeEscape(t *testing.T) { - ss := []string{ - ``, - `abc def`, - `a & b`, - `a&b`, - `a & b`, - `"`, - `"`, - `"<&>"`, - `"<&>"`, - `3&5==1 && 0<1, "0<1", a+acute=á`, - `The special characters are: <, >, &, ' and "`, - } - for _, s := range ss { - if got := UnescapeString(EscapeString(s)); got != s { - t.Errorf("got %q want %q", got, s) - } - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/example_test.go b/Godeps/_workspace/src/golang.org/x/net/html/example_test.go deleted file mode 100644 index 0b06ed7..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/example_test.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This example demonstrates parsing HTML data and walking the resulting tree. -package html_test - -import ( - "fmt" - "log" - "strings" - - "golang.org/x/net/html" -) - -func ExampleParse() { - s := `

Links:

` - doc, err := html.Parse(strings.NewReader(s)) - if err != nil { - log.Fatal(err) - } - var f func(*html.Node) - f = func(n *html.Node) { - if n.Type == html.ElementNode && n.Data == "a" { - for _, a := range n.Attr { - if a.Key == "href" { - fmt.Println(a.Val) - break - } - } - } - for c := n.FirstChild; c != nil; c = c.NextSibling { - f(c) - } - } - f(doc) - // Output: - // foo - // /bar/baz -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/node_test.go b/Godeps/_workspace/src/golang.org/x/net/html/node_test.go deleted file mode 100644 index 471102f..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/node_test.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package html - -import ( - "fmt" -) - -// checkTreeConsistency checks that a node and its descendants are all -// consistent in their parent/child/sibling relationships. -func checkTreeConsistency(n *Node) error { - return checkTreeConsistency1(n, 0) -} - -func checkTreeConsistency1(n *Node, depth int) error { - if depth == 1e4 { - return fmt.Errorf("html: tree looks like it contains a cycle") - } - if err := checkNodeConsistency(n); err != nil { - return err - } - for c := n.FirstChild; c != nil; c = c.NextSibling { - if err := checkTreeConsistency1(c, depth+1); err != nil { - return err - } - } - return nil -} - -// checkNodeConsistency checks that a node's parent/child/sibling relationships -// are consistent. -func checkNodeConsistency(n *Node) error { - if n == nil { - return nil - } - - nParent := 0 - for p := n.Parent; p != nil; p = p.Parent { - nParent++ - if nParent == 1e4 { - return fmt.Errorf("html: parent list looks like an infinite loop") - } - } - - nForward := 0 - for c := n.FirstChild; c != nil; c = c.NextSibling { - nForward++ - if nForward == 1e6 { - return fmt.Errorf("html: forward list of children looks like an infinite loop") - } - if c.Parent != n { - return fmt.Errorf("html: inconsistent child/parent relationship") - } - } - - nBackward := 0 - for c := n.LastChild; c != nil; c = c.PrevSibling { - nBackward++ - if nBackward == 1e6 { - return fmt.Errorf("html: backward list of children looks like an infinite loop") - } - if c.Parent != n { - return fmt.Errorf("html: inconsistent child/parent relationship") - } - } - - if n.Parent != nil { - if n.Parent == n { - return fmt.Errorf("html: inconsistent parent relationship") - } - if n.Parent == n.FirstChild { - return fmt.Errorf("html: inconsistent parent/first relationship") - } - if n.Parent == n.LastChild { - return fmt.Errorf("html: inconsistent parent/last relationship") - } - if n.Parent == n.PrevSibling { - return fmt.Errorf("html: inconsistent parent/prev relationship") - } - if n.Parent == n.NextSibling { - return fmt.Errorf("html: inconsistent parent/next relationship") - } - - parentHasNAsAChild := false - for c := n.Parent.FirstChild; c != nil; c = c.NextSibling { - if c == n { - parentHasNAsAChild = true - break - } - } - if !parentHasNAsAChild { - return fmt.Errorf("html: inconsistent parent/child relationship") - } - } - - if n.PrevSibling != nil && n.PrevSibling.NextSibling != n { - return fmt.Errorf("html: inconsistent prev/next relationship") - } - if n.NextSibling != nil && n.NextSibling.PrevSibling != n { - return fmt.Errorf("html: inconsistent next/prev relationship") - } - - if (n.FirstChild == nil) != (n.LastChild == nil) { - return fmt.Errorf("html: inconsistent first/last relationship") - } - if n.FirstChild != nil && n.FirstChild == n.LastChild { - // We have a sole child. - if n.FirstChild.PrevSibling != nil || n.FirstChild.NextSibling != nil { - return fmt.Errorf("html: inconsistent sole child's sibling relationship") - } - } - - seen := map[*Node]bool{} - - var last *Node - for c := n.FirstChild; c != nil; c = c.NextSibling { - if seen[c] { - return fmt.Errorf("html: inconsistent repeated child") - } - seen[c] = true - last = c - } - if last != n.LastChild { - return fmt.Errorf("html: inconsistent last relationship") - } - - var first *Node - for c := n.LastChild; c != nil; c = c.PrevSibling { - if !seen[c] { - return fmt.Errorf("html: inconsistent missing child") - } - delete(seen, c) - first = c - } - if first != n.FirstChild { - return fmt.Errorf("html: inconsistent first relationship") - } - - if len(seen) != 0 { - return fmt.Errorf("html: inconsistent forwards/backwards child list") - } - - return nil -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/parse_test.go b/Godeps/_workspace/src/golang.org/x/net/html/parse_test.go deleted file mode 100644 index 7e47d11..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/parse_test.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package html - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "runtime" - "sort" - "strings" - "testing" - - "golang.org/x/net/html/atom" -) - -// readParseTest reads a single test case from r. -func readParseTest(r *bufio.Reader) (text, want, context string, err error) { - line, err := r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - var b []byte - - // Read the HTML. - if string(line) != "#data\n" { - return "", "", "", fmt.Errorf(`got %q want "#data\n"`, line) - } - for { - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - if line[0] == '#' { - break - } - b = append(b, line...) - } - text = strings.TrimSuffix(string(b), "\n") - b = b[:0] - - // Skip the error list. - if string(line) != "#errors\n" { - return "", "", "", fmt.Errorf(`got %q want "#errors\n"`, line) - } - for { - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - if line[0] == '#' { - break - } - } - - if string(line) == "#document-fragment\n" { - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - context = strings.TrimSpace(string(line)) - line, err = r.ReadSlice('\n') - if err != nil { - return "", "", "", err - } - } - - // Read the dump of what the parse tree should be. - if string(line) != "#document\n" { - return "", "", "", fmt.Errorf(`got %q want "#document\n"`, line) - } - inQuote := false - for { - line, err = r.ReadSlice('\n') - if err != nil && err != io.EOF { - return "", "", "", err - } - trimmed := bytes.Trim(line, "| \n") - if len(trimmed) > 0 { - if line[0] == '|' && trimmed[0] == '"' { - inQuote = true - } - if trimmed[len(trimmed)-1] == '"' && !(line[0] == '|' && len(trimmed) == 1) { - inQuote = false - } - } - if len(line) == 0 || len(line) == 1 && line[0] == '\n' && !inQuote { - break - } - b = append(b, line...) - } - return text, string(b), context, nil -} - -func dumpIndent(w io.Writer, level int) { - io.WriteString(w, "| ") - for i := 0; i < level; i++ { - io.WriteString(w, " ") - } -} - -type sortedAttributes []Attribute - -func (a sortedAttributes) Len() int { - return len(a) -} - -func (a sortedAttributes) Less(i, j int) bool { - if a[i].Namespace != a[j].Namespace { - return a[i].Namespace < a[j].Namespace - } - return a[i].Key < a[j].Key -} - -func (a sortedAttributes) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} - -func dumpLevel(w io.Writer, n *Node, level int) error { - dumpIndent(w, level) - switch n.Type { - case ErrorNode: - return errors.New("unexpected ErrorNode") - case DocumentNode: - return errors.New("unexpected DocumentNode") - case ElementNode: - if n.Namespace != "" { - fmt.Fprintf(w, "<%s %s>", n.Namespace, n.Data) - } else { - fmt.Fprintf(w, "<%s>", n.Data) - } - attr := sortedAttributes(n.Attr) - sort.Sort(attr) - for _, a := range attr { - io.WriteString(w, "\n") - dumpIndent(w, level+1) - if a.Namespace != "" { - fmt.Fprintf(w, `%s %s="%s"`, a.Namespace, a.Key, a.Val) - } else { - fmt.Fprintf(w, `%s="%s"`, a.Key, a.Val) - } - } - case TextNode: - fmt.Fprintf(w, `"%s"`, n.Data) - case CommentNode: - fmt.Fprintf(w, "", n.Data) - case DoctypeNode: - fmt.Fprintf(w, "") - case scopeMarkerNode: - return errors.New("unexpected scopeMarkerNode") - default: - return errors.New("unknown node type") - } - io.WriteString(w, "\n") - for c := n.FirstChild; c != nil; c = c.NextSibling { - if err := dumpLevel(w, c, level+1); err != nil { - return err - } - } - return nil -} - -func dump(n *Node) (string, error) { - if n == nil || n.FirstChild == nil { - return "", nil - } - var b bytes.Buffer - for c := n.FirstChild; c != nil; c = c.NextSibling { - if err := dumpLevel(&b, c, 0); err != nil { - return "", err - } - } - return b.String(), nil -} - -const testDataDir = "testdata/webkit/" - -func TestParser(t *testing.T) { - testFiles, err := filepath.Glob(testDataDir + "*.dat") - if err != nil { - t.Fatal(err) - } - for _, tf := range testFiles { - f, err := os.Open(tf) - if err != nil { - t.Fatal(err) - } - defer f.Close() - r := bufio.NewReader(f) - - for i := 0; ; i++ { - text, want, context, err := readParseTest(r) - if err == io.EOF { - break - } - if err != nil { - t.Fatal(err) - } - - err = testParseCase(text, want, context) - - if err != nil { - t.Errorf("%s test #%d %q, %s", tf, i, text, err) - } - } - } -} - -// testParseCase tests one test case from the test files. If the test does not -// pass, it returns an error that explains the failure. -// text is the HTML to be parsed, want is a dump of the correct parse tree, -// and context is the name of the context node, if any. -func testParseCase(text, want, context string) (err error) { - defer func() { - if x := recover(); x != nil { - switch e := x.(type) { - case error: - err = e - default: - err = fmt.Errorf("%v", e) - } - } - }() - - var doc *Node - if context == "" { - doc, err = Parse(strings.NewReader(text)) - if err != nil { - return err - } - } else { - contextNode := &Node{ - Type: ElementNode, - DataAtom: atom.Lookup([]byte(context)), - Data: context, - } - nodes, err := ParseFragment(strings.NewReader(text), contextNode) - if err != nil { - return err - } - doc = &Node{ - Type: DocumentNode, - } - for _, n := range nodes { - doc.AppendChild(n) - } - } - - if err := checkTreeConsistency(doc); err != nil { - return err - } - - got, err := dump(doc) - if err != nil { - return err - } - // Compare the parsed tree to the #document section. - if got != want { - return fmt.Errorf("got vs want:\n----\n%s----\n%s----", got, want) - } - - if renderTestBlacklist[text] || context != "" { - return nil - } - - // Check that rendering and re-parsing results in an identical tree. - pr, pw := io.Pipe() - go func() { - pw.CloseWithError(Render(pw, doc)) - }() - doc1, err := Parse(pr) - if err != nil { - return err - } - got1, err := dump(doc1) - if err != nil { - return err - } - if got != got1 { - return fmt.Errorf("got vs got1:\n----\n%s----\n%s----", got, got1) - } - - return nil -} - -// Some test input result in parse trees are not 'well-formed' despite -// following the HTML5 recovery algorithms. Rendering and re-parsing such a -// tree will not result in an exact clone of that tree. We blacklist such -// inputs from the render test. -var renderTestBlacklist = map[string]bool{ - // The second will be reparented to the first 's parent. This - // results in an whose parent is an , which is not 'well-formed'. - `
XCY`: true, - // The same thing with a

: - `

`: true, - // More cases of being reparented: - `aba
brx
aoe`: true, - `

`: true, - `
`: true, - // A similar reparenting situation involving : - `123`: true, - // A element is reparented, putting it before a table. - // A <plaintext> element can't have anything after it in HTML. - `<table><plaintext><td>`: true, - `<!doctype html><table><plaintext></plaintext>`: true, - `<!doctype html><table><tbody><plaintext></plaintext>`: true, - `<!doctype html><table><tbody><tr><plaintext></plaintext>`: true, - // A form inside a table inside a form doesn't work either. - `<!doctype html><form><table></form><form></table></form>`: true, - // A script that ends at EOF may escape its own closing tag when rendered. - `<!doctype html><script><!--<script `: true, - `<!doctype html><script><!--<script <`: true, - `<!doctype html><script><!--<script <a`: true, - `<!doctype html><script><!--<script </`: true, - `<!doctype html><script><!--<script </s`: true, - `<!doctype html><script><!--<script </script`: true, - `<!doctype html><script><!--<script </scripta`: true, - `<!doctype html><script><!--<script -`: true, - `<!doctype html><script><!--<script -a`: true, - `<!doctype html><script><!--<script -<`: true, - `<!doctype html><script><!--<script --`: true, - `<!doctype html><script><!--<script --a`: true, - `<!doctype html><script><!--<script --<`: true, - `<script><!--<script `: true, - `<script><!--<script <a`: true, - `<script><!--<script </script`: true, - `<script><!--<script </scripta`: true, - `<script><!--<script -`: true, - `<script><!--<script -a`: true, - `<script><!--<script --`: true, - `<script><!--<script --a`: true, - `<script><!--<script <`: true, - `<script><!--<script </`: true, - `<script><!--<script </s`: true, - // Reconstructing the active formatting elements results in a <plaintext> - // element that contains an <a> element. - `<!doctype html><p><a><plaintext>b`: true, -} - -func TestNodeConsistency(t *testing.T) { - // inconsistentNode is a Node whose DataAtom and Data do not agree. - inconsistentNode := &Node{ - Type: ElementNode, - DataAtom: atom.Frameset, - Data: "table", - } - _, err := ParseFragment(strings.NewReader("<p>hello</p>"), inconsistentNode) - if err == nil { - t.Errorf("got nil error, want non-nil") - } -} - -func BenchmarkParser(b *testing.B) { - buf, err := ioutil.ReadFile("testdata/go1.html") - if err != nil { - b.Fatalf("could not read testdata/go1.html: %v", err) - } - b.SetBytes(int64(len(buf))) - runtime.GC() - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - Parse(bytes.NewBuffer(buf)) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/render_test.go b/Godeps/_workspace/src/golang.org/x/net/html/render_test.go deleted file mode 100644 index 11da54b..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/render_test.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package html - -import ( - "bytes" - "testing" -) - -func TestRenderer(t *testing.T) { - nodes := [...]*Node{ - 0: { - Type: ElementNode, - Data: "html", - }, - 1: { - Type: ElementNode, - Data: "head", - }, - 2: { - Type: ElementNode, - Data: "body", - }, - 3: { - Type: TextNode, - Data: "0<1", - }, - 4: { - Type: ElementNode, - Data: "p", - Attr: []Attribute{ - { - Key: "id", - Val: "A", - }, - { - Key: "foo", - Val: `abc"def`, - }, - }, - }, - 5: { - Type: TextNode, - Data: "2", - }, - 6: { - Type: ElementNode, - Data: "b", - Attr: []Attribute{ - { - Key: "empty", - Val: "", - }, - }, - }, - 7: { - Type: TextNode, - Data: "3", - }, - 8: { - Type: ElementNode, - Data: "i", - Attr: []Attribute{ - { - Key: "backslash", - Val: `\`, - }, - }, - }, - 9: { - Type: TextNode, - Data: "&4", - }, - 10: { - Type: TextNode, - Data: "5", - }, - 11: { - Type: ElementNode, - Data: "blockquote", - }, - 12: { - Type: ElementNode, - Data: "br", - }, - 13: { - Type: TextNode, - Data: "6", - }, - } - - // Build a tree out of those nodes, based on a textual representation. - // Only the ".\t"s are significant. The trailing HTML-like text is - // just commentary. The "0:" prefixes are for easy cross-reference with - // the nodes array. - treeAsText := [...]string{ - 0: `<html>`, - 1: `. <head>`, - 2: `. <body>`, - 3: `. . "0&lt;1"`, - 4: `. . <p id="A" foo="abc&#34;def">`, - 5: `. . . "2"`, - 6: `. . . <b empty="">`, - 7: `. . . . "3"`, - 8: `. . . <i backslash="\">`, - 9: `. . . . "&amp;4"`, - 10: `. . "5"`, - 11: `. . <blockquote>`, - 12: `. . <br>`, - 13: `. . "6"`, - } - if len(nodes) != len(treeAsText) { - t.Fatal("len(nodes) != len(treeAsText)") - } - var stack [8]*Node - for i, line := range treeAsText { - level := 0 - for line[0] == '.' { - // Strip a leading ".\t". - line = line[2:] - level++ - } - n := nodes[i] - if level == 0 { - if stack[0] != nil { - t.Fatal("multiple root nodes") - } - stack[0] = n - } else { - stack[level-1].AppendChild(n) - stack[level] = n - for i := level + 1; i < len(stack); i++ { - stack[i] = nil - } - } - // At each stage of tree construction, we check all nodes for consistency. - for j, m := range nodes { - if err := checkNodeConsistency(m); err != nil { - t.Fatalf("i=%d, j=%d: %v", i, j, err) - } - } - } - - want := `<html><head></head><body>0&lt;1<p id="A" foo="abc&#34;def">` + - `2<b empty="">3</b><i backslash="\">&amp;4</i></p>` + - `5<blockquote></blockquote><br/>6</body></html>` - b := new(bytes.Buffer) - if err := Render(b, nodes[0]); err != nil { - t.Fatal(err) - } - if got := b.String(); got != want { - t.Errorf("got vs want:\n%s\n%s\n", got, want) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/go1.html b/Godeps/_workspace/src/golang.org/x/net/html/testdata/go1.html deleted file mode 100644 index a782cc7..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/go1.html +++ /dev/null @@ -1,2237 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - - <title>Go 1 Release Notes - The Go Programming Language</title> - -<link type="text/css" rel="stylesheet" href="/doc/style.css"> -<script type="text/javascript" src="/doc/godocs.js"></script> - -<link rel="search" type="application/opensearchdescription+xml" title="godoc" href="/opensearch.xml" /> - -<script type="text/javascript"> -var _gaq = _gaq || []; -_gaq.push(["_setAccount", "UA-11222381-2"]); -_gaq.push(["_trackPageview"]); -</script> -</head> -<body> - -<div id="topbar"><div class="container wide"> - -<form method="GET" action="/search"> -<div id="menu"> -<a href="/doc/">Documents</a> -<a href="/ref/">References</a> -<a href="/pkg/">Packages</a> -<a href="/project/">The Project</a> -<a href="/help/">Help</a> -<input type="text" id="search" name="q" class="inactive" value="Search"> -</div> -<div id="heading"><a href="/">The Go Programming Language</a></div> -</form> - -</div></div> - -<div id="page" class="wide"> - - - <div id="plusone"><g:plusone size="small" annotation="none"></g:plusone></div> - <h1>Go 1 Release Notes</h1> - - - - -<div id="nav"></div> - - - - -<h2 id="introduction">Introduction to Go 1</h2> - -<p> -Go version 1, Go 1 for short, defines a language and a set of core libraries -that provide a stable foundation for creating reliable products, projects, and -publications. -</p> - -<p> -The driving motivation for Go 1 is stability for its users. People should be able to -write Go programs and expect that they will continue to compile and run without -change, on a time scale of years, including in production environments such as -Google App Engine. Similarly, people should be able to write books about Go, be -able to say which version of Go the book is describing, and have that version -number still be meaningful much later. -</p> - -<p> -Code that compiles in Go 1 should, with few exceptions, continue to compile and -run throughout the lifetime of that version, even as we issue updates and bug -fixes such as Go version 1.1, 1.2, and so on. Other than critical fixes, changes -made to the language and library for subsequent releases of Go 1 may -add functionality but will not break existing Go 1 programs. -<a href="go1compat.html">The Go 1 compatibility document</a> -explains the compatibility guidelines in more detail. -</p> - -<p> -Go 1 is a representation of Go as it used today, not a wholesale rethinking of -the language. We avoided designing new features and instead focused on cleaning -up problems and inconsistencies and improving portability. There are a number -changes to the Go language and packages that we had considered for some time and -prototyped but not released primarily because they are significant and -backwards-incompatible. Go 1 was an opportunity to get them out, which is -helpful for the long term, but also means that Go 1 introduces incompatibilities -for old programs. Fortunately, the <code>go</code> <code>fix</code> tool can -automate much of the work needed to bring programs up to the Go 1 standard. -</p> - -<p> -This document outlines the major changes in Go 1 that will affect programmers -updating existing code; its reference point is the prior release, r60 (tagged as -r60.3). It also explains how to update code from r60 to run under Go 1. -</p> - -<h2 id="language">Changes to the language</h2> - -<h3 id="append">Append</h3> - -<p> -The <code>append</code> predeclared variadic function makes it easy to grow a slice -by adding elements to the end. -A common use is to add bytes to the end of a byte slice when generating output. -However, <code>append</code> did not provide a way to append a string to a <code>[]byte</code>, -which is another common case. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/greeting := ..byte/` `/append.*hello/`}} ---> greeting := []byte{} - greeting = append(greeting, []byte(&#34;hello &#34;)...)</pre> - -<p> -By analogy with the similar property of <code>copy</code>, Go 1 -permits a string to be appended (byte-wise) directly to a byte -slice, reducing the friction between strings and byte slices. -The conversion is no longer necessary: -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/append.*world/`}} ---> greeting = append(greeting, &#34;world&#34;...)</pre> - -<p> -<em>Updating</em>: -This is a new feature, so existing code needs no changes. -</p> - -<h3 id="close">Close</h3> - -<p> -The <code>close</code> predeclared function provides a mechanism -for a sender to signal that no more values will be sent. -It is important to the implementation of <code>for</code> <code>range</code> -loops over channels and is helpful in other situations. -Partly by design and partly because of race conditions that can occur otherwise, -it is intended for use only by the goroutine sending on the channel, -not by the goroutine receiving data. -However, before Go 1 there was no compile-time checking that <code>close</code> -was being used correctly. -</p> - -<p> -To close this gap, at least in part, Go 1 disallows <code>close</code> on receive-only channels. -Attempting to close such a channel is a compile-time error. -</p> - -<pre> - var c chan int - var csend chan&lt;- int = c - var crecv &lt;-chan int = c - close(c) // legal - close(csend) // legal - close(crecv) // illegal -</pre> - -<p> -<em>Updating</em>: -Existing code that attempts to close a receive-only channel was -erroneous even before Go 1 and should be fixed. The compiler will -now reject such code. -</p> - -<h3 id="literals">Composite literals</h3> - -<p> -In Go 1, a composite literal of array, slice, or map type can elide the -type specification for the elements' initializers if they are of pointer type. -All four of the initializations in this example are legal; the last one was illegal before Go 1. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/type Date struct/` `/STOP/`}} ---> type Date struct { - month string - day int - } - <span class="comment">// Struct values, fully qualified; always legal.</span> - holiday1 := []Date{ - Date{&#34;Feb&#34;, 14}, - Date{&#34;Nov&#34;, 11}, - Date{&#34;Dec&#34;, 25}, - } - <span class="comment">// Struct values, type name elided; always legal.</span> - holiday2 := []Date{ - {&#34;Feb&#34;, 14}, - {&#34;Nov&#34;, 11}, - {&#34;Dec&#34;, 25}, - } - <span class="comment">// Pointers, fully qualified, always legal.</span> - holiday3 := []*Date{ - &amp;Date{&#34;Feb&#34;, 14}, - &amp;Date{&#34;Nov&#34;, 11}, - &amp;Date{&#34;Dec&#34;, 25}, - } - <span class="comment">// Pointers, type name elided; legal in Go 1.</span> - holiday4 := []*Date{ - {&#34;Feb&#34;, 14}, - {&#34;Nov&#34;, 11}, - {&#34;Dec&#34;, 25}, - }</pre> - -<p> -<em>Updating</em>: -This change has no effect on existing code, but the command -<code>gofmt</code> <code>-s</code> applied to existing source -will, among other things, elide explicit element types wherever permitted. -</p> - - -<h3 id="init">Goroutines during init</h3> - -<p> -The old language defined that <code>go</code> statements executed during initialization created goroutines but that they did not begin to run until initialization of the entire program was complete. -This introduced clumsiness in many places and, in effect, limited the utility -of the <code>init</code> construct: -if it was possible for another package to use the library during initialization, the library -was forced to avoid goroutines. -This design was done for reasons of simplicity and safety but, -as our confidence in the language grew, it seemed unnecessary. -Running goroutines during initialization is no more complex or unsafe than running them during normal execution. -</p> - -<p> -In Go 1, code that uses goroutines can be called from -<code>init</code> routines and global initialization expressions -without introducing a deadlock. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/PackageGlobal/` `/^}/`}} --->var PackageGlobal int - -func init() { - c := make(chan int) - go initializationFunction(c) - PackageGlobal = &lt;-c -}</pre> - -<p> -<em>Updating</em>: -This is a new feature, so existing code needs no changes, -although it's possible that code that depends on goroutines not starting before <code>main</code> will break. -There was no such code in the standard repository. -</p> - -<h3 id="rune">The rune type</h3> - -<p> -The language spec allows the <code>int</code> type to be 32 or 64 bits wide, but current implementations set <code>int</code> to 32 bits even on 64-bit platforms. -It would be preferable to have <code>int</code> be 64 bits on 64-bit platforms. -(There are important consequences for indexing large slices.) -However, this change would waste space when processing Unicode characters with -the old language because the <code>int</code> type was also used to hold Unicode code points: each code point would waste an extra 32 bits of storage if <code>int</code> grew from 32 bits to 64. -</p> - -<p> -To make changing to 64-bit <code>int</code> feasible, -Go 1 introduces a new basic type, <code>rune</code>, to represent -individual Unicode code points. -It is an alias for <code>int32</code>, analogous to <code>byte</code> -as an alias for <code>uint8</code>. -</p> - -<p> -Character literals such as <code>'a'</code>, <code>'語'</code>, and <code>'\u0345'</code> -now have default type <code>rune</code>, -analogous to <code>1.0</code> having default type <code>float64</code>. -A variable initialized to a character constant will therefore -have type <code>rune</code> unless otherwise specified. -</p> - -<p> -Libraries have been updated to use <code>rune</code> rather than <code>int</code> -when appropriate. For instance, the functions <code>unicode.ToLower</code> and -relatives now take and return a <code>rune</code>. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/STARTRUNE/` `/ENDRUNE/`}} ---> delta := &#39;δ&#39; <span class="comment">// delta has type rune.</span> - var DELTA rune - DELTA = unicode.ToUpper(delta) - epsilon := unicode.ToLower(DELTA + 1) - if epsilon != &#39;δ&#39;+1 { - log.Fatal(&#34;inconsistent casing for Greek&#34;) - }</pre> - -<p> -<em>Updating</em>: -Most source code will be unaffected by this because the type inference from -<code>:=</code> initializers introduces the new type silently, and it propagates -from there. -Some code may get type errors that a trivial conversion will resolve. -</p> - -<h3 id="error">The error type</h3> - -<p> -Go 1 introduces a new built-in type, <code>error</code>, which has the following definition: -</p> - -<pre> - type error interface { - Error() string - } -</pre> - -<p> -Since the consequences of this type are all in the package library, -it is discussed <a href="#errors">below</a>. -</p> - -<h3 id="delete">Deleting from maps</h3> - -<p> -In the old language, to delete the entry with key <code>k</code> from map <code>m</code>, one wrote the statement, -</p> - -<pre> - m[k] = value, false -</pre> - -<p> -This syntax was a peculiar special case, the only two-to-one assignment. -It required passing a value (usually ignored) that is evaluated but discarded, -plus a boolean that was nearly always the constant <code>false</code>. -It did the job but was odd and a point of contention. -</p> - -<p> -In Go 1, that syntax has gone; instead there is a new built-in -function, <code>delete</code>. The call -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/delete\(m, k\)/`}} ---> delete(m, k)</pre> - -<p> -will delete the map entry retrieved by the expression <code>m[k]</code>. -There is no return value. Deleting a non-existent entry is a no-op. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will convert expressions of the form <code>m[k] = value, -false</code> into <code>delete(m, k)</code> when it is clear that -the ignored value can be safely discarded from the program and -<code>false</code> refers to the predefined boolean constant. -The fix tool -will flag other uses of the syntax for inspection by the programmer. -</p> - -<h3 id="iteration">Iterating in maps</h3> - -<p> -The old language specification did not define the order of iteration for maps, -and in practice it differed across hardware platforms. -This caused tests that iterated over maps to be fragile and non-portable, with the -unpleasant property that a test might always pass on one machine but break on another. -</p> - -<p> -In Go 1, the order in which elements are visited when iterating -over a map using a <code>for</code> <code>range</code> statement -is defined to be unpredictable, even if the same loop is run multiple -times with the same map. -Code should not assume that the elements are visited in any particular order. -</p> - -<p> -This change means that code that depends on iteration order is very likely to break early and be fixed long before it becomes a problem. -Just as important, it allows the map implementation to ensure better map balancing even when programs are using range loops to select an element from a map. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/Sunday/` `/^ }/`}} ---> m := map[string]int{&#34;Sunday&#34;: 0, &#34;Monday&#34;: 1} - for name, value := range m { - <span class="comment">// This loop should not assume Sunday will be visited first.</span> - f(name, value) - }</pre> - -<p> -<em>Updating</em>: -This is one change where tools cannot help. Most existing code -will be unaffected, but some programs may break or misbehave; we -recommend manual checking of all range statements over maps to -verify they do not depend on iteration order. There were a few such -examples in the standard repository; they have been fixed. -Note that it was already incorrect to depend on the iteration order, which -was unspecified. This change codifies the unpredictability. -</p> - -<h3 id="multiple_assignment">Multiple assignment</h3> - -<p> -The language specification has long guaranteed that in assignments -the right-hand-side expressions are all evaluated before any left-hand-side expressions are assigned. -To guarantee predictable behavior, -Go 1 refines the specification further. -</p> - -<p> -If the left-hand side of the assignment -statement contains expressions that require evaluation, such as -function calls or array indexing operations, these will all be done -using the usual left-to-right rule before any variables are assigned -their value. Once everything is evaluated, the actual assignments -proceed in left-to-right order. -</p> - -<p> -These examples illustrate the behavior. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/sa :=/` `/then sc.0. = 2/`}} ---> sa := []int{1, 2, 3} - i := 0 - i, sa[i] = 1, 2 <span class="comment">// sets i = 1, sa[0] = 2</span> - - sb := []int{1, 2, 3} - j := 0 - sb[j], j = 2, 1 <span class="comment">// sets sb[0] = 2, j = 1</span> - - sc := []int{1, 2, 3} - sc[0], sc[0] = 1, 2 <span class="comment">// sets sc[0] = 1, then sc[0] = 2 (so sc[0] = 2 at end)</span></pre> - -<p> -<em>Updating</em>: -This is one change where tools cannot help, but breakage is unlikely. -No code in the standard repository was broken by this change, and code -that depended on the previous unspecified behavior was already incorrect. -</p> - -<h3 id="shadowing">Returns and shadowed variables</h3> - -<p> -A common mistake is to use <code>return</code> (without arguments) after an assignment to a variable that has the same name as a result variable but is not the same variable. -This situation is called <em>shadowing</em>: the result variable has been shadowed by another variable with the same name declared in an inner scope. -</p> - -<p> -In functions with named return values, -the Go 1 compilers disallow return statements without arguments if any of the named return values is shadowed at the point of the return statement. -(It isn't part of the specification, because this is one area we are still exploring; -the situation is analogous to the compilers rejecting functions that do not end with an explicit return statement.) -</p> - -<p> -This function implicitly returns a shadowed return value and will be rejected by the compiler: -</p> - -<pre> - func Bug() (i, j, k int) { - for i = 0; i &lt; 5; i++ { - for j := 0; j &lt; 5; j++ { // Redeclares j. - k += i*j - if k > 100 { - return // Rejected: j is shadowed here. - } - } - } - return // OK: j is not shadowed here. - } -</pre> - -<p> -<em>Updating</em>: -Code that shadows return values in this way will be rejected by the compiler and will need to be fixed by hand. -The few cases that arose in the standard repository were mostly bugs. -</p> - -<h3 id="unexported">Copying structs with unexported fields</h3> - -<p> -The old language did not allow a package to make a copy of a struct value containing unexported fields belonging to a different package. -There was, however, a required exception for a method receiver; -also, the implementations of <code>copy</code> and <code>append</code> have never honored the restriction. -</p> - -<p> -Go 1 will allow packages to copy struct values containing unexported fields from other packages. -Besides resolving the inconsistency, -this change admits a new kind of API: a package can return an opaque value without resorting to a pointer or interface. -The new implementations of <code>time.Time</code> and -<code>reflect.Value</code> are examples of types taking advantage of this new property. -</p> - -<p> -As an example, if package <code>p</code> includes the definitions, -</p> - -<pre> - type Struct struct { - Public int - secret int - } - func NewStruct(a int) Struct { // Note: not a pointer. - return Struct{a, f(a)} - } - func (s Struct) String() string { - return fmt.Sprintf("{%d (secret %d)}", s.Public, s.secret) - } -</pre> - -<p> -a package that imports <code>p</code> can assign and copy values of type -<code>p.Struct</code> at will. -Behind the scenes the unexported fields will be assigned and copied just -as if they were exported, -but the client code will never be aware of them. The code -</p> - -<pre> - import "p" - - myStruct := p.NewStruct(23) - copyOfMyStruct := myStruct - fmt.Println(myStruct, copyOfMyStruct) -</pre> - -<p> -will show that the secret field of the struct has been copied to the new value. -</p> - -<p> -<em>Updating</em>: -This is a new feature, so existing code needs no changes. -</p> - -<h3 id="equality">Equality</h3> - -<p> -Before Go 1, the language did not define equality on struct and array values. -This meant, -among other things, that structs and arrays could not be used as map keys. -On the other hand, Go did define equality on function and map values. -Function equality was problematic in the presence of closures -(when are two closures equal?) -while map equality compared pointers, not the maps' content, which was usually -not what the user would want. -</p> - -<p> -Go 1 addressed these issues. -First, structs and arrays can be compared for equality and inequality -(<code>==</code> and <code>!=</code>), -and therefore be used as map keys, -provided they are composed from elements for which equality is also defined, -using element-wise comparison. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/type Day struct/` `/Printf/`}} ---> type Day struct { - long string - short string - } - Christmas := Day{&#34;Christmas&#34;, &#34;XMas&#34;} - Thanksgiving := Day{&#34;Thanksgiving&#34;, &#34;Turkey&#34;} - holiday := map[Day]bool{ - Christmas: true, - Thanksgiving: true, - } - fmt.Printf(&#34;Christmas is a holiday: %t\n&#34;, holiday[Christmas])</pre> - -<p> -Second, Go 1 removes the definition of equality for function values, -except for comparison with <code>nil</code>. -Finally, map equality is gone too, also except for comparison with <code>nil</code>. -</p> - -<p> -Note that equality is still undefined for slices, for which the -calculation is in general infeasible. Also note that the ordered -comparison operators (<code>&lt;</code> <code>&lt;=</code> -<code>&gt;</code> <code>&gt;=</code>) are still undefined for -structs and arrays. - -<p> -<em>Updating</em>: -Struct and array equality is a new feature, so existing code needs no changes. -Existing code that depends on function or map equality will be -rejected by the compiler and will need to be fixed by hand. -Few programs will be affected, but the fix may require some -redesign. -</p> - -<h2 id="packages">The package hierarchy</h2> - -<p> -Go 1 addresses many deficiencies in the old standard library and -cleans up a number of packages, making them more internally consistent -and portable. -</p> - -<p> -This section describes how the packages have been rearranged in Go 1. -Some have moved, some have been renamed, some have been deleted. -New packages are described in later sections. -</p> - -<h3 id="hierarchy">The package hierarchy</h3> - -<p> -Go 1 has a rearranged package hierarchy that groups related items -into subdirectories. For instance, <code>utf8</code> and -<code>utf16</code> now occupy subdirectories of <code>unicode</code>. -Also, <a href="#subrepo">some packages</a> have moved into -subrepositories of -<a href="http://code.google.com/p/go"><code>code.google.com/p/go</code></a> -while <a href="#deleted">others</a> have been deleted outright. -</p> - -<table class="codetable" frame="border" summary="Moved packages"> -<colgroup align="left" width="60%"></colgroup> -<colgroup align="left" width="40%"></colgroup> -<tr> -<th align="left">Old path</th> -<th align="left">New path</th> -</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>asn1</td> <td>encoding/asn1</td></tr> -<tr><td>csv</td> <td>encoding/csv</td></tr> -<tr><td>gob</td> <td>encoding/gob</td></tr> -<tr><td>json</td> <td>encoding/json</td></tr> -<tr><td>xml</td> <td>encoding/xml</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>exp/template/html</td> <td>html/template</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>big</td> <td>math/big</td></tr> -<tr><td>cmath</td> <td>math/cmplx</td></tr> -<tr><td>rand</td> <td>math/rand</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>http</td> <td>net/http</td></tr> -<tr><td>http/cgi</td> <td>net/http/cgi</td></tr> -<tr><td>http/fcgi</td> <td>net/http/fcgi</td></tr> -<tr><td>http/httptest</td> <td>net/http/httptest</td></tr> -<tr><td>http/pprof</td> <td>net/http/pprof</td></tr> -<tr><td>mail</td> <td>net/mail</td></tr> -<tr><td>rpc</td> <td>net/rpc</td></tr> -<tr><td>rpc/jsonrpc</td> <td>net/rpc/jsonrpc</td></tr> -<tr><td>smtp</td> <td>net/smtp</td></tr> -<tr><td>url</td> <td>net/url</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>exec</td> <td>os/exec</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>scanner</td> <td>text/scanner</td></tr> -<tr><td>tabwriter</td> <td>text/tabwriter</td></tr> -<tr><td>template</td> <td>text/template</td></tr> -<tr><td>template/parse</td> <td>text/template/parse</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>utf8</td> <td>unicode/utf8</td></tr> -<tr><td>utf16</td> <td>unicode/utf16</td></tr> -</table> - -<p> -Note that the package names for the old <code>cmath</code> and -<code>exp/template/html</code> packages have changed to <code>cmplx</code> -and <code>template</code>. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update all imports and package renames for packages that -remain inside the standard repository. Programs that import packages -that are no longer in the standard repository will need to be edited -by hand. -</p> - -<h3 id="exp">The package tree exp</h3> - -<p> -Because they are not standardized, the packages under the <code>exp</code> directory will not be available in the -standard Go 1 release distributions, although they will be available in source code form -in <a href="http://code.google.com/p/go/">the repository</a> for -developers who wish to use them. -</p> - -<p> -Several packages have moved under <code>exp</code> at the time of Go 1's release: -</p> - -<ul> -<li><code>ebnf</code></li> -<li><code>html</code><sup>&#8224;</sup></li> -<li><code>go/types</code></li> -</ul> - -<p> -(<sup>&#8224;</sup>The <code>EscapeString</code> and <code>UnescapeString</code> types remain -in package <code>html</code>.) -</p> - -<p> -All these packages are available under the same names, with the prefix <code>exp/</code>: <code>exp/ebnf</code> etc. -</p> - -<p> -Also, the <code>utf8.String</code> type has been moved to its own package, <code>exp/utf8string</code>. -</p> - -<p> -Finally, the <code>gotype</code> command now resides in <code>exp/gotype</code>, while -<code>ebnflint</code> is now in <code>exp/ebnflint</code>. -If they are installed, they now reside in <code>$GOROOT/bin/tool</code>. -</p> - -<p> -<em>Updating</em>: -Code that uses packages in <code>exp</code> will need to be updated by hand, -or else compiled from an installation that has <code>exp</code> available. -The <code>go</code> <code>fix</code> tool or the compiler will complain about such uses. -</p> - -<h3 id="old">The package tree old</h3> - -<p> -Because they are deprecated, the packages under the <code>old</code> directory will not be available in the -standard Go 1 release distributions, although they will be available in source code form for -developers who wish to use them. -</p> - -<p> -The packages in their new locations are: -</p> - -<ul> -<li><code>old/netchan</code></li> -<li><code>old/regexp</code></li> -<li><code>old/template</code></li> -</ul> - -<p> -<em>Updating</em>: -Code that uses packages now in <code>old</code> will need to be updated by hand, -or else compiled from an installation that has <code>old</code> available. -The <code>go</code> <code>fix</code> tool will warn about such uses. -</p> - -<h3 id="deleted">Deleted packages</h3> - -<p> -Go 1 deletes several packages outright: -</p> - -<ul> -<li><code>container/vector</code></li> -<li><code>exp/datafmt</code></li> -<li><code>go/typechecker</code></li> -<li><code>try</code></li> -</ul> - -<p> -and also the command <code>gotry</code>. -</p> - -<p> -<em>Updating</em>: -Code that uses <code>container/vector</code> should be updated to use -slices directly. See -<a href="http://code.google.com/p/go-wiki/wiki/SliceTricks">the Go -Language Community Wiki</a> for some suggestions. -Code that uses the other packages (there should be almost zero) will need to be rethought. -</p> - -<h3 id="subrepo">Packages moving to subrepositories</h3> - -<p> -Go 1 has moved a number of packages into other repositories, usually sub-repositories of -<a href="http://code.google.com/p/go/">the main Go repository</a>. -This table lists the old and new import paths: - -<table class="codetable" frame="border" summary="Sub-repositories"> -<colgroup align="left" width="40%"></colgroup> -<colgroup align="left" width="60%"></colgroup> -<tr> -<th align="left">Old</th> -<th align="left">New</th> -</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>crypto/bcrypt</td> <td>code.google.com/p/go.crypto/bcrypt</tr> -<tr><td>crypto/blowfish</td> <td>code.google.com/p/go.crypto/blowfish</tr> -<tr><td>crypto/cast5</td> <td>code.google.com/p/go.crypto/cast5</tr> -<tr><td>crypto/md4</td> <td>code.google.com/p/go.crypto/md4</tr> -<tr><td>crypto/ocsp</td> <td>code.google.com/p/go.crypto/ocsp</tr> -<tr><td>crypto/openpgp</td> <td>code.google.com/p/go.crypto/openpgp</tr> -<tr><td>crypto/openpgp/armor</td> <td>code.google.com/p/go.crypto/openpgp/armor</tr> -<tr><td>crypto/openpgp/elgamal</td> <td>code.google.com/p/go.crypto/openpgp/elgamal</tr> -<tr><td>crypto/openpgp/errors</td> <td>code.google.com/p/go.crypto/openpgp/errors</tr> -<tr><td>crypto/openpgp/packet</td> <td>code.google.com/p/go.crypto/openpgp/packet</tr> -<tr><td>crypto/openpgp/s2k</td> <td>code.google.com/p/go.crypto/openpgp/s2k</tr> -<tr><td>crypto/ripemd160</td> <td>code.google.com/p/go.crypto/ripemd160</tr> -<tr><td>crypto/twofish</td> <td>code.google.com/p/go.crypto/twofish</tr> -<tr><td>crypto/xtea</td> <td>code.google.com/p/go.crypto/xtea</tr> -<tr><td>exp/ssh</td> <td>code.google.com/p/go.crypto/ssh</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>image/bmp</td> <td>code.google.com/p/go.image/bmp</tr> -<tr><td>image/tiff</td> <td>code.google.com/p/go.image/tiff</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>net/dict</td> <td>code.google.com/p/go.net/dict</tr> -<tr><td>net/websocket</td> <td>code.google.com/p/go.net/websocket</tr> -<tr><td>exp/spdy</td> <td>code.google.com/p/go.net/spdy</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>encoding/git85</td> <td>code.google.com/p/go.codereview/git85</tr> -<tr><td>patch</td> <td>code.google.com/p/go.codereview/patch</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>exp/wingui</td> <td>code.google.com/p/gowingui</tr> -</table> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update imports of these packages to use the new import paths. -Installations that depend on these packages will need to install them using -a <code>go get</code> command. -</p> - -<h2 id="major">Major changes to the library</h2> - -<p> -This section describes significant changes to the core libraries, the ones that -affect the most programs. -</p> - -<h3 id="errors">The error type and errors package</h3> - -<p> -The placement of <code>os.Error</code> in package <code>os</code> is mostly historical: errors first came up when implementing package <code>os</code>, and they seemed system-related at the time. -Since then it has become clear that errors are more fundamental than the operating system. For example, it would be nice to use <code>Errors</code> in packages that <code>os</code> depends on, like <code>syscall</code>. -Also, having <code>Error</code> in <code>os</code> introduces many dependencies on <code>os</code> that would otherwise not exist. -</p> - -<p> -Go 1 solves these problems by introducing a built-in <code>error</code> interface type and a separate <code>errors</code> package (analogous to <code>bytes</code> and <code>strings</code>) that contains utility functions. -It replaces <code>os.NewError</code> with -<a href="/pkg/errors/#New"><code>errors.New</code></a>, -giving errors a more central place in the environment. -</p> - -<p> -So the widely-used <code>String</code> method does not cause accidental satisfaction -of the <code>error</code> interface, the <code>error</code> interface uses instead -the name <code>Error</code> for that method: -</p> - -<pre> - type error interface { - Error() string - } -</pre> - -<p> -The <code>fmt</code> library automatically invokes <code>Error</code>, as it already -does for <code>String</code>, for easy printing of error values. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/START ERROR EXAMPLE/` `/END ERROR EXAMPLE/`}} --->type SyntaxError struct { - File string - Line int - Message string -} - -func (se *SyntaxError) Error() string { - return fmt.Sprintf(&#34;%s:%d: %s&#34;, se.File, se.Line, se.Message) -}</pre> - -<p> -All standard packages have been updated to use the new interface; the old <code>os.Error</code> is gone. -</p> - -<p> -A new package, <a href="/pkg/errors/"><code>errors</code></a>, contains the function -</p> - -<pre> -func New(text string) error -</pre> - -<p> -to turn a string into an error. It replaces the old <code>os.NewError</code>. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/ErrSyntax/`}} ---> var ErrSyntax = errors.New(&#34;syntax error&#34;)</pre> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update almost all code affected by the change. -Code that defines error types with a <code>String</code> method will need to be updated -by hand to rename the methods to <code>Error</code>. -</p> - -<h3 id="errno">System call errors</h3> - -<p> -The old <code>syscall</code> package, which predated <code>os.Error</code> -(and just about everything else), -returned errors as <code>int</code> values. -In turn, the <code>os</code> package forwarded many of these errors, such -as <code>EINVAL</code>, but using a different set of errors on each platform. -This behavior was unpleasant and unportable. -</p> - -<p> -In Go 1, the -<a href="/pkg/syscall/"><code>syscall</code></a> -package instead returns an <code>error</code> for system call errors. -On Unix, the implementation is done by a -<a href="/pkg/syscall/#Errno"><code>syscall.Errno</code></a> type -that satisfies <code>error</code> and replaces the old <code>os.Errno</code>. -</p> - -<p> -The changes affecting <code>os.EINVAL</code> and relatives are -described <a href="#os">elsewhere</a>. - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update almost all code affected by the change. -Regardless, most code should use the <code>os</code> package -rather than <code>syscall</code> and so will be unaffected. -</p> - -<h3 id="time">Time</h3> - -<p> -Time is always a challenge to support well in a programming language. -The old Go <code>time</code> package had <code>int64</code> units, no -real type safety, -and no distinction between absolute times and durations. -</p> - -<p> -One of the most sweeping changes in the Go 1 library is therefore a -complete redesign of the -<a href="/pkg/time/"><code>time</code></a> package. -Instead of an integer number of nanoseconds as an <code>int64</code>, -and a separate <code>*time.Time</code> type to deal with human -units such as hours and years, -there are now two fundamental types: -<a href="/pkg/time/#Time"><code>time.Time</code></a> -(a value, so the <code>*</code> is gone), which represents a moment in time; -and <a href="/pkg/time/#Duration"><code>time.Duration</code></a>, -which represents an interval. -Both have nanosecond resolution. -A <code>Time</code> can represent any time into the ancient -past and remote future, while a <code>Duration</code> can -span plus or minus only about 290 years. -There are methods on these types, plus a number of helpful -predefined constant durations such as <code>time.Second</code>. -</p> - -<p> -Among the new methods are things like -<a href="/pkg/time/#Time.Add"><code>Time.Add</code></a>, -which adds a <code>Duration</code> to a <code>Time</code>, and -<a href="/pkg/time/#Time.Sub"><code>Time.Sub</code></a>, -which subtracts two <code>Times</code> to yield a <code>Duration</code>. -</p> - -<p> -The most important semantic change is that the Unix epoch (Jan 1, 1970) is now -relevant only for those functions and methods that mention Unix: -<a href="/pkg/time/#Unix"><code>time.Unix</code></a> -and the <a href="/pkg/time/#Time.Unix"><code>Unix</code></a> -and <a href="/pkg/time/#Time.UnixNano"><code>UnixNano</code></a> methods -of the <code>Time</code> type. -In particular, -<a href="/pkg/time/#Now"><code>time.Now</code></a> -returns a <code>time.Time</code> value rather than, in the old -API, an integer nanosecond count since the Unix epoch. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/sleepUntil/` `/^}/`}} ---><span class="comment">// sleepUntil sleeps until the specified time. It returns immediately if it&#39;s too late.</span> -func sleepUntil(wakeup time.Time) { - now := time.Now() <span class="comment">// A Time.</span> - if !wakeup.After(now) { - return - } - delta := wakeup.Sub(now) <span class="comment">// A Duration.</span> - fmt.Printf(&#34;Sleeping for %.3fs\n&#34;, delta.Seconds()) - time.Sleep(delta) -}</pre> - -<p> -The new types, methods, and constants have been propagated through -all the standard packages that use time, such as <code>os</code> and -its representation of file time stamps. -</p> - -<p> -<em>Updating</em>: -The <code>go</code> <code>fix</code> tool will update many uses of the old <code>time</code> package to use the new -types and methods, although it does not replace values such as <code>1e9</code> -representing nanoseconds per second. -Also, because of type changes in some of the values that arise, -some of the expressions rewritten by the fix tool may require -further hand editing; in such cases the rewrite will include -the correct function or method for the old functionality, but -may have the wrong type or require further analysis. -</p> - -<h2 id="minor">Minor changes to the library</h2> - -<p> -This section describes smaller changes, such as those to less commonly -used packages or that affect -few programs beyond the need to run <code>go</code> <code>fix</code>. -This category includes packages that are new in Go 1. -Collectively they improve portability, regularize behavior, and -make the interfaces more modern and Go-like. -</p> - -<h3 id="archive_zip">The archive/zip package</h3> - -<p> -In Go 1, <a href="/pkg/archive/zip/#Writer"><code>*zip.Writer</code></a> no -longer has a <code>Write</code> method. Its presence was a mistake. -</p> - -<p> -<em>Updating</em>: -What little code is affected will be caught by the compiler and must be updated by hand. -</p> - -<h3 id="bufio">The bufio package</h3> - -<p> -In Go 1, <a href="/pkg/bufio/#NewReaderSize"><code>bufio.NewReaderSize</code></a> -and -<a href="/pkg/bufio/#NewWriterSize"><code>bufio.NewWriterSize</code></a> -functions no longer return an error for invalid sizes. -If the argument size is too small or invalid, it is adjusted. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update calls that assign the error to _. -Calls that aren't fixed will be caught by the compiler and must be updated by hand. -</p> - -<h3 id="compress">The compress/flate, compress/gzip and compress/zlib packages</h3> - -<p> -In Go 1, the <code>NewWriterXxx</code> functions in -<a href="/pkg/compress/flate"><code>compress/flate</code></a>, -<a href="/pkg/compress/gzip"><code>compress/gzip</code></a> and -<a href="/pkg/compress/zlib"><code>compress/zlib</code></a> -all return <code>(*Writer, error)</code> if they take a compression level, -and <code>*Writer</code> otherwise. Package <code>gzip</code>'s -<code>Compressor</code> and <code>Decompressor</code> types have been renamed -to <code>Writer</code> and <code>Reader</code>. Package <code>flate</code>'s -<code>WrongValueError</code> type has been removed. -</p> - -<p> -<em>Updating</em> -Running <code>go</code> <code>fix</code> will update old names and calls that assign the error to _. -Calls that aren't fixed will be caught by the compiler and must be updated by hand. -</p> - -<h3 id="crypto_aes_des">The crypto/aes and crypto/des packages</h3> - -<p> -In Go 1, the <code>Reset</code> method has been removed. Go does not guarantee -that memory is not copied and therefore this method was misleading. -</p> - -<p> -The cipher-specific types <code>*aes.Cipher</code>, <code>*des.Cipher</code>, -and <code>*des.TripleDESCipher</code> have been removed in favor of -<code>cipher.Block</code>. -</p> - -<p> -<em>Updating</em>: -Remove the calls to Reset. Replace uses of the specific cipher types with -cipher.Block. -</p> - -<h3 id="crypto_elliptic">The crypto/elliptic package</h3> - -<p> -In Go 1, <a href="/pkg/crypto/elliptic/#Curve"><code>elliptic.Curve</code></a> -has been made an interface to permit alternative implementations. The curve -parameters have been moved to the -<a href="/pkg/crypto/elliptic/#CurveParams"><code>elliptic.CurveParams</code></a> -structure. -</p> - -<p> -<em>Updating</em>: -Existing users of <code>*elliptic.Curve</code> will need to change to -simply <code>elliptic.Curve</code>. Calls to <code>Marshal</code>, -<code>Unmarshal</code> and <code>GenerateKey</code> are now functions -in <code>crypto/elliptic</code> that take an <code>elliptic.Curve</code> -as their first argument. -</p> - -<h3 id="crypto_hmac">The crypto/hmac package</h3> - -<p> -In Go 1, the hash-specific functions, such as <code>hmac.NewMD5</code>, have -been removed from <code>crypto/hmac</code>. Instead, <code>hmac.New</code> takes -a function that returns a <code>hash.Hash</code>, such as <code>md5.New</code>. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will perform the needed changes. -</p> - -<h3 id="crypto_x509">The crypto/x509 package</h3> - -<p> -In Go 1, the -<a href="/pkg/crypto/x509/#CreateCertificate"><code>CreateCertificate</code></a> -and -<a href="/pkg/crypto/x509/#CreateCRL"><code>CreateCRL</code></a> -functions in <code>crypto/x509</code> have been altered to take an -<code>interface{}</code> where they previously took a <code>*rsa.PublicKey</code> -or <code>*rsa.PrivateKey</code>. This will allow other public key algorithms -to be implemented in the future. -</p> - -<p> -<em>Updating</em>: -No changes will be needed. -</p> - -<h3 id="encoding_binary">The encoding/binary package</h3> - -<p> -In Go 1, the <code>binary.TotalSize</code> function has been replaced by -<a href="/pkg/encoding/binary/#Size"><code>Size</code></a>, -which takes an <code>interface{}</code> argument rather than -a <code>reflect.Value</code>. -</p> - -<p> -<em>Updating</em>: -What little code is affected will be caught by the compiler and must be updated by hand. -</p> - -<h3 id="encoding_xml">The encoding/xml package</h3> - -<p> -In Go 1, the <a href="/pkg/encoding/xml/"><code>xml</code></a> package -has been brought closer in design to the other marshaling packages such -as <a href="/pkg/encoding/gob/"><code>encoding/gob</code></a>. -</p> - -<p> -The old <code>Parser</code> type is renamed -<a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> and has a new -<a href="/pkg/encoding/xml/#Decoder.Decode"><code>Decode</code></a> method. An -<a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a> type was also introduced. -</p> - -<p> -The functions <a href="/pkg/encoding/xml/#Marshal"><code>Marshal</code></a> -and <a href="/pkg/encoding/xml/#Unmarshal"><code>Unmarshal</code></a> -work with <code>[]byte</code> values now. To work with streams, -use the new <a href="/pkg/encoding/xml/#Encoder"><code>Encoder</code></a> -and <a href="/pkg/encoding/xml/#Decoder"><code>Decoder</code></a> types. -</p> - -<p> -When marshaling or unmarshaling values, the format of supported flags in -field tags has changed to be closer to the -<a href="/pkg/encoding/json"><code>json</code></a> package -(<code>`xml:"name,flag"`</code>). The matching done between field tags, field -names, and the XML attribute and element names is now case-sensitive. -The <code>XMLName</code> field tag, if present, must also match the name -of the XML element being marshaled. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update most uses of the package except for some calls to -<code>Unmarshal</code>. Special care must be taken with field tags, -since the fix tool will not update them and if not fixed by hand they will -misbehave silently in some cases. For example, the old -<code>"attr"</code> is now written <code>",attr"</code> while plain -<code>"attr"</code> remains valid but with a different meaning. -</p> - -<h3 id="expvar">The expvar package</h3> - -<p> -In Go 1, the <code>RemoveAll</code> function has been removed. -The <code>Iter</code> function and Iter method on <code>*Map</code> have -been replaced by -<a href="/pkg/expvar/#Do"><code>Do</code></a> -and -<a href="/pkg/expvar/#Map.Do"><code>(*Map).Do</code></a>. -</p> - -<p> -<em>Updating</em>: -Most code using <code>expvar</code> will not need changing. The rare code that used -<code>Iter</code> can be updated to pass a closure to <code>Do</code> to achieve the same effect. -</p> - -<h3 id="flag">The flag package</h3> - -<p> -In Go 1, the interface <a href="/pkg/flag/#Value"><code>flag.Value</code></a> has changed slightly. -The <code>Set</code> method now returns an <code>error</code> instead of -a <code>bool</code> to indicate success or failure. -</p> - -<p> -There is also a new kind of flag, <code>Duration</code>, to support argument -values specifying time intervals. -Values for such flags must be given units, just as <code>time.Duration</code> -formats them: <code>10s</code>, <code>1h30m</code>, etc. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/timeout/`}} --->var timeout = flag.Duration(&#34;timeout&#34;, 30*time.Second, &#34;how long to wait for completion&#34;)</pre> - -<p> -<em>Updating</em>: -Programs that implement their own flags will need minor manual fixes to update their -<code>Set</code> methods. -The <code>Duration</code> flag is new and affects no existing code. -</p> - - -<h3 id="go">The go/* packages</h3> - -<p> -Several packages under <code>go</code> have slightly revised APIs. -</p> - -<p> -A concrete <code>Mode</code> type was introduced for configuration mode flags -in the packages -<a href="/pkg/go/scanner/"><code>go/scanner</code></a>, -<a href="/pkg/go/parser/"><code>go/parser</code></a>, -<a href="/pkg/go/printer/"><code>go/printer</code></a>, and -<a href="/pkg/go/doc/"><code>go/doc</code></a>. -</p> - -<p> -The modes <code>AllowIllegalChars</code> and <code>InsertSemis</code> have been removed -from the <a href="/pkg/go/scanner/"><code>go/scanner</code></a> package. They were mostly -useful for scanning text other then Go source files. Instead, the -<a href="/pkg/text/scanner/"><code>text/scanner</code></a> package should be used -for that purpose. -</p> - -<p> -The <a href="/pkg/go/scanner/#ErrorHandler"><code>ErrorHandler</code></a> provided -to the scanner's <a href="/pkg/go/scanner/#Scanner.Init"><code>Init</code></a> method is -now simply a function rather than an interface. The <code>ErrorVector</code> type has -been removed in favor of the (existing) <a href="/pkg/go/scanner/#ErrorList"><code>ErrorList</code></a> -type, and the <code>ErrorVector</code> methods have been migrated. Instead of embedding -an <code>ErrorVector</code> in a client of the scanner, now a client should maintain -an <code>ErrorList</code>. -</p> - -<p> -The set of parse functions provided by the <a href="/pkg/go/parser/"><code>go/parser</code></a> -package has been reduced to the primary parse function -<a href="/pkg/go/parser/#ParseFile"><code>ParseFile</code></a>, and a couple of -convenience functions <a href="/pkg/go/parser/#ParseDir"><code>ParseDir</code></a> -and <a href="/pkg/go/parser/#ParseExpr"><code>ParseExpr</code></a>. -</p> - -<p> -The <a href="/pkg/go/printer/"><code>go/printer</code></a> package supports an additional -configuration mode <a href="/pkg/go/printer/#Mode"><code>SourcePos</code></a>; -if set, the printer will emit <code>//line</code> comments such that the generated -output contains the original source code position information. The new type -<a href="/pkg/go/printer/#CommentedNode"><code>CommentedNode</code></a> can be -used to provide comments associated with an arbitrary -<a href="/pkg/go/ast/#Node"><code>ast.Node</code></a> (until now only -<a href="/pkg/go/ast/#File"><code>ast.File</code></a> carried comment information). -</p> - -<p> -The type names of the <a href="/pkg/go/doc/"><code>go/doc</code></a> package have been -streamlined by removing the <code>Doc</code> suffix: <code>PackageDoc</code> -is now <code>Package</code>, <code>ValueDoc</code> is <code>Value</code>, etc. -Also, all types now consistently have a <code>Name</code> field (or <code>Names</code>, -in the case of type <code>Value</code>) and <code>Type.Factories</code> has become -<code>Type.Funcs</code>. -Instead of calling <code>doc.NewPackageDoc(pkg, importpath)</code>, -documentation for a package is created with: -</p> - -<pre> - doc.New(pkg, importpath, mode) -</pre> - -<p> -where the new <code>mode</code> parameter specifies the operation mode: -if set to <a href="/pkg/go/doc/#AllDecls"><code>AllDecls</code></a>, all declarations -(not just exported ones) are considered. -The function <code>NewFileDoc</code> was removed, and the function -<code>CommentText</code> has become the method -<a href="/pkg/go/ast/#Text"><code>Text</code></a> of -<a href="/pkg/go/ast/#CommentGroup"><code>ast.CommentGroup</code></a>. -</p> - -<p> -In package <a href="/pkg/go/token/"><code>go/token</code></a>, the -<a href="/pkg/go/token/#FileSet"><code>token.FileSet</code></a> method <code>Files</code> -(which originally returned a channel of <code>*token.File</code>s) has been replaced -with the iterator <a href="/pkg/go/token/#FileSet.Iterate"><code>Iterate</code></a> that -accepts a function argument instead. -</p> - -<p> -In package <a href="/pkg/go/build/"><code>go/build</code></a>, the API -has been nearly completely replaced. -The package still computes Go package information -but it does not run the build: the <code>Cmd</code> and <code>Script</code> -types are gone. -(To build code, use the new -<a href="/cmd/go/"><code>go</code></a> command instead.) -The <code>DirInfo</code> type is now named -<a href="/pkg/go/build/#Package"><code>Package</code></a>. -<code>FindTree</code> and <code>ScanDir</code> are replaced by -<a href="/pkg/go/build/#Import"><code>Import</code></a> -and -<a href="/pkg/go/build/#ImportDir"><code>ImportDir</code></a>. -</p> - -<p> -<em>Updating</em>: -Code that uses packages in <code>go</code> will have to be updated by hand; the -compiler will reject incorrect uses. Templates used in conjunction with any of the -<code>go/doc</code> types may need manual fixes; the renamed fields will lead -to run-time errors. -</p> - -<h3 id="hash">The hash package</h3> - -<p> -In Go 1, the definition of <a href="/pkg/hash/#Hash"><code>hash.Hash</code></a> includes -a new method, <code>BlockSize</code>. This new method is used primarily in the -cryptographic libraries. -</p> - -<p> -The <code>Sum</code> method of the -<a href="/pkg/hash/#Hash"><code>hash.Hash</code></a> interface now takes a -<code>[]byte</code> argument, to which the hash value will be appended. -The previous behavior can be recreated by adding a <code>nil</code> argument to the call. -</p> - -<p> -<em>Updating</em>: -Existing implementations of <code>hash.Hash</code> will need to add a -<code>BlockSize</code> method. Hashes that process the input one byte at -a time can implement <code>BlockSize</code> to return 1. -Running <code>go</code> <code>fix</code> will update calls to the <code>Sum</code> methods of the various -implementations of <code>hash.Hash</code>. -</p> - -<p> -<em>Updating</em>: -Since the package's functionality is new, no updating is necessary. -</p> - -<h3 id="http">The http package</h3> - -<p> -In Go 1 the <a href="/pkg/net/http/"><code>http</code></a> package is refactored, -putting some of the utilities into a -<a href="/pkg/net/http/httputil/"><code>httputil</code></a> subdirectory. -These pieces are only rarely needed by HTTP clients. -The affected items are: -</p> - -<ul> -<li>ClientConn</li> -<li>DumpRequest</li> -<li>DumpRequestOut</li> -<li>DumpResponse</li> -<li>NewChunkedReader</li> -<li>NewChunkedWriter</li> -<li>NewClientConn</li> -<li>NewProxyClientConn</li> -<li>NewServerConn</li> -<li>NewSingleHostReverseProxy</li> -<li>ReverseProxy</li> -<li>ServerConn</li> -</ul> - -<p> -The <code>Request.RawURL</code> field has been removed; it was a -historical artifact. -</p> - -<p> -The <code>Handle</code> and <code>HandleFunc</code> -functions, and the similarly-named methods of <code>ServeMux</code>, -now panic if an attempt is made to register the same pattern twice. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update the few programs that are affected except for -uses of <code>RawURL</code>, which must be fixed by hand. -</p> - -<h3 id="image">The image package</h3> - -<p> -The <a href="/pkg/image/"><code>image</code></a> package has had a number of -minor changes, rearrangements and renamings. -</p> - -<p> -Most of the color handling code has been moved into its own package, -<a href="/pkg/image/color/"><code>image/color</code></a>. -For the elements that moved, a symmetry arises; for instance, -each pixel of an -<a href="/pkg/image/#RGBA"><code>image.RGBA</code></a> -is a -<a href="/pkg/image/color/#RGBA"><code>color.RGBA</code></a>. -</p> - -<p> -The old <code>image/ycbcr</code> package has been folded, with some -renamings, into the -<a href="/pkg/image/"><code>image</code></a> -and -<a href="/pkg/image/color/"><code>image/color</code></a> -packages. -</p> - -<p> -The old <code>image.ColorImage</code> type is still in the <code>image</code> -package but has been renamed -<a href="/pkg/image/#Uniform"><code>image.Uniform</code></a>, -while <code>image.Tiled</code> has been removed. -</p> - -<p> -This table lists the renamings. -</p> - -<table class="codetable" frame="border" summary="image renames"> -<colgroup align="left" width="50%"></colgroup> -<colgroup align="left" width="50%"></colgroup> -<tr> -<th align="left">Old</th> -<th align="left">New</th> -</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>image.Color</td> <td>color.Color</td></tr> -<tr><td>image.ColorModel</td> <td>color.Model</td></tr> -<tr><td>image.ColorModelFunc</td> <td>color.ModelFunc</td></tr> -<tr><td>image.PalettedColorModel</td> <td>color.Palette</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>image.RGBAColor</td> <td>color.RGBA</td></tr> -<tr><td>image.RGBA64Color</td> <td>color.RGBA64</td></tr> -<tr><td>image.NRGBAColor</td> <td>color.NRGBA</td></tr> -<tr><td>image.NRGBA64Color</td> <td>color.NRGBA64</td></tr> -<tr><td>image.AlphaColor</td> <td>color.Alpha</td></tr> -<tr><td>image.Alpha16Color</td> <td>color.Alpha16</td></tr> -<tr><td>image.GrayColor</td> <td>color.Gray</td></tr> -<tr><td>image.Gray16Color</td> <td>color.Gray16</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>image.RGBAColorModel</td> <td>color.RGBAModel</td></tr> -<tr><td>image.RGBA64ColorModel</td> <td>color.RGBA64Model</td></tr> -<tr><td>image.NRGBAColorModel</td> <td>color.NRGBAModel</td></tr> -<tr><td>image.NRGBA64ColorModel</td> <td>color.NRGBA64Model</td></tr> -<tr><td>image.AlphaColorModel</td> <td>color.AlphaModel</td></tr> -<tr><td>image.Alpha16ColorModel</td> <td>color.Alpha16Model</td></tr> -<tr><td>image.GrayColorModel</td> <td>color.GrayModel</td></tr> -<tr><td>image.Gray16ColorModel</td> <td>color.Gray16Model</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>ycbcr.RGBToYCbCr</td> <td>color.RGBToYCbCr</td></tr> -<tr><td>ycbcr.YCbCrToRGB</td> <td>color.YCbCrToRGB</td></tr> -<tr><td>ycbcr.YCbCrColorModel</td> <td>color.YCbCrModel</td></tr> -<tr><td>ycbcr.YCbCrColor</td> <td>color.YCbCr</td></tr> -<tr><td>ycbcr.YCbCr</td> <td>image.YCbCr</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>ycbcr.SubsampleRatio444</td> <td>image.YCbCrSubsampleRatio444</td></tr> -<tr><td>ycbcr.SubsampleRatio422</td> <td>image.YCbCrSubsampleRatio422</td></tr> -<tr><td>ycbcr.SubsampleRatio420</td> <td>image.YCbCrSubsampleRatio420</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>image.ColorImage</td> <td>image.Uniform</td></tr> -</table> - -<p> -The image package's <code>New</code> functions -(<a href="/pkg/image/#NewRGBA"><code>NewRGBA</code></a>, -<a href="/pkg/image/#NewRGBA64"><code>NewRGBA64</code></a>, etc.) -take an <a href="/pkg/image/#Rectangle"><code>image.Rectangle</code></a> as an argument -instead of four integers. -</p> - -<p> -Finally, there are new predefined <code>color.Color</code> variables -<a href="/pkg/image/color/#Black"><code>color.Black</code></a>, -<a href="/pkg/image/color/#White"><code>color.White</code></a>, -<a href="/pkg/image/color/#Opaque"><code>color.Opaque</code></a> -and -<a href="/pkg/image/color/#Transparent"><code>color.Transparent</code></a>. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update almost all code affected by the change. -</p> - -<h3 id="log_syslog">The log/syslog package</h3> - -<p> -In Go 1, the <a href="/pkg/log/syslog/#NewLogger"><code>syslog.NewLogger</code></a> -function returns an error as well as a <code>log.Logger</code>. -</p> - -<p> -<em>Updating</em>: -What little code is affected will be caught by the compiler and must be updated by hand. -</p> - -<h3 id="mime">The mime package</h3> - -<p> -In Go 1, the <a href="/pkg/mime/#FormatMediaType"><code>FormatMediaType</code></a> function -of the <code>mime</code> package has been simplified to make it -consistent with -<a href="/pkg/mime/#ParseMediaType"><code>ParseMediaType</code></a>. -It now takes <code>"text/html"</code> rather than <code>"text"</code> and <code>"html"</code>. -</p> - -<p> -<em>Updating</em>: -What little code is affected will be caught by the compiler and must be updated by hand. -</p> - -<h3 id="net">The net package</h3> - -<p> -In Go 1, the various <code>SetTimeout</code>, -<code>SetReadTimeout</code>, and <code>SetWriteTimeout</code> methods -have been replaced with -<a href="/pkg/net/#IPConn.SetDeadline"><code>SetDeadline</code></a>, -<a href="/pkg/net/#IPConn.SetReadDeadline"><code>SetReadDeadline</code></a>, and -<a href="/pkg/net/#IPConn.SetWriteDeadline"><code>SetWriteDeadline</code></a>, -respectively. Rather than taking a timeout value in nanoseconds that -apply to any activity on the connection, the new methods set an -absolute deadline (as a <code>time.Time</code> value) after which -reads and writes will time out and no longer block. -</p> - -<p> -There are also new functions -<a href="/pkg/net/#DialTimeout"><code>net.DialTimeout</code></a> -to simplify timing out dialing a network address and -<a href="/pkg/net/#ListenMulticastUDP"><code>net.ListenMulticastUDP</code></a> -to allow multicast UDP to listen concurrently across multiple listeners. -The <code>net.ListenMulticastUDP</code> function replaces the old -<code>JoinGroup</code> and <code>LeaveGroup</code> methods. -</p> - -<p> -<em>Updating</em>: -Code that uses the old methods will fail to compile and must be updated by hand. -The semantic change makes it difficult for the fix tool to update automatically. -</p> - -<h3 id="os">The os package</h3> - -<p> -The <code>Time</code> function has been removed; callers should use -the <a href="/pkg/time/#Time"><code>Time</code></a> type from the -<code>time</code> package. -</p> - -<p> -The <code>Exec</code> function has been removed; callers should use -<code>Exec</code> from the <code>syscall</code> package, where available. -</p> - -<p> -The <code>ShellExpand</code> function has been renamed to <a -href="/pkg/os/#ExpandEnv"><code>ExpandEnv</code></a>. -</p> - -<p> -The <a href="/pkg/os/#NewFile"><code>NewFile</code></a> function -now takes a <code>uintptr</code> fd, instead of an <code>int</code>. -The <a href="/pkg/os/#File.Fd"><code>Fd</code></a> method on files now -also returns a <code>uintptr</code>. -</p> - -<p> -There are no longer error constants such as <code>EINVAL</code> -in the <code>os</code> package, since the set of values varied with -the underlying operating system. There are new portable functions like -<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a> -to test common error properties, plus a few new error values -with more Go-like names, such as -<a href="/pkg/os/#ErrPermission"><code>ErrPermission</code></a> -and -<a href="/pkg/os/#ErrNoEnv"><code>ErrNoEnv</code></a>. -</p> - -<p> -The <code>Getenverror</code> function has been removed. To distinguish -between a non-existent environment variable and an empty string, -use <a href="/pkg/os/#Environ"><code>os.Environ</code></a> or -<a href="/pkg/syscall/#Getenv"><code>syscall.Getenv</code></a>. -</p> - - -<p> -The <a href="/pkg/os/#Process.Wait"><code>Process.Wait</code></a> method has -dropped its option argument and the associated constants are gone -from the package. -Also, the function <code>Wait</code> is gone; only the method of -the <code>Process</code> type persists. -</p> - -<p> -The <code>Waitmsg</code> type returned by -<a href="/pkg/os/#Process.Wait"><code>Process.Wait</code></a> -has been replaced with a more portable -<a href="/pkg/os/#ProcessState"><code>ProcessState</code></a> -type with accessor methods to recover information about the -process. -Because of changes to <code>Wait</code>, the <code>ProcessState</code> -value always describes an exited process. -Portability concerns simplified the interface in other ways, but the values returned by the -<a href="/pkg/os/#ProcessState.Sys"><code>ProcessState.Sys</code></a> and -<a href="/pkg/os/#ProcessState.SysUsage"><code>ProcessState.SysUsage</code></a> -methods can be type-asserted to underlying system-specific data structures such as -<a href="/pkg/syscall/#WaitStatus"><code>syscall.WaitStatus</code></a> and -<a href="/pkg/syscall/#Rusage"><code>syscall.Rusage</code></a> on Unix. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will drop a zero argument to <code>Process.Wait</code>. -All other changes will be caught by the compiler and must be updated by hand. -</p> - -<h4 id="os_fileinfo">The os.FileInfo type</h4> - -<p> -Go 1 redefines the <a href="/pkg/os/#FileInfo"><code>os.FileInfo</code></a> type, -changing it from a struct to an interface: -</p> - -<pre> - type FileInfo interface { - Name() string // base name of the file - Size() int64 // length in bytes - Mode() FileMode // file mode bits - ModTime() time.Time // modification time - IsDir() bool // abbreviation for Mode().IsDir() - Sys() interface{} // underlying data source (can return nil) - } -</pre> - -<p> -The file mode information has been moved into a subtype called -<a href="/pkg/os/#FileMode"><code>os.FileMode</code></a>, -a simple integer type with <code>IsDir</code>, <code>Perm</code>, and <code>String</code> -methods. -</p> - -<p> -The system-specific details of file modes and properties such as (on Unix) -i-number have been removed from <code>FileInfo</code> altogether. -Instead, each operating system's <code>os</code> package provides an -implementation of the <code>FileInfo</code> interface, which -has a <code>Sys</code> method that returns the -system-specific representation of file metadata. -For instance, to discover the i-number of a file on a Unix system, unpack -the <code>FileInfo</code> like this: -</p> - -<pre> - fi, err := os.Stat("hello.go") - if err != nil { - log.Fatal(err) - } - // Check that it's a Unix file. - unixStat, ok := fi.Sys().(*syscall.Stat_t) - if !ok { - log.Fatal("hello.go: not a Unix file") - } - fmt.Printf("file i-number: %d\n", unixStat.Ino) -</pre> - -<p> -Assuming (which is unwise) that <code>"hello.go"</code> is a Unix file, -the i-number expression could be contracted to -</p> - -<pre> - fi.Sys().(*syscall.Stat_t).Ino -</pre> - -<p> -The vast majority of uses of <code>FileInfo</code> need only the methods -of the standard interface. -</p> - -<p> -The <code>os</code> package no longer contains wrappers for the POSIX errors -such as <code>ENOENT</code>. -For the few programs that need to verify particular error conditions, there are -now the boolean functions -<a href="/pkg/os/#IsExist"><code>IsExist</code></a>, -<a href="/pkg/os/#IsNotExist"><code>IsNotExist</code></a> -and -<a href="/pkg/os/#IsPermission"><code>IsPermission</code></a>. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/os\.Open/` `/}/`}} ---> f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600) - if os.IsExist(err) { - log.Printf(&#34;%s already exists&#34;, name) - }</pre> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update code that uses the old equivalent of the current <code>os.FileInfo</code> -and <code>os.FileMode</code> API. -Code that needs system-specific file details will need to be updated by hand. -Code that uses the old POSIX error values from the <code>os</code> package -will fail to compile and will also need to be updated by hand. -</p> - -<h3 id="os_signal">The os/signal package</h3> - -<p> -The <code>os/signal</code> package in Go 1 replaces the -<code>Incoming</code> function, which returned a channel -that received all incoming signals, -with the selective <code>Notify</code> function, which asks -for delivery of specific signals on an existing channel. -</p> - -<p> -<em>Updating</em>: -Code must be updated by hand. -A literal translation of -</p> -<pre> -c := signal.Incoming() -</pre> -<p> -is -</p> -<pre> -c := make(chan os.Signal) -signal.Notify(c) // ask for all signals -</pre> -<p> -but most code should list the specific signals it wants to handle instead: -</p> -<pre> -c := make(chan os.Signal) -signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT) -</pre> - -<h3 id="path_filepath">The path/filepath package</h3> - -<p> -In Go 1, the <a href="/pkg/path/filepath/#Walk"><code>Walk</code></a> function of the -<code>path/filepath</code> package -has been changed to take a function value of type -<a href="/pkg/path/filepath/#WalkFunc"><code>WalkFunc</code></a> -instead of a <code>Visitor</code> interface value. -<code>WalkFunc</code> unifies the handling of both files and directories. -</p> - -<pre> - type WalkFunc func(path string, info os.FileInfo, err error) error -</pre> - -<p> -The <code>WalkFunc</code> function will be called even for files or directories that could not be opened; -in such cases the error argument will describe the failure. -If a directory's contents are to be skipped, -the function should return the value <a href="/pkg/path/filepath/#variables"><code>filepath.SkipDir</code></a> -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/STARTWALK/` `/ENDWALK/`}} ---> markFn := func(path string, info os.FileInfo, err error) error { - if path == &#34;pictures&#34; { <span class="comment">// Will skip walking of directory pictures and its contents.</span> - return filepath.SkipDir - } - if err != nil { - return err - } - log.Println(path) - return nil - } - err := filepath.Walk(&#34;.&#34;, markFn) - if err != nil { - log.Fatal(err) - }</pre> - -<p> -<em>Updating</em>: -The change simplifies most code but has subtle consequences, so affected programs -will need to be updated by hand. -The compiler will catch code using the old interface. -</p> - -<h3 id="regexp">The regexp package</h3> - -<p> -The <a href="/pkg/regexp/"><code>regexp</code></a> package has been rewritten. -It has the same interface but the specification of the regular expressions -it supports has changed from the old "egrep" form to that of -<a href="http://code.google.com/p/re2/">RE2</a>. -</p> - -<p> -<em>Updating</em>: -Code that uses the package should have its regular expressions checked by hand. -</p> - -<h3 id="runtime">The runtime package</h3> - -<p> -In Go 1, much of the API exported by package -<code>runtime</code> has been removed in favor of -functionality provided by other packages. -Code using the <code>runtime.Type</code> interface -or its specific concrete type implementations should -now use package <a href="/pkg/reflect/"><code>reflect</code></a>. -Code using <code>runtime.Semacquire</code> or <code>runtime.Semrelease</code> -should use channels or the abstractions in package <a href="/pkg/sync/"><code>sync</code></a>. -The <code>runtime.Alloc</code>, <code>runtime.Free</code>, -and <code>runtime.Lookup</code> functions, an unsafe API created for -debugging the memory allocator, have no replacement. -</p> - -<p> -Before, <code>runtime.MemStats</code> was a global variable holding -statistics about memory allocation, and calls to <code>runtime.UpdateMemStats</code> -ensured that it was up to date. -In Go 1, <code>runtime.MemStats</code> is a struct type, and code should use -<a href="/pkg/runtime/#ReadMemStats"><code>runtime.ReadMemStats</code></a> -to obtain the current statistics. -</p> - -<p> -The package adds a new function, -<a href="/pkg/runtime/#NumCPU"><code>runtime.NumCPU</code></a>, that returns the number of CPUs available -for parallel execution, as reported by the operating system kernel. -Its value can inform the setting of <code>GOMAXPROCS</code>. -The <code>runtime.Cgocalls</code> and <code>runtime.Goroutines</code> functions -have been renamed to <code>runtime.NumCgoCall</code> and <code>runtime.NumGoroutine</code>. -</p> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update code for the function renamings. -Other code will need to be updated by hand. -</p> - -<h3 id="strconv">The strconv package</h3> - -<p> -In Go 1, the -<a href="/pkg/strconv/"><code>strconv</code></a> -package has been significantly reworked to make it more Go-like and less C-like, -although <code>Atoi</code> lives on (it's similar to -<code>int(ParseInt(x, 10, 0))</code>, as does -<code>Itoa(x)</code> (<code>FormatInt(int64(x), 10)</code>). -There are also new variants of some of the functions that append to byte slices rather than -return strings, to allow control over allocation. -</p> - -<p> -This table summarizes the renamings; see the -<a href="/pkg/strconv/">package documentation</a> -for full details. -</p> - -<table class="codetable" frame="border" summary="strconv renames"> -<colgroup align="left" width="50%"></colgroup> -<colgroup align="left" width="50%"></colgroup> -<tr> -<th align="left">Old call</th> -<th align="left">New call</th> -</tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Atob(x)</td> <td>ParseBool(x)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Atof32(x)</td> <td>ParseFloat(x, 32)§</td></tr> -<tr><td>Atof64(x)</td> <td>ParseFloat(x, 64)</td></tr> -<tr><td>AtofN(x, n)</td> <td>ParseFloat(x, n)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Atoi(x)</td> <td>Atoi(x)</td></tr> -<tr><td>Atoi(x)</td> <td>ParseInt(x, 10, 0)§</td></tr> -<tr><td>Atoi64(x)</td> <td>ParseInt(x, 10, 64)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Atoui(x)</td> <td>ParseUint(x, 10, 0)§</td></tr> -<tr><td>Atoui64(x)</td> <td>ParseUint(x, 10, 64)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Btoi64(x, b)</td> <td>ParseInt(x, b, 64)</td></tr> -<tr><td>Btoui64(x, b)</td> <td>ParseUint(x, b, 64)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Btoa(x)</td> <td>FormatBool(x)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Ftoa32(x, f, p)</td> <td>FormatFloat(float64(x), f, p, 32)</td></tr> -<tr><td>Ftoa64(x, f, p)</td> <td>FormatFloat(x, f, p, 64)</td></tr> -<tr><td>FtoaN(x, f, p, n)</td> <td>FormatFloat(x, f, p, n)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Itoa(x)</td> <td>Itoa(x)</td></tr> -<tr><td>Itoa(x)</td> <td>FormatInt(int64(x), 10)</td></tr> -<tr><td>Itoa64(x)</td> <td>FormatInt(x, 10)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Itob(x, b)</td> <td>FormatInt(int64(x), b)</td></tr> -<tr><td>Itob64(x, b)</td> <td>FormatInt(x, b)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Uitoa(x)</td> <td>FormatUint(uint64(x), 10)</td></tr> -<tr><td>Uitoa64(x)</td> <td>FormatUint(x, 10)</td></tr> -<tr> -<td colspan="2"><hr></td> -</tr> -<tr><td>Uitob(x, b)</td> <td>FormatUint(uint64(x), b)</td></tr> -<tr><td>Uitob64(x, b)</td> <td>FormatUint(x, b)</td></tr> -</table> - -<p> -<em>Updating</em>: -Running <code>go</code> <code>fix</code> will update almost all code affected by the change. -<br> -§ <code>Atoi</code> persists but <code>Atoui</code> and <code>Atof32</code> do not, so -they may require -a cast that must be added by hand; the <code>go</code> <code>fix</code> tool will warn about it. -</p> - - -<h3 id="templates">The template packages</h3> - -<p> -The <code>template</code> and <code>exp/template/html</code> packages have moved to -<a href="/pkg/text/template/"><code>text/template</code></a> and -<a href="/pkg/html/template/"><code>html/template</code></a>. -More significant, the interface to these packages has been simplified. -The template language is the same, but the concept of "template set" is gone -and the functions and methods of the packages have changed accordingly, -often by elimination. -</p> - -<p> -Instead of sets, a <code>Template</code> object -may contain multiple named template definitions, -in effect constructing -name spaces for template invocation. -A template can invoke any other template associated with it, but only those -templates associated with it. -The simplest way to associate templates is to parse them together, something -made easier with the new structure of the packages. -</p> - -<p> -<em>Updating</em>: -The imports will be updated by fix tool. -Single-template uses will be otherwise be largely unaffected. -Code that uses multiple templates in concert will need to be updated by hand. -The <a href="/pkg/text/template/#examples">examples</a> in -the documentation for <code>text/template</code> can provide guidance. -</p> - -<h3 id="testing">The testing package</h3> - -<p> -The testing package has a type, <code>B</code>, passed as an argument to benchmark functions. -In Go 1, <code>B</code> has new methods, analogous to those of <code>T</code>, enabling -logging and failure reporting. -</p> - -<pre><!--{{code "/doc/progs/go1.go" `/func.*Benchmark/` `/^}/`}} --->func BenchmarkSprintf(b *testing.B) { - <span class="comment">// Verify correctness before running benchmark.</span> - b.StopTimer() - got := fmt.Sprintf(&#34;%x&#34;, 23) - const expect = &#34;17&#34; - if expect != got { - b.Fatalf(&#34;expected %q; got %q&#34;, expect, got) - } - b.StartTimer() - for i := 0; i &lt; b.N; i++ { - fmt.Sprintf(&#34;%x&#34;, 23) - } -}</pre> - -<p> -<em>Updating</em>: -Existing code is unaffected, although benchmarks that use <code>println</code> -or <code>panic</code> should be updated to use the new methods. -</p> - -<h3 id="testing_script">The testing/script package</h3> - -<p> -The testing/script package has been deleted. It was a dreg. -</p> - -<p> -<em>Updating</em>: -No code is likely to be affected. -</p> - -<h3 id="unsafe">The unsafe package</h3> - -<p> -In Go 1, the functions -<code>unsafe.Typeof</code>, <code>unsafe.Reflect</code>, -<code>unsafe.Unreflect</code>, <code>unsafe.New</code>, and -<code>unsafe.NewArray</code> have been removed; -they duplicated safer functionality provided by -package <a href="/pkg/reflect/"><code>reflect</code></a>. -</p> - -<p> -<em>Updating</em>: -Code using these functions must be rewritten to use -package <a href="/pkg/reflect/"><code>reflect</code></a>. -The changes to <a href="http://code.google.com/p/go/source/detail?r=2646dc956207">encoding/gob</a> and the <a href="http://code.google.com/p/goprotobuf/source/detail?r=5340ad310031">protocol buffer library</a> -may be helpful as examples. -</p> - -<h3 id="url">The url package</h3> - -<p> -In Go 1 several fields from the <a href="/pkg/net/url/#URL"><code>url.URL</code></a> type -were removed or replaced. -</p> - -<p> -The <a href="/pkg/net/url/#URL.String"><code>String</code></a> method now -predictably rebuilds an encoded URL string using all of <code>URL</code>'s -fields as necessary. The resulting string will also no longer have -passwords escaped. -</p> - -<p> -The <code>Raw</code> field has been removed. In most cases the <code>String</code> -method may be used in its place. -</p> - -<p> -The old <code>RawUserinfo</code> field is replaced by the <code>User</code> -field, of type <a href="/pkg/net/url/#Userinfo"><code>*net.Userinfo</code></a>. -Values of this type may be created using the new <a href="/pkg/net/url/#User"><code>net.User</code></a> -and <a href="/pkg/net/url/#UserPassword"><code>net.UserPassword</code></a> -functions. The <code>EscapeUserinfo</code> and <code>UnescapeUserinfo</code> -functions are also gone. -</p> - -<p> -The <code>RawAuthority</code> field has been removed. The same information is -available in the <code>Host</code> and <code>User</code> fields. -</p> - -<p> -The <code>RawPath</code> field and the <code>EncodedPath</code> method have -been removed. The path information in rooted URLs (with a slash following the -schema) is now available only in decoded form in the <code>Path</code> field. -Occasionally, the encoded data may be required to obtain information that -was lost in the decoding process. These cases must be handled by accessing -the data the URL was built from. -</p> - -<p> -URLs with non-rooted paths, such as <code>"mailto:dev@golang.org?subject=Hi"</code>, -are also handled differently. The <code>OpaquePath</code> boolean field has been -removed and a new <code>Opaque</code> string field introduced to hold the encoded -path for such URLs. In Go 1, the cited URL parses as: -</p> - -<pre> - URL{ - Scheme: "mailto", - Opaque: "dev@golang.org", - RawQuery: "subject=Hi", - } -</pre> - -<p> -A new <a href="/pkg/net/url/#URL.RequestURI"><code>RequestURI</code></a> method was -added to <code>URL</code>. -</p> - -<p> -The <code>ParseWithReference</code> function has been renamed to <code>ParseWithFragment</code>. -</p> - -<p> -<em>Updating</em>: -Code that uses the old fields will fail to compile and must be updated by hand. -The semantic changes make it difficult for the fix tool to update automatically. -</p> - -<h2 id="cmd_go">The go command</h2> - -<p> -Go 1 introduces the <a href="/cmd/go/">go command</a>, a tool for fetching, -building, and installing Go packages and commands. The <code>go</code> command -does away with makefiles, instead using Go source code to find dependencies and -determine build conditions. Most existing Go programs will no longer require -makefiles to be built. -</p> - -<p> -See <a href="/doc/code.html">How to Write Go Code</a> for a primer on the -<code>go</code> command and the <a href="/cmd/go/">go command documentation</a> -for the full details. -</p> - -<p> -<em>Updating</em>: -Projects that depend on the Go project's old makefile-based build -infrastructure (<code>Make.pkg</code>, <code>Make.cmd</code>, and so on) should -switch to using the <code>go</code> command for building Go code and, if -necessary, rewrite their makefiles to perform any auxiliary build tasks. -</p> - -<h2 id="cmd_cgo">The cgo command</h2> - -<p> -In Go 1, the <a href="/cmd/cgo">cgo command</a> -uses a different <code>_cgo_export.h</code> -file, which is generated for packages containing <code>//export</code> lines. -The <code>_cgo_export.h</code> file now begins with the C preamble comment, -so that exported function definitions can use types defined there. -This has the effect of compiling the preamble multiple times, so a -package using <code>//export</code> must not put function definitions -or variable initializations in the C preamble. -</p> - -<h2 id="releases">Packaged releases</h2> - -<p> -One of the most significant changes associated with Go 1 is the availability -of prepackaged, downloadable distributions. -They are available for many combinations of architecture and operating system -(including Windows) and the list will grow. -Installation details are described on the -<a href="/doc/install">Getting Started</a> page, while -the distributions themselves are listed on the -<a href="http://code.google.com/p/go/downloads/list">downloads page</a>. - - -</div> - -<div id="footer"> -Build version go1.0.1.<br> -Except as <a href="http://code.google.com/policies.html#restrictions">noted</a>, -the content of this page is licensed under the -Creative Commons Attribution 3.0 License, -and code is licensed under a <a href="/LICENSE">BSD license</a>.<br> -<a href="/doc/tos.html">Terms of Service</a> | -<a href="http://www.google.com/intl/en/privacy/privacy-policy.html">Privacy Policy</a> -</div> - -<script type="text/javascript"> -(function() { - var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true; - ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"; - var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s); -})(); -</script> -</body> -<script type="text/javascript"> - (function() { - var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; - po.src = 'https://apis.google.com/js/plusone.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); - })(); -</script> -</html> - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/README b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/README deleted file mode 100644 index 9b4c2d8..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/README +++ /dev/null @@ -1,28 +0,0 @@ -The *.dat files in this directory are copied from The WebKit Open Source -Project, specifically $WEBKITROOT/LayoutTests/html5lib/resources. -WebKit is licensed under a BSD style license. -http://webkit.org/coding/bsd-license.html says: - -Copyright (C) 2009 Apple Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption01.dat deleted file mode 100644 index 787e1b0..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption01.dat +++ /dev/null @@ -1,194 +0,0 @@ -#data -<a><p></a></p> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <p> -| <a> - -#data -<a>1<p>2</a>3</p> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "1" -| <p> -| <a> -| "2" -| "3" - -#data -<a>1<button>2</a>3</button> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "1" -| <button> -| <a> -| "2" -| "3" - -#data -<a>1<b>2</a>3</b> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "1" -| <b> -| "2" -| <b> -| "3" - -#data -<a>1<div>2<div>3</a>4</div>5</div> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "1" -| <div> -| <a> -| "2" -| <div> -| <a> -| "3" -| "4" -| "5" - -#data -<table><a>1<p>2</a>3</p> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "1" -| <p> -| <a> -| "2" -| "3" -| <table> - -#data -<b><b><a><p></a> -#errors -#document -| <html> -| <head> -| <body> -| <b> -| <b> -| <a> -| <p> -| <a> - -#data -<b><a><b><p></a> -#errors -#document -| <html> -| <head> -| <body> -| <b> -| <a> -| <b> -| <b> -| <p> -| <a> - -#data -<a><b><b><p></a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <b> -| <b> -| <b> -| <b> -| <p> -| <a> - -#data -<p>1<s id="A">2<b id="B">3</p>4</s>5</b> -#errors -#document -| <html> -| <head> -| <body> -| <p> -| "1" -| <s> -| id="A" -| "2" -| <b> -| id="B" -| "3" -| <s> -| id="A" -| <b> -| id="B" -| "4" -| <b> -| id="B" -| "5" - -#data -<table><a>1<td>2</td>3</table> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "1" -| <a> -| "3" -| <table> -| <tbody> -| <tr> -| <td> -| "2" - -#data -<table>A<td>B</td>C</table> -#errors -#document -| <html> -| <head> -| <body> -| "AC" -| <table> -| <tbody> -| <tr> -| <td> -| "B" - -#data -<a><svg><tr><input></a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <svg svg> -| <svg tr> -| <svg input> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption02.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption02.dat deleted file mode 100644 index d18151b..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/adoption02.dat +++ /dev/null @@ -1,31 +0,0 @@ -#data -<b>1<i>2<p>3</b>4 -#errors -#document -| <html> -| <head> -| <body> -| <b> -| "1" -| <i> -| "2" -| <i> -| <p> -| <b> -| "3" -| "4" - -#data -<a><div><style></style><address><a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <div> -| <a> -| <style> -| <address> -| <a> -| <a> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/comments01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/comments01.dat deleted file mode 100644 index 44f1876..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/comments01.dat +++ /dev/null @@ -1,135 +0,0 @@ -#data -FOO<!-- BAR -->BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- BAR --> -| "BAZ" - -#data -FOO<!-- BAR --!>BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- BAR --> -| "BAZ" - -#data -FOO<!-- BAR -- >BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- BAR -- >BAZ --> - -#data -FOO<!-- BAR -- <QUX> -- MUX -->BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- BAR -- <QUX> -- MUX --> -| "BAZ" - -#data -FOO<!-- BAR -- <QUX> -- MUX --!>BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- BAR -- <QUX> -- MUX --> -| "BAZ" - -#data -FOO<!-- BAR -- <QUX> -- MUX -- >BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- BAR -- <QUX> -- MUX -- >BAZ --> - -#data -FOO<!---->BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- --> -| "BAZ" - -#data -FOO<!--->BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- --> -| "BAZ" - -#data -FOO<!-->BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- --> -| "BAZ" - -#data -<?xml version="1.0">Hi -#errors -#document -| <!-- ?xml version="1.0" --> -| <html> -| <head> -| <body> -| "Hi" - -#data -<?xml version="1.0"> -#errors -#document -| <!-- ?xml version="1.0" --> -| <html> -| <head> -| <body> - -#data -<?xml version -#errors -#document -| <!-- ?xml version --> -| <html> -| <head> -| <body> - -#data -FOO<!----->BAZ -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <!-- - --> -| "BAZ" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/doctype01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/doctype01.dat deleted file mode 100644 index ae45732..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/doctype01.dat +++ /dev/null @@ -1,370 +0,0 @@ -#data -<!DOCTYPE html>Hello -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!dOctYpE HtMl>Hello -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPEhtml>Hello -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE>Hello -#errors -#document -| <!DOCTYPE > -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE >Hello -#errors -#document -| <!DOCTYPE > -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato >Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato taco>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato taco "ddd>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato sYstEM>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato sYstEM >Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato sYstEM ggg>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato SYSTEM taco >Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato SYSTEM 'taco"'>Hello -#errors -#document -| <!DOCTYPE potato "" "taco""> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato SYSTEM "taco">Hello -#errors -#document -| <!DOCTYPE potato "" "taco"> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato SYSTEM "tai'co">Hello -#errors -#document -| <!DOCTYPE potato "" "tai'co"> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato SYSTEMtaco "ddd">Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato grass SYSTEM taco>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato pUbLIc>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato pUbLIc >Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato pUbLIcgoof>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato PUBLIC goof>Hello -#errors -#document -| <!DOCTYPE potato> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato PUBLIC "go'of">Hello -#errors -#document -| <!DOCTYPE potato "go'of" ""> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato PUBLIC 'go'of'>Hello -#errors -#document -| <!DOCTYPE potato "go" ""> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato PUBLIC 'go:hh of' >Hello -#errors -#document -| <!DOCTYPE potato "go:hh of" ""> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE potato PUBLIC "W3C-//dfdf" SYSTEM ggg>Hello -#errors -#document -| <!DOCTYPE potato "W3C-//dfdf" ""> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" - "http://www.w3.org/TR/html4/strict.dtd">Hello -#errors -#document -| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE ...>Hello -#errors -#document -| <!DOCTYPE ...> -| <html> -| <head> -| <body> -| "Hello" - -#data -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -#errors -#document -| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" -"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> -#errors -#document -| <!DOCTYPE html "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE root-element [SYSTEM OR PUBLIC FPI] "uri" [ -<!-- internal declarations --> -]> -#errors -#document -| <!DOCTYPE root-element> -| <html> -| <head> -| <body> -| "]>" - -#data -<!DOCTYPE html PUBLIC - "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" - "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> -#errors -#document -| <!DOCTYPE html "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE HTML SYSTEM "http://www.w3.org/DTD/HTML4-strict.dtd"><body><b>Mine!</b></body> -#errors -#document -| <!DOCTYPE html "" "http://www.w3.org/DTD/HTML4-strict.dtd"> -| <html> -| <head> -| <body> -| <b> -| "Mine!" - -#data -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> -#errors -#document -| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'> -#errors -#document -| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.01//EN"'http://www.w3.org/TR/html4/strict.dtd'> -#errors -#document -| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE HTML PUBLIC'-//W3C//DTD HTML 4.01//EN''http://www.w3.org/TR/html4/strict.dtd'> -#errors -#document -| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> -| <html> -| <head> -| <body> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities01.dat deleted file mode 100644 index c8073b7..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities01.dat +++ /dev/null @@ -1,603 +0,0 @@ -#data -FOO&gt;BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO>BAR" - -#data -FOO&gtBAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO>BAR" - -#data -FOO&gt BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO> BAR" - -#data -FOO&gt;;;BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO>;;BAR" - -#data -I'm &notit; I tell you -#errors -#document -| <html> -| <head> -| <body> -| "I'm ¬it; I tell you" - -#data -I'm &notin; I tell you -#errors -#document -| <html> -| <head> -| <body> -| "I'm ∉ I tell you" - -#data -FOO& BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO& BAR" - -#data -FOO&<BAR> -#errors -#document -| <html> -| <head> -| <body> -| "FOO&" -| <bar> - -#data -FOO&&&&gt;BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO&&&>BAR" - -#data -FOO&#41;BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO)BAR" - -#data -FOO&#x41;BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOOABAR" - -#data -FOO&#X41;BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOOABAR" - -#data -FOO&#BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO&#BAR" - -#data -FOO&#ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO&#ZOO" - -#data -FOO&#xBAR -#errors -#document -| <html> -| <head> -| <body> -| "FOOºR" - -#data -FOO&#xZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO&#xZOO" - -#data -FOO&#XZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO&#XZOO" - -#data -FOO&#41BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO)BAR" - -#data -FOO&#x41BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO䆺R" - -#data -FOO&#x41ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOAZOO" - -#data -FOO&#x0000;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" - -#data -FOO&#x0078;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOxZOO" - -#data -FOO&#x0079;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOyZOO" - -#data -FOO&#x0080;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO€ZOO" - -#data -FOO&#x0081;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOZOO" - -#data -FOO&#x0082;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO‚ZOO" - -#data -FOO&#x0083;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOƒZOO" - -#data -FOO&#x0084;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO„ZOO" - -#data -FOO&#x0085;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO…ZOO" - -#data -FOO&#x0086;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO†ZOO" - -#data -FOO&#x0087;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO‡ZOO" - -#data -FOO&#x0088;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOˆZOO" - -#data -FOO&#x0089;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO‰ZOO" - -#data -FOO&#x008A;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOŠZOO" - -#data -FOO&#x008B;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO‹ZOO" - -#data -FOO&#x008C;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOŒZOO" - -#data -FOO&#x008D;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOZOO" - -#data -FOO&#x008E;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOŽZOO" - -#data -FOO&#x008F;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOZOO" - -#data -FOO&#x0090;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOZOO" - -#data -FOO&#x0091;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO‘ZOO" - -#data -FOO&#x0092;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO’ZOO" - -#data -FOO&#x0093;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO“ZOO" - -#data -FOO&#x0094;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO”ZOO" - -#data -FOO&#x0095;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO•ZOO" - -#data -FOO&#x0096;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO–ZOO" - -#data -FOO&#x0097;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO—ZOO" - -#data -FOO&#x0098;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO˜ZOO" - -#data -FOO&#x0099;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO™ZOO" - -#data -FOO&#x009A;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOšZOO" - -#data -FOO&#x009B;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO›ZOO" - -#data -FOO&#x009C;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOœZOO" - -#data -FOO&#x009D;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOZOO" - -#data -FOO&#x009E;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOžZOO" - -#data -FOO&#x009F;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOŸZOO" - -#data -FOO&#x00A0;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO ZOO" - -#data -FOO&#xD7FF;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO퟿ZOO" - -#data -FOO&#xD800;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" - -#data -FOO&#xD801;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" - -#data -FOO&#xDFFE;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" - -#data -FOO&#xDFFF;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" - -#data -FOO&#xE000;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOOZOO" - -#data -FOO&#x10FFFE;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO􏿾ZOO" - -#data -FOO&#x1087D4;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO􈟔ZOO" - -#data -FOO&#x10FFFF;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO􏿿ZOO" - -#data -FOO&#x110000;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" - -#data -FOO&#xFFFFFF;ZOO -#errors -#document -| <html> -| <head> -| <body> -| "FOO�ZOO" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities02.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities02.dat deleted file mode 100644 index e2fb42a..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/entities02.dat +++ /dev/null @@ -1,249 +0,0 @@ -#data -<div bar="ZZ&gt;YY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ>YY" - -#data -<div bar="ZZ&"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&" - -#data -<div bar='ZZ&'></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&" - -#data -<div bar=ZZ&></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&" - -#data -<div bar="ZZ&gt=YY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&gt=YY" - -#data -<div bar="ZZ&gt0YY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&gt0YY" - -#data -<div bar="ZZ&gt9YY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&gt9YY" - -#data -<div bar="ZZ&gtaYY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&gtaYY" - -#data -<div bar="ZZ&gtZYY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&gtZYY" - -#data -<div bar="ZZ&gt YY"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ> YY" - -#data -<div bar="ZZ&gt"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ>" - -#data -<div bar='ZZ&gt'></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ>" - -#data -<div bar=ZZ&gt></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ>" - -#data -<div bar="ZZ&pound_id=23"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ£_id=23" - -#data -<div bar="ZZ&prod_id=23"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&prod_id=23" - -#data -<div bar="ZZ&pound;_id=23"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ£_id=23" - -#data -<div bar="ZZ&prod;_id=23"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ∏_id=23" - -#data -<div bar="ZZ&pound=23"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&pound=23" - -#data -<div bar="ZZ&prod=23"></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| bar="ZZ&prod=23" - -#data -<div>ZZ&pound_id=23</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "ZZ£_id=23" - -#data -<div>ZZ&prod_id=23</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "ZZ&prod_id=23" - -#data -<div>ZZ&pound;_id=23</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "ZZ£_id=23" - -#data -<div>ZZ&prod;_id=23</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "ZZ∏_id=23" - -#data -<div>ZZ&pound=23</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "ZZ£=23" - -#data -<div>ZZ&prod=23</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "ZZ&prod=23" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/html5test-com.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/html5test-com.dat deleted file mode 100644 index d7cb71d..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/html5test-com.dat +++ /dev/null @@ -1,246 +0,0 @@ -#data -<div<div> -#errors -#document -| <html> -| <head> -| <body> -| <div<div> - -#data -<div foo<bar=''> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| foo<bar="" - -#data -<div foo=`bar`> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| foo="`bar`" - -#data -<div \"foo=''> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| \"foo="" - -#data -<a href='\nbar'></a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| href="\nbar" - -#data -<!DOCTYPE html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -&lang;&rang; -#errors -#document -| <html> -| <head> -| <body> -| "⟨⟩" - -#data -&apos; -#errors -#document -| <html> -| <head> -| <body> -| "'" - -#data -&ImaginaryI; -#errors -#document -| <html> -| <head> -| <body> -| "ⅈ" - -#data -&Kopf; -#errors -#document -| <html> -| <head> -| <body> -| "𝕂" - -#data -&notinva; -#errors -#document -| <html> -| <head> -| <body> -| "∉" - -#data -<?import namespace="foo" implementation="#bar"> -#errors -#document -| <!-- ?import namespace="foo" implementation="#bar" --> -| <html> -| <head> -| <body> - -#data -<!--foo--bar--> -#errors -#document -| <!-- foo--bar --> -| <html> -| <head> -| <body> - -#data -<![CDATA[x]]> -#errors -#document -| <!-- [CDATA[x]] --> -| <html> -| <head> -| <body> - -#data -<textarea><!--</textarea>--></textarea> -#errors -#document -| <html> -| <head> -| <body> -| <textarea> -| "<!--" -| "-->" - -#data -<textarea><!--</textarea>--> -#errors -#document -| <html> -| <head> -| <body> -| <textarea> -| "<!--" -| "-->" - -#data -<style><!--</style>--></style> -#errors -#document -| <html> -| <head> -| <style> -| "<!--" -| <body> -| "-->" - -#data -<style><!--</style>--> -#errors -#document -| <html> -| <head> -| <style> -| "<!--" -| <body> -| "-->" - -#data -<ul><li>A </li> <li>B</li></ul> -#errors -#document -| <html> -| <head> -| <body> -| <ul> -| <li> -| "A " -| " " -| <li> -| "B" - -#data -<table><form><input type=hidden><input></form><div></div></table> -#errors -#document -| <html> -| <head> -| <body> -| <input> -| <div> -| <table> -| <form> -| <input> -| type="hidden" - -#data -<i>A<b>B<p></i>C</b>D -#errors -#document -| <html> -| <head> -| <body> -| <i> -| "A" -| <b> -| "B" -| <b> -| <p> -| <b> -| <i> -| "C" -| "D" - -#data -<div></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> - -#data -<svg></svg> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> - -#data -<math></math> -#errors -#document -| <html> -| <head> -| <body> -| <math math> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/inbody01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/inbody01.dat deleted file mode 100644 index 3f2bd37..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/inbody01.dat +++ /dev/null @@ -1,43 +0,0 @@ -#data -<button>1</foo> -#errors -#document -| <html> -| <head> -| <body> -| <button> -| "1" - -#data -<foo>1<p>2</foo> -#errors -#document -| <html> -| <head> -| <body> -| <foo> -| "1" -| <p> -| "2" - -#data -<dd>1</foo> -#errors -#document -| <html> -| <head> -| <body> -| <dd> -| "1" - -#data -<foo>1<dd>2</foo> -#errors -#document -| <html> -| <head> -| <body> -| <foo> -| "1" -| <dd> -| "2" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/isindex.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/isindex.dat deleted file mode 100644 index 88325ff..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/isindex.dat +++ /dev/null @@ -1,40 +0,0 @@ -#data -<isindex> -#errors -#document -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| <hr> - -#data -<isindex name="A" action="B" prompt="C" foo="D"> -#errors -#document -| <html> -| <head> -| <body> -| <form> -| action="B" -| <hr> -| <label> -| "C" -| <input> -| foo="D" -| name="isindex" -| <hr> - -#data -<form><isindex> -#errors -#document -| <html> -| <head> -| <body> -| <form> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat deleted file mode 100644 index a5ebb1eb285116af391137bc94beac0c8a6834b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 115 zcmXZUQ3`+{41i&ucZ#9c5brYEqF^T2f`Sg8m2W@)!xxy0Am++fibh!_xp`HU=1fj= l5Tv!*b_iUjqsV4(V_d9g>VZ9lc;ttC7t#O7YxuDS4-Zl&BR>ED diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat deleted file mode 100644 index 5a92084..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat +++ /dev/null @@ -1,52 +0,0 @@ -#data -<input type="hidden"><frameset> -#errors -21: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -31: “frameset” start tag seen. -31: End of file seen and there were open elements. -#document -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><table><caption><svg>foo</table>bar -#errors -47: End tag “table” did not match the name of the current open element (“svg”). -47: “table” closed but “caption” was still open. -47: End tag “table” seen, but there were open elements. -36: Unclosed element “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <svg svg> -| "foo" -| "bar" - -#data -<table><tr><td><svg><desc><td></desc><circle> -#errors -7: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -30: A table cell was implicitly closed, but there were open elements. -26: Unclosed element “desc”. -20: Unclosed element “svg”. -37: Stray end tag “desc”. -45: End of file seen and there were open elements. -45: Unclosed element “circle”. -7: Unclosed element “table”. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| <svg desc> -| <td> -| <circle> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat deleted file mode 100644 index 04cc11fb9d458ea32dca02e2f3bf39221196ab8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4166 zcmds4&1%~~5Y}1XcNojiOL5|Zdr6iB6Q@@dnjYGa!^&DaD*8j(rYZE*N*}4O(Ai!6 zt?Ym#%MQd~yz+X#nfd0M+40P0g4rKk_ucGyu~@9HzqzhG<5`wuxjplf&5wx3!u}29 zQA8od1>ll1zgT*S|4T0c9E6$RdB?_+5>}tF$TnjU&$*!FvRd{rQXeva!GcpkGm9M! zZBWBlo0XH%V%aC7h2%Ws8$qo;*=zDp0+b3F08~mq!5(ow4OtKi{*2LVgD~WoB_9R= z%96mMsPR;h$nTtgfB$G~Tu5~MsAZ5p?I@Yv->g@6t9!$ThX*>G;HMo(<c>}#7Rl5a zZg4uE1I7jOIW4nFO4J6iM;kDRJYY@HxlJ-2>|)pZu4LM<KOUh3ErDsMA{%qAZOUw$ zscvR?JZJVK)-qamv2krWRmhr-vcp#rkm+dl=W)$LH~WnyKCXT2=DO^$@Rb}6$4@S` zDy!WdH|zeTS5P`WCOgJYv%MecK8>qS(UCIoh@(L9F*ZXarNczOPxy50-rRltbPH<s zA!)|x#GcqI^c|On6=j}5m2?=K6mlgf$6nP%Y{F?5Ca>+lsqMcUzhGX-DG?dIeM%yw zq)6Z5tV+moc?F-@Px$g4N7@AhG2|lSEV{6lAFkjw_958<_GvD+SlP=VmQ!lVHXJsI znhY+?3E0d<$JA<%tK<^VtQR#nU@+CT{-PMJ<%52yKtV-o{8a81dy0d-O}vj9)n^7k zT4d@%G%wJ%%qhlePD%yYMMpP?=tpcJ%YZV=t3+x1nKCnh=v}&mgl&nSNPf^%ki)ze l`$yqfayHMBo}R^L^DOS^S$;Op@}8cl(m$8f+I>c;?LSw^)ujLc diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scriptdata01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scriptdata01.dat deleted file mode 100644 index 76b67f4..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scriptdata01.dat +++ /dev/null @@ -1,308 +0,0 @@ -#data -FOO<script>'Hello'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'Hello'" -| "BAR" - -#data -FOO<script></script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "BAR" - -#data -FOO<script></script >BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "BAR" - -#data -FOO<script></script/>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "BAR" - -#data -FOO<script></script/ >BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "BAR" - -#data -FOO<script type="text/plain"></scriptx>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "</scriptx>BAR" - -#data -FOO<script></script foo=">" dd>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "BAR" - -#data -FOO<script>'<'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<'" -| "BAR" - -#data -FOO<script>'<!'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!'" -| "BAR" - -#data -FOO<script>'<!-'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!-'" -| "BAR" - -#data -FOO<script>'<!--'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!--'" -| "BAR" - -#data -FOO<script>'<!---'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!---'" -| "BAR" - -#data -FOO<script>'<!-->'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!-->'" -| "BAR" - -#data -FOO<script>'<!-->'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!-->'" -| "BAR" - -#data -FOO<script>'<!-- potato'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!-- potato'" -| "BAR" - -#data -FOO<script>'<!-- <sCrIpt'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!-- <sCrIpt'" -| "BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt>'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt>'</script>BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt> -'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt> -'</script>BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt> --'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt> --'</script>BAR" - -#data -FOO<script>'<!-- <sCrIpt> -->'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| "'<!-- <sCrIpt> -->'" -| "BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt> --!>'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt> --!>'</script>BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt> -- >'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt> -- >'</script>BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt '</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt '</script>BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt/'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt/'</script>BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt\'</script>BAR -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt\'" -| "BAR" - -#data -FOO<script type="text/plain">'<!-- <sCrIpt/'</script>BAR</script>QUX -#errors -#document -| <html> -| <head> -| <body> -| "FOO" -| <script> -| type="text/plain" -| "'<!-- <sCrIpt/'</script>BAR" -| "QUX" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat deleted file mode 100644 index 4e08d0e..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat +++ /dev/null @@ -1,15 +0,0 @@ -#data -<p><b id="A"><script>document.getElementById("A").id = "B"</script></p>TEXT</b> -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <b> -| id="B" -| <script> -| "document.getElementById("A").id = "B"" -| <b> -| id="A" -| "TEXT" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat deleted file mode 100644 index ef4a41c..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat +++ /dev/null @@ -1,28 +0,0 @@ -#data -1<script>document.write("2")</script>3 -#errors -#document -| <html> -| <head> -| <body> -| "1" -| <script> -| "document.write("2")" -| "23" - -#data -1<script>document.write("<script>document.write('2')</scr"+ "ipt><script>document.write('3')</scr" + "ipt>")</script>4 -#errors -#document -| <html> -| <head> -| <body> -| "1" -| <script> -| "document.write("<script>document.write('2')</scr"+ "ipt><script>document.write('3')</scr" + "ipt>")" -| <script> -| "document.write('2')" -| "2" -| <script> -| "document.write('3')" -| "34" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tables01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tables01.dat deleted file mode 100644 index c4b47e4..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tables01.dat +++ /dev/null @@ -1,212 +0,0 @@ -#data -<table><th> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <th> - -#data -<table><td> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<table><col foo='bar'> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <colgroup> -| <col> -| foo="bar" - -#data -<table><colgroup></html>foo -#errors -#document -| <html> -| <head> -| <body> -| "foo" -| <table> -| <colgroup> - -#data -<table></table><p>foo -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <p> -| "foo" - -#data -<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr><td> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<table><select><option>3</select></table> -#errors -#document -| <html> -| <head> -| <body> -| <select> -| <option> -| "3" -| <table> - -#data -<table><select><table></table></select></table> -#errors -#document -| <html> -| <head> -| <body> -| <select> -| <table> -| <table> - -#data -<table><select></table> -#errors -#document -| <html> -| <head> -| <body> -| <select> -| <table> - -#data -<table><select><option>A<tr><td>B</td></tr></table> -#errors -#document -| <html> -| <head> -| <body> -| <select> -| <option> -| "A" -| <table> -| <tbody> -| <tr> -| <td> -| "B" - -#data -<table><td></body></caption></col></colgroup></html>foo -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "foo" - -#data -<table><td>A</table>B -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "A" -| "B" - -#data -<table><tr><caption> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <caption> - -#data -<table><tr></body></caption></col></colgroup></html></td></th><td>foo -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "foo" - -#data -<table><td><tr> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <tr> - -#data -<table><td><button><td> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <button> -| <td> - -#data -<table><tr><td><svg><desc><td> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| <svg desc> -| <td> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests1.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests1.dat deleted file mode 100644 index cbf8bdd..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests1.dat +++ /dev/null @@ -1,1952 +0,0 @@ -#data -Test -#errors -Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "Test" - -#data -<p>One<p>Two -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <p> -| "One" -| <p> -| "Two" - -#data -Line1<br>Line2<br>Line3<br>Line4 -#errors -Line: 1 Col: 5 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "Line1" -| <br> -| "Line2" -| <br> -| "Line3" -| <br> -| "Line4" - -#data -<html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<head> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<body> -#errors -Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><head> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><head></head> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><head></head><body> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><head></head><body></body> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><head><body></body></html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><head></body></html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -Line: 1 Col: 19 Unexpected end tag (body). -Line: 1 Col: 26 Unexpected end tag (html). -#document -| <html> -| <head> -| <body> - -#data -<html><head><body></html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<html><body></html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<body></html> -#errors -Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<head></html> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end tag (html). Ignored. -#document -| <html> -| <head> -| <body> - -#data -</head> -#errors -Line: 1 Col: 7 Unexpected end tag (head). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -</body> -#errors -Line: 1 Col: 7 Unexpected end tag (body). Expected DOCTYPE. -Line: 1 Col: 7 Unexpected end tag (body) after the (implied) root element. -#document -| <html> -| <head> -| <body> - -#data -</html> -#errors -Line: 1 Col: 7 Unexpected end tag (html). Expected DOCTYPE. -Line: 1 Col: 7 Unexpected end tag (html) after the (implied) root element. -#document -| <html> -| <head> -| <body> - -#data -<b><table><td><i></table> -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 25 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 25 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| <table> -| <tbody> -| <tr> -| <td> -| <i> - -#data -<b><table><td></b><i></table>X -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 18 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 29 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 30 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| <table> -| <tbody> -| <tr> -| <td> -| <i> -| "X" - -#data -<h1>Hello<h2>World -#errors -4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -13: Heading cannot be a child of another heading. -18: End of file seen and there were open elements. -#document -| <html> -| <head> -| <body> -| <h1> -| "Hello" -| <h2> -| "World" - -#data -<a><p>X<a>Y</a>Z</p></a> -#errors -Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 10 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 24 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <a> -| <p> -| <a> -| "X" -| <a> -| "Y" -| "Z" - -#data -<b><button>foo</b>bar -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 15 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <b> -| <button> -| <b> -| "foo" -| "bar" - -#data -<!DOCTYPE html><span><button>foo</span>bar -#errors -39: End tag “span” seen but there were unclosed elements. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <span> -| <button> -| "foobar" - -#data -<p><b><div><marquee></p></b></div>X -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end tag (p). Ignored. -Line: 1 Col: 24 Unexpected end tag (p). Ignored. -Line: 1 Col: 28 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 34 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 35 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <p> -| <b> -| <div> -| <b> -| <marquee> -| <p> -| "X" - -#data -<script><div></script></div><title><p></title><p><p> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 28 Unexpected end tag (div). Ignored. -#document -| <html> -| <head> -| <script> -| "<div>" -| <title> -| "<p>" -| <body> -| <p> -| <p> - -#data -<!--><div>--<!--> -#errors -Line: 1 Col: 5 Incorrect comment. -Line: 1 Col: 10 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 17 Incorrect comment. -Line: 1 Col: 17 Expected closing tag. Unexpected end of file. -#document -| <!-- --> -| <html> -| <head> -| <body> -| <div> -| "--" -| <!-- --> - -#data -<p><hr></p> -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end tag (p). Ignored. -#document -| <html> -| <head> -| <body> -| <p> -| <hr> -| <p> - -#data -<select><b><option><select><option></b></select>X -#errors -Line: 1 Col: 8 Unexpected start tag (select). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected start tag token (b) in the select phase. Ignored. -Line: 1 Col: 27 Unexpected select start tag in the select phase treated as select end tag. -Line: 1 Col: 39 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 48 Unexpected end tag (select). Ignored. -Line: 1 Col: 49 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <select> -| <option> -| <option> -| "X" - -#data -<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y -#errors -Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 35 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 40 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 43 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 43 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 43 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 51 Unexpected implied end tag (a) in the table phase. -Line: 1 Col: 63 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 64 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| <a> -| <table> -| <tbody> -| <tr> -| <td> -| <a> -| <table> -| <a> -| <a> -| <b> -| "X" -| "C" -| <a> -| "Y" - -#data -<a X>0<b>1<a Y>2 -#errors -Line: 1 Col: 5 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 15 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 16 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| x="" -| "0" -| <b> -| "1" -| <b> -| <a> -| y="" -| "2" - -#data -<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X--> -#errors -Line: 1 Col: 7 Unexpected '-' after '--' found in comment. -Line: 1 Col: 14 Unexpected start tag (font). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 41 Unexpected start tag (b) in table context caused voodoo mode. -Line: 1 Col: 48 Unexpected implied end tag (b) in the table phase. -Line: 1 Col: 48 Unexpected table cell start tag (th) in the table body phase. -Line: 1 Col: 63 Got table cell end tag (th) while required end tags are missing. -Line: 1 Col: 71 Unexpected end of file. Expected table content. -#document -| <!-- - --> -| <html> -| <head> -| <body> -| <font> -| <div> -| "helloexcite!" -| <b> -| "me!" -| <table> -| <tbody> -| <tr> -| <th> -| <i> -| "please!" -| <!-- X --> - -#data -<!DOCTYPE html><li>hello<li>world<ul>how<li>do</ul>you</body><!--do--> -#errors -Line: 1 Col: 61 Unexpected end tag (li). Missing end tag (body). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <li> -| "hello" -| <li> -| "world" -| <ul> -| "how" -| <li> -| "do" -| "you" -| <!-- do --> - -#data -<!DOCTYPE html>A<option>B<optgroup>C<select>D</option>E -#errors -Line: 1 Col: 54 Unexpected end tag (option) in the select phase. Ignored. -Line: 1 Col: 55 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "A" -| <option> -| "B" -| <optgroup> -| "C" -| <select> -| "DE" - -#data -< -#errors -Line: 1 Col: 1 Expected tag name. Got something else instead -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "<" - -#data -<# -#errors -Line: 1 Col: 1 Expected tag name. Got something else instead -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "<#" - -#data -</ -#errors -Line: 1 Col: 2 Expected closing tag. Unexpected end of file. -Line: 1 Col: 2 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "</" - -#data -</# -#errors -Line: 1 Col: 2 Expected closing tag. Unexpected character '#' found. -Line: 1 Col: 3 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- # --> -| <html> -| <head> -| <body> - -#data -<? -#errors -Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.) -Line: 1 Col: 2 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- ? --> -| <html> -| <head> -| <body> - -#data -<?# -#errors -Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.) -Line: 1 Col: 3 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- ?# --> -| <html> -| <head> -| <body> - -#data -<! -#errors -Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found. -Line: 1 Col: 2 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- --> -| <html> -| <head> -| <body> - -#data -<!# -#errors -Line: 1 Col: 3 Expected '--' or 'DOCTYPE'. Not found. -Line: 1 Col: 3 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- # --> -| <html> -| <head> -| <body> - -#data -<?COMMENT?> -#errors -Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.) -Line: 1 Col: 11 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- ?COMMENT? --> -| <html> -| <head> -| <body> - -#data -<!COMMENT> -#errors -Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found. -Line: 1 Col: 10 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- COMMENT --> -| <html> -| <head> -| <body> - -#data -</ COMMENT > -#errors -Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found. -Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- COMMENT --> -| <html> -| <head> -| <body> - -#data -<?COM--MENT?> -#errors -Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.) -Line: 1 Col: 13 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- ?COM--MENT? --> -| <html> -| <head> -| <body> - -#data -<!COM--MENT> -#errors -Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found. -Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- COM--MENT --> -| <html> -| <head> -| <body> - -#data -</ COM--MENT > -#errors -Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found. -Line: 1 Col: 14 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- COM--MENT --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><style> EOF -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| " EOF" -| <body> - -#data -<!DOCTYPE html><script> <!-- </script> --> </script> EOF -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| " <!-- " -| " " -| <body> -| "--> EOF" - -#data -<b><p></b>TEST -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 10 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <b> -| <p> -| <b> -| "TEST" - -#data -<p id=a><b><p id=b></b>TEST -#errors -Line: 1 Col: 8 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 19 Unexpected end tag (p). Ignored. -Line: 1 Col: 23 End tag (b) violates step 1, paragraph 2 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <p> -| id="a" -| <b> -| <p> -| id="b" -| "TEST" - -#data -<b id=a><p><b id=b></p></b>TEST -#errors -Line: 1 Col: 8 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end tag (p). Ignored. -Line: 1 Col: 27 End tag (b) violates step 1, paragraph 2 of the adoption agency algorithm. -Line: 1 Col: 31 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| id="a" -| <p> -| <b> -| id="b" -| "TEST" - -#data -<!DOCTYPE html><title>U-test</title><body><div><p>Test<u></p></div></body> -#errors -Line: 1 Col: 61 Unexpected end tag (p). Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "U-test" -| <body> -| <div> -| <p> -| "Test" -| <u> - -#data -<!DOCTYPE html><font><table></font></table></font> -#errors -Line: 1 Col: 35 Unexpected end tag (font) in table context caused voodoo mode. -Line: 1 Col: 35 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <font> -| <table> - -#data -<font><p>hello<b>cruel</font>world -#errors -Line: 1 Col: 6 Unexpected start tag (font). Expected DOCTYPE. -Line: 1 Col: 29 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 29 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 34 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <font> -| <p> -| <font> -| "hello" -| <b> -| "cruel" -| <b> -| "world" - -#data -<b>Test</i>Test -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 11 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 15 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| "TestTest" - -#data -<b>A<cite>B<div>C -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 17 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| "A" -| <cite> -| "B" -| <div> -| "C" - -#data -<b>A<cite>B<div>C</cite>D -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 24 Unexpected end tag (cite). Ignored. -Line: 1 Col: 25 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| "A" -| <cite> -| "B" -| <div> -| "CD" - -#data -<b>A<cite>B<div>C</b>D -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 21 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 22 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| "A" -| <cite> -| "B" -| <div> -| <b> -| "C" -| "D" - -#data - -#errors -Line: 1 Col: 0 Unexpected End of file. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<DIV> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 5 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> - -#data -<DIV> abc -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 9 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc" - -#data -<DIV> abc <B> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 13 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> - -#data -<DIV> abc <B> def -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 17 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def" - -#data -<DIV> abc <B> def <I> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 21 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> - -#data -<DIV> abc <B> def <I> ghi -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 25 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi" - -#data -<DIV> abc <B> def <I> ghi <P> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 29 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <p> - -#data -<DIV> abc <B> def <I> ghi <P> jkl -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 33 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <p> -| " jkl" - -#data -<DIV> abc <B> def <I> ghi <P> jkl </B> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 38 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <i> -| <p> -| <b> -| " jkl " - -#data -<DIV> abc <B> def <I> ghi <P> jkl </B> mno -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 42 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <i> -| <p> -| <b> -| " jkl " -| " mno" - -#data -<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 47 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <i> -| <p> -| <i> -| <b> -| " jkl " -| " mno " - -#data -<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 51 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <i> -| <p> -| <i> -| <b> -| " jkl " -| " mno " -| " pqr" - -#data -<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 56 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <i> -| <p> -| <i> -| <b> -| " jkl " -| " mno " -| " pqr " - -#data -<DIV> abc <B> def <I> ghi <P> jkl </B> mno </I> pqr </P> stu -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 38 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 47 End tag (i) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 60 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " abc " -| <b> -| " def " -| <i> -| " ghi " -| <i> -| <p> -| <i> -| <b> -| " jkl " -| " mno " -| " pqr " -| " stu" - -#data -<test attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> -#errors -Line: 1 Col: 1040 Unexpected start tag (test). Expected DOCTYPE. -Line: 1 Col: 1040 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <test> -| attribute----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------="" - -#data -<a href="blah">aba<table><a href="foo">br<tr><td></td></tr>x</table>aoe -#errors -Line: 1 Col: 15 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 39 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 39 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 39 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 45 Unexpected implied end tag (a) in the table phase. -Line: 1 Col: 68 Unexpected implied end tag (a) in the table phase. -Line: 1 Col: 71 Expected closing tag. Unexpected end of file. - -#document -| <html> -| <head> -| <body> -| <a> -| href="blah" -| "aba" -| <a> -| href="foo" -| "br" -| <a> -| href="foo" -| "x" -| <table> -| <tbody> -| <tr> -| <td> -| <a> -| href="foo" -| "aoe" - -#data -<a href="blah">aba<table><tr><td><a href="foo">br</td></tr>x</table>aoe -#errors -Line: 1 Col: 15 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 54 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 60 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 71 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| href="blah" -| "abax" -| <table> -| <tbody> -| <tr> -| <td> -| <a> -| href="foo" -| "br" -| "aoe" - -#data -<table><a href="blah">aba<tr><td><a href="foo">br</td></tr>x</table>aoe -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 29 Unexpected implied end tag (a) in the table phase. -Line: 1 Col: 54 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 68 Unexpected implied end tag (a) in the table phase. -Line: 1 Col: 71 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| href="blah" -| "aba" -| <a> -| href="blah" -| "x" -| <table> -| <tbody> -| <tr> -| <td> -| <a> -| href="foo" -| "br" -| <a> -| href="blah" -| "aoe" - -#data -<a href=a>aa<marquee>aa<a href=b>bb</marquee>aa -#errors -Line: 1 Col: 10 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 45 End tag (marquee) seen too early. Expected other end tag. -Line: 1 Col: 47 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| href="a" -| "aa" -| <marquee> -| "aa" -| <a> -| href="b" -| "bb" -| "aa" - -#data -<wbr><strike><code></strike><code><strike></code> -#errors -Line: 1 Col: 5 Unexpected start tag (wbr). Expected DOCTYPE. -Line: 1 Col: 28 End tag (strike) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 49 Unexpected end tag (code). Ignored. -#document -| <html> -| <head> -| <body> -| <wbr> -| <strike> -| <code> -| <code> -| <code> -| <strike> - -#data -<!DOCTYPE html><spacer>foo -#errors -26: End of file seen and there were open elements. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <spacer> -| "foo" - -#data -<title><meta></title><link><title><meta></title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -#document -| <html> -| <head> -| <title> -| "<meta>" -| <link> -| <title> -| "<meta>" -| <body> - -#data -<style><!--</style><meta><script>--><link></script> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 51 Unexpected end of file. Expected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--" -| <meta> -| <script> -| "--><link>" -| <body> - -#data -<head><meta></head><link> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 25 Unexpected start tag (link) that can be in head. Moved. -#document -| <html> -| <head> -| <meta> -| <link> -| <body> - -#data -<table><tr><tr><td><td><span><th><span>X</table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 33 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 48 Got table cell end tag (th) while required end tags are missing. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <tr> -| <td> -| <td> -| <span> -| <th> -| <span> -| "X" - -#data -<body><body><base><link><meta><title><p></title><body><p></body> -#errors -Line: 1 Col: 6 Unexpected start tag (body). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected start tag (body). -Line: 1 Col: 54 Unexpected start tag (body). -Line: 1 Col: 64 Unexpected end tag (p). Missing end tag (body). -#document -| <html> -| <head> -| <body> -| <base> -| <link> -| <meta> -| <title> -| "<p>" -| <p> - -#data -<textarea><p></textarea> -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <textarea> -| "<p>" - -#data -<p><image></p> -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected start tag (image). Treated as img. -#document -| <html> -| <head> -| <body> -| <p> -| <img> - -#data -<a><table><a></table><p><a><div><a> -#errors -Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 13 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 13 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 21 Unexpected end tag (table). Expected end tag (a). -Line: 1 Col: 27 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 27 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm. -Line: 1 Col: 32 Unexpected end tag (p). Ignored. -Line: 1 Col: 35 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 35 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm. -Line: 1 Col: 35 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| <a> -| <table> -| <p> -| <a> -| <div> -| <a> - -#data -<head></p><meta><p> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected end tag (p). Ignored. -#document -| <html> -| <head> -| <meta> -| <body> -| <p> - -#data -<head></html><meta><p> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 19 Unexpected start tag (meta). -#document -| <html> -| <head> -| <body> -| <meta> -| <p> - -#data -<b><table><td><i></table> -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 25 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 25 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| <table> -| <tbody> -| <tr> -| <td> -| <i> - -#data -<b><table><td></b><i></table> -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 18 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 29 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 29 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| <table> -| <tbody> -| <tr> -| <td> -| <i> - -#data -<h1><h2> -#errors -4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -8: Heading cannot be a child of another heading. -8: End of file seen and there were open elements. -#document -| <html> -| <head> -| <body> -| <h1> -| <h2> - -#data -<a><p><a></a></p></a> -#errors -Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 9 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 21 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <a> -| <p> -| <a> -| <a> - -#data -<b><button></b></button></b> -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 15 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <b> -| <button> -| <b> - -#data -<p><b><div><marquee></p></b></div> -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end tag (p). Ignored. -Line: 1 Col: 24 Unexpected end tag (p). Ignored. -Line: 1 Col: 28 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 34 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 34 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <p> -| <b> -| <div> -| <b> -| <marquee> -| <p> - -#data -<script></script></div><title></title><p><p> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end tag (div). Ignored. -#document -| <html> -| <head> -| <script> -| <title> -| <body> -| <p> -| <p> - -#data -<p><hr></p> -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end tag (p). Ignored. -#document -| <html> -| <head> -| <body> -| <p> -| <hr> -| <p> - -#data -<select><b><option><select><option></b></select> -#errors -Line: 1 Col: 8 Unexpected start tag (select). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected start tag token (b) in the select phase. Ignored. -Line: 1 Col: 27 Unexpected select start tag in the select phase treated as select end tag. -Line: 1 Col: 39 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 48 Unexpected end tag (select). Ignored. -Line: 1 Col: 48 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <select> -| <option> -| <option> - -#data -<html><head><title></title><body></body></html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <title> -| <body> - -#data -<a><table><td><a><table></table><a></tr><a></table><a> -#errors -Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 35 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 40 Got table cell end tag (td) while required end tags are missing. -Line: 1 Col: 43 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 43 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 43 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 51 Unexpected implied end tag (a) in the table phase. -Line: 1 Col: 54 Unexpected start tag (a) implies end tag (a). -Line: 1 Col: 54 End tag (a) violates step 1, paragraph 2 of the adoption agency algorithm. -Line: 1 Col: 54 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| <a> -| <table> -| <tbody> -| <tr> -| <td> -| <a> -| <table> -| <a> -| <a> - -#data -<ul><li></li><div><li></div><li><li><div><li><address><li><b><em></b><li></ul> -#errors -Line: 1 Col: 4 Unexpected start tag (ul). Expected DOCTYPE. -Line: 1 Col: 45 Missing end tag (div, li). -Line: 1 Col: 58 Missing end tag (address, li). -Line: 1 Col: 69 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -#document -| <html> -| <head> -| <body> -| <ul> -| <li> -| <div> -| <li> -| <li> -| <li> -| <div> -| <li> -| <address> -| <li> -| <b> -| <em> -| <li> - -#data -<ul><li><ul></li><li>a</li></ul></li></ul> -#errors -XXX: fix me -#document -| <html> -| <head> -| <body> -| <ul> -| <li> -| <ul> -| <li> -| "a" - -#data -<frameset><frame><frameset><frame></frameset><noframes></noframes></frameset> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -#document -| <html> -| <head> -| <frameset> -| <frame> -| <frameset> -| <frame> -| <noframes> - -#data -<h1><table><td><h3></table><h3></h1> -#errors -4: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -15: “td” start tag in table body. -27: Unclosed elements. -31: Heading cannot be a child of another heading. -36: End tag “h1” seen but there were unclosed elements. -#document -| <html> -| <head> -| <body> -| <h1> -| <table> -| <tbody> -| <tr> -| <td> -| <h3> -| <h3> - -#data -<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <table> -| <colgroup> -| <col> -| <colgroup> -| <col> -| <col> -| <col> -| <colgroup> -| <col> -| <col> -| <thead> -| <tr> -| <td> - -#data -<table><col><tbody><col><tr><col><td><col></table><col> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 55 Unexpected start tag col. Ignored. -#document -| <html> -| <head> -| <body> -| <table> -| <colgroup> -| <col> -| <tbody> -| <colgroup> -| <col> -| <tbody> -| <tr> -| <colgroup> -| <col> -| <tbody> -| <tr> -| <td> -| <colgroup> -| <col> - -#data -<table><colgroup><tbody><colgroup><tr><colgroup><td><colgroup></table><colgroup> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 52 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 80 Unexpected start tag colgroup. Ignored. -#document -| <html> -| <head> -| <body> -| <table> -| <colgroup> -| <tbody> -| <colgroup> -| <tbody> -| <tr> -| <colgroup> -| <tbody> -| <tr> -| <td> -| <colgroup> - -#data -</strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea> -#errors -Line: 1 Col: 9 Unexpected end tag (strong). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected end tag (strong) after the (implied) root element. -Line: 1 Col: 13 Unexpected end tag (b) after the (implied) root element. -Line: 1 Col: 18 Unexpected end tag (em) after the (implied) root element. -Line: 1 Col: 22 Unexpected end tag (i) after the (implied) root element. -Line: 1 Col: 26 Unexpected end tag (u) after the (implied) root element. -Line: 1 Col: 35 Unexpected end tag (strike) after the (implied) root element. -Line: 1 Col: 39 Unexpected end tag (s) after the (implied) root element. -Line: 1 Col: 47 Unexpected end tag (blink) after the (implied) root element. -Line: 1 Col: 52 Unexpected end tag (tt) after the (implied) root element. -Line: 1 Col: 58 Unexpected end tag (pre) after the (implied) root element. -Line: 1 Col: 64 Unexpected end tag (big) after the (implied) root element. -Line: 1 Col: 72 Unexpected end tag (small) after the (implied) root element. -Line: 1 Col: 79 Unexpected end tag (font) after the (implied) root element. -Line: 1 Col: 88 Unexpected end tag (select) after the (implied) root element. -Line: 1 Col: 93 Unexpected end tag (h1) after the (implied) root element. -Line: 1 Col: 98 Unexpected end tag (h2) after the (implied) root element. -Line: 1 Col: 103 Unexpected end tag (h3) after the (implied) root element. -Line: 1 Col: 108 Unexpected end tag (h4) after the (implied) root element. -Line: 1 Col: 113 Unexpected end tag (h5) after the (implied) root element. -Line: 1 Col: 118 Unexpected end tag (h6) after the (implied) root element. -Line: 1 Col: 125 Unexpected end tag (body) after the (implied) root element. -Line: 1 Col: 130 Unexpected end tag (br). Treated as br element. -Line: 1 Col: 134 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 140 This element (img) has no end tag. -Line: 1 Col: 148 Unexpected end tag (title). Ignored. -Line: 1 Col: 155 Unexpected end tag (span). Ignored. -Line: 1 Col: 163 Unexpected end tag (style). Ignored. -Line: 1 Col: 172 Unexpected end tag (script). Ignored. -Line: 1 Col: 180 Unexpected end tag (table). Ignored. -Line: 1 Col: 185 Unexpected end tag (th). Ignored. -Line: 1 Col: 190 Unexpected end tag (td). Ignored. -Line: 1 Col: 195 Unexpected end tag (tr). Ignored. -Line: 1 Col: 203 This element (frame) has no end tag. -Line: 1 Col: 210 This element (area) has no end tag. -Line: 1 Col: 217 Unexpected end tag (link). Ignored. -Line: 1 Col: 225 This element (param) has no end tag. -Line: 1 Col: 230 This element (hr) has no end tag. -Line: 1 Col: 238 This element (input) has no end tag. -Line: 1 Col: 244 Unexpected end tag (col). Ignored. -Line: 1 Col: 251 Unexpected end tag (base). Ignored. -Line: 1 Col: 258 Unexpected end tag (meta). Ignored. -Line: 1 Col: 269 This element (basefont) has no end tag. -Line: 1 Col: 279 This element (bgsound) has no end tag. -Line: 1 Col: 287 This element (embed) has no end tag. -Line: 1 Col: 296 This element (spacer) has no end tag. -Line: 1 Col: 300 Unexpected end tag (p). Ignored. -Line: 1 Col: 305 End tag (dd) seen too early. Expected other end tag. -Line: 1 Col: 310 End tag (dt) seen too early. Expected other end tag. -Line: 1 Col: 320 Unexpected end tag (caption). Ignored. -Line: 1 Col: 331 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 339 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 347 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 355 Unexpected end tag (thead). Ignored. -Line: 1 Col: 365 End tag (address) seen too early. Expected other end tag. -Line: 1 Col: 378 End tag (blockquote) seen too early. Expected other end tag. -Line: 1 Col: 387 End tag (center) seen too early. Expected other end tag. -Line: 1 Col: 393 Unexpected end tag (dir). Ignored. -Line: 1 Col: 399 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 404 End tag (dl) seen too early. Expected other end tag. -Line: 1 Col: 415 End tag (fieldset) seen too early. Expected other end tag. -Line: 1 Col: 425 End tag (listing) seen too early. Expected other end tag. -Line: 1 Col: 432 End tag (menu) seen too early. Expected other end tag. -Line: 1 Col: 437 End tag (ol) seen too early. Expected other end tag. -Line: 1 Col: 442 End tag (ul) seen too early. Expected other end tag. -Line: 1 Col: 447 End tag (li) seen too early. Expected other end tag. -Line: 1 Col: 454 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 460 This element (wbr) has no end tag. -Line: 1 Col: 476 End tag (button) seen too early. Expected other end tag. -Line: 1 Col: 486 End tag (marquee) seen too early. Expected other end tag. -Line: 1 Col: 495 End tag (object) seen too early. Expected other end tag. -Line: 1 Col: 513 Unexpected end tag (html). Ignored. -Line: 1 Col: 513 Unexpected end tag (frameset). Ignored. -Line: 1 Col: 520 Unexpected end tag (head). Ignored. -Line: 1 Col: 529 Unexpected end tag (iframe). Ignored. -Line: 1 Col: 537 This element (image) has no end tag. -Line: 1 Col: 547 This element (isindex) has no end tag. -Line: 1 Col: 557 Unexpected end tag (noembed). Ignored. -Line: 1 Col: 568 Unexpected end tag (noframes). Ignored. -Line: 1 Col: 579 Unexpected end tag (noscript). Ignored. -Line: 1 Col: 590 Unexpected end tag (optgroup). Ignored. -Line: 1 Col: 599 Unexpected end tag (option). Ignored. -Line: 1 Col: 611 Unexpected end tag (plaintext). Ignored. -Line: 1 Col: 622 Unexpected end tag (textarea). Ignored. -#document -| <html> -| <head> -| <body> -| <br> -| <p> - -#data -<table><tr></strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end tag (strong) in table context caused voodoo mode. -Line: 1 Col: 20 End tag (strong) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 24 Unexpected end tag (b) in table context caused voodoo mode. -Line: 1 Col: 24 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 29 Unexpected end tag (em) in table context caused voodoo mode. -Line: 1 Col: 29 End tag (em) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 33 Unexpected end tag (i) in table context caused voodoo mode. -Line: 1 Col: 33 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 37 Unexpected end tag (u) in table context caused voodoo mode. -Line: 1 Col: 37 End tag (u) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 46 Unexpected end tag (strike) in table context caused voodoo mode. -Line: 1 Col: 46 End tag (strike) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 50 Unexpected end tag (s) in table context caused voodoo mode. -Line: 1 Col: 50 End tag (s) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 58 Unexpected end tag (blink) in table context caused voodoo mode. -Line: 1 Col: 58 Unexpected end tag (blink). Ignored. -Line: 1 Col: 63 Unexpected end tag (tt) in table context caused voodoo mode. -Line: 1 Col: 63 End tag (tt) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 69 Unexpected end tag (pre) in table context caused voodoo mode. -Line: 1 Col: 69 End tag (pre) seen too early. Expected other end tag. -Line: 1 Col: 75 Unexpected end tag (big) in table context caused voodoo mode. -Line: 1 Col: 75 End tag (big) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 83 Unexpected end tag (small) in table context caused voodoo mode. -Line: 1 Col: 83 End tag (small) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 90 Unexpected end tag (font) in table context caused voodoo mode. -Line: 1 Col: 90 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 99 Unexpected end tag (select) in table context caused voodoo mode. -Line: 1 Col: 99 Unexpected end tag (select). Ignored. -Line: 1 Col: 104 Unexpected end tag (h1) in table context caused voodoo mode. -Line: 1 Col: 104 End tag (h1) seen too early. Expected other end tag. -Line: 1 Col: 109 Unexpected end tag (h2) in table context caused voodoo mode. -Line: 1 Col: 109 End tag (h2) seen too early. Expected other end tag. -Line: 1 Col: 114 Unexpected end tag (h3) in table context caused voodoo mode. -Line: 1 Col: 114 End tag (h3) seen too early. Expected other end tag. -Line: 1 Col: 119 Unexpected end tag (h4) in table context caused voodoo mode. -Line: 1 Col: 119 End tag (h4) seen too early. Expected other end tag. -Line: 1 Col: 124 Unexpected end tag (h5) in table context caused voodoo mode. -Line: 1 Col: 124 End tag (h5) seen too early. Expected other end tag. -Line: 1 Col: 129 Unexpected end tag (h6) in table context caused voodoo mode. -Line: 1 Col: 129 End tag (h6) seen too early. Expected other end tag. -Line: 1 Col: 136 Unexpected end tag (body) in the table row phase. Ignored. -Line: 1 Col: 141 Unexpected end tag (br) in table context caused voodoo mode. -Line: 1 Col: 141 Unexpected end tag (br). Treated as br element. -Line: 1 Col: 145 Unexpected end tag (a) in table context caused voodoo mode. -Line: 1 Col: 145 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 151 Unexpected end tag (img) in table context caused voodoo mode. -Line: 1 Col: 151 This element (img) has no end tag. -Line: 1 Col: 159 Unexpected end tag (title) in table context caused voodoo mode. -Line: 1 Col: 159 Unexpected end tag (title). Ignored. -Line: 1 Col: 166 Unexpected end tag (span) in table context caused voodoo mode. -Line: 1 Col: 166 Unexpected end tag (span). Ignored. -Line: 1 Col: 174 Unexpected end tag (style) in table context caused voodoo mode. -Line: 1 Col: 174 Unexpected end tag (style). Ignored. -Line: 1 Col: 183 Unexpected end tag (script) in table context caused voodoo mode. -Line: 1 Col: 183 Unexpected end tag (script). Ignored. -Line: 1 Col: 196 Unexpected end tag (th). Ignored. -Line: 1 Col: 201 Unexpected end tag (td). Ignored. -Line: 1 Col: 206 Unexpected end tag (tr). Ignored. -Line: 1 Col: 214 This element (frame) has no end tag. -Line: 1 Col: 221 This element (area) has no end tag. -Line: 1 Col: 228 Unexpected end tag (link). Ignored. -Line: 1 Col: 236 This element (param) has no end tag. -Line: 1 Col: 241 This element (hr) has no end tag. -Line: 1 Col: 249 This element (input) has no end tag. -Line: 1 Col: 255 Unexpected end tag (col). Ignored. -Line: 1 Col: 262 Unexpected end tag (base). Ignored. -Line: 1 Col: 269 Unexpected end tag (meta). Ignored. -Line: 1 Col: 280 This element (basefont) has no end tag. -Line: 1 Col: 290 This element (bgsound) has no end tag. -Line: 1 Col: 298 This element (embed) has no end tag. -Line: 1 Col: 307 This element (spacer) has no end tag. -Line: 1 Col: 311 Unexpected end tag (p). Ignored. -Line: 1 Col: 316 End tag (dd) seen too early. Expected other end tag. -Line: 1 Col: 321 End tag (dt) seen too early. Expected other end tag. -Line: 1 Col: 331 Unexpected end tag (caption). Ignored. -Line: 1 Col: 342 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 350 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 358 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 366 Unexpected end tag (thead). Ignored. -Line: 1 Col: 376 End tag (address) seen too early. Expected other end tag. -Line: 1 Col: 389 End tag (blockquote) seen too early. Expected other end tag. -Line: 1 Col: 398 End tag (center) seen too early. Expected other end tag. -Line: 1 Col: 404 Unexpected end tag (dir). Ignored. -Line: 1 Col: 410 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 415 End tag (dl) seen too early. Expected other end tag. -Line: 1 Col: 426 End tag (fieldset) seen too early. Expected other end tag. -Line: 1 Col: 436 End tag (listing) seen too early. Expected other end tag. -Line: 1 Col: 443 End tag (menu) seen too early. Expected other end tag. -Line: 1 Col: 448 End tag (ol) seen too early. Expected other end tag. -Line: 1 Col: 453 End tag (ul) seen too early. Expected other end tag. -Line: 1 Col: 458 End tag (li) seen too early. Expected other end tag. -Line: 1 Col: 465 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm. -Line: 1 Col: 471 This element (wbr) has no end tag. -Line: 1 Col: 487 End tag (button) seen too early. Expected other end tag. -Line: 1 Col: 497 End tag (marquee) seen too early. Expected other end tag. -Line: 1 Col: 506 End tag (object) seen too early. Expected other end tag. -Line: 1 Col: 524 Unexpected end tag (html). Ignored. -Line: 1 Col: 524 Unexpected end tag (frameset). Ignored. -Line: 1 Col: 531 Unexpected end tag (head). Ignored. -Line: 1 Col: 540 Unexpected end tag (iframe). Ignored. -Line: 1 Col: 548 This element (image) has no end tag. -Line: 1 Col: 558 This element (isindex) has no end tag. -Line: 1 Col: 568 Unexpected end tag (noembed). Ignored. -Line: 1 Col: 579 Unexpected end tag (noframes). Ignored. -Line: 1 Col: 590 Unexpected end tag (noscript). Ignored. -Line: 1 Col: 601 Unexpected end tag (optgroup). Ignored. -Line: 1 Col: 610 Unexpected end tag (option). Ignored. -Line: 1 Col: 622 Unexpected end tag (plaintext). Ignored. -Line: 1 Col: 633 Unexpected end tag (textarea). Ignored. -#document -| <html> -| <head> -| <body> -| <br> -| <table> -| <tbody> -| <tr> -| <p> - -#data -<frameset> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 1 Col: 10 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <frameset> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests10.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests10.dat deleted file mode 100644 index 4f8df86..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests10.dat +++ /dev/null @@ -1,799 +0,0 @@ -#data -<!DOCTYPE html><svg></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> - -#data -<!DOCTYPE html><svg></svg><![CDATA[a]]> -#errors -29: Bogus comment -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <!-- [CDATA[a]] --> - -#data -<!DOCTYPE html><body><svg></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> - -#data -<!DOCTYPE html><body><select><svg></svg></select> -#errors -35: Stray “svg” start tag. -42: Stray end tag “svg” -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!DOCTYPE html><body><select><option><svg></svg></option></select> -#errors -43: Stray “svg” start tag. -50: Stray end tag “svg” -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> - -#data -<!DOCTYPE html><body><table><svg></svg></table> -#errors -34: Start tag “svg” seen in “table”. -41: Stray end tag “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <table> - -#data -<!DOCTYPE html><body><table><svg><g>foo</g></svg></table> -#errors -34: Start tag “svg” seen in “table”. -46: Stray end tag “g”. -53: Stray end tag “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <table> - -#data -<!DOCTYPE html><body><table><svg><g>foo</g><g>bar</g></svg></table> -#errors -34: Start tag “svg” seen in “table”. -46: Stray end tag “g”. -58: Stray end tag “g”. -65: Stray end tag “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <table> - -#data -<!DOCTYPE html><body><table><tbody><svg><g>foo</g><g>bar</g></svg></tbody></table> -#errors -41: Start tag “svg” seen in “table”. -53: Stray end tag “g”. -65: Stray end tag “g”. -72: Stray end tag “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <table> -| <tbody> - -#data -<!DOCTYPE html><body><table><tbody><tr><svg><g>foo</g><g>bar</g></svg></tr></tbody></table> -#errors -45: Start tag “svg” seen in “table”. -57: Stray end tag “g”. -69: Stray end tag “g”. -76: Stray end tag “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <table> -| <tbody> -| <tr> - -#data -<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg></td></tr></tbody></table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" - -#data -<!DOCTYPE html><body><table><tbody><tr><td><svg><g>foo</g><g>bar</g></svg><p>baz</td></tr></tbody></table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g></svg><p>baz</caption></table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g><p>baz</table><p>quux -#errors -70: HTML start tag “p” in a foreign namespace context. -81: “table” closed but “caption” was still open. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <p> -| "baz" -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><caption><svg><g>foo</g><g>bar</g>baz</table><p>quux -#errors -78: “table” closed but “caption” was still open. -78: Unclosed elements on stack. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| "baz" -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><colgroup><svg><g>foo</g><g>bar</g><p>baz</table><p>quux -#errors -44: Start tag “svg” seen in “table”. -56: Stray end tag “g”. -68: Stray end tag “g”. -71: HTML start tag “p” in a foreign namespace context. -71: Start tag “p” seen in “table”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <p> -| "baz" -| <table> -| <colgroup> -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux -#errors -50: Stray “svg” start tag. -54: Stray “g” start tag. -62: Stray end tag “g” -66: Stray “g” start tag. -74: Stray end tag “g” -77: Stray “p” start tag. -88: “table” end tag with “select” open. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <select> -| "foobarbaz" -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux -#errors -36: Start tag “select” seen in “table”. -42: Stray “svg” start tag. -46: Stray “g” start tag. -54: Stray end tag “g” -58: Stray “g” start tag. -66: Stray end tag “g” -69: Stray “p” start tag. -80: “table” end tag with “select” open. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| "foobarbaz" -| <table> -| <p> -| "quux" - -#data -<!DOCTYPE html><body></body></html><svg><g>foo</g><g>bar</g><p>baz -#errors -41: Stray “svg” start tag. -68: HTML start tag “p” in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><body></body><svg><g>foo</g><g>bar</g><p>baz -#errors -34: Stray “svg” start tag. -61: HTML start tag “p” in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg g> -| "foo" -| <svg g> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><frameset><svg><g></g><g></g><p><span> -#errors -31: Stray “svg” start tag. -35: Stray “g” start tag. -40: Stray end tag “g” -44: Stray “g” start tag. -49: Stray end tag “g” -52: Stray “p” start tag. -58: Stray “span” start tag. -58: End of file seen and there were open elements. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><frameset></frameset><svg><g></g><g></g><p><span> -#errors -42: Stray “svg” start tag. -46: Stray “g” start tag. -51: Stray end tag “g” -55: Stray “g” start tag. -60: Stray end tag “g” -63: Stray “p” start tag. -69: Stray “span” start tag. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><body xlink:href=foo><svg xlink:href=foo></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| <svg svg> -| xlink href="foo" - -#data -<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo></g></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| xml:lang="en" -| <svg svg> -| <svg g> -| xlink href="foo" -| xml lang="en" - -#data -<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo /></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| xml:lang="en" -| <svg svg> -| <svg g> -| xlink href="foo" -| xml lang="en" - -#data -<!DOCTYPE html><body xlink:href=foo xml:lang=en><svg><g xml:lang=en xlink:href=foo />bar</svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| xml:lang="en" -| <svg svg> -| <svg g> -| xlink href="foo" -| xml lang="en" -| "bar" - -#data -<svg></path> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> - -#data -<div><svg></div>a -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <svg svg> -| "a" - -#data -<div><svg><path></div>a -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <svg svg> -| <svg path> -| "a" - -#data -<div><svg><path></svg><path> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <svg svg> -| <svg path> -| <path> - -#data -<div><svg><path><foreignObject><math></div>a -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <svg svg> -| <svg path> -| <svg foreignObject> -| <math math> -| "a" - -#data -<div><svg><path><foreignObject><p></div>a -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <svg svg> -| <svg path> -| <svg foreignObject> -| <p> -| "a" - -#data -<!DOCTYPE html><svg><desc><div><svg><ul>a -#errors -40: HTML start tag “ul” in a foreign namespace context. -41: End of file in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg desc> -| <div> -| <svg svg> -| <ul> -| "a" - -#data -<!DOCTYPE html><svg><desc><svg><ul>a -#errors -35: HTML start tag “ul” in a foreign namespace context. -36: End of file in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg desc> -| <svg svg> -| <ul> -| "a" - -#data -<!DOCTYPE html><p><svg><desc><p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <svg svg> -| <svg desc> -| <p> - -#data -<!DOCTYPE html><p><svg><title><p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <svg svg> -| <svg title> -| <p> - -#data -<div><svg><path><foreignObject><p></foreignObject><p> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <svg svg> -| <svg path> -| <svg foreignObject> -| <p> -| <p> - -#data -<math><mi><div><object><div><span></span></div></object></div></mi><mi> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| <div> -| <object> -| <div> -| <span> -| <math mi> - -#data -<math><mi><svg><foreignObject><div><div></div></div></foreignObject></svg></mi><mi> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| <svg svg> -| <svg foreignObject> -| <div> -| <div> -| <math mi> - -#data -<svg><script></script><path> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <svg script> -| <svg path> - -#data -<table><svg></svg><tr> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <table> -| <tbody> -| <tr> - -#data -<math><mi><mglyph> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| <math mglyph> - -#data -<math><mi><malignmark> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| <math malignmark> - -#data -<math><mo><mglyph> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mo> -| <math mglyph> - -#data -<math><mo><malignmark> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mo> -| <math malignmark> - -#data -<math><mn><mglyph> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mn> -| <math mglyph> - -#data -<math><mn><malignmark> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mn> -| <math malignmark> - -#data -<math><ms><mglyph> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math ms> -| <math mglyph> - -#data -<math><ms><malignmark> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math ms> -| <math malignmark> - -#data -<math><mtext><mglyph> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mtext> -| <math mglyph> - -#data -<math><mtext><malignmark> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mtext> -| <math malignmark> - -#data -<math><annotation-xml><svg></svg></annotation-xml><mi> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| <svg svg> -| <math mi> - -#data -<math><annotation-xml><svg><foreignObject><div><math><mi></mi></math><span></span></div></foreignObject><path></path></svg></annotation-xml><mi> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| <svg svg> -| <svg foreignObject> -| <div> -| <math math> -| <math mi> -| <span> -| <svg path> -| <math mi> - -#data -<math><annotation-xml><svg><foreignObject><math><mi><svg></svg></mi><mo></mo></math><span></span></foreignObject><path></path></svg></annotation-xml><mi> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| <svg svg> -| <svg foreignObject> -| <math math> -| <math mi> -| <svg svg> -| <math mo> -| <span> -| <svg path> -| <math mi> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests11.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests11.dat deleted file mode 100644 index 638cde4..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests11.dat +++ /dev/null @@ -1,482 +0,0 @@ -#data -<!DOCTYPE html><body><svg attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' contentScriptType='' contentStyleType='' diffuseConstant='' edgeMode='' externalResourcesRequired='' filterRes='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| attributeName="" -| attributeType="" -| baseFrequency="" -| baseProfile="" -| calcMode="" -| clipPathUnits="" -| contentScriptType="" -| contentStyleType="" -| diffuseConstant="" -| edgeMode="" -| externalResourcesRequired="" -| filterRes="" -| filterUnits="" -| glyphRef="" -| gradientTransform="" -| gradientUnits="" -| kernelMatrix="" -| kernelUnitLength="" -| keyPoints="" -| keySplines="" -| keyTimes="" -| lengthAdjust="" -| limitingConeAngle="" -| markerHeight="" -| markerUnits="" -| markerWidth="" -| maskContentUnits="" -| maskUnits="" -| numOctaves="" -| pathLength="" -| patternContentUnits="" -| patternTransform="" -| patternUnits="" -| pointsAtX="" -| pointsAtY="" -| pointsAtZ="" -| preserveAlpha="" -| preserveAspectRatio="" -| primitiveUnits="" -| refX="" -| refY="" -| repeatCount="" -| repeatDur="" -| requiredExtensions="" -| requiredFeatures="" -| specularConstant="" -| specularExponent="" -| spreadMethod="" -| startOffset="" -| stdDeviation="" -| stitchTiles="" -| surfaceScale="" -| systemLanguage="" -| tableValues="" -| targetX="" -| targetY="" -| textLength="" -| viewBox="" -| viewTarget="" -| xChannelSelector="" -| yChannelSelector="" -| zoomAndPan="" - -#data -<!DOCTYPE html><BODY><SVG ATTRIBUTENAME='' ATTRIBUTETYPE='' BASEFREQUENCY='' BASEPROFILE='' CALCMODE='' CLIPPATHUNITS='' CONTENTSCRIPTTYPE='' CONTENTSTYLETYPE='' DIFFUSECONSTANT='' EDGEMODE='' EXTERNALRESOURCESREQUIRED='' FILTERRES='' FILTERUNITS='' GLYPHREF='' GRADIENTTRANSFORM='' GRADIENTUNITS='' KERNELMATRIX='' KERNELUNITLENGTH='' KEYPOINTS='' KEYSPLINES='' KEYTIMES='' LENGTHADJUST='' LIMITINGCONEANGLE='' MARKERHEIGHT='' MARKERUNITS='' MARKERWIDTH='' MASKCONTENTUNITS='' MASKUNITS='' NUMOCTAVES='' PATHLENGTH='' PATTERNCONTENTUNITS='' PATTERNTRANSFORM='' PATTERNUNITS='' POINTSATX='' POINTSATY='' POINTSATZ='' PRESERVEALPHA='' PRESERVEASPECTRATIO='' PRIMITIVEUNITS='' REFX='' REFY='' REPEATCOUNT='' REPEATDUR='' REQUIREDEXTENSIONS='' REQUIREDFEATURES='' SPECULARCONSTANT='' SPECULAREXPONENT='' SPREADMETHOD='' STARTOFFSET='' STDDEVIATION='' STITCHTILES='' SURFACESCALE='' SYSTEMLANGUAGE='' TABLEVALUES='' TARGETX='' TARGETY='' TEXTLENGTH='' VIEWBOX='' VIEWTARGET='' XCHANNELSELECTOR='' YCHANNELSELECTOR='' ZOOMANDPAN=''></SVG> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| attributeName="" -| attributeType="" -| baseFrequency="" -| baseProfile="" -| calcMode="" -| clipPathUnits="" -| contentScriptType="" -| contentStyleType="" -| diffuseConstant="" -| edgeMode="" -| externalResourcesRequired="" -| filterRes="" -| filterUnits="" -| glyphRef="" -| gradientTransform="" -| gradientUnits="" -| kernelMatrix="" -| kernelUnitLength="" -| keyPoints="" -| keySplines="" -| keyTimes="" -| lengthAdjust="" -| limitingConeAngle="" -| markerHeight="" -| markerUnits="" -| markerWidth="" -| maskContentUnits="" -| maskUnits="" -| numOctaves="" -| pathLength="" -| patternContentUnits="" -| patternTransform="" -| patternUnits="" -| pointsAtX="" -| pointsAtY="" -| pointsAtZ="" -| preserveAlpha="" -| preserveAspectRatio="" -| primitiveUnits="" -| refX="" -| refY="" -| repeatCount="" -| repeatDur="" -| requiredExtensions="" -| requiredFeatures="" -| specularConstant="" -| specularExponent="" -| spreadMethod="" -| startOffset="" -| stdDeviation="" -| stitchTiles="" -| surfaceScale="" -| systemLanguage="" -| tableValues="" -| targetX="" -| targetY="" -| textLength="" -| viewBox="" -| viewTarget="" -| xChannelSelector="" -| yChannelSelector="" -| zoomAndPan="" - -#data -<!DOCTYPE html><body><svg attributename='' attributetype='' basefrequency='' baseprofile='' calcmode='' clippathunits='' contentscripttype='' contentstyletype='' diffuseconstant='' edgemode='' externalresourcesrequired='' filterres='' filterunits='' glyphref='' gradienttransform='' gradientunits='' kernelmatrix='' kernelunitlength='' keypoints='' keysplines='' keytimes='' lengthadjust='' limitingconeangle='' markerheight='' markerunits='' markerwidth='' maskcontentunits='' maskunits='' numoctaves='' pathlength='' patterncontentunits='' patterntransform='' patternunits='' pointsatx='' pointsaty='' pointsatz='' preservealpha='' preserveaspectratio='' primitiveunits='' refx='' refy='' repeatcount='' repeatdur='' requiredextensions='' requiredfeatures='' specularconstant='' specularexponent='' spreadmethod='' startoffset='' stddeviation='' stitchtiles='' surfacescale='' systemlanguage='' tablevalues='' targetx='' targety='' textlength='' viewbox='' viewtarget='' xchannelselector='' ychannelselector='' zoomandpan=''></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| attributeName="" -| attributeType="" -| baseFrequency="" -| baseProfile="" -| calcMode="" -| clipPathUnits="" -| contentScriptType="" -| contentStyleType="" -| diffuseConstant="" -| edgeMode="" -| externalResourcesRequired="" -| filterRes="" -| filterUnits="" -| glyphRef="" -| gradientTransform="" -| gradientUnits="" -| kernelMatrix="" -| kernelUnitLength="" -| keyPoints="" -| keySplines="" -| keyTimes="" -| lengthAdjust="" -| limitingConeAngle="" -| markerHeight="" -| markerUnits="" -| markerWidth="" -| maskContentUnits="" -| maskUnits="" -| numOctaves="" -| pathLength="" -| patternContentUnits="" -| patternTransform="" -| patternUnits="" -| pointsAtX="" -| pointsAtY="" -| pointsAtZ="" -| preserveAlpha="" -| preserveAspectRatio="" -| primitiveUnits="" -| refX="" -| refY="" -| repeatCount="" -| repeatDur="" -| requiredExtensions="" -| requiredFeatures="" -| specularConstant="" -| specularExponent="" -| spreadMethod="" -| startOffset="" -| stdDeviation="" -| stitchTiles="" -| surfaceScale="" -| systemLanguage="" -| tableValues="" -| targetX="" -| targetY="" -| textLength="" -| viewBox="" -| viewTarget="" -| xChannelSelector="" -| yChannelSelector="" -| zoomAndPan="" - -#data -<!DOCTYPE html><body><math attributeName='' attributeType='' baseFrequency='' baseProfile='' calcMode='' clipPathUnits='' contentScriptType='' contentStyleType='' diffuseConstant='' edgeMode='' externalResourcesRequired='' filterRes='' filterUnits='' glyphRef='' gradientTransform='' gradientUnits='' kernelMatrix='' kernelUnitLength='' keyPoints='' keySplines='' keyTimes='' lengthAdjust='' limitingConeAngle='' markerHeight='' markerUnits='' markerWidth='' maskContentUnits='' maskUnits='' numOctaves='' pathLength='' patternContentUnits='' patternTransform='' patternUnits='' pointsAtX='' pointsAtY='' pointsAtZ='' preserveAlpha='' preserveAspectRatio='' primitiveUnits='' refX='' refY='' repeatCount='' repeatDur='' requiredExtensions='' requiredFeatures='' specularConstant='' specularExponent='' spreadMethod='' startOffset='' stdDeviation='' stitchTiles='' surfaceScale='' systemLanguage='' tableValues='' targetX='' targetY='' textLength='' viewBox='' viewTarget='' xChannelSelector='' yChannelSelector='' zoomAndPan=''></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| attributename="" -| attributetype="" -| basefrequency="" -| baseprofile="" -| calcmode="" -| clippathunits="" -| contentscripttype="" -| contentstyletype="" -| diffuseconstant="" -| edgemode="" -| externalresourcesrequired="" -| filterres="" -| filterunits="" -| glyphref="" -| gradienttransform="" -| gradientunits="" -| kernelmatrix="" -| kernelunitlength="" -| keypoints="" -| keysplines="" -| keytimes="" -| lengthadjust="" -| limitingconeangle="" -| markerheight="" -| markerunits="" -| markerwidth="" -| maskcontentunits="" -| maskunits="" -| numoctaves="" -| pathlength="" -| patterncontentunits="" -| patterntransform="" -| patternunits="" -| pointsatx="" -| pointsaty="" -| pointsatz="" -| preservealpha="" -| preserveaspectratio="" -| primitiveunits="" -| refx="" -| refy="" -| repeatcount="" -| repeatdur="" -| requiredextensions="" -| requiredfeatures="" -| specularconstant="" -| specularexponent="" -| spreadmethod="" -| startoffset="" -| stddeviation="" -| stitchtiles="" -| surfacescale="" -| systemlanguage="" -| tablevalues="" -| targetx="" -| targety="" -| textlength="" -| viewbox="" -| viewtarget="" -| xchannelselector="" -| ychannelselector="" -| zoomandpan="" - -#data -<!DOCTYPE html><body><svg><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg altGlyph> -| <svg altGlyphDef> -| <svg altGlyphItem> -| <svg animateColor> -| <svg animateMotion> -| <svg animateTransform> -| <svg clipPath> -| <svg feBlend> -| <svg feColorMatrix> -| <svg feComponentTransfer> -| <svg feComposite> -| <svg feConvolveMatrix> -| <svg feDiffuseLighting> -| <svg feDisplacementMap> -| <svg feDistantLight> -| <svg feFlood> -| <svg feFuncA> -| <svg feFuncB> -| <svg feFuncG> -| <svg feFuncR> -| <svg feGaussianBlur> -| <svg feImage> -| <svg feMerge> -| <svg feMergeNode> -| <svg feMorphology> -| <svg feOffset> -| <svg fePointLight> -| <svg feSpecularLighting> -| <svg feSpotLight> -| <svg feTile> -| <svg feTurbulence> -| <svg foreignObject> -| <svg glyphRef> -| <svg linearGradient> -| <svg radialGradient> -| <svg textPath> - -#data -<!DOCTYPE html><body><svg><altglyph /><altglyphdef /><altglyphitem /><animatecolor /><animatemotion /><animatetransform /><clippath /><feblend /><fecolormatrix /><fecomponenttransfer /><fecomposite /><feconvolvematrix /><fediffuselighting /><fedisplacementmap /><fedistantlight /><feflood /><fefunca /><fefuncb /><fefuncg /><fefuncr /><fegaussianblur /><feimage /><femerge /><femergenode /><femorphology /><feoffset /><fepointlight /><fespecularlighting /><fespotlight /><fetile /><feturbulence /><foreignobject /><glyphref /><lineargradient /><radialgradient /><textpath /></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg altGlyph> -| <svg altGlyphDef> -| <svg altGlyphItem> -| <svg animateColor> -| <svg animateMotion> -| <svg animateTransform> -| <svg clipPath> -| <svg feBlend> -| <svg feColorMatrix> -| <svg feComponentTransfer> -| <svg feComposite> -| <svg feConvolveMatrix> -| <svg feDiffuseLighting> -| <svg feDisplacementMap> -| <svg feDistantLight> -| <svg feFlood> -| <svg feFuncA> -| <svg feFuncB> -| <svg feFuncG> -| <svg feFuncR> -| <svg feGaussianBlur> -| <svg feImage> -| <svg feMerge> -| <svg feMergeNode> -| <svg feMorphology> -| <svg feOffset> -| <svg fePointLight> -| <svg feSpecularLighting> -| <svg feSpotLight> -| <svg feTile> -| <svg feTurbulence> -| <svg foreignObject> -| <svg glyphRef> -| <svg linearGradient> -| <svg radialGradient> -| <svg textPath> - -#data -<!DOCTYPE html><BODY><SVG><ALTGLYPH /><ALTGLYPHDEF /><ALTGLYPHITEM /><ANIMATECOLOR /><ANIMATEMOTION /><ANIMATETRANSFORM /><CLIPPATH /><FEBLEND /><FECOLORMATRIX /><FECOMPONENTTRANSFER /><FECOMPOSITE /><FECONVOLVEMATRIX /><FEDIFFUSELIGHTING /><FEDISPLACEMENTMAP /><FEDISTANTLIGHT /><FEFLOOD /><FEFUNCA /><FEFUNCB /><FEFUNCG /><FEFUNCR /><FEGAUSSIANBLUR /><FEIMAGE /><FEMERGE /><FEMERGENODE /><FEMORPHOLOGY /><FEOFFSET /><FEPOINTLIGHT /><FESPECULARLIGHTING /><FESPOTLIGHT /><FETILE /><FETURBULENCE /><FOREIGNOBJECT /><GLYPHREF /><LINEARGRADIENT /><RADIALGRADIENT /><TEXTPATH /></SVG> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg altGlyph> -| <svg altGlyphDef> -| <svg altGlyphItem> -| <svg animateColor> -| <svg animateMotion> -| <svg animateTransform> -| <svg clipPath> -| <svg feBlend> -| <svg feColorMatrix> -| <svg feComponentTransfer> -| <svg feComposite> -| <svg feConvolveMatrix> -| <svg feDiffuseLighting> -| <svg feDisplacementMap> -| <svg feDistantLight> -| <svg feFlood> -| <svg feFuncA> -| <svg feFuncB> -| <svg feFuncG> -| <svg feFuncR> -| <svg feGaussianBlur> -| <svg feImage> -| <svg feMerge> -| <svg feMergeNode> -| <svg feMorphology> -| <svg feOffset> -| <svg fePointLight> -| <svg feSpecularLighting> -| <svg feSpotLight> -| <svg feTile> -| <svg feTurbulence> -| <svg foreignObject> -| <svg glyphRef> -| <svg linearGradient> -| <svg radialGradient> -| <svg textPath> - -#data -<!DOCTYPE html><body><math><altGlyph /><altGlyphDef /><altGlyphItem /><animateColor /><animateMotion /><animateTransform /><clipPath /><feBlend /><feColorMatrix /><feComponentTransfer /><feComposite /><feConvolveMatrix /><feDiffuseLighting /><feDisplacementMap /><feDistantLight /><feFlood /><feFuncA /><feFuncB /><feFuncG /><feFuncR /><feGaussianBlur /><feImage /><feMerge /><feMergeNode /><feMorphology /><feOffset /><fePointLight /><feSpecularLighting /><feSpotLight /><feTile /><feTurbulence /><foreignObject /><glyphRef /><linearGradient /><radialGradient /><textPath /></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math altglyph> -| <math altglyphdef> -| <math altglyphitem> -| <math animatecolor> -| <math animatemotion> -| <math animatetransform> -| <math clippath> -| <math feblend> -| <math fecolormatrix> -| <math fecomponenttransfer> -| <math fecomposite> -| <math feconvolvematrix> -| <math fediffuselighting> -| <math fedisplacementmap> -| <math fedistantlight> -| <math feflood> -| <math fefunca> -| <math fefuncb> -| <math fefuncg> -| <math fefuncr> -| <math fegaussianblur> -| <math feimage> -| <math femerge> -| <math femergenode> -| <math femorphology> -| <math feoffset> -| <math fepointlight> -| <math fespecularlighting> -| <math fespotlight> -| <math fetile> -| <math feturbulence> -| <math foreignobject> -| <math glyphref> -| <math lineargradient> -| <math radialgradient> -| <math textpath> - -#data -<!DOCTYPE html><body><svg><solidColor /></svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg solidcolor> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests12.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests12.dat deleted file mode 100644 index 63107d2..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests12.dat +++ /dev/null @@ -1,62 +0,0 @@ -#data -<!DOCTYPE html><body><p>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "foo" -| <math math> -| <math mtext> -| <i> -| "baz" -| <math annotation-xml> -| <svg svg> -| <svg desc> -| <b> -| "eggs" -| <svg g> -| <svg foreignObject> -| <p> -| "spam" -| <table> -| <tbody> -| <tr> -| <td> -| <img> -| <svg g> -| "quux" -| "bar" - -#data -<!DOCTYPE html><body>foo<math><mtext><i>baz</i></mtext><annotation-xml><svg><desc><b>eggs</b></desc><g><foreignObject><P>spam<TABLE><tr><td><img></td></table></foreignObject></g><g>quux</g></svg></annotation-xml></math>bar -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "foo" -| <math math> -| <math mtext> -| <i> -| "baz" -| <math annotation-xml> -| <svg svg> -| <svg desc> -| <b> -| "eggs" -| <svg g> -| <svg foreignObject> -| <p> -| "spam" -| <table> -| <tbody> -| <tr> -| <td> -| <img> -| <svg g> -| "quux" -| "bar" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests14.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests14.dat deleted file mode 100644 index b8713f8..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests14.dat +++ /dev/null @@ -1,74 +0,0 @@ -#data -<!DOCTYPE html><html><body><xyz:abc></xyz:abc> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <xyz:abc> - -#data -<!DOCTYPE html><html><body><xyz:abc></xyz:abc><span></span> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <xyz:abc> -| <span> - -#data -<!DOCTYPE html><html><html abc:def=gh><xyz:abc></xyz:abc> -#errors -15: Unexpected start tag html -#document -| <!DOCTYPE html> -| <html> -| abc:def="gh" -| <head> -| <body> -| <xyz:abc> - -#data -<!DOCTYPE html><html xml:lang=bar><html xml:lang=foo> -#errors -15: Unexpected start tag html -#document -| <!DOCTYPE html> -| <html> -| xml:lang="bar" -| <head> -| <body> - -#data -<!DOCTYPE html><html 123=456> -#errors -#document -| <!DOCTYPE html> -| <html> -| 123="456" -| <head> -| <body> - -#data -<!DOCTYPE html><html 123=456><html 789=012> -#errors -#document -| <!DOCTYPE html> -| <html> -| 123="456" -| 789="012" -| <head> -| <body> - -#data -<!DOCTYPE html><html><body 789=012> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| 789="012" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests15.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests15.dat deleted file mode 100644 index 6ce1c0d..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests15.dat +++ /dev/null @@ -1,208 +0,0 @@ -#data -<!DOCTYPE html><p><b><i><u></p> <p>X -#errors -Line: 1 Col: 31 Unexpected end tag (p). Ignored. -Line: 1 Col: 36 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <b> -| <i> -| <u> -| <b> -| <i> -| <u> -| " " -| <p> -| "X" - -#data -<p><b><i><u></p> -<p>X -#errors -Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end tag (p). Ignored. -Line: 2 Col: 4 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <p> -| <b> -| <i> -| <u> -| <b> -| <i> -| <u> -| " -" -| <p> -| "X" - -#data -<!doctype html></html> <head> -#errors -Line: 1 Col: 22 Unexpected end tag (html) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " " - -#data -<!doctype html></body><meta> -#errors -Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <meta> - -#data -<html></html><!-- foo --> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end tag (html) after the (implied) root element. -#document -| <html> -| <head> -| <body> -| <!-- foo --> - -#data -<!doctype html></body><title>X</title> -#errors -Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <title> -| "X" - -#data -<!doctype html><table> X<meta></table> -#errors -Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 30 Unexpected start tag (meta) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " X" -| <meta> -| <table> - -#data -<!doctype html><table> x</table> -#errors -Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " x" -| <table> - -#data -<!doctype html><table> x </table> -#errors -Line: 1 Col: 25 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " x " -| <table> - -#data -<!doctype html><table><tr> x</table> -#errors -Line: 1 Col: 28 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " x" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table>X<style> <tr>x </style> </table> -#errors -Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" -| <table> -| <style> -| " <tr>x " -| " " - -#data -<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div> -#errors -Line: 1 Col: 30 Unexpected start tag (a) in table context caused voodoo mode. -Line: 1 Col: 37 Unexpected end tag (a) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| <a> -| "foo" -| <table> -| " " -| <tbody> -| <tr> -| <td> -| "bar" -| " " - -#data -<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes> -#errors -6: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -13: Stray start tag “frame”. -21: Stray end tag “frame”. -29: Stray end tag “frame”. -39: “frameset” start tag after “body” already open. -105: End of file seen inside an [R]CDATA element. -105: End of file seen and there were open elements. -XXX: These errors are wrong, please fix me! -#document -| <html> -| <head> -| <frameset> -| <frame> -| <frameset> -| <frame> -| <noframes> -| "</frameset><noframes>" - -#data -<!DOCTYPE html><object></html> -#errors -1: Expected closing tag. Unexpected end of file -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <object> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests16.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests16.dat deleted file mode 100644 index c8ef66f..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests16.dat +++ /dev/null @@ -1,2299 +0,0 @@ -#data -<!doctype html><script> -#errors -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| <body> - -#data -<!doctype html><script>a -#errors -Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "a" -| <body> - -#data -<!doctype html><script>< -#errors -Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<" -| <body> - -#data -<!doctype html><script></ -#errors -Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</" -| <body> - -#data -<!doctype html><script></S -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</S" -| <body> - -#data -<!doctype html><script></SC -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SC" -| <body> - -#data -<!doctype html><script></SCR -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCR" -| <body> - -#data -<!doctype html><script></SCRI -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCRI" -| <body> - -#data -<!doctype html><script></SCRIP -#errors -Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCRIP" -| <body> - -#data -<!doctype html><script></SCRIPT -#errors -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</SCRIPT" -| <body> - -#data -<!doctype html><script></SCRIPT -#errors -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| <body> - -#data -<!doctype html><script></s -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</s" -| <body> - -#data -<!doctype html><script></sc -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</sc" -| <body> - -#data -<!doctype html><script></scr -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</scr" -| <body> - -#data -<!doctype html><script></scri -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</scri" -| <body> - -#data -<!doctype html><script></scrip -#errors -Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</scrip" -| <body> - -#data -<!doctype html><script></script -#errors -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "</script" -| <body> - -#data -<!doctype html><script></script -#errors -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| <body> - -#data -<!doctype html><script><! -#errors -Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!" -| <body> - -#data -<!doctype html><script><!a -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!a" -| <body> - -#data -<!doctype html><script><!- -#errors -Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!-" -| <body> - -#data -<!doctype html><script><!-a -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!-a" -| <body> - -#data -<!doctype html><script><!-- -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<!doctype html><script><!--a -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--a" -| <body> - -#data -<!doctype html><script><!--< -#errors -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<" -| <body> - -#data -<!doctype html><script><!--<a -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<a" -| <body> - -#data -<!doctype html><script><!--</ -#errors -Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--</" -| <body> - -#data -<!doctype html><script><!--</script -#errors -Line: 1 Col: 35 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--</script" -| <body> - -#data -<!doctype html><script><!--</script -#errors -Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<!doctype html><script><!--<s -#errors -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<s" -| <body> - -#data -<!doctype html><script><!--<script -#errors -Line: 1 Col: 34 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script" -| <body> - -#data -<!doctype html><script><!--<script -#errors -Line: 1 Col: 35 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script " -| <body> - -#data -<!doctype html><script><!--<script < -#errors -Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script <" -| <body> - -#data -<!doctype html><script><!--<script <a -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script <a" -| <body> - -#data -<!doctype html><script><!--<script </ -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </" -| <body> - -#data -<!doctype html><script><!--<script </s -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </s" -| <body> - -#data -<!doctype html><script><!--<script </script -#errors -Line: 1 Col: 43 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script" -| <body> - -#data -<!doctype html><script><!--<script </scripta -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </scripta" -| <body> - -#data -<!doctype html><script><!--<script </script -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script </script> -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script>" -| <body> - -#data -<!doctype html><script><!--<script </script/ -#errors -Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script/" -| <body> - -#data -<!doctype html><script><!--<script </script < -#errors -Line: 1 Col: 45 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script <" -| <body> - -#data -<!doctype html><script><!--<script </script <a -#errors -Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script <a" -| <body> - -#data -<!doctype html><script><!--<script </script </ -#errors -Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script </" -| <body> - -#data -<!doctype html><script><!--<script </script </script -#errors -Line: 1 Col: 52 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script </script" -| <body> - -#data -<!doctype html><script><!--<script </script </script -#errors -Line: 1 Col: 53 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script </script </script/ -#errors -Line: 1 Col: 53 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script </script </script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<!doctype html><script><!--<script - -#errors -Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -" -| <body> - -#data -<!doctype html><script><!--<script -a -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -a" -| <body> - -#data -<!doctype html><script><!--<script -< -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -<" -| <body> - -#data -<!doctype html><script><!--<script -- -#errors -Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --" -| <body> - -#data -<!doctype html><script><!--<script --a -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --a" -| <body> - -#data -<!doctype html><script><!--<script --< -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --<" -| <body> - -#data -<!doctype html><script><!--<script --> -#errors -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script -->< -#errors -Line: 1 Col: 39 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --><" -| <body> - -#data -<!doctype html><script><!--<script --></ -#errors -Line: 1 Col: 40 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --></" -| <body> - -#data -<!doctype html><script><!--<script --></script -#errors -Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script --></script" -| <body> - -#data -<!doctype html><script><!--<script --></script -#errors -Line: 1 Col: 47 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script --></script/ -#errors -Line: 1 Col: 47 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script --></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<!doctype html><script><!--<script><\/script>--></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script><\/script>-->" -| <body> - -#data -<!doctype html><script><!--<script></scr'+'ipt>--></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt>-->" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>--><!--</script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>--><!--" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>-- ></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>-- >" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>- -></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- ->" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>- - ></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- - >" -| <body> - -#data -<!doctype html><script><!--<script></script><script></script>-></script> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>->" -| <body> - -#data -<!doctype html><script><!--<script>--!></script>X -#errors -Line: 1 Col: 49 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script>--!></script>X" -| <body> - -#data -<!doctype html><script><!--<scr'+'ipt></script>--></script> -#errors -Line: 1 Col: 59 Unexpected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<scr'+'ipt>" -| <body> -| "-->" - -#data -<!doctype html><script><!--<script></scr'+'ipt></script>X -#errors -Line: 1 Col: 57 Unexpected end of file. Expected end tag (script). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt></script>X" -| <body> - -#data -<!doctype html><style><!--<style></style>--></style> -#errors -Line: 1 Col: 52 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--<style>" -| <body> -| "-->" - -#data -<!doctype html><style><!--</style>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--" -| <body> -| "X" - -#data -<!doctype html><style><!--...</style>...--></style> -#errors -Line: 1 Col: 51 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--..." -| <body> -| "...-->" - -#data -<!doctype html><style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>" -| <body> -| "X" - -#data -<!doctype html><style><!--...<style><!--...--!></style>--></style> -#errors -Line: 1 Col: 66 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--...<style><!--...--!>" -| <body> -| "-->" - -#data -<!doctype html><style><!--...</style><!-- --><style>@import ...</style> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "<!--..." -| <!-- --> -| <style> -| "@import ..." -| <body> - -#data -<!doctype html><style>...<style><!--...</style><!-- --></style> -#errors -Line: 1 Col: 63 Unexpected end tag (style). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "...<style><!--..." -| <!-- --> -| <body> - -#data -<!doctype html><style>...<!--[if IE]><style>...</style>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <style> -| "...<!--[if IE]><style>..." -| <body> -| "X" - -#data -<!doctype html><title><!--<title></title>--></title> -#errors -Line: 1 Col: 52 Unexpected end tag (title). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "<!--<title>" -| <body> -| "-->" - -#data -<!doctype html><title>&lt;/title></title> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "</title>" -| <body> - -#data -<!doctype html><title>foo/title><link></head><body>X -#errors -Line: 1 Col: 52 Unexpected end of file. Expected end tag (title). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "foo/title><link></head><body>X" -| <body> - -#data -<!doctype html><noscript><!--<noscript></noscript>--></noscript> -#errors -Line: 1 Col: 64 Unexpected end tag (noscript). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noscript> -| "<!--<noscript>" -| <body> -| "-->" - -#data -<!doctype html><noscript><!--</noscript>X<noscript>--></noscript> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noscript> -| "<!--" -| <body> -| "X" -| <noscript> -| "-->" - -#data -<!doctype html><noscript><iframe></noscript>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noscript> -| "<iframe>" -| <body> -| "X" - -#data -<!doctype html><noframes><!--<noframes></noframes>--></noframes> -#errors -Line: 1 Col: 64 Unexpected end tag (noframes). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noframes> -| "<!--<noframes>" -| <body> -| "-->" - -#data -<!doctype html><noframes><body><script><!--...</script></body></noframes></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <noframes> -| "<body><script><!--...</script></body>" -| <body> - -#data -<!doctype html><textarea><!--<textarea></textarea>--></textarea> -#errors -Line: 1 Col: 64 Unexpected end tag (textarea). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "<!--<textarea>" -| "-->" - -#data -<!doctype html><textarea>&lt;/textarea></textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "</textarea>" - -#data -<!doctype html><textarea>&lt;</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "<" - -#data -<!doctype html><textarea>a&lt;b</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "a<b" - -#data -<!doctype html><iframe><!--<iframe></iframe>--></iframe> -#errors -Line: 1 Col: 56 Unexpected end tag (iframe). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <iframe> -| "<!--<iframe>" -| "-->" - -#data -<!doctype html><iframe>...<!--X->...<!--/X->...</iframe> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <iframe> -| "...<!--X->...<!--/X->..." - -#data -<!doctype html><xmp><!--<xmp></xmp>--></xmp> -#errors -Line: 1 Col: 44 Unexpected end tag (xmp). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <xmp> -| "<!--<xmp>" -| "-->" - -#data -<!doctype html><noembed><!--<noembed></noembed>--></noembed> -#errors -Line: 1 Col: 60 Unexpected end tag (noembed). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <noembed> -| "<!--<noembed>" -| "-->" - -#data -<script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 8 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| <body> - -#data -<script>a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "a" -| <body> - -#data -<script>< -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 9 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<" -| <body> - -#data -<script></ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</" -| <body> - -#data -<script></S -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</S" -| <body> - -#data -<script></SC -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SC" -| <body> - -#data -<script></SCR -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCR" -| <body> - -#data -<script></SCRI -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCRI" -| <body> - -#data -<script></SCRIP -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 15 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCRIP" -| <body> - -#data -<script></SCRIPT -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</SCRIPT" -| <body> - -#data -<script></SCRIPT -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| <body> - -#data -<script></s -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</s" -| <body> - -#data -<script></sc -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</sc" -| <body> - -#data -<script></scr -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</scr" -| <body> - -#data -<script></scri -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</scri" -| <body> - -#data -<script></scrip -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 15 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</scrip" -| <body> - -#data -<script></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</script" -| <body> - -#data -<script></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| <body> - -#data -<script><! -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 10 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!" -| <body> - -#data -<script><!a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!a" -| <body> - -#data -<script><!- -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!-" -| <body> - -#data -<script><!-a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!-a" -| <body> - -#data -<script><!-- -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<script><!--a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--a" -| <body> - -#data -<script><!--< -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<" -| <body> - -#data -<script><!--<a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<a" -| <body> - -#data -<script><!--</ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--</" -| <body> - -#data -<script><!--</script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--</script" -| <body> - -#data -<script><!--</script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--" -| <body> - -#data -<script><!--<s -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<s" -| <body> - -#data -<script><!--<script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 19 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script" -| <body> - -#data -<script><!--<script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script " -| <body> - -#data -<script><!--<script < -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script <" -| <body> - -#data -<script><!--<script <a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script <a" -| <body> - -#data -<script><!--<script </ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </" -| <body> - -#data -<script><!--<script </s -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </s" -| <body> - -#data -<script><!--<script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script" -| <body> - -#data -<script><!--<script </scripta -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </scripta" -| <body> - -#data -<script><!--<script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script </script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script>" -| <body> - -#data -<script><!--<script </script/ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script/" -| <body> - -#data -<script><!--<script </script < -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script <" -| <body> - -#data -<script><!--<script </script <a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script <a" -| <body> - -#data -<script><!--<script </script </ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script </" -| <body> - -#data -<script><!--<script </script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script </script" -| <body> - -#data -<script><!--<script </script </script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script </script </script/ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script </script </script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script </script " -| <body> - -#data -<script><!--<script - -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -" -| <body> - -#data -<script><!--<script -a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -a" -| <body> - -#data -<script><!--<script -- -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --" -| <body> - -#data -<script><!--<script --a -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --a" -| <body> - -#data -<script><!--<script --> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script -->< -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --><" -| <body> - -#data -<script><!--<script --></ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --></" -| <body> - -#data -<script><!--<script --></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script --></script" -| <body> - -#data -<script><!--<script --></script -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script --></script/ -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script --></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script -->" -| <body> - -#data -<script><!--<script><\/script>--></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script><\/script>-->" -| <body> - -#data -<script><!--<script></scr'+'ipt>--></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt>-->" -| <body> - -#data -<script><!--<script></script><script></script></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>" -| <body> - -#data -<script><!--<script></script><script></script>--><!--</script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>--><!--" -| <body> - -#data -<script><!--<script></script><script></script>-- ></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>-- >" -| <body> - -#data -<script><!--<script></script><script></script>- -></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- ->" -| <body> - -#data -<script><!--<script></script><script></script>- - ></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>- - >" -| <body> - -#data -<script><!--<script></script><script></script>-></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| "<!--<script></script><script></script>->" -| <body> - -#data -<script><!--<script>--!></script>X -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 34 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script>--!></script>X" -| <body> - -#data -<script><!--<scr'+'ipt></script>--></script> -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 44 Unexpected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<scr'+'ipt>" -| <body> -| "-->" - -#data -<script><!--<script></scr'+'ipt></script>X -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 42 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "<!--<script></scr'+'ipt></script>X" -| <body> - -#data -<style><!--<style></style>--></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--<style>" -| <body> -| "-->" - -#data -<style><!--</style>X -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "<!--" -| <body> -| "X" - -#data -<style><!--...</style>...--></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 36 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--..." -| <body> -| "...-->" - -#data -<style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>" -| <body> -| "X" - -#data -<style><!--...<style><!--...--!></style>--></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 51 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "<!--...<style><!--...--!>" -| <body> -| "-->" - -#data -<style><!--...</style><!-- --><style>@import ...</style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "<!--..." -| <!-- --> -| <style> -| "@import ..." -| <body> - -#data -<style>...<style><!--...</style><!-- --></style> -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 48 Unexpected end tag (style). -#document -| <html> -| <head> -| <style> -| "...<style><!--..." -| <!-- --> -| <body> - -#data -<style>...<!--[if IE]><style>...</style>X -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| "...<!--[if IE]><style>..." -| <body> -| "X" - -#data -<title><!--<title></title>--></title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected end tag (title). -#document -| <html> -| <head> -| <title> -| "<!--<title>" -| <body> -| "-->" - -#data -<title>&lt;/title></title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -#document -| <html> -| <head> -| <title> -| "</title>" -| <body> - -#data -<title>foo/title><link></head><body>X -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -Line: 1 Col: 37 Unexpected end of file. Expected end tag (title). -#document -| <html> -| <head> -| <title> -| "foo/title><link></head><body>X" -| <body> - -#data -<noscript><!--<noscript></noscript>--></noscript> -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -Line: 1 Col: 49 Unexpected end tag (noscript). -#document -| <html> -| <head> -| <noscript> -| "<!--<noscript>" -| <body> -| "-->" - -#data -<noscript><!--</noscript>X<noscript>--></noscript> -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -#document -| <html> -| <head> -| <noscript> -| "<!--" -| <body> -| "X" -| <noscript> -| "-->" - -#data -<noscript><iframe></noscript>X -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -#document -| <html> -| <head> -| <noscript> -| "<iframe>" -| <body> -| "X" - -#data -<noframes><!--<noframes></noframes>--></noframes> -#errors -Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE. -Line: 1 Col: 49 Unexpected end tag (noframes). -#document -| <html> -| <head> -| <noframes> -| "<!--<noframes>" -| <body> -| "-->" - -#data -<noframes><body><script><!--...</script></body></noframes></html> -#errors -Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE. -#document -| <html> -| <head> -| <noframes> -| "<body><script><!--...</script></body>" -| <body> - -#data -<textarea><!--<textarea></textarea>--></textarea> -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -Line: 1 Col: 49 Unexpected end tag (textarea). -#document -| <html> -| <head> -| <body> -| <textarea> -| "<!--<textarea>" -| "-->" - -#data -<textarea>&lt;/textarea></textarea> -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <textarea> -| "</textarea>" - -#data -<iframe><!--<iframe></iframe>--></iframe> -#errors -Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. -Line: 1 Col: 41 Unexpected end tag (iframe). -#document -| <html> -| <head> -| <body> -| <iframe> -| "<!--<iframe>" -| "-->" - -#data -<iframe>...<!--X->...<!--/X->...</iframe> -#errors -Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <iframe> -| "...<!--X->...<!--/X->..." - -#data -<xmp><!--<xmp></xmp>--></xmp> -#errors -Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE. -Line: 1 Col: 29 Unexpected end tag (xmp). -#document -| <html> -| <head> -| <body> -| <xmp> -| "<!--<xmp>" -| "-->" - -#data -<noembed><!--<noembed></noembed>--></noembed> -#errors -Line: 1 Col: 9 Unexpected start tag (noembed). Expected DOCTYPE. -Line: 1 Col: 45 Unexpected end tag (noembed). -#document -| <html> -| <head> -| <body> -| <noembed> -| "<!--<noembed>" -| "-->" - -#data -<!doctype html><table> - -#errors -Line 2 Col 0 Unexpected end of file. Expected table content. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| " -" - -#data -<!doctype html><table><td><span><font></span><span> -#errors -Line 1 Col 26 Unexpected table cell start tag (td) in the table body phase. -Line 1 Col 45 Unexpected end tag (span). -Line 1 Col 51 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <span> -| <font> -| <font> -| <span> - -#data -<!doctype html><form><table></form><form></table></form> -#errors -35: Stray end tag “form”. -41: Start tag “form” seen in “table”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <table> -| <form> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests17.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests17.dat deleted file mode 100644 index 7b555f8..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests17.dat +++ /dev/null @@ -1,153 +0,0 @@ -#data -<!doctype html><table><tbody><select><tr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><tr><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<!doctype html><table><tr><td><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <select> -| <td> - -#data -<!doctype html><table><tr><th><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <th> -| <select> -| <td> - -#data -<!doctype html><table><caption><select><tr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <select> -| <tbody> -| <tr> - -#data -<!doctype html><select><tr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><th> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><tbody> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><thead> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><tfoot> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><select><caption> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><table><tr></table>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| "a" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests18.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests18.dat deleted file mode 100644 index 680e1f0..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests18.dat +++ /dev/null @@ -1,269 +0,0 @@ -#data -<!doctype html><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" - -#data -<!doctype html><table><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> - -#data -<!doctype html><table><tbody><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> -| <tbody> - -#data -<!doctype html><table><tbody><tr><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><tbody><tr><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><td><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <plaintext> -| "</plaintext>" - -#data -<!doctype html><table><caption><plaintext></plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <plaintext> -| "</plaintext>" - -#data -<!doctype html><table><tr><style></script></style>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "abc" -| <table> -| <tbody> -| <tr> -| <style> -| "</script>" - -#data -<!doctype html><table><tr><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "abc" -| <table> -| <tbody> -| <tr> -| <script> -| "</style>" - -#data -<!doctype html><table><caption><style></script></style>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <style> -| "</script>" -| "abc" - -#data -<!doctype html><table><td><style></script></style>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <style> -| "</script>" -| "abc" - -#data -<!doctype html><select><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <script> -| "</style>" -| "abc" - -#data -<!doctype html><table><select><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <script> -| "</style>" -| "abc" -| <table> - -#data -<!doctype html><table><tr><select><script></style></script>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <script> -| "</style>" -| "abc" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><frameset></frameset><noframes>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" - -#data -<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" -| <!-- abc --> - -#data -<!doctype html><frameset></frameset></html><noframes>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" - -#data -<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <noframes> -| "abc" -| <!-- abc --> - -#data -<!doctype html><table><tr></tbody><tfoot> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <tfoot> - -#data -<!doctype html><table><td><svg></svg>abc<td> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| "abc" -| <td> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests19.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests19.dat deleted file mode 100644 index 0d62f5a..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests19.dat +++ /dev/null @@ -1,1237 +0,0 @@ -#data -<!doctype html><math><mn DefinitionUrl="foo"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mn> -| definitionURL="foo" - -#data -<!doctype html><html></p><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <!-- foo --> -| <head> -| <body> - -#data -<!doctype html><head></head></p><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <!-- foo --> -| <body> - -#data -<!doctype html><body><p><pre> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <pre> - -#data -<!doctype html><body><p><listing> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <listing> - -#data -<!doctype html><p><plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <plaintext> - -#data -<!doctype html><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <h1> - -#data -<!doctype html><form><isindex> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> - -#data -<!doctype html><isindex action="POST"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| action="POST" -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| <hr> - -#data -<!doctype html><isindex prompt="this is isindex"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "this is isindex" -| <input> -| name="isindex" -| <hr> - -#data -<!doctype html><isindex type="hidden"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| type="hidden" -| <hr> - -#data -<!doctype html><isindex name="foo"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| <hr> - -#data -<!doctype html><ruby><p><rp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <p> -| <rp> - -#data -<!doctype html><ruby><div><span><rp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <span> -| <rp> - -#data -<!doctype html><ruby><div><p><rp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <p> -| <rp> - -#data -<!doctype html><ruby><p><rt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <p> -| <rt> - -#data -<!doctype html><ruby><div><span><rt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <span> -| <rt> - -#data -<!doctype html><ruby><div><p><rt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <p> -| <rt> - -#data -<!doctype html><math/><foo> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <foo> - -#data -<!doctype html><svg/><foo> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <foo> - -#data -<!doctype html><div></body><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| <!-- foo --> - -#data -<!doctype html><h1><div><h3><span></h1>foo -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <h1> -| <div> -| <h3> -| <span> -| "foo" - -#data -<!doctype html><p></h3>foo -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "foo" - -#data -<!doctype html><h3><li>abc</h2>foo -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <h3> -| <li> -| "abc" -| "foo" - -#data -<!doctype html><table>abc<!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "abc" -| <table> -| <!-- foo --> - -#data -<!doctype html><table> <!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| " " -| <!-- foo --> - -#data -<!doctype html><table> b <!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| " b " -| <table> -| <!-- foo --> - -#data -<!doctype html><select><option><option> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> -| <option> - -#data -<!doctype html><select><option></optgroup> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> - -#data -<!doctype html><select><option></optgroup> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> - -#data -<!doctype html><p><math><mi><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mi> -| <p> -| <h1> - -#data -<!doctype html><p><math><mo><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mo> -| <p> -| <h1> - -#data -<!doctype html><p><math><mn><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mn> -| <p> -| <h1> - -#data -<!doctype html><p><math><ms><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math ms> -| <p> -| <h1> - -#data -<!doctype html><p><math><mtext><p><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mtext> -| <p> -| <h1> - -#data -<!doctype html><frameset></noframes> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><html c=d><body></html><html a=b> -#errors -#document -| <!DOCTYPE html> -| <html> -| a="b" -| c="d" -| <head> -| <body> - -#data -<!doctype html><html c=d><frameset></frameset></html><html a=b> -#errors -#document -| <!DOCTYPE html> -| <html> -| a="b" -| c="d" -| <head> -| <frameset> - -#data -<!doctype html><html><frameset></frameset></html><!--foo--> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <!-- foo --> - -#data -<!doctype html><html><frameset></frameset></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| " " - -#data -<!doctype html><html><frameset></frameset></html>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><html><frameset></frameset></html><p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><html><frameset></frameset></html></p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<html><frameset></frameset></html><!doctype html> -#errors -#document -| <html> -| <head> -| <frameset> - -#data -<!doctype html><body><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!doctype html><p><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><p>a<frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "a" - -#data -<!doctype html><p> <frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><pre><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> - -#data -<!doctype html><listing><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <listing> - -#data -<!doctype html><li><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <li> - -#data -<!doctype html><dd><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <dd> - -#data -<!doctype html><dt><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <dt> - -#data -<!doctype html><button><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <button> - -#data -<!doctype html><applet><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <applet> - -#data -<!doctype html><marquee><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <marquee> - -#data -<!doctype html><object><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <object> - -#data -<!doctype html><table><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> - -#data -<!doctype html><area><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <area> - -#data -<!doctype html><basefont><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <basefont> -| <frameset> - -#data -<!doctype html><bgsound><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <bgsound> -| <frameset> - -#data -<!doctype html><br><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <br> - -#data -<!doctype html><embed><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <embed> - -#data -<!doctype html><img><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <img> - -#data -<!doctype html><input><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <input> - -#data -<!doctype html><keygen><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <keygen> - -#data -<!doctype html><wbr><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <wbr> - -#data -<!doctype html><hr><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <hr> - -#data -<!doctype html><textarea></textarea><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> - -#data -<!doctype html><xmp></xmp><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <xmp> - -#data -<!doctype html><iframe></iframe><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <iframe> - -#data -<!doctype html><select></select><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!doctype html><svg></svg><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><math></math><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><svg><foreignObject><div> <frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<!doctype html><svg>a</svg><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| "a" - -#data -<!doctype html><svg> </svg><frameset><frame> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> -| <frame> - -#data -<html>aaa<frameset></frameset> -#errors -#document -| <html> -| <head> -| <body> -| "aaa" - -#data -<html> a <frameset></frameset> -#errors -#document -| <html> -| <head> -| <body> -| "a " - -#data -<!doctype html><div><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><div><body><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> - -#data -<!doctype html><p><math></p>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| "a" - -#data -<!doctype html><p><math><mn><span></p>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <math math> -| <math mn> -| <span> -| <p> -| "a" - -#data -<!doctype html><math></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> - -#data -<!doctype html><meta charset="ascii"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <meta> -| charset="ascii" -| <body> - -#data -<!doctype html><meta http-equiv="content-type" content="text/html;charset=ascii"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <meta> -| content="text/html;charset=ascii" -| http-equiv="content-type" -| <body> - -#data -<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset="utf8"> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --> -| <meta> -| charset="utf8" -| <body> - -#data -<!doctype html><html a=b><head></head><html c=d> -#errors -#document -| <!DOCTYPE html> -| <html> -| a="b" -| c="d" -| <head> -| <body> - -#data -<!doctype html><image/> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <img> - -#data -<!doctype html>a<i>b<table>c<b>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "a" -| <i> -| "bc" -| <b> -| "de" -| "f" -| <table> - -#data -<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <b> -| <i> -| "c" -| <a> -| "d" -| <a> -| "e" -| <a> -| "f" -| <table> - -#data -<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <b> -| <i> -| "c" -| <a> -| "d" -| <a> -| "e" -| <a> -| "f" - -#data -<!doctype html><table><i>a<b>b<div>c</i> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <i> -| "c" -| <table> - -#data -<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <b> -| "b" -| <b> -| <div> -| <b> -| <i> -| "c" -| <a> -| "d" -| <a> -| "e" -| <a> -| "f" -| <table> - -#data -<!doctype html><table><i>a<div>b<tr>c<b>d</i>e -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <i> -| "a" -| <div> -| "b" -| <i> -| "c" -| <b> -| "d" -| <b> -| "e" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><table><td><table><i>a<div>b<b>c</i>d -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <i> -| "a" -| <div> -| <i> -| "b" -| <b> -| "c" -| <b> -| "d" -| <table> - -#data -<!doctype html><body><bgsound> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <bgsound> - -#data -<!doctype html><body><basefont> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <basefont> - -#data -<!doctype html><a><b></a><basefont> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <a> -| <b> -| <basefont> - -#data -<!doctype html><a><b></a><bgsound> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <a> -| <b> -| <bgsound> - -#data -<!doctype html><figcaption><article></figcaption>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <figcaption> -| <article> -| "a" - -#data -<!doctype html><summary><article></summary>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <summary> -| <article> -| "a" - -#data -<!doctype html><p><a><plaintext>b -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <a> -| <plaintext> -| <a> -| "b" - -#data -<!DOCTYPE html><div>a<a></div>b<p>c</p>d -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| "a" -| <a> -| <a> -| "b" -| <p> -| "c" -| "d" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests2.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests2.dat deleted file mode 100644 index 60d8592..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests2.dat +++ /dev/null @@ -1,763 +0,0 @@ -#data -<!DOCTYPE html>Test -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "Test" - -#data -<textarea>test</div>test -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -Line: 1 Col: 24 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <textarea> -| "test</div>test" - -#data -<table><td> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 11 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<table><td>test</tbody></table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "test" - -#data -<frame>test -#errors -Line: 1 Col: 7 Unexpected start tag (frame). Expected DOCTYPE. -Line: 1 Col: 7 Unexpected start tag frame. Ignored. -#document -| <html> -| <head> -| <body> -| "test" - -#data -<!DOCTYPE html><frameset>test -#errors -Line: 1 Col: 29 Unepxected characters in the frameset phase. Characters ignored. -Line: 1 Col: 29 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><frameset><!DOCTYPE html> -#errors -Line: 1 Col: 40 Unexpected DOCTYPE. Ignored. -Line: 1 Col: 40 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><font><p><b>test</font> -#errors -Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <font> -| <p> -| <font> -| <b> -| "test" - -#data -<!DOCTYPE html><dt><div><dd> -#errors -Line: 1 Col: 28 Missing end tag (div, dt). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <dt> -| <div> -| <dd> - -#data -<script></x -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). -#document -| <html> -| <head> -| <script> -| "</x" -| <body> - -#data -<table><plaintext><td> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 18 Unexpected start tag (plaintext) in table context caused voodoo mode. -Line: 1 Col: 22 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <plaintext> -| "<td>" -| <table> - -#data -<plaintext></plaintext> -#errors -Line: 1 Col: 11 Unexpected start tag (plaintext). Expected DOCTYPE. -Line: 1 Col: 23 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <plaintext> -| "</plaintext>" - -#data -<!DOCTYPE html><table><tr>TEST -#errors -Line: 1 Col: 30 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 30 Unexpected end of file. Expected table content. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "TEST" -| <table> -| <tbody> -| <tr> - -#data -<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4> -#errors -Line: 1 Col: 37 Unexpected start tag (body). -Line: 1 Col: 53 Unexpected start tag (body). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| t1="1" -| t2="2" -| t3="3" -| t4="4" - -#data -</b test -#errors -Line: 1 Col: 8 Unexpected end of file in attribute name. -Line: 1 Col: 8 End tag contains unexpected attributes. -Line: 1 Col: 8 Unexpected end tag (b). Expected DOCTYPE. -Line: 1 Col: 8 Unexpected end tag (b) after the (implied) root element. -#document -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html></b test<b &=&amp>X -#errors -Line: 1 Col: 32 Named entity didn't end with ';'. -Line: 1 Col: 33 End tag contains unexpected attributes. -Line: 1 Col: 33 Unexpected end tag (b) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" - -#data -<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -Line: 1 Col: 54 Unexpected end of file in the tag name. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| type="text/x-foobar;baz" -| "X</SCRipt" -| <body> - -#data -& -#errors -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&" - -#data -&# -#errors -Line: 1 Col: 1 Numeric entity expected. Got end of file instead. -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&#" - -#data -&#X -#errors -Line: 1 Col: 3 Numeric entity expected but none found. -Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&#X" - -#data -&#x -#errors -Line: 1 Col: 3 Numeric entity expected but none found. -Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&#x" - -#data -&#45 -#errors -Line: 1 Col: 4 Numeric entity didn't end with ';'. -Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "-" - -#data -&x-test -#errors -Line: 1 Col: 1 Named entity expected. Got none. -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&x-test" - -#data -<!doctypehtml><p><li> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <li> - -#data -<!doctypehtml><p><dt> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <dt> - -#data -<!doctypehtml><p><dd> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <dd> - -#data -<!doctypehtml><p><form> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -Line: 1 Col: 23 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <form> - -#data -<!DOCTYPE html><p></P>X -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| "X" - -#data -&AMP -#errors -Line: 1 Col: 4 Named entity didn't end with ';'. -Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&" - -#data -&AMp; -#errors -Line: 1 Col: 1 Named entity expected. Got none. -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "&AMp;" - -#data -<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY> -#errors -Line: 1 Col: 110 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly> - -#data -<!DOCTYPE html>X</body>X -#errors -Line: 1 Col: 24 Unexpected non-space characters in the after body phase. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "XX" - -#data -<!DOCTYPE html><!-- X -#errors -Line: 1 Col: 21 Unexpected end of file in comment. -#document -| <!DOCTYPE html> -| <!-- X --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><table><caption>test TEST</caption><td>test -#errors -Line: 1 Col: 54 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 58 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| "test TEST" -| <tbody> -| <tr> -| <td> -| "test" - -#data -<!DOCTYPE html><select><option><optgroup> -#errors -Line: 1 Col: 41 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> -| <optgroup> - -#data -<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option> -#errors -Line: 1 Col: 68 Unexpected select start tag in the select phase treated as select end tag. -Line: 1 Col: 76 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <optgroup> -| <option> -| <option> -| <option> - -#data -<!DOCTYPE html><select><optgroup><option><optgroup> -#errors -Line: 1 Col: 51 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <optgroup> -| <option> -| <optgroup> - -#data -<!DOCTYPE html><datalist><option>foo</datalist>bar -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <datalist> -| <option> -| "foo" -| "bar" - -#data -<!DOCTYPE html><font><input><input></font> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <font> -| <input> -| <input> - -#data -<!DOCTYPE html><!-- XXX - XXX --> -#errors -#document -| <!DOCTYPE html> -| <!-- XXX - XXX --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><!-- XXX - XXX -#errors -Line: 1 Col: 29 Unexpected end of file in comment (-) -#document -| <!DOCTYPE html> -| <!-- XXX - XXX --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><!-- XXX - XXX - XXX --> -#errors -#document -| <!DOCTYPE html> -| <!-- XXX - XXX - XXX --> -| <html> -| <head> -| <body> - -#data -<isindex test=x name=x> -#errors -Line: 1 Col: 23 Unexpected start tag (isindex). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected start tag isindex. Don't use it! -#document -| <html> -| <head> -| <body> -| <form> -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| test="x" -| <hr> - -#data -test -test -#errors -Line: 2 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "test -test" - -#data -<!DOCTYPE html><body><title>test</body></title> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <title> -| "test</body>" - -#data -<!DOCTYPE html><body><title>X</title><meta name=z><link rel=foo><style> -x { content:"</style" } </style> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <title> -| "X" -| <meta> -| name="z" -| <link> -| rel="foo" -| <style> -| " -x { content:"</style" } " - -#data -<!DOCTYPE html><select><optgroup></optgroup></select> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <optgroup> - -#data - - -#errors -Line: 2 Col: 1 Unexpected End of file. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html> <html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><script> -</script> <title>x</title> </head> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <script> -| " -" -| " " -| <title> -| "x" -| " " -| <body> - -#data -<!DOCTYPE html><html><body><html id=x> -#errors -Line: 1 Col: 38 html needs to be the first start tag. -#document -| <!DOCTYPE html> -| <html> -| id="x" -| <head> -| <body> - -#data -<!DOCTYPE html>X</body><html id="x"> -#errors -Line: 1 Col: 36 Unexpected start tag token (html) in the after body phase. -Line: 1 Col: 36 html needs to be the first start tag. -#document -| <!DOCTYPE html> -| <html> -| id="x" -| <head> -| <body> -| "X" - -#data -<!DOCTYPE html><head><html id=x> -#errors -Line: 1 Col: 32 html needs to be the first start tag. -#document -| <!DOCTYPE html> -| <html> -| id="x" -| <head> -| <body> - -#data -<!DOCTYPE html>X</html>X -#errors -Line: 1 Col: 24 Unexpected non-space characters in the after body phase. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "XX" - -#data -<!DOCTYPE html>X</html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X " - -#data -<!DOCTYPE html>X</html><p>X -#errors -Line: 1 Col: 26 Unexpected start tag (p). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" -| <p> -| "X" - -#data -<!DOCTYPE html>X<p/x/y/z> -#errors -Line: 1 Col: 19 Expected a > after the /. -Line: 1 Col: 21 Solidus (/) incorrectly placed in tag. -Line: 1 Col: 23 Solidus (/) incorrectly placed in tag. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" -| <p> -| x="" -| y="" -| z="" - -#data -<!DOCTYPE html><!--x-- -#errors -Line: 1 Col: 22 Unexpected end of file in comment (--). -#document -| <!DOCTYPE html> -| <!-- x --> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE html><table><tr><td></p></table> -#errors -Line: 1 Col: 34 Unexpected end tag (p). Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <p> - -#data -<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->--> -#errors -Line: 1 Col: 20 Expected space or '>'. Got '' -Line: 1 Col: 25 Erroneous DOCTYPE. -Line: 1 Col: 35 Unexpected character in comment found. -#document -| <!DOCTYPE <!doctype> -| <html> -| <head> -| <body> -| ">" -| <!-- <!--x --> -| "-->" - -#data -<!doctype html><div><form></form><div></div></div> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| <form> -| <div> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests20.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests20.dat deleted file mode 100644 index 6bd8256..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests20.dat +++ /dev/null @@ -1,455 +0,0 @@ -#data -<!doctype html><p><button><button> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <button> - -#data -<!doctype html><p><button><address> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <address> - -#data -<!doctype html><p><button><blockquote> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <blockquote> - -#data -<!doctype html><p><button><menu> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <menu> - -#data -<!doctype html><p><button><p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <p> - -#data -<!doctype html><p><button><ul> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <ul> - -#data -<!doctype html><p><button><h1> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <h1> - -#data -<!doctype html><p><button><h6> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <h6> - -#data -<!doctype html><p><button><listing> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <listing> - -#data -<!doctype html><p><button><pre> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <pre> - -#data -<!doctype html><p><button><form> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <form> - -#data -<!doctype html><p><button><li> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <li> - -#data -<!doctype html><p><button><dd> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <dd> - -#data -<!doctype html><p><button><dt> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <dt> - -#data -<!doctype html><p><button><plaintext> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <plaintext> - -#data -<!doctype html><p><button><table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <table> - -#data -<!doctype html><p><button><hr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <hr> - -#data -<!doctype html><p><button><xmp> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <xmp> - -#data -<!doctype html><p><button></p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <button> -| <p> - -#data -<!doctype html><address><button></address>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <address> -| <button> -| "a" - -#data -<!doctype html><address><button></address>a -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <address> -| <button> -| "a" - -#data -<p><table></p> -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <p> -| <table> - -#data -<!doctype html><svg> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> - -#data -<!doctype html><p><figcaption> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <figcaption> - -#data -<!doctype html><p><summary> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <summary> - -#data -<!doctype html><form><table><form> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <table> - -#data -<!doctype html><table><form><form> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <form> - -#data -<!doctype html><table><form></table><form> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <form> - -#data -<!doctype html><svg><foreignObject><p> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg foreignObject> -| <p> - -#data -<!doctype html><svg><title>abc -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg title> -| "abc" - -#data -<option><span><option> -#errors -#document -| <html> -| <head> -| <body> -| <option> -| <span> -| <option> - -#data -<option><option> -#errors -#document -| <html> -| <head> -| <body> -| <option> -| <option> - -#data -<math><annotation-xml><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| <div> - -#data -<math><annotation-xml encoding="application/svg+xml"><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| encoding="application/svg+xml" -| <div> - -#data -<math><annotation-xml encoding="application/xhtml+xml"><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| encoding="application/xhtml+xml" -| <div> - -#data -<math><annotation-xml encoding="aPPlication/xhtmL+xMl"><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| encoding="aPPlication/xhtmL+xMl" -| <div> - -#data -<math><annotation-xml encoding="text/html"><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| encoding="text/html" -| <div> - -#data -<math><annotation-xml encoding="Text/htmL"><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| encoding="Text/htmL" -| <div> - -#data -<math><annotation-xml encoding=" text/html "><div> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| encoding=" text/html " -| <div> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests21.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests21.dat deleted file mode 100644 index 1260ec0..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests21.dat +++ /dev/null @@ -1,221 +0,0 @@ -#data -<svg><![CDATA[foo]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "foo" - -#data -<math><![CDATA[foo]]> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| "foo" - -#data -<div><![CDATA[foo]]> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <!-- [CDATA[foo]] --> - -#data -<svg><![CDATA[foo -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "foo" - -#data -<svg><![CDATA[foo -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "foo" - -#data -<svg><![CDATA[ -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> - -#data -<svg><![CDATA[]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> - -#data -<svg><![CDATA[]] >]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "]] >" - -#data -<svg><![CDATA[]] >]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "]] >" - -#data -<svg><![CDATA[]] -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "]]" - -#data -<svg><![CDATA[] -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "]" - -#data -<svg><![CDATA[]>a -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "]>a" - -#data -<svg><foreignObject><div><![CDATA[foo]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <svg foreignObject> -| <div> -| <!-- [CDATA[foo]] --> - -#data -<svg><![CDATA[<svg>]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<svg>" - -#data -<svg><![CDATA[</svg>a]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "</svg>a" - -#data -<svg><![CDATA[<svg>a -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<svg>a" - -#data -<svg><![CDATA[</svg>a -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "</svg>a" - -#data -<svg><![CDATA[<svg>]]><path> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<svg>" -| <svg path> - -#data -<svg><![CDATA[<svg>]]></path> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<svg>" - -#data -<svg><![CDATA[<svg>]]><!--path--> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<svg>" -| <!-- path --> - -#data -<svg><![CDATA[<svg>]]>path -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<svg>path" - -#data -<svg><![CDATA[<!--svg-->]]> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| "<!--svg-->" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests22.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests22.dat deleted file mode 100644 index aab27b2..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests22.dat +++ /dev/null @@ -1,157 +0,0 @@ -#data -<a><b><big><em><strong><div>X</a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <b> -| <big> -| <em> -| <strong> -| <big> -| <em> -| <strong> -| <div> -| <a> -| "X" - -#data -<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8>A</a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <b> -| <b> -| <div> -| id="1" -| <a> -| <div> -| id="2" -| <a> -| <div> -| id="3" -| <a> -| <div> -| id="4" -| <a> -| <div> -| id="5" -| <a> -| <div> -| id="6" -| <a> -| <div> -| id="7" -| <a> -| <div> -| id="8" -| <a> -| "A" - -#data -<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9>A</a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <b> -| <b> -| <div> -| id="1" -| <a> -| <div> -| id="2" -| <a> -| <div> -| id="3" -| <a> -| <div> -| id="4" -| <a> -| <div> -| id="5" -| <a> -| <div> -| id="6" -| <a> -| <div> -| id="7" -| <a> -| <div> -| id="8" -| <a> -| <div> -| id="9" -| "A" - -#data -<a><b><div id=1><div id=2><div id=3><div id=4><div id=5><div id=6><div id=7><div id=8><div id=9><div id=10>A</a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <b> -| <b> -| <div> -| id="1" -| <a> -| <div> -| id="2" -| <a> -| <div> -| id="3" -| <a> -| <div> -| id="4" -| <a> -| <div> -| id="5" -| <a> -| <div> -| id="6" -| <a> -| <div> -| id="7" -| <a> -| <div> -| id="8" -| <a> -| <div> -| id="9" -| <div> -| id="10" -| "A" - -#data -<cite><b><cite><i><cite><i><cite><i><div>X</b>TEST -#errors -Line: 1 Col: 6 Unexpected start tag (cite). Expected DOCTYPE. -Line: 1 Col: 46 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 50 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <cite> -| <b> -| <cite> -| <i> -| <cite> -| <i> -| <cite> -| <i> -| <i> -| <i> -| <div> -| <b> -| "X" -| "TEST" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests23.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests23.dat deleted file mode 100644 index 34d2a73..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests23.dat +++ /dev/null @@ -1,155 +0,0 @@ -#data -<p><font size=4><font color=red><font size=4><font size=4><font size=4><font size=4><font size=4><font color=red><p>X -#errors -3: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -116: Unclosed elements. -117: End of file seen and there were open elements. -#document -| <html> -| <head> -| <body> -| <p> -| <font> -| size="4" -| <font> -| color="red" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| color="red" -| <p> -| <font> -| color="red" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| color="red" -| "X" - -#data -<p><font size=4><font size=4><font size=4><font size=4><p>X -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <p> -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| "X" - -#data -<p><font size=4><font size=4><font size=4><font size="5"><font size=4><p>X -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="5" -| <font> -| size="4" -| <p> -| <font> -| size="4" -| <font> -| size="4" -| <font> -| size="5" -| <font> -| size="4" -| "X" - -#data -<p><font size=4 id=a><font size=4 id=b><font size=4><font size=4><p>X -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <font> -| id="a" -| size="4" -| <font> -| id="b" -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| <p> -| <font> -| id="a" -| size="4" -| <font> -| id="b" -| size="4" -| <font> -| size="4" -| <font> -| size="4" -| "X" - -#data -<p><b id=a><b id=a><b id=a><b><object><b id=a><b id=a>X</object><p>Y -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <b> -| id="a" -| <b> -| id="a" -| <b> -| id="a" -| <b> -| <object> -| <b> -| id="a" -| <b> -| id="a" -| "X" -| <p> -| <b> -| id="a" -| <b> -| id="a" -| <b> -| id="a" -| <b> -| "Y" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests24.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests24.dat deleted file mode 100644 index f6dc7eb..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests24.dat +++ /dev/null @@ -1,79 +0,0 @@ -#data -<!DOCTYPE html>&NotEqualTilde; -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "≂̸" - -#data -<!DOCTYPE html>&NotEqualTilde;A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "≂̸A" - -#data -<!DOCTYPE html>&ThickSpace; -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "  " - -#data -<!DOCTYPE html>&ThickSpace;A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "  A" - -#data -<!DOCTYPE html>&NotSubset; -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "⊂⃒" - -#data -<!DOCTYPE html>&NotSubset;A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "⊂⃒A" - -#data -<!DOCTYPE html>&Gopf; -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "𝔾" - -#data -<!DOCTYPE html>&Gopf;A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "𝔾A" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests25.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests25.dat deleted file mode 100644 index 00de729..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests25.dat +++ /dev/null @@ -1,219 +0,0 @@ -#data -<!DOCTYPE html><body><foo>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <foo> -| "A" - -#data -<!DOCTYPE html><body><area>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <area> -| "A" - -#data -<!DOCTYPE html><body><base>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <base> -| "A" - -#data -<!DOCTYPE html><body><basefont>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <basefont> -| "A" - -#data -<!DOCTYPE html><body><bgsound>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <bgsound> -| "A" - -#data -<!DOCTYPE html><body><br>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <br> -| "A" - -#data -<!DOCTYPE html><body><col>A -#errors -26: Stray start tag “col”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "A" - -#data -<!DOCTYPE html><body><command>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <command> -| "A" - -#data -<!DOCTYPE html><body><embed>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <embed> -| "A" - -#data -<!DOCTYPE html><body><frame>A -#errors -26: Stray start tag “frame”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "A" - -#data -<!DOCTYPE html><body><hr>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <hr> -| "A" - -#data -<!DOCTYPE html><body><img>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <img> -| "A" - -#data -<!DOCTYPE html><body><input>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <input> -| "A" - -#data -<!DOCTYPE html><body><keygen>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <keygen> -| "A" - -#data -<!DOCTYPE html><body><link>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <link> -| "A" - -#data -<!DOCTYPE html><body><meta>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <meta> -| "A" - -#data -<!DOCTYPE html><body><param>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <param> -| "A" - -#data -<!DOCTYPE html><body><source>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <source> -| "A" - -#data -<!DOCTYPE html><body><track>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <track> -| "A" - -#data -<!DOCTYPE html><body><wbr>A -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <wbr> -| "A" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests26.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests26.dat deleted file mode 100644 index fae11ff..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests26.dat +++ /dev/null @@ -1,313 +0,0 @@ -#data -<!DOCTYPE html><body><a href='#1'><nobr>1<nobr></a><br><a href='#2'><nobr>2<nobr></a><br><a href='#3'><nobr>3<nobr></a> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <a> -| href="#1" -| <nobr> -| "1" -| <nobr> -| <nobr> -| <br> -| <a> -| href="#2" -| <a> -| href="#2" -| <nobr> -| "2" -| <nobr> -| <nobr> -| <br> -| <a> -| href="#3" -| <a> -| href="#3" -| <nobr> -| "3" -| <nobr> - -#data -<!DOCTYPE html><body><b><nobr>1<nobr></b><i><nobr>2<nobr></i>3 -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <nobr> -| <nobr> -| <i> -| <i> -| <nobr> -| "2" -| <nobr> -| <nobr> -| "3" - -#data -<!DOCTYPE html><body><b><nobr>1<table><nobr></b><i><nobr>2<nobr></i>3 -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <nobr> -| <i> -| <i> -| <nobr> -| "2" -| <nobr> -| <nobr> -| "3" -| <table> - -#data -<!DOCTYPE html><body><b><nobr>1<table><tr><td><nobr></b><i><nobr>2<nobr></i>3 -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <table> -| <tbody> -| <tr> -| <td> -| <nobr> -| <i> -| <i> -| <nobr> -| "2" -| <nobr> -| <nobr> -| "3" - -#data -<!DOCTYPE html><body><b><nobr>1<div><nobr></b><i><nobr>2<nobr></i>3 -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <div> -| <b> -| <nobr> -| <nobr> -| <nobr> -| <i> -| <i> -| <nobr> -| "2" -| <nobr> -| <nobr> -| "3" - -#data -<!DOCTYPE html><body><b><nobr>1<nobr></b><div><i><nobr>2<nobr></i>3 -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <nobr> -| <div> -| <nobr> -| <i> -| <i> -| <nobr> -| "2" -| <nobr> -| <nobr> -| "3" - -#data -<!DOCTYPE html><body><b><nobr>1<nobr><ins></b><i><nobr> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <nobr> -| <ins> -| <nobr> -| <i> -| <i> -| <nobr> - -#data -<!DOCTYPE html><body><b><nobr>1<ins><nobr></b><i>2 -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| <nobr> -| "1" -| <ins> -| <nobr> -| <nobr> -| <i> -| "2" - -#data -<!DOCTYPE html><body><b>1<nobr></b><i><nobr>2</i> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <b> -| "1" -| <nobr> -| <nobr> -| <i> -| <i> -| <nobr> -| "2" - -#data -<p><code x</code></p> - -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <code> -| code="" -| x<="" -| <code> -| code="" -| x<="" -| " -" - -#data -<!DOCTYPE html><svg><foreignObject><p><i></p>a -#errors -45: End tag “p” seen, but there were open elements. -41: Unclosed element “i”. -46: End of file seen and there were open elements. -35: Unclosed element “foreignObject”. -20: Unclosed element “svg”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <svg svg> -| <svg foreignObject> -| <p> -| <i> -| <i> -| "a" - -#data -<!DOCTYPE html><table><tr><td><svg><foreignObject><p><i></p>a -#errors -56: End tag “p” seen, but there were open elements. -52: Unclosed element “i”. -57: End of file seen and there were open elements. -46: Unclosed element “foreignObject”. -31: Unclosed element “svg”. -22: Unclosed element “table”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| <svg foreignObject> -| <p> -| <i> -| <i> -| "a" - -#data -<!DOCTYPE html><math><mtext><p><i></p>a -#errors -38: End tag “p” seen, but there were open elements. -34: Unclosed element “i”. -39: End of file in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mtext> -| <p> -| <i> -| <i> -| "a" - -#data -<!DOCTYPE html><table><tr><td><math><mtext><p><i></p>a -#errors -53: End tag “p” seen, but there were open elements. -49: Unclosed element “i”. -54: End of file in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <math math> -| <math mtext> -| <p> -| <i> -| <i> -| "a" - -#data -<!DOCTYPE html><body><div><!/div>a -#errors -29: Bogus comment. -34: End of file seen and there were open elements. -26: Unclosed element “div”. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <div> -| <!-- /div --> -| "a" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests3.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests3.dat deleted file mode 100644 index 38dc501..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests3.dat +++ /dev/null @@ -1,305 +0,0 @@ -#data -<head></head><style></style> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected start tag (style) that can be in head. Moved. -#document -| <html> -| <head> -| <style> -| <body> - -#data -<head></head><script></script> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected start tag (script) that can be in head. Moved. -#document -| <html> -| <head> -| <script> -| <body> - -#data -<head></head><!-- --><style></style><!-- --><script></script> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -Line: 1 Col: 28 Unexpected start tag (style) that can be in head. Moved. -#document -| <html> -| <head> -| <style> -| <script> -| <!-- --> -| <!-- --> -| <body> - -#data -<head></head><!-- -->x<style></style><!-- --><script></script> -#errors -Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. -#document -| <html> -| <head> -| <!-- --> -| <body> -| "x" -| <style> -| <!-- --> -| <script> - -#data -<!DOCTYPE html><html><head></head><body><pre> -</pre></body></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> - -#data -<!DOCTYPE html><html><head></head><body><pre> -foo</pre></body></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| "foo" - -#data -<!DOCTYPE html><html><head></head><body><pre> - -foo</pre></body></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| " -foo" - -#data -<!DOCTYPE html><html><head></head><body><pre> -foo -</pre></body></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| "foo -" - -#data -<!DOCTYPE html><html><head></head><body><pre>x</pre><span> -</span></body></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| "x" -| <span> -| " -" - -#data -<!DOCTYPE html><html><head></head><body><pre>x -y</pre></body></html> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| "x -y" - -#data -<!DOCTYPE html><html><head></head><body><pre>x<div> -y</pre></body></html> -#errors -Line: 2 Col: 7 End tag (pre) seen too early. Expected other end tag. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| "x" -| <div> -| " -y" - -#data -<!DOCTYPE html><pre>&#x0a;&#x0a;A</pre> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <pre> -| " -A" - -#data -<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML> -#errors -Line: 1 Col: 33 Unexpected start tag head in existing head. Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <meta> -| <body> - -#data -<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML> -#errors -Line: 1 Col: 33 Unexpected start tag head in existing head. Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<textarea>foo<span>bar</span><i>baz -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -Line: 1 Col: 35 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <textarea> -| "foo<span>bar</span><i>baz" - -#data -<title>foo<span>bar</em><i>baz -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -Line: 1 Col: 30 Unexpected end of file. Expected end tag (title). -#document -| <html> -| <head> -| <title> -| "foo<span>bar</em><i>baz" -| <body> - -#data -<!DOCTYPE html><textarea> -</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> - -#data -<!DOCTYPE html><textarea> -foo</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| "foo" - -#data -<!DOCTYPE html><textarea> - -foo</textarea> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <textarea> -| " -foo" - -#data -<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html> -#errors -Line: 1 Col: 60 Missing end tag (div, li). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <ul> -| <li> -| <div> -| <p> -| <li> - -#data -<!doctype html><nobr><nobr><nobr> -#errors -Line: 1 Col: 27 Unexpected start tag (nobr) implies end tag (nobr). -Line: 1 Col: 33 Unexpected start tag (nobr) implies end tag (nobr). -Line: 1 Col: 33 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <nobr> -| <nobr> -| <nobr> - -#data -<!doctype html><nobr><nobr></nobr><nobr> -#errors -Line: 1 Col: 27 Unexpected start tag (nobr) implies end tag (nobr). -Line: 1 Col: 40 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <nobr> -| <nobr> -| <nobr> - -#data -<!doctype html><html><body><p><table></table></body></html> -#errors -Not known -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <table> - -#data -<p><table></table> -#errors -Not known -#document -| <html> -| <head> -| <body> -| <p> -| <table> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests4.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests4.dat deleted file mode 100644 index 3c50632..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests4.dat +++ /dev/null @@ -1,59 +0,0 @@ -#data -direct div content -#errors -#document-fragment -div -#document -| "direct div content" - -#data -direct textarea content -#errors -#document-fragment -textarea -#document -| "direct textarea content" - -#data -textarea content with <em>pseudo</em> <foo>markup -#errors -#document-fragment -textarea -#document -| "textarea content with <em>pseudo</em> <foo>markup" - -#data -this is &#x0043;DATA inside a <style> element -#errors -#document-fragment -style -#document -| "this is &#x0043;DATA inside a <style> element" - -#data -</plaintext> -#errors -#document-fragment -plaintext -#document -| "</plaintext>" - -#data -setting html's innerHTML -#errors -Line: 1 Col: 24 Unexpected EOF in inner html mode. -#document-fragment -html -#document -| <head> -| <body> -| "setting html's innerHTML" - -#data -<title>setting head's innerHTML</title> -#errors -#document-fragment -head -#document -| <title> -| "setting head's innerHTML" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests5.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests5.dat deleted file mode 100644 index d7b5128..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests5.dat +++ /dev/null @@ -1,191 +0,0 @@ -#data -<style> <!-- </style>x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end of file. Expected end tag (style). -#document -| <html> -| <head> -| <style> -| " <!-- " -| <body> -| "x" - -#data -<style> <!-- </style> --> </style>x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| " <!-- " -| " " -| <body> -| "--> x" - -#data -<style> <!--> </style>x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| " <!--> " -| <body> -| "x" - -#data -<style> <!---> </style>x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| " <!---> " -| <body> -| "x" - -#data -<iframe> <!---> </iframe>x -#errors -Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <iframe> -| " <!---> " -| "x" - -#data -<iframe> <!--- </iframe>->x</iframe> --> </iframe>x -#errors -Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <iframe> -| " <!--- " -| "->x --> x" - -#data -<script> <!-- </script> --> </script>x -#errors -Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. -#document -| <html> -| <head> -| <script> -| " <!-- " -| " " -| <body> -| "--> x" - -#data -<title> <!-- </title> --> </title>x -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -#document -| <html> -| <head> -| <title> -| " <!-- " -| " " -| <body> -| "--> x" - -#data -<textarea> <!--- </textarea>->x</textarea> --> </textarea>x -#errors -Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <textarea> -| " <!--- " -| "->x --> x" - -#data -<style> <!</-- </style>x -#errors -Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. -#document -| <html> -| <head> -| <style> -| " <!</-- " -| <body> -| "x" - -#data -<p><xmp></xmp> -#errors -XXX: Unknown -#document -| <html> -| <head> -| <body> -| <p> -| <xmp> - -#data -<xmp> <!-- > --> </xmp> -#errors -Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <xmp> -| " <!-- > --> " - -#data -<title>&amp;</title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -#document -| <html> -| <head> -| <title> -| "&" -| <body> - -#data -<title><!--&amp;--></title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -#document -| <html> -| <head> -| <title> -| "<!--&-->" -| <body> - -#data -<title><!--</title> -#errors -Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. -Line: 1 Col: 19 Unexpected end of file. Expected end tag (title). -#document -| <html> -| <head> -| <title> -| "<!--" -| <body> - -#data -<noscript><!--</noscript>--></noscript> -#errors -Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. -#document -| <html> -| <head> -| <noscript> -| "<!--" -| <body> -| "-->" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests6.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests6.dat deleted file mode 100644 index f28ece4..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests6.dat +++ /dev/null @@ -1,663 +0,0 @@ -#data -<!doctype html></head> <head> -#errors -Line: 1 Col: 29 Unexpected start tag head. Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| " " -| <body> - -#data -<!doctype html><form><div></form><div> -#errors -33: End tag "form" seen but there were unclosed elements. -38: End of file seen and there were open elements. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <form> -| <div> -| <div> - -#data -<!doctype html><title>&amp;</title> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "&" -| <body> - -#data -<!doctype html><title><!--&amp;--></title> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "<!--&-->" -| <body> - -#data -<!doctype> -#errors -Line: 1 Col: 9 No space after literal string 'DOCTYPE'. -Line: 1 Col: 10 Unexpected > character. Expected DOCTYPE name. -Line: 1 Col: 10 Erroneous DOCTYPE. -#document -| <!DOCTYPE > -| <html> -| <head> -| <body> - -#data -<!---x -#errors -Line: 1 Col: 6 Unexpected end of file in comment. -Line: 1 Col: 6 Unexpected End of file. Expected DOCTYPE. -#document -| <!-- -x --> -| <html> -| <head> -| <body> - -#data -<body> -<div> -#errors -Line: 1 Col: 6 Unexpected start tag (body). -Line: 2 Col: 5 Expected closing tag. Unexpected end of file. -#document-fragment -div -#document -| " -" -| <div> - -#data -<frameset></frameset> -foo -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 2 Col: 3 Unexpected non-space characters in the after frameset phase. Ignored. -#document -| <html> -| <head> -| <frameset> -| " -" - -#data -<frameset></frameset> -<noframes> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 2 Col: 10 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <frameset> -| " -" -| <noframes> - -#data -<frameset></frameset> -<div> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 2 Col: 5 Unexpected start tag (div) in the after frameset phase. Ignored. -#document -| <html> -| <head> -| <frameset> -| " -" - -#data -<frameset></frameset> -</html> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -#document -| <html> -| <head> -| <frameset> -| " -" - -#data -<frameset></frameset> -</div> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 2 Col: 6 Unexpected end tag (div) in the after frameset phase. Ignored. -#document -| <html> -| <head> -| <frameset> -| " -" - -#data -<form><form> -#errors -Line: 1 Col: 6 Unexpected start tag (form). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected start tag (form). -Line: 1 Col: 12 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <form> - -#data -<button><button> -#errors -Line: 1 Col: 8 Unexpected start tag (button). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected start tag (button) implies end tag (button). -Line: 1 Col: 16 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <button> -| <button> - -#data -<table><tr><td></th> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end tag (th). Ignored. -Line: 1 Col: 20 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<table><caption><td> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end tag (td). Ignored. -Line: 1 Col: 20 Unexpected table cell start tag (td) in the table body phase. -Line: 1 Col: 20 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <caption> -| <tbody> -| <tr> -| <td> - -#data -<table><caption><div> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 21 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <caption> -| <div> - -#data -</caption><div> -#errors -Line: 1 Col: 10 Unexpected end tag (caption). Ignored. -Line: 1 Col: 15 Expected closing tag. Unexpected end of file. -#document-fragment -caption -#document -| <div> - -#data -<table><caption><div></caption> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 31 Unexpected end tag (caption). Missing end tag (div). -Line: 1 Col: 31 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <table> -| <caption> -| <div> - -#data -<table><caption></table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 24 Unexpected end table tag in caption. Generates implied end caption. -#document -| <html> -| <head> -| <body> -| <table> -| <caption> - -#data -</table><div> -#errors -Line: 1 Col: 8 Unexpected end table tag in caption. Generates implied end caption. -Line: 1 Col: 8 Unexpected end tag (caption). Ignored. -Line: 1 Col: 13 Expected closing tag. Unexpected end of file. -#document-fragment -caption -#document -| <div> - -#data -<table><caption></body></col></colgroup></html></tbody></td></tfoot></th></thead></tr> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 23 Unexpected end tag (body). Ignored. -Line: 1 Col: 29 Unexpected end tag (col). Ignored. -Line: 1 Col: 40 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 47 Unexpected end tag (html). Ignored. -Line: 1 Col: 55 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 60 Unexpected end tag (td). Ignored. -Line: 1 Col: 68 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 73 Unexpected end tag (th). Ignored. -Line: 1 Col: 81 Unexpected end tag (thead). Ignored. -Line: 1 Col: 86 Unexpected end tag (tr). Ignored. -Line: 1 Col: 86 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <caption> - -#data -<table><caption><div></div> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 27 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <caption> -| <div> - -#data -<table><tr><td></body></caption></col></colgroup></html> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end tag (body). Ignored. -Line: 1 Col: 32 Unexpected end tag (caption). Ignored. -Line: 1 Col: 38 Unexpected end tag (col). Ignored. -Line: 1 Col: 49 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 56 Unexpected end tag (html). Ignored. -Line: 1 Col: 56 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> - -#data -</table></tbody></tfoot></thead></tr><div> -#errors -Line: 1 Col: 8 Unexpected end tag (table). Ignored. -Line: 1 Col: 16 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 24 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 32 Unexpected end tag (thead). Ignored. -Line: 1 Col: 37 Unexpected end tag (tr). Ignored. -Line: 1 Col: 42 Expected closing tag. Unexpected end of file. -#document-fragment -td -#document -| <div> - -#data -<table><colgroup>foo -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 20 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| "foo" -| <table> -| <colgroup> - -#data -foo<col> -#errors -Line: 1 Col: 3 Unexpected end tag (colgroup). Ignored. -#document-fragment -colgroup -#document -| <col> - -#data -<table><colgroup></col> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 23 This element (col) has no end tag. -Line: 1 Col: 23 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <table> -| <colgroup> - -#data -<frameset><div> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 1 Col: 15 Unexpected start tag token (div) in the frameset phase. Ignored. -Line: 1 Col: 15 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <frameset> - -#data -</frameset><frame> -#errors -Line: 1 Col: 11 Unexpected end tag token (frameset) in the frameset phase (innerHTML). -#document-fragment -frameset -#document -| <frame> - -#data -<frameset></div> -#errors -Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected end tag token (div) in the frameset phase. Ignored. -Line: 1 Col: 16 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <frameset> - -#data -</body><div> -#errors -Line: 1 Col: 7 Unexpected end tag (body). Ignored. -Line: 1 Col: 12 Expected closing tag. Unexpected end of file. -#document-fragment -body -#document -| <div> - -#data -<table><tr><div> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode. -Line: 1 Col: 16 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <div> -| <table> -| <tbody> -| <tr> - -#data -</tr><td> -#errors -Line: 1 Col: 5 Unexpected end tag (tr). Ignored. -#document-fragment -tr -#document -| <td> - -#data -</tbody></tfoot></thead><td> -#errors -Line: 1 Col: 8 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 16 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 24 Unexpected end tag (thead). Ignored. -#document-fragment -tr -#document -| <td> - -#data -<table><tr><div><td> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 16 Unexpected start tag (div) in table context caused voodoo mode. -Line: 1 Col: 20 Unexpected implied end tag (div) in the table row phase. -Line: 1 Col: 20 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| <table> -| <tbody> -| <tr> -| <td> - -#data -<caption><col><colgroup><tbody><tfoot><thead><tr> -#errors -Line: 1 Col: 9 Unexpected start tag (caption). -Line: 1 Col: 14 Unexpected start tag (col). -Line: 1 Col: 24 Unexpected start tag (colgroup). -Line: 1 Col: 31 Unexpected start tag (tbody). -Line: 1 Col: 38 Unexpected start tag (tfoot). -Line: 1 Col: 45 Unexpected start tag (thead). -Line: 1 Col: 49 Unexpected end of file. Expected table content. -#document-fragment -tbody -#document -| <tr> - -#data -<table><tbody></thead> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 22 Unexpected end tag (thead) in the table body phase. Ignored. -Line: 1 Col: 22 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> - -#data -</table><tr> -#errors -Line: 1 Col: 8 Unexpected end tag (table). Ignored. -Line: 1 Col: 12 Unexpected end of file. Expected table content. -#document-fragment -tbody -#document -| <tr> - -#data -<table><tbody></body></caption></col></colgroup></html></td></th></tr> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 21 Unexpected end tag (body) in the table body phase. Ignored. -Line: 1 Col: 31 Unexpected end tag (caption) in the table body phase. Ignored. -Line: 1 Col: 37 Unexpected end tag (col) in the table body phase. Ignored. -Line: 1 Col: 48 Unexpected end tag (colgroup) in the table body phase. Ignored. -Line: 1 Col: 55 Unexpected end tag (html) in the table body phase. Ignored. -Line: 1 Col: 60 Unexpected end tag (td) in the table body phase. Ignored. -Line: 1 Col: 65 Unexpected end tag (th) in the table body phase. Ignored. -Line: 1 Col: 70 Unexpected end tag (tr) in the table body phase. Ignored. -Line: 1 Col: 70 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> - -#data -<table><tbody></div> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 20 Unexpected end tag (div) in table context caused voodoo mode. -Line: 1 Col: 20 End tag (div) seen too early. Expected other end tag. -Line: 1 Col: 20 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> - -#data -<table><table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected start tag (table) implies end tag (table). -Line: 1 Col: 14 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <table> -| <table> - -#data -<table></body></caption></col></colgroup></html></tbody></td></tfoot></th></thead></tr> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 14 Unexpected end tag (body). Ignored. -Line: 1 Col: 24 Unexpected end tag (caption). Ignored. -Line: 1 Col: 30 Unexpected end tag (col). Ignored. -Line: 1 Col: 41 Unexpected end tag (colgroup). Ignored. -Line: 1 Col: 48 Unexpected end tag (html). Ignored. -Line: 1 Col: 56 Unexpected end tag (tbody). Ignored. -Line: 1 Col: 61 Unexpected end tag (td). Ignored. -Line: 1 Col: 69 Unexpected end tag (tfoot). Ignored. -Line: 1 Col: 74 Unexpected end tag (th). Ignored. -Line: 1 Col: 82 Unexpected end tag (thead). Ignored. -Line: 1 Col: 87 Unexpected end tag (tr). Ignored. -Line: 1 Col: 87 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <table> - -#data -</table><tr> -#errors -Line: 1 Col: 8 Unexpected end tag (table). Ignored. -Line: 1 Col: 12 Unexpected end of file. Expected table content. -#document-fragment -table -#document -| <tbody> -| <tr> - -#data -<body></body></html> -#errors -Line: 1 Col: 20 Unexpected html end tag in inner html mode. -Line: 1 Col: 20 Unexpected EOF in inner html mode. -#document-fragment -html -#document -| <head> -| <body> - -#data -<html><frameset></frameset></html> -#errors -Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. -#document -| <html> -| <head> -| <frameset> -| " " - -#data -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"><html></html> -#errors -Line: 1 Col: 50 Erroneous DOCTYPE. -Line: 1 Col: 63 Unexpected end tag (html) after the (implied) root element. -#document -| <!DOCTYPE html "-//W3C//DTD HTML 4.01//EN" ""> -| <html> -| <head> -| <body> - -#data -<param><frameset></frameset> -#errors -Line: 1 Col: 7 Unexpected start tag (param). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected start tag (frameset). -#document -| <html> -| <head> -| <frameset> - -#data -<source><frameset></frameset> -#errors -Line: 1 Col: 7 Unexpected start tag (source). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected start tag (frameset). -#document -| <html> -| <head> -| <frameset> - -#data -<track><frameset></frameset> -#errors -Line: 1 Col: 7 Unexpected start tag (track). Expected DOCTYPE. -Line: 1 Col: 17 Unexpected start tag (frameset). -#document -| <html> -| <head> -| <frameset> - -#data -</html><frameset></frameset> -#errors -7: End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -17: Stray “frameset” start tag. -17: “frameset” start tag seen. -#document -| <html> -| <head> -| <frameset> - -#data -</body><frameset></frameset> -#errors -7: End tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. -17: Stray “frameset” start tag. -17: “frameset” start tag seen. -#document -| <html> -| <head> -| <frameset> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests7.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests7.dat deleted file mode 100644 index f5193c6..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests7.dat +++ /dev/null @@ -1,390 +0,0 @@ -#data -<!doctype html><body><title>X</title> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <title> -| "X" - -#data -<!doctype html><table><title>X</title></table> -#errors -Line: 1 Col: 29 Unexpected start tag (title) in table context caused voodoo mode. -Line: 1 Col: 38 Unexpected end tag (title) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <title> -| "X" -| <table> - -#data -<!doctype html><head></head><title>X</title> -#errors -Line: 1 Col: 35 Unexpected start tag (title) that can be in head. Moved. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "X" -| <body> - -#data -<!doctype html></head><title>X</title> -#errors -Line: 1 Col: 29 Unexpected start tag (title) that can be in head. Moved. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <title> -| "X" -| <body> - -#data -<!doctype html><table><meta></table> -#errors -Line: 1 Col: 28 Unexpected start tag (meta) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <meta> -| <table> - -#data -<!doctype html><table>X<tr><td><table> <meta></table></table> -#errors -Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 45 Unexpected start tag (meta) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" -| <table> -| <tbody> -| <tr> -| <td> -| <meta> -| <table> -| " " - -#data -<!doctype html><html> <head> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!doctype html> <head> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!doctype html><table><style> <tr>x </style> </table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <style> -| " <tr>x " -| " " - -#data -<!doctype html><table><TBODY><script> <tr>x </script> </table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <script> -| " <tr>x " -| " " - -#data -<!doctype html><p><applet><p>X</p></applet> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <p> -| <applet> -| <p> -| "X" - -#data -<!doctype html><listing> -X</listing> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <listing> -| "X" - -#data -<!doctype html><select><input>X -#errors -Line: 1 Col: 30 Unexpected input start tag in the select phase. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <input> -| "X" - -#data -<!doctype html><select><select>X -#errors -Line: 1 Col: 31 Unexpected select start tag in the select phase treated as select end tag. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| "X" - -#data -<!doctype html><table><input type=hidDEN></table> -#errors -Line: 1 Col: 41 Unexpected input with type hidden in table context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <input> -| type="hidDEN" - -#data -<!doctype html><table>X<input type=hidDEN></table> -#errors -Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| "X" -| <table> -| <input> -| type="hidDEN" - -#data -<!doctype html><table> <input type=hidDEN></table> -#errors -Line: 1 Col: 43 Unexpected input with type hidden in table context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| " " -| <input> -| type="hidDEN" - -#data -<!doctype html><table> <input type='hidDEN'></table> -#errors -Line: 1 Col: 45 Unexpected input with type hidden in table context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| " " -| <input> -| type="hidDEN" - -#data -<!doctype html><table><input type=" hidden"><input type=hidDEN></table> -#errors -Line: 1 Col: 44 Unexpected start tag (input) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <input> -| type=" hidden" -| <table> -| <input> -| type="hidDEN" - -#data -<!doctype html><table><select>X<tr> -#errors -Line: 1 Col: 30 Unexpected start tag (select) in table context caused voodoo mode. -Line: 1 Col: 35 Unexpected table element start tag (trs) in the select in table phase. -Line: 1 Col: 35 Unexpected end of file. Expected table content. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| "X" -| <table> -| <tbody> -| <tr> - -#data -<!doctype html><select>X</select> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| "X" - -#data -<!DOCTYPE hTmL><html></html> -#errors -Line: 1 Col: 28 Unexpected end tag (html) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<!DOCTYPE HTML><html></html> -#errors -Line: 1 Col: 28 Unexpected end tag (html) after the (implied) root element. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> - -#data -<body>X</body></body> -#errors -Line: 1 Col: 21 Unexpected end tag token (body) in the after body phase. -Line: 1 Col: 21 Unexpected EOF in inner html mode. -#document-fragment -html -#document -| <head> -| <body> -| "X" - -#data -<div><p>a</x> b -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 13 Unexpected end tag (x). Ignored. -Line: 1 Col: 15 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| <p> -| "a b" - -#data -<table><tr><td><code></code> </table> -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <code> -| " " - -#data -<table><b><tr><td>aaa</td></tr>bbb</table>ccc -#errors -XXX: Fix me -#document -| <html> -| <head> -| <body> -| <b> -| <b> -| "bbb" -| <table> -| <tbody> -| <tr> -| <td> -| "aaa" -| <b> -| "ccc" - -#data -A<table><tr> B</tr> B</table> -#errors -XXX: Fix me -#document -| <html> -| <head> -| <body> -| "A B B" -| <table> -| <tbody> -| <tr> - -#data -A<table><tr> B</tr> </em>C</table> -#errors -XXX: Fix me -#document -| <html> -| <head> -| <body> -| "A BC" -| <table> -| <tbody> -| <tr> -| " " - -#data -<select><keygen> -#errors -Not known -#document -| <html> -| <head> -| <body> -| <select> -| <keygen> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests8.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests8.dat deleted file mode 100644 index 90e6c91..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests8.dat +++ /dev/null @@ -1,148 +0,0 @@ -#data -<div> -<div></div> -</span>x -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 3 Col: 7 Unexpected end tag (span). Ignored. -Line: 3 Col: 8 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| " -" -| <div> -| " -x" - -#data -<div>x<div></div> -</span>x -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 2 Col: 7 Unexpected end tag (span). Ignored. -Line: 2 Col: 8 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| "x" -| <div> -| " -x" - -#data -<div>x<div></div>x</span>x -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 25 Unexpected end tag (span). Ignored. -Line: 1 Col: 26 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| "x" -| <div> -| "xx" - -#data -<div>x<div></div>y</span>z -#errors -Line: 1 Col: 5 Unexpected start tag (div). Expected DOCTYPE. -Line: 1 Col: 25 Unexpected end tag (span). Ignored. -Line: 1 Col: 26 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <div> -| "x" -| <div> -| "yz" - -#data -<table><div>x<div></div>x</span>x -#errors -Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. -Line: 1 Col: 12 Unexpected start tag (div) in table context caused voodoo mode. -Line: 1 Col: 18 Unexpected start tag (div) in table context caused voodoo mode. -Line: 1 Col: 24 Unexpected end tag (div) in table context caused voodoo mode. -Line: 1 Col: 32 Unexpected end tag (span) in table context caused voodoo mode. -Line: 1 Col: 32 Unexpected end tag (span). Ignored. -Line: 1 Col: 33 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| <div> -| "x" -| <div> -| "xx" -| <table> - -#data -x<table>x -#errors -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -Line: 1 Col: 9 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 9 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| "xx" -| <table> - -#data -x<table><table>x -#errors -Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. -Line: 1 Col: 15 Unexpected start tag (table) implies end tag (table). -Line: 1 Col: 16 Unexpected non-space characters in table context caused voodoo mode. -Line: 1 Col: 16 Unexpected end of file. Expected table content. -#document -| <html> -| <head> -| <body> -| "x" -| <table> -| "x" -| <table> - -#data -<b>a<div></div><div></b>y -#errors -Line: 1 Col: 3 Unexpected start tag (b). Expected DOCTYPE. -Line: 1 Col: 24 End tag (b) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 25 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <b> -| "a" -| <div> -| <div> -| <b> -| "y" - -#data -<a><div><p></a> -#errors -Line: 1 Col: 3 Unexpected start tag (a). Expected DOCTYPE. -Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 15 End tag (a) violates step 1, paragraph 3 of the adoption agency algorithm. -Line: 1 Col: 15 Expected closing tag. Unexpected end of file. -#document -| <html> -| <head> -| <body> -| <a> -| <div> -| <a> -| <p> -| <a> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests9.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests9.dat deleted file mode 100644 index 554e27a..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests9.dat +++ /dev/null @@ -1,457 +0,0 @@ -#data -<!DOCTYPE html><math></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> - -#data -<!DOCTYPE html><body><math></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> - -#data -<!DOCTYPE html><math><mi> -#errors -25: End of file in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> - -#data -<!DOCTYPE html><math><annotation-xml><svg><u> -#errors -45: HTML start tag “u” in a foreign namespace context. -45: End of file seen and there were open elements. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math annotation-xml> -| <svg svg> -| <u> - -#data -<!DOCTYPE html><body><select><math></math></select> -#errors -Line: 1 Col: 35 Unexpected start tag token (math) in the select phase. Ignored. -Line: 1 Col: 42 Unexpected end tag (math) in the select phase. Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> - -#data -<!DOCTYPE html><body><select><option><math></math></option></select> -#errors -Line: 1 Col: 43 Unexpected start tag token (math) in the select phase. Ignored. -Line: 1 Col: 50 Unexpected end tag (math) in the select phase. Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| <option> - -#data -<!DOCTYPE html><body><table><math></math></table> -#errors -Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode. -Line: 1 Col: 41 Unexpected end tag (math) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <table> - -#data -<!DOCTYPE html><body><table><math><mi>foo</mi></math></table> -#errors -Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode. -Line: 1 Col: 46 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 53 Unexpected end tag (math) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <table> - -#data -<!DOCTYPE html><body><table><math><mi>foo</mi><mi>bar</mi></math></table> -#errors -Line: 1 Col: 34 Unexpected start tag (math) in table context caused voodoo mode. -Line: 1 Col: 46 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 58 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 65 Unexpected end tag (math) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <table> - -#data -<!DOCTYPE html><body><table><tbody><math><mi>foo</mi><mi>bar</mi></math></tbody></table> -#errors -Line: 1 Col: 41 Unexpected start tag (math) in table context caused voodoo mode. -Line: 1 Col: 53 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 65 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 72 Unexpected end tag (math) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <table> -| <tbody> - -#data -<!DOCTYPE html><body><table><tbody><tr><math><mi>foo</mi><mi>bar</mi></math></tr></tbody></table> -#errors -Line: 1 Col: 45 Unexpected start tag (math) in table context caused voodoo mode. -Line: 1 Col: 57 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 69 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 76 Unexpected end tag (math) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <table> -| <tbody> -| <tr> - -#data -<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math></td></tr></tbody></table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" - -#data -<!DOCTYPE html><body><table><tbody><tr><td><math><mi>foo</mi><mi>bar</mi></math><p>baz</td></tr></tbody></table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi></math><p>baz</caption></table> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux -#errors -Line: 1 Col: 70 HTML start tag "p" in a foreign namespace context. -Line: 1 Col: 81 Unexpected end table tag in caption. Generates implied end caption. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <p> -| "baz" -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><caption><math><mi>foo</mi><mi>bar</mi>baz</table><p>quux -#errors -Line: 1 Col: 78 Unexpected end table tag in caption. Generates implied end caption. -Line: 1 Col: 78 Unexpected end tag (caption). Missing end tag (math). -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <caption> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| "baz" -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><colgroup><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux -#errors -Line: 1 Col: 44 Unexpected start tag (math) in table context caused voodoo mode. -Line: 1 Col: 56 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 68 Unexpected end tag (mi) in table context caused voodoo mode. -Line: 1 Col: 71 HTML start tag "p" in a foreign namespace context. -Line: 1 Col: 71 Unexpected start tag (p) in table context caused voodoo mode. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <p> -| "baz" -| <table> -| <colgroup> -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux -#errors -Line: 1 Col: 50 Unexpected start tag token (math) in the select phase. Ignored. -Line: 1 Col: 54 Unexpected start tag token (mi) in the select phase. Ignored. -Line: 1 Col: 62 Unexpected end tag (mi) in the select phase. Ignored. -Line: 1 Col: 66 Unexpected start tag token (mi) in the select phase. Ignored. -Line: 1 Col: 74 Unexpected end tag (mi) in the select phase. Ignored. -Line: 1 Col: 77 Unexpected start tag token (p) in the select phase. Ignored. -Line: 1 Col: 88 Unexpected table element end tag (tables) in the select in table phase. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <select> -| "foobarbaz" -| <p> -| "quux" - -#data -<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux -#errors -Line: 1 Col: 36 Unexpected start tag (select) in table context caused voodoo mode. -Line: 1 Col: 42 Unexpected start tag token (math) in the select phase. Ignored. -Line: 1 Col: 46 Unexpected start tag token (mi) in the select phase. Ignored. -Line: 1 Col: 54 Unexpected end tag (mi) in the select phase. Ignored. -Line: 1 Col: 58 Unexpected start tag token (mi) in the select phase. Ignored. -Line: 1 Col: 66 Unexpected end tag (mi) in the select phase. Ignored. -Line: 1 Col: 69 Unexpected start tag token (p) in the select phase. Ignored. -Line: 1 Col: 80 Unexpected table element end tag (tables) in the select in table phase. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <select> -| "foobarbaz" -| <table> -| <p> -| "quux" - -#data -<!DOCTYPE html><body></body></html><math><mi>foo</mi><mi>bar</mi><p>baz -#errors -Line: 1 Col: 41 Unexpected start tag (math). -Line: 1 Col: 68 HTML start tag "p" in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><body></body><math><mi>foo</mi><mi>bar</mi><p>baz -#errors -Line: 1 Col: 34 Unexpected start tag token (math) in the after body phase. -Line: 1 Col: 61 HTML start tag "p" in a foreign namespace context. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <math math> -| <math mi> -| "foo" -| <math mi> -| "bar" -| <p> -| "baz" - -#data -<!DOCTYPE html><frameset><math><mi></mi><mi></mi><p><span> -#errors -Line: 1 Col: 31 Unexpected start tag token (math) in the frameset phase. Ignored. -Line: 1 Col: 35 Unexpected start tag token (mi) in the frameset phase. Ignored. -Line: 1 Col: 40 Unexpected end tag token (mi) in the frameset phase. Ignored. -Line: 1 Col: 44 Unexpected start tag token (mi) in the frameset phase. Ignored. -Line: 1 Col: 49 Unexpected end tag token (mi) in the frameset phase. Ignored. -Line: 1 Col: 52 Unexpected start tag token (p) in the frameset phase. Ignored. -Line: 1 Col: 58 Unexpected start tag token (span) in the frameset phase. Ignored. -Line: 1 Col: 58 Expected closing tag. Unexpected end of file. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><frameset></frameset><math><mi></mi><mi></mi><p><span> -#errors -Line: 1 Col: 42 Unexpected start tag (math) in the after frameset phase. Ignored. -Line: 1 Col: 46 Unexpected start tag (mi) in the after frameset phase. Ignored. -Line: 1 Col: 51 Unexpected end tag (mi) in the after frameset phase. Ignored. -Line: 1 Col: 55 Unexpected start tag (mi) in the after frameset phase. Ignored. -Line: 1 Col: 60 Unexpected end tag (mi) in the after frameset phase. Ignored. -Line: 1 Col: 63 Unexpected start tag (p) in the after frameset phase. Ignored. -Line: 1 Col: 69 Unexpected start tag (span) in the after frameset phase. Ignored. -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!DOCTYPE html><body xlink:href=foo><math xlink:href=foo></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| <math math> -| xlink href="foo" - -#data -<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo></mi></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| xml:lang="en" -| <math math> -| <math mi> -| xlink href="foo" -| xml lang="en" - -#data -<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo /></math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| xml:lang="en" -| <math math> -| <math mi> -| xlink href="foo" -| xml lang="en" - -#data -<!DOCTYPE html><body xlink:href=foo xml:lang=en><math><mi xml:lang=en xlink:href=foo />bar</math> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| xlink:href="foo" -| xml:lang="en" -| <math math> -| <math mi> -| xlink href="foo" -| xml lang="en" -| "bar" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat deleted file mode 100644 index 6c78661..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat +++ /dev/null @@ -1,741 +0,0 @@ -#data -<body><span> -#errors -#document-fragment -body -#document -| <span> - -#data -<span><body> -#errors -#document-fragment -body -#document -| <span> - -#data -<span><body> -#errors -#document-fragment -div -#document -| <span> - -#data -<body><span> -#errors -#document-fragment -html -#document -| <head> -| <body> -| <span> - -#data -<frameset><span> -#errors -#document-fragment -body -#document -| <span> - -#data -<span><frameset> -#errors -#document-fragment -body -#document -| <span> - -#data -<span><frameset> -#errors -#document-fragment -div -#document -| <span> - -#data -<frameset><span> -#errors -#document-fragment -html -#document -| <head> -| <frameset> - -#data -<table><tr> -#errors -#document-fragment -table -#document -| <tbody> -| <tr> - -#data -</table><tr> -#errors -#document-fragment -table -#document -| <tbody> -| <tr> - -#data -<a> -#errors -#document-fragment -table -#document -| <a> - -#data -<a> -#errors -#document-fragment -table -#document -| <a> - -#data -<a><caption>a -#errors -#document-fragment -table -#document -| <a> -| <caption> -| "a" - -#data -<a><colgroup><col> -#errors -#document-fragment -table -#document -| <a> -| <colgroup> -| <col> - -#data -<a><tbody><tr> -#errors -#document-fragment -table -#document -| <a> -| <tbody> -| <tr> - -#data -<a><tfoot><tr> -#errors -#document-fragment -table -#document -| <a> -| <tfoot> -| <tr> - -#data -<a><thead><tr> -#errors -#document-fragment -table -#document -| <a> -| <thead> -| <tr> - -#data -<a><tr> -#errors -#document-fragment -table -#document -| <a> -| <tbody> -| <tr> - -#data -<a><th> -#errors -#document-fragment -table -#document -| <a> -| <tbody> -| <tr> -| <th> - -#data -<a><td> -#errors -#document-fragment -table -#document -| <a> -| <tbody> -| <tr> -| <td> - -#data -<table></table><tbody> -#errors -#document-fragment -caption -#document -| <table> - -#data -</table><span> -#errors -#document-fragment -caption -#document -| <span> - -#data -<span></table> -#errors -#document-fragment -caption -#document -| <span> - -#data -</caption><span> -#errors -#document-fragment -caption -#document -| <span> - -#data -<span></caption><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><caption><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><col><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><colgroup><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><html><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><tbody><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><td><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><tfoot><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><thead><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><th><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span><tr><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -<span></table><span> -#errors -#document-fragment -caption -#document -| <span> -| <span> - -#data -</colgroup><col> -#errors -#document-fragment -colgroup -#document -| <col> - -#data -<a><col> -#errors -#document-fragment -colgroup -#document -| <col> - -#data -<caption><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -<col><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -<colgroup><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -<tbody><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -<tfoot><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -<thead><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -</table><a> -#errors -#document-fragment -tbody -#document -| <a> - -#data -<a><tr> -#errors -#document-fragment -tbody -#document -| <a> -| <tr> - -#data -<a><td> -#errors -#document-fragment -tbody -#document -| <a> -| <tr> -| <td> - -#data -<a><td> -#errors -#document-fragment -tbody -#document -| <a> -| <tr> -| <td> - -#data -<a><td> -#errors -#document-fragment -tbody -#document -| <a> -| <tr> -| <td> - -#data -<td><table><tbody><a><tr> -#errors -#document-fragment -tbody -#document -| <tr> -| <td> -| <a> -| <table> -| <tbody> -| <tr> - -#data -</tr><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<td><table><a><tr></tr><tr> -#errors -#document-fragment -tr -#document -| <td> -| <a> -| <table> -| <tbody> -| <tr> -| <tr> - -#data -<caption><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<col><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<colgroup><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<tbody><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<tfoot><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<thead><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<tr><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -</table><td> -#errors -#document-fragment -tr -#document -| <td> - -#data -<td><table></table><td> -#errors -#document-fragment -tr -#document -| <td> -| <table> -| <td> - -#data -<td><table></table><td> -#errors -#document-fragment -tr -#document -| <td> -| <table> -| <td> - -#data -<caption><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<col><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<colgroup><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<tbody><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<tfoot><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<th><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<thead><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<tr><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</table><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</tbody><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</td><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</tfoot><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</thead><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</th><a> -#errors -#document-fragment -td -#document -| <a> - -#data -</tr><a> -#errors -#document-fragment -td -#document -| <a> - -#data -<table><td><td> -#errors -#document-fragment -td -#document -| <table> -| <tbody> -| <tr> -| <td> -| <td> - -#data -</select><option> -#errors -#document-fragment -select -#document -| <option> - -#data -<input><option> -#errors -#document-fragment -select -#document -| <option> - -#data -<keygen><option> -#errors -#document-fragment -select -#document -| <option> - -#data -<textarea><option> -#errors -#document-fragment -select -#document -| <option> - -#data -</html><!--abc--> -#errors -#document-fragment -html -#document -| <head> -| <body> -| <!-- abc --> - -#data -</frameset><frame> -#errors -#document-fragment -frameset -#document -| <frame> - -#data -#errors -#document-fragment -html -#document -| <head> -| <body> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tricky01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tricky01.dat deleted file mode 100644 index 0841992..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/tricky01.dat +++ /dev/null @@ -1,261 +0,0 @@ -#data -<b><p>Bold </b> Not bold</p> -Also not bold. -#errors -#document -| <html> -| <head> -| <body> -| <b> -| <p> -| <b> -| "Bold " -| " Not bold" -| " -Also not bold." - -#data -<html> -<font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain -<p>I should not be red. <font color=red>Red. <i>Italic and red.</p> -<p>Italic and red. </i> Red.</font> I should not be red.</p> -<b>Bold <i>Bold and italic</b> Only Italic </i> Plain -#errors -#document -| <html> -| <head> -| <body> -| <font> -| color="red" -| <i> -| "Italic and Red" -| <i> -| <p> -| <font> -| color="red" -| "Italic and Red " -| " Just italic." -| " Italic only." -| " Plain -" -| <p> -| "I should not be red. " -| <font> -| color="red" -| "Red. " -| <i> -| "Italic and red." -| <font> -| color="red" -| <i> -| " -" -| <p> -| <font> -| color="red" -| <i> -| "Italic and red. " -| " Red." -| " I should not be red." -| " -" -| <b> -| "Bold " -| <i> -| "Bold and italic" -| <i> -| " Only Italic " -| " Plain" - -#data -<html><body> -<p><font size="7">First paragraph.</p> -<p>Second paragraph.</p></font> -<b><p><i>Bold and Italic</b> Italic</p> -#errors -#document -| <html> -| <head> -| <body> -| " -" -| <p> -| <font> -| size="7" -| "First paragraph." -| <font> -| size="7" -| " -" -| <p> -| "Second paragraph." -| " -" -| <b> -| <p> -| <b> -| <i> -| "Bold and Italic" -| <i> -| " Italic" - -#data -<html> -<dl> -<dt><b>Boo -<dd>Goo? -</dl> -</html> -#errors -#document -| <html> -| <head> -| <body> -| <dl> -| " -" -| <dt> -| <b> -| "Boo -" -| <dd> -| <b> -| "Goo? -" -| <b> -| " -" - -#data -<html><body> -<label><a><div>Hello<div>World</div></a></label> -</body></html> -#errors -#document -| <html> -| <head> -| <body> -| " -" -| <label> -| <a> -| <div> -| <a> -| "Hello" -| <div> -| "World" -| " -" - -#data -<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table> -#errors -#document -| <html> -| <head> -| <body> -| <center> -| " " -| <font> -| "a" -| <font> -| <img> -| " " -| <table> -| " " -| <tbody> -| <tr> -| <td> -| " " -| " " -| " " - -#data -<table><tr><p><a><p>You should see this text. -#errors -#document -| <html> -| <head> -| <body> -| <p> -| <a> -| <p> -| <a> -| "You should see this text." -| <table> -| <tbody> -| <tr> - -#data -<TABLE> -<TR> -<CENTER><CENTER><TD></TD></TR><TR> -<FONT> -<TABLE><tr></tr></TABLE> -</P> -<a></font><font></a> -This page contains an insanely badly-nested tag sequence. -#errors -#document -| <html> -| <head> -| <body> -| <center> -| <center> -| <font> -| " -" -| <table> -| " -" -| <tbody> -| <tr> -| " -" -| <td> -| <tr> -| " -" -| <table> -| <tbody> -| <tr> -| <font> -| " -" -| <p> -| " -" -| <a> -| <a> -| <font> -| <font> -| " -This page contains an insanely badly-nested tag sequence." - -#data -<html> -<body> -<b><nobr><div>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the -nobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre> -</body> -</html> -#errors -#document -| <html> -| <head> -| <body> -| " -" -| <b> -| <nobr> -| <div> -| <b> -| <nobr> -| "This text is in a div inside a nobr" -| "More text that should not be in the nobr, i.e., the -nobr should have closed the div inside it implicitly. " -| <pre> -| "A pre tag outside everything else." -| " - -" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit01.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit01.dat deleted file mode 100644 index 9d425e9..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit01.dat +++ /dev/null @@ -1,610 +0,0 @@ -#data -Test -#errors -Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. -#document -| <html> -| <head> -| <body> -| "Test" - -#data -<div></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> - -#data -<div>Test</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "Test" - -#data -<di -#errors -#document -| <html> -| <head> -| <body> - -#data -<div>Hello</div> -<script> -console.log("PASS"); -</script> -<div>Bye</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "Hello" -| " -" -| <script> -| " -console.log("PASS"); -" -| " -" -| <div> -| "Bye" - -#data -<div foo="bar">Hello</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| foo="bar" -| "Hello" - -#data -<div>Hello</div> -<script> -console.log("FOO<span>BAR</span>BAZ"); -</script> -<div>Bye</div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| "Hello" -| " -" -| <script> -| " -console.log("FOO<span>BAR</span>BAZ"); -" -| " -" -| <div> -| "Bye" - -#data -<foo bar="baz"></foo><potato quack="duck"></potato> -#errors -#document -| <html> -| <head> -| <body> -| <foo> -| bar="baz" -| <potato> -| quack="duck" - -#data -<foo bar="baz"><potato quack="duck"></potato></foo> -#errors -#document -| <html> -| <head> -| <body> -| <foo> -| bar="baz" -| <potato> -| quack="duck" - -#data -<foo></foo bar="baz"><potato></potato quack="duck"> -#errors -#document -| <html> -| <head> -| <body> -| <foo> -| <potato> - -#data -</ tttt> -#errors -#document -| <!-- tttt --> -| <html> -| <head> -| <body> - -#data -<div FOO ><img><img></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| foo="" -| <img> -| <img> - -#data -<p>Test</p<p>Test2</p> -#errors -#document -| <html> -| <head> -| <body> -| <p> -| "TestTest2" - -#data -<rdar://problem/6869687> -#errors -#document -| <html> -| <head> -| <body> -| <rdar:> -| 6869687="" -| problem="" - -#data -<A>test< /A> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| "test< /A>" - -#data -&lt; -#errors -#document -| <html> -| <head> -| <body> -| "<" - -#data -<body foo='bar'><body foo='baz' yo='mama'> -#errors -#document -| <html> -| <head> -| <body> -| foo="bar" -| yo="mama" - -#data -<body></br foo="bar"></body> -#errors -#document -| <html> -| <head> -| <body> -| <br> - -#data -<bdy><br foo="bar"></body> -#errors -#document -| <html> -| <head> -| <body> -| <bdy> -| <br> -| foo="bar" - -#data -<body></body></br foo="bar"> -#errors -#document -| <html> -| <head> -| <body> -| <br> - -#data -<bdy></body><br foo="bar"> -#errors -#document -| <html> -| <head> -| <body> -| <bdy> -| <br> -| foo="bar" - -#data -<html><body></body></html><!-- Hi there --> -#errors -#document -| <html> -| <head> -| <body> -| <!-- Hi there --> - -#data -<html><body></body></html>x<!-- Hi there --> -#errors -#document -| <html> -| <head> -| <body> -| "x" -| <!-- Hi there --> - -#data -<html><body></body></html>x<!-- Hi there --></html><!-- Again --> -#errors -#document -| <html> -| <head> -| <body> -| "x" -| <!-- Hi there --> -| <!-- Again --> - -#data -<html><body></body></html>x<!-- Hi there --></body></html><!-- Again --> -#errors -#document -| <html> -| <head> -| <body> -| "x" -| <!-- Hi there --> -| <!-- Again --> - -#data -<html><body><ruby><div><rp>xx</rp></div></ruby></body></html> -#errors -#document -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <rp> -| "xx" - -#data -<html><body><ruby><div><rt>xx</rt></div></ruby></body></html> -#errors -#document -| <html> -| <head> -| <body> -| <ruby> -| <div> -| <rt> -| "xx" - -#data -<html><frameset><!--1--><noframes>A</noframes><!--2--></frameset><!--3--><noframes>B</noframes><!--4--></html><!--5--><noframes>C</noframes><!--6--> -#errors -#document -| <html> -| <head> -| <frameset> -| <!-- 1 --> -| <noframes> -| "A" -| <!-- 2 --> -| <!-- 3 --> -| <noframes> -| "B" -| <!-- 4 --> -| <noframes> -| "C" -| <!-- 5 --> -| <!-- 6 --> - -#data -<select><option>A<select><option>B<select><option>C<select><option>D<select><option>E<select><option>F<select><option>G<select> -#errors -#document -| <html> -| <head> -| <body> -| <select> -| <option> -| "A" -| <option> -| "B" -| <select> -| <option> -| "C" -| <option> -| "D" -| <select> -| <option> -| "E" -| <option> -| "F" -| <select> -| <option> -| "G" - -#data -<dd><dd><dt><dt><dd><li><li> -#errors -#document -| <html> -| <head> -| <body> -| <dd> -| <dd> -| <dt> -| <dt> -| <dd> -| <li> -| <li> - -#data -<div><b></div><div><nobr>a<nobr> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <b> -| <div> -| <b> -| <nobr> -| "a" -| <nobr> - -#data -<head></head> -<body></body> -#errors -#document -| <html> -| <head> -| " -" -| <body> - -#data -<head></head> <style></style>ddd -#errors -#document -| <html> -| <head> -| <style> -| " " -| <body> -| "ddd" - -#data -<kbd><table></kbd><col><select><tr> -#errors -#document -| <html> -| <head> -| <body> -| <kbd> -| <select> -| <table> -| <colgroup> -| <col> -| <tbody> -| <tr> - -#data -<kbd><table></kbd><col><select><tr></table><div> -#errors -#document -| <html> -| <head> -| <body> -| <kbd> -| <select> -| <table> -| <colgroup> -| <col> -| <tbody> -| <tr> -| <div> - -#data -<a><li><style></style><title></title></a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <li> -| <a> -| <style> -| <title> - -#data -<font></p><p><meta><title></title></font> -#errors -#document -| <html> -| <head> -| <body> -| <font> -| <p> -| <p> -| <font> -| <meta> -| <title> - -#data -<a><center><title></title><a> -#errors -#document -| <html> -| <head> -| <body> -| <a> -| <center> -| <a> -| <title> -| <a> - -#data -<svg><title><div> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <svg title> -| <div> - -#data -<svg><title><rect><div> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <svg title> -| <rect> -| <div> - -#data -<svg><title><svg><div> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <svg title> -| <svg svg> -| <div> - -#data -<img <="" FAIL> -#errors -#document -| <html> -| <head> -| <body> -| <img> -| <="" -| fail="" - -#data -<ul><li><div id='foo'/>A</li><li>B<div>C</div></li></ul> -#errors -#document -| <html> -| <head> -| <body> -| <ul> -| <li> -| <div> -| id="foo" -| "A" -| <li> -| "B" -| <div> -| "C" - -#data -<svg><em><desc></em> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <em> -| <desc> - -#data -<table><tr><td><svg><desc><td></desc><circle> -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| <svg svg> -| <svg desc> -| <td> -| <circle> - -#data -<svg><tfoot></mi><td> -#errors -#document -| <html> -| <head> -| <body> -| <svg svg> -| <svg tfoot> -| <svg td> - -#data -<math><mrow><mrow><mn>1</mn></mrow><mi>a</mi></mrow></math> -#errors -#document -| <html> -| <head> -| <body> -| <math math> -| <math mrow> -| <math mrow> -| <math mn> -| "1" -| <math mi> -| "a" - -#data -<!doctype html><input type="hidden"><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <frameset> - -#data -<!doctype html><input type="button"><frameset> -#errors -#document -| <!DOCTYPE html> -| <html> -| <head> -| <body> -| <input> -| type="button" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit02.dat b/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit02.dat deleted file mode 100644 index 905783d..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/testdata/webkit/webkit02.dat +++ /dev/null @@ -1,159 +0,0 @@ -#data -<foo bar=qux/> -#errors -#document -| <html> -| <head> -| <body> -| <foo> -| bar="qux/" - -#data -<p id="status"><noscript><strong>A</strong></noscript><span>B</span></p> -#errors -#document -| <html> -| <head> -| <body> -| <p> -| id="status" -| <noscript> -| "<strong>A</strong>" -| <span> -| "B" - -#data -<div><sarcasm><div></div></sarcasm></div> -#errors -#document -| <html> -| <head> -| <body> -| <div> -| <sarcasm> -| <div> - -#data -<html><body><img src="" border="0" alt="><div>A</div></body></html> -#errors -#document -| <html> -| <head> -| <body> - -#data -<table><td></tbody>A -#errors -#document -| <html> -| <head> -| <body> -| "A" -| <table> -| <tbody> -| <tr> -| <td> - -#data -<table><td></thead>A -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "A" - -#data -<table><td></tfoot>A -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <tbody> -| <tr> -| <td> -| "A" - -#data -<table><thead><td></tbody>A -#errors -#document -| <html> -| <head> -| <body> -| <table> -| <thead> -| <tr> -| <td> -| "A" - -#data -<legend>test</legend> -#errors -#document -| <html> -| <head> -| <body> -| <legend> -| "test" - -#data -<table><input> -#errors -#document -| <html> -| <head> -| <body> -| <input> -| <table> - -#data -<b><em><dcell><postfield><postfield><postfield><postfield><missing_glyph><missing_glyph><missing_glyph><missing_glyph><hkern><aside></b></em> -#errors -#document-fragment -div -#document -| <b> -| <em> -| <dcell> -| <postfield> -| <postfield> -| <postfield> -| <postfield> -| <missing_glyph> -| <missing_glyph> -| <missing_glyph> -| <missing_glyph> -| <hkern> -| <aside> -| <em> -| <b> - -#data -<isindex action="x"> -#errors -#document-fragment -table -#document -| <form> -| action="x" -| <hr> -| <label> -| "This is a searchable index. Enter search keywords: " -| <input> -| name="isindex" -| <hr> - -#data -<option><XH<optgroup></optgroup> -#errors -#document-fragment -select -#document -| <option> diff --git a/Godeps/_workspace/src/golang.org/x/net/html/token_test.go b/Godeps/_workspace/src/golang.org/x/net/html/token_test.go deleted file mode 100644 index 20221c3..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/token_test.go +++ /dev/null @@ -1,748 +0,0 @@ -// Copyright 2010 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package html - -import ( - "bytes" - "io" - "io/ioutil" - "reflect" - "runtime" - "strings" - "testing" -) - -type tokenTest struct { - // A short description of the test case. - desc string - // The HTML to parse. - html string - // The string representations of the expected tokens, joined by '$'. - golden string -} - -var tokenTests = []tokenTest{ - { - "empty", - "", - "", - }, - // A single text node. The tokenizer should not break text nodes on whitespace, - // nor should it normalize whitespace within a text node. - { - "text", - "foo bar", - "foo bar", - }, - // An entity. - { - "entity", - "one &lt; two", - "one &lt; two", - }, - // A start, self-closing and end tag. The tokenizer does not care if the start - // and end tokens don't match; that is the job of the parser. - { - "tags", - "<a>b<c/>d</e>", - "<a>$b$<c/>$d$</e>", - }, - // Angle brackets that aren't a tag. - { - "not a tag #0", - "<", - "&lt;", - }, - { - "not a tag #1", - "</", - "&lt;/", - }, - { - "not a tag #2", - "</>", - "<!---->", - }, - { - "not a tag #3", - "a</>b", - "a$<!---->$b", - }, - { - "not a tag #4", - "</ >", - "<!-- -->", - }, - { - "not a tag #5", - "</.", - "<!--.-->", - }, - { - "not a tag #6", - "</.>", - "<!--.-->", - }, - { - "not a tag #7", - "a < b", - "a &lt; b", - }, - { - "not a tag #8", - "<.>", - "&lt;.&gt;", - }, - { - "not a tag #9", - "a<<<b>>>c", - "a&lt;&lt;$<b>$&gt;&gt;c", - }, - { - "not a tag #10", - "if x<0 and y < 0 then x*y>0", - "if x&lt;0 and y &lt; 0 then x*y&gt;0", - }, - { - "not a tag #11", - "<<p>", - "&lt;$<p>", - }, - // EOF in a tag name. - { - "tag name eof #0", - "<a", - "", - }, - { - "tag name eof #1", - "<a ", - "", - }, - { - "tag name eof #2", - "a<b", - "a", - }, - { - "tag name eof #3", - "<a><b", - "<a>", - }, - { - "tag name eof #4", - `<a x`, - ``, - }, - // Some malformed tags that are missing a '>'. - { - "malformed tag #0", - `<p</p>`, - `<p< p="">`, - }, - { - "malformed tag #1", - `<p </p>`, - `<p <="" p="">`, - }, - { - "malformed tag #2", - `<p id`, - ``, - }, - { - "malformed tag #3", - `<p id=`, - ``, - }, - { - "malformed tag #4", - `<p id=>`, - `<p id="">`, - }, - { - "malformed tag #5", - `<p id=0`, - ``, - }, - { - "malformed tag #6", - `<p id=0</p>`, - `<p id="0&lt;/p">`, - }, - { - "malformed tag #7", - `<p id="0</p>`, - ``, - }, - { - "malformed tag #8", - `<p id="0"</p>`, - `<p id="0" <="" p="">`, - }, - { - "malformed tag #9", - `<p></p id`, - `<p>`, - }, - // Raw text and RCDATA. - { - "basic raw text", - "<script><a></b></script>", - "<script>$&lt;a&gt;&lt;/b&gt;$</script>", - }, - { - "unfinished script end tag", - "<SCRIPT>a</SCR", - "<script>$a&lt;/SCR", - }, - { - "broken script end tag", - "<SCRIPT>a</SCR ipt>", - "<script>$a&lt;/SCR ipt&gt;", - }, - { - "EOF in script end tag", - "<SCRIPT>a</SCRipt", - "<script>$a&lt;/SCRipt", - }, - { - "scriptx end tag", - "<SCRIPT>a</SCRiptx", - "<script>$a&lt;/SCRiptx", - }, - { - "' ' completes script end tag", - "<SCRIPT>a</SCRipt ", - "<script>$a", - }, - { - "'>' completes script end tag", - "<SCRIPT>a</SCRipt>", - "<script>$a$</script>", - }, - { - "self-closing script end tag", - "<SCRIPT>a</SCRipt/>", - "<script>$a$</script>", - }, - { - "nested script tag", - "<SCRIPT>a</SCRipt<script>", - "<script>$a&lt;/SCRipt&lt;script&gt;", - }, - { - "script end tag after unfinished", - "<SCRIPT>a</SCRipt</script>", - "<script>$a&lt;/SCRipt$</script>", - }, - { - "script/style mismatched tags", - "<script>a</style>", - "<script>$a&lt;/style&gt;", - }, - { - "style element with entity", - "<style>&apos;", - "<style>$&amp;apos;", - }, - { - "textarea with tag", - "<textarea><div></textarea>", - "<textarea>$&lt;div&gt;$</textarea>", - }, - { - "title with tag and entity", - "<title><b>K&amp;R C</b></title>", - "<title>$&lt;b&gt;K&amp;R C&lt;/b&gt;$</title>", - }, - // DOCTYPE tests. - { - "Proper DOCTYPE", - "<!DOCTYPE html>", - "<!DOCTYPE html>", - }, - { - "DOCTYPE with no space", - "<!doctypehtml>", - "<!DOCTYPE html>", - }, - { - "DOCTYPE with two spaces", - "<!doctype html>", - "<!DOCTYPE html>", - }, - { - "looks like DOCTYPE but isn't", - "<!DOCUMENT html>", - "<!--DOCUMENT html-->", - }, - { - "DOCTYPE at EOF", - "<!DOCtype", - "<!DOCTYPE >", - }, - // XML processing instructions. - { - "XML processing instruction", - "<?xml?>", - "<!--?xml?-->", - }, - // Comments. - { - "comment0", - "abc<b><!-- skipme --></b>def", - "abc$<b>$<!-- skipme -->$</b>$def", - }, - { - "comment1", - "a<!-->z", - "a$<!---->$z", - }, - { - "comment2", - "a<!--->z", - "a$<!---->$z", - }, - { - "comment3", - "a<!--x>-->z", - "a$<!--x>-->$z", - }, - { - "comment4", - "a<!--x->-->z", - "a$<!--x->-->$z", - }, - { - "comment5", - "a<!>z", - "a$<!---->$z", - }, - { - "comment6", - "a<!->z", - "a$<!----->$z", - }, - { - "comment7", - "a<!---<>z", - "a$<!---<>z-->", - }, - { - "comment8", - "a<!--z", - "a$<!--z-->", - }, - { - "comment9", - "a<!--z-", - "a$<!--z-->", - }, - { - "comment10", - "a<!--z--", - "a$<!--z-->", - }, - { - "comment11", - "a<!--z---", - "a$<!--z--->", - }, - { - "comment12", - "a<!--z----", - "a$<!--z---->", - }, - { - "comment13", - "a<!--x--!>z", - "a$<!--x-->$z", - }, - // An attribute with a backslash. - { - "backslash", - `<p id="a\"b">`, - `<p id="a\" b"="">`, - }, - // Entities, tag name and attribute key lower-casing, and whitespace - // normalization within a tag. - { - "tricky", - "<p \t\n iD=\"a&quot;B\" foo=\"bar\"><EM>te&lt;&amp;;xt</em></p>", - `<p id="a&#34;B" foo="bar">$<em>$te&lt;&amp;;xt$</em>$</p>`, - }, - // A nonexistent entity. Tokenizing and converting back to a string should - // escape the "&" to become "&amp;". - { - "noSuchEntity", - `<a b="c&noSuchEntity;d">&lt;&alsoDoesntExist;&`, - `<a b="c&amp;noSuchEntity;d">$&lt;&amp;alsoDoesntExist;&amp;`, - }, - { - "entity without semicolon", - `&notit;&notin;<a b="q=z&amp=5&notice=hello&not;=world">`, - `¬it;∉$<a b="q=z&amp;amp=5&amp;notice=hello¬=world">`, - }, - { - "entity with digits", - "&frac12;", - "½", - }, - // Attribute tests: - // http://dev.w3.org/html5/pf-summary/Overview.html#attributes - { - "Empty attribute", - `<input disabled FOO>`, - `<input disabled="" foo="">`, - }, - { - "Empty attribute, whitespace", - `<input disabled FOO >`, - `<input disabled="" foo="">`, - }, - { - "Unquoted attribute value", - `<input value=yes FOO=BAR>`, - `<input value="yes" foo="BAR">`, - }, - { - "Unquoted attribute value, spaces", - `<input value = yes FOO = BAR>`, - `<input value="yes" foo="BAR">`, - }, - { - "Unquoted attribute value, trailing space", - `<input value=yes FOO=BAR >`, - `<input value="yes" foo="BAR">`, - }, - { - "Single-quoted attribute value", - `<input value='yes' FOO='BAR'>`, - `<input value="yes" foo="BAR">`, - }, - { - "Single-quoted attribute value, trailing space", - `<input value='yes' FOO='BAR' >`, - `<input value="yes" foo="BAR">`, - }, - { - "Double-quoted attribute value", - `<input value="I'm an attribute" FOO="BAR">`, - `<input value="I&#39;m an attribute" foo="BAR">`, - }, - { - "Attribute name characters", - `<meta http-equiv="content-type">`, - `<meta http-equiv="content-type">`, - }, - { - "Mixed attributes", - `a<P V="0 1" w='2' X=3 y>z`, - `a$<p v="0 1" w="2" x="3" y="">$z`, - }, - { - "Attributes with a solitary single quote", - `<p id=can't><p id=won't>`, - `<p id="can&#39;t">$<p id="won&#39;t">`, - }, -} - -func TestTokenizer(t *testing.T) { -loop: - for _, tt := range tokenTests { - z := NewTokenizer(strings.NewReader(tt.html)) - if tt.golden != "" { - for i, s := range strings.Split(tt.golden, "$") { - if z.Next() == ErrorToken { - t.Errorf("%s token %d: want %q got error %v", tt.desc, i, s, z.Err()) - continue loop - } - actual := z.Token().String() - if s != actual { - t.Errorf("%s token %d: want %q got %q", tt.desc, i, s, actual) - continue loop - } - } - } - z.Next() - if z.Err() != io.EOF { - t.Errorf("%s: want EOF got %q", tt.desc, z.Err()) - } - } -} - -func TestMaxBuffer(t *testing.T) { - // Exceeding the maximum buffer size generates ErrBufferExceeded. - z := NewTokenizer(strings.NewReader("<" + strings.Repeat("t", 10))) - z.SetMaxBuf(5) - tt := z.Next() - if got, want := tt, ErrorToken; got != want { - t.Fatalf("token type: got: %v want: %v", got, want) - } - if got, want := z.Err(), ErrBufferExceeded; got != want { - t.Errorf("error type: got: %v want: %v", got, want) - } - if got, want := string(z.Raw()), "<tttt"; got != want { - t.Fatalf("buffered before overflow: got: %q want: %q", got, want) - } -} - -func TestMaxBufferReconstruction(t *testing.T) { - // Exceeding the maximum buffer size at any point while tokenizing permits - // reconstructing the original input. -tests: - for _, test := range tokenTests { - for maxBuf := 1; ; maxBuf++ { - r := strings.NewReader(test.html) - z := NewTokenizer(r) - z.SetMaxBuf(maxBuf) - var tokenized bytes.Buffer - for { - tt := z.Next() - tokenized.Write(z.Raw()) - if tt == ErrorToken { - if err := z.Err(); err != io.EOF && err != ErrBufferExceeded { - t.Errorf("%s: unexpected error: %v", test.desc, err) - } - break - } - } - // Anything tokenized along with untokenized input or data left in the reader. - assembled, err := ioutil.ReadAll(io.MultiReader(&tokenized, bytes.NewReader(z.Buffered()), r)) - if err != nil { - t.Errorf("%s: ReadAll: %v", test.desc, err) - continue tests - } - if got, want := string(assembled), test.html; got != want { - t.Errorf("%s: reassembled html:\n got: %q\nwant: %q", test.desc, got, want) - continue tests - } - // EOF indicates that we completed tokenization and hence found the max - // maxBuf that generates ErrBufferExceeded, so continue to the next test. - if z.Err() == io.EOF { - break - } - } // buffer sizes - } // tests -} - -func TestPassthrough(t *testing.T) { - // Accumulating the raw output for each parse event should reconstruct the - // original input. - for _, test := range tokenTests { - z := NewTokenizer(strings.NewReader(test.html)) - var parsed bytes.Buffer - for { - tt := z.Next() - parsed.Write(z.Raw()) - if tt == ErrorToken { - break - } - } - if got, want := parsed.String(), test.html; got != want { - t.Errorf("%s: parsed output:\n got: %q\nwant: %q", test.desc, got, want) - } - } -} - -func TestBufAPI(t *testing.T) { - s := "0<a>1</a>2<b>3<a>4<a>5</a>6</b>7</a>8<a/>9" - z := NewTokenizer(bytes.NewBufferString(s)) - var result bytes.Buffer - depth := 0 -loop: - for { - tt := z.Next() - switch tt { - case ErrorToken: - if z.Err() != io.EOF { - t.Error(z.Err()) - } - break loop - case TextToken: - if depth > 0 { - result.Write(z.Text()) - } - case StartTagToken, EndTagToken: - tn, _ := z.TagName() - if len(tn) == 1 && tn[0] == 'a' { - if tt == StartTagToken { - depth++ - } else { - depth-- - } - } - } - } - u := "14567" - v := string(result.Bytes()) - if u != v { - t.Errorf("TestBufAPI: want %q got %q", u, v) - } -} - -func TestConvertNewlines(t *testing.T) { - testCases := map[string]string{ - "Mac\rDOS\r\nUnix\n": "Mac\nDOS\nUnix\n", - "Unix\nMac\rDOS\r\n": "Unix\nMac\nDOS\n", - "DOS\r\nDOS\r\nDOS\r\n": "DOS\nDOS\nDOS\n", - "": "", - "\n": "\n", - "\n\r": "\n\n", - "\r": "\n", - "\r\n": "\n", - "\r\n\n": "\n\n", - "\r\n\r": "\n\n", - "\r\n\r\n": "\n\n", - "\r\r": "\n\n", - "\r\r\n": "\n\n", - "\r\r\n\n": "\n\n\n", - "\r\r\r\n": "\n\n\n", - "\r \n": "\n \n", - "xyz": "xyz", - } - for in, want := range testCases { - if got := string(convertNewlines([]byte(in))); got != want { - t.Errorf("input %q: got %q, want %q", in, got, want) - } - } -} - -func TestReaderEdgeCases(t *testing.T) { - const s = "<p>An io.Reader can return (0, nil) or (n, io.EOF).</p>" - testCases := []io.Reader{ - &zeroOneByteReader{s: s}, - &eofStringsReader{s: s}, - &stuckReader{}, - } - for i, tc := range testCases { - got := []TokenType{} - z := NewTokenizer(tc) - for { - tt := z.Next() - if tt == ErrorToken { - break - } - got = append(got, tt) - } - if err := z.Err(); err != nil && err != io.EOF { - if err != io.ErrNoProgress { - t.Errorf("i=%d: %v", i, err) - } - continue - } - want := []TokenType{ - StartTagToken, - TextToken, - EndTagToken, - } - if !reflect.DeepEqual(got, want) { - t.Errorf("i=%d: got %v, want %v", i, got, want) - continue - } - } -} - -// zeroOneByteReader is like a strings.Reader that alternates between -// returning 0 bytes and 1 byte at a time. -type zeroOneByteReader struct { - s string - n int -} - -func (r *zeroOneByteReader) Read(p []byte) (int, error) { - if len(p) == 0 { - return 0, nil - } - if len(r.s) == 0 { - return 0, io.EOF - } - r.n++ - if r.n%2 != 0 { - return 0, nil - } - p[0], r.s = r.s[0], r.s[1:] - return 1, nil -} - -// eofStringsReader is like a strings.Reader but can return an (n, err) where -// n > 0 && err != nil. -type eofStringsReader struct { - s string -} - -func (r *eofStringsReader) Read(p []byte) (int, error) { - n := copy(p, r.s) - r.s = r.s[n:] - if r.s != "" { - return n, nil - } - return n, io.EOF -} - -// stuckReader is an io.Reader that always returns no data and no error. -type stuckReader struct{} - -func (*stuckReader) Read(p []byte) (int, error) { - return 0, nil -} - -const ( - rawLevel = iota - lowLevel - highLevel -) - -func benchmarkTokenizer(b *testing.B, level int) { - buf, err := ioutil.ReadFile("testdata/go1.html") - if err != nil { - b.Fatalf("could not read testdata/go1.html: %v", err) - } - b.SetBytes(int64(len(buf))) - runtime.GC() - b.ReportAllocs() - b.ResetTimer() - for i := 0; i < b.N; i++ { - z := NewTokenizer(bytes.NewBuffer(buf)) - for { - tt := z.Next() - if tt == ErrorToken { - if err := z.Err(); err != nil && err != io.EOF { - b.Fatalf("tokenizer error: %v", err) - } - break - } - switch level { - case rawLevel: - // Calling z.Raw just returns the raw bytes of the token. It does - // not unescape &lt; to <, or lower-case tag names and attribute keys. - z.Raw() - case lowLevel: - // Caling z.Text, z.TagName and z.TagAttr returns []byte values - // whose contents may change on the next call to z.Next. - switch tt { - case TextToken, CommentToken, DoctypeToken: - z.Text() - case StartTagToken, SelfClosingTagToken: - _, more := z.TagName() - for more { - _, _, more = z.TagAttr() - } - case EndTagToken: - z.TagName() - } - case highLevel: - // Calling z.Token converts []byte values to strings whose validity - // extend beyond the next call to z.Next. - z.Token() - } - } - } -} - -func BenchmarkRawLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, rawLevel) } -func BenchmarkLowLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, lowLevel) } -func BenchmarkHighLevelTokenizer(b *testing.B) { benchmarkTokenizer(b, highLevel) } diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/decode_test.go b/Godeps/_workspace/src/gopkg.in/yaml.v2/decode_test.go deleted file mode 100644 index 9c89658..0000000 --- a/Godeps/_workspace/src/gopkg.in/yaml.v2/decode_test.go +++ /dev/null @@ -1,966 +0,0 @@ -package yaml_test - -import ( - "errors" - . "gopkg.in/check.v1" - "gopkg.in/yaml.v2" - "math" - "net" - "reflect" - "strings" - "time" -) - -var unmarshalIntTest = 123 - -var unmarshalTests = []struct { - data string - value interface{} -}{ - { - "", - &struct{}{}, - }, { - "{}", &struct{}{}, - }, { - "v: hi", - map[string]string{"v": "hi"}, - }, { - "v: hi", map[string]interface{}{"v": "hi"}, - }, { - "v: true", - map[string]string{"v": "true"}, - }, { - "v: true", - map[string]interface{}{"v": true}, - }, { - "v: 10", - map[string]interface{}{"v": 10}, - }, { - "v: 0b10", - map[string]interface{}{"v": 2}, - }, { - "v: 0xA", - map[string]interface{}{"v": 10}, - }, { - "v: 4294967296", - map[string]int64{"v": 4294967296}, - }, { - "v: 0.1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .Inf", - map[string]interface{}{"v": math.Inf(+1)}, - }, { - "v: -.Inf", - map[string]interface{}{"v": math.Inf(-1)}, - }, { - "v: -10", - map[string]interface{}{"v": -10}, - }, { - "v: -.1", - map[string]interface{}{"v": -0.1}, - }, - - // Simple values. - { - "123", - &unmarshalIntTest, - }, - - // Floats from spec - { - "canonical: 6.8523e+5", - map[string]interface{}{"canonical": 6.8523e+5}, - }, { - "expo: 685.230_15e+03", - map[string]interface{}{"expo": 685.23015e+03}, - }, { - "fixed: 685_230.15", - map[string]interface{}{"fixed": 685230.15}, - }, { - "neginf: -.inf", - map[string]interface{}{"neginf": math.Inf(-1)}, - }, { - "fixed: 685_230.15", - map[string]float64{"fixed": 685230.15}, - }, - //{"sexa: 190:20:30.15", map[string]interface{}{"sexa": 0}}, // Unsupported - //{"notanum: .NaN", map[string]interface{}{"notanum": math.NaN()}}, // Equality of NaN fails. - - // Bools from spec - { - "canonical: y", - map[string]interface{}{"canonical": true}, - }, { - "answer: NO", - map[string]interface{}{"answer": false}, - }, { - "logical: True", - map[string]interface{}{"logical": true}, - }, { - "option: on", - map[string]interface{}{"option": true}, - }, { - "option: on", - map[string]bool{"option": true}, - }, - // Ints from spec - { - "canonical: 685230", - map[string]interface{}{"canonical": 685230}, - }, { - "decimal: +685_230", - map[string]interface{}{"decimal": 685230}, - }, { - "octal: 02472256", - map[string]interface{}{"octal": 685230}, - }, { - "hexa: 0x_0A_74_AE", - map[string]interface{}{"hexa": 685230}, - }, { - "bin: 0b1010_0111_0100_1010_1110", - map[string]interface{}{"bin": 685230}, - }, { - "bin: -0b101010", - map[string]interface{}{"bin": -42}, - }, { - "decimal: +685_230", - map[string]int{"decimal": 685230}, - }, - - //{"sexa: 190:20:30", map[string]interface{}{"sexa": 0}}, // Unsupported - - // Nulls from spec - { - "empty:", - map[string]interface{}{"empty": nil}, - }, { - "canonical: ~", - map[string]interface{}{"canonical": nil}, - }, { - "english: null", - map[string]interface{}{"english": nil}, - }, { - "~: null key", - map[interface{}]string{nil: "null key"}, - }, { - "empty:", - map[string]*bool{"empty": nil}, - }, - - // Flow sequence - { - "seq: [A,B]", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq: [A,B,C,]", - map[string][]string{"seq": {"A", "B", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]string{"seq": {"A", "1", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]int{"seq": {1}}, - }, { - "seq: [A,1,C]", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - // Block sequence - { - "seq:\n - A\n - B", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq:\n - A\n - B\n - C", - map[string][]string{"seq": {"A", "B", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]string{"seq": {"A", "1", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]int{"seq": {1}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - - // Literal block scalar - { - "scalar: | # Comment\n\n literal\n\n \ttext\n\n", - map[string]string{"scalar": "\nliteral\n\n\ttext\n"}, - }, - - // Folded block scalar - { - "scalar: > # Comment\n\n folded\n line\n \n next\n line\n * one\n * two\n\n last\n line\n\n", - map[string]string{"scalar": "\nfolded line\nnext line\n * one\n * two\n\nlast line\n"}, - }, - - // Map inside interface with no type hints. - { - "a: {b: c}", - map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - }, - - // Structs and type conversions. - { - "hello: world", - &struct{ Hello string }{"world"}, - }, { - "a: {b: c}", - &struct{ A struct{ B string } }{struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A map[string]string }{map[string]string{"b": "c"}}, - }, { - "a: {b: c}", - &struct{ A *map[string]string }{&map[string]string{"b": "c"}}, - }, { - "a:", - &struct{ A map[string]string }{}, - }, { - "a: 1", - &struct{ A int }{1}, - }, { - "a: 1", - &struct{ A float64 }{1}, - }, { - "a: 1.0", - &struct{ A int }{1}, - }, { - "a: 1.0", - &struct{ A uint }{1}, - }, { - "a: [1, 2]", - &struct{ A []int }{[]int{1, 2}}, - }, { - "a: 1", - &struct{ B int }{0}, - }, { - "a: 1", - &struct { - B int "a" - }{1}, - }, { - "a: y", - &struct{ A bool }{true}, - }, - - // Some cross type conversions - { - "v: 42", - map[string]uint{"v": 42}, - }, { - "v: -42", - map[string]uint{}, - }, { - "v: 4294967296", - map[string]uint64{"v": 4294967296}, - }, { - "v: -4294967296", - map[string]uint64{}, - }, - - // int - { - "int_max: 2147483647", - map[string]int{"int_max": math.MaxInt32}, - }, - { - "int_min: -2147483648", - map[string]int{"int_min": math.MinInt32}, - }, - { - "int_overflow: 9223372036854775808", // math.MaxInt64 + 1 - map[string]int{}, - }, - - // int64 - { - "int64_max: 9223372036854775807", - map[string]int64{"int64_max": math.MaxInt64}, - }, - { - "int64_max_base2: 0b111111111111111111111111111111111111111111111111111111111111111", - map[string]int64{"int64_max_base2": math.MaxInt64}, - }, - { - "int64_min: -9223372036854775808", - map[string]int64{"int64_min": math.MinInt64}, - }, - { - "int64_neg_base2: -0b111111111111111111111111111111111111111111111111111111111111111", - map[string]int64{"int64_neg_base2": -math.MaxInt64}, - }, - { - "int64_overflow: 9223372036854775808", // math.MaxInt64 + 1 - map[string]int64{}, - }, - - // uint - { - "uint_min: 0", - map[string]uint{"uint_min": 0}, - }, - { - "uint_max: 4294967295", - map[string]uint{"uint_max": math.MaxUint32}, - }, - { - "uint_underflow: -1", - map[string]uint{}, - }, - - // uint64 - { - "uint64_min: 0", - map[string]uint{"uint64_min": 0}, - }, - { - "uint64_max: 18446744073709551615", - map[string]uint64{"uint64_max": math.MaxUint64}, - }, - { - "uint64_max_base2: 0b1111111111111111111111111111111111111111111111111111111111111111", - map[string]uint64{"uint64_max_base2": math.MaxUint64}, - }, - { - "uint64_maxint64: 9223372036854775807", - map[string]uint64{"uint64_maxint64": math.MaxInt64}, - }, - { - "uint64_underflow: -1", - map[string]uint64{}, - }, - - // float32 - { - "float32_max: 3.40282346638528859811704183484516925440e+38", - map[string]float32{"float32_max": math.MaxFloat32}, - }, - { - "float32_nonzero: 1.401298464324817070923729583289916131280e-45", - map[string]float32{"float32_nonzero": math.SmallestNonzeroFloat32}, - }, - { - "float32_maxuint64: 18446744073709551615", - map[string]float32{"float32_maxuint64": float32(math.MaxUint64)}, - }, - { - "float32_maxuint64+1: 18446744073709551616", - map[string]float32{"float32_maxuint64+1": float32(math.MaxUint64 + 1)}, - }, - - // float64 - { - "float64_max: 1.797693134862315708145274237317043567981e+308", - map[string]float64{"float64_max": math.MaxFloat64}, - }, - { - "float64_nonzero: 4.940656458412465441765687928682213723651e-324", - map[string]float64{"float64_nonzero": math.SmallestNonzeroFloat64}, - }, - { - "float64_maxuint64: 18446744073709551615", - map[string]float64{"float64_maxuint64": float64(math.MaxUint64)}, - }, - { - "float64_maxuint64+1: 18446744073709551616", - map[string]float64{"float64_maxuint64+1": float64(math.MaxUint64 + 1)}, - }, - - // Overflow cases. - { - "v: 4294967297", - map[string]int32{}, - }, { - "v: 128", - map[string]int8{}, - }, - - // Quoted values. - { - "'1': '\"2\"'", - map[interface{}]interface{}{"1": "\"2\""}, - }, { - "v:\n- A\n- 'B\n\n C'\n", - map[string][]string{"v": {"A", "B\nC"}}, - }, - - // Explicit tags. - { - "v: !!float '1.1'", - map[string]interface{}{"v": 1.1}, - }, { - "v: !!null ''", - map[string]interface{}{"v": nil}, - }, { - "%TAG !y! tag:yaml.org,2002:\n---\nv: !y!int '1'", - map[string]interface{}{"v": 1}, - }, - - // Anchors and aliases. - { - "a: &x 1\nb: &y 2\nc: *x\nd: *y\n", - &struct{ A, B, C, D int }{1, 2, 1, 2}, - }, { - "a: &a {c: 1}\nb: *a", - &struct { - A, B struct { - C int - } - }{struct{ C int }{1}, struct{ C int }{1}}, - }, { - "a: &a [1, 2]\nb: *a", - &struct{ B []int }{[]int{1, 2}}, - }, { - "b: *a\na: &a {c: 1}", - &struct { - A, B struct { - C int - } - }{struct{ C int }{1}, struct{ C int }{1}}, - }, - - // Bug #1133337 - { - "foo: ''", - map[string]*string{"foo": new(string)}, - }, { - "foo: null", - map[string]string{"foo": ""}, - }, { - "foo: null", - map[string]interface{}{"foo": nil}, - }, - - // Ignored field - { - "a: 1\nb: 2\n", - &struct { - A int - B int "-" - }{1, 0}, - }, - - // Bug #1191981 - { - "" + - "%YAML 1.1\n" + - "--- !!str\n" + - `"Generic line break (no glyph)\n\` + "\n" + - ` Generic line break (glyphed)\n\` + "\n" + - ` Line separator\u2028\` + "\n" + - ` Paragraph separator\u2029"` + "\n", - "" + - "Generic line break (no glyph)\n" + - "Generic line break (glyphed)\n" + - "Line separator\u2028Paragraph separator\u2029", - }, - - // Struct inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - }, - - // Map inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C map[string]int `yaml:",inline"` - }{1, map[string]int{"b": 2, "c": 3}}, - }, - - // bug 1243827 - { - "a: -b_c", - map[string]interface{}{"a": "-b_c"}, - }, - { - "a: +b_c", - map[string]interface{}{"a": "+b_c"}, - }, - { - "a: 50cent_of_dollar", - map[string]interface{}{"a": "50cent_of_dollar"}, - }, - - // Duration - { - "a: 3s", - map[string]time.Duration{"a": 3 * time.Second}, - }, - - // Issue #24. - { - "a: <foo>", - map[string]string{"a": "<foo>"}, - }, - - // Base 60 floats are obsolete and unsupported. - { - "a: 1:1\n", - map[string]string{"a": "1:1"}, - }, - - // Binary data. - { - "a: !!binary gIGC\n", - map[string]string{"a": "\x80\x81\x82"}, - }, { - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - map[string]string{"a": strings.Repeat("\x90", 54)}, - }, { - "a: !!binary |\n " + strings.Repeat("A", 70) + "\n ==\n", - map[string]string{"a": strings.Repeat("\x00", 52)}, - }, - - // Ordered maps. - { - "{b: 2, a: 1, d: 4, c: 3, sub: {e: 5}}", - &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, - }, - - // Issue #39. - { - "a:\n b:\n c: d\n", - map[string]struct{ B interface{} }{"a": {map[interface{}]interface{}{"c": "d"}}}, - }, - - // Custom map type. - { - "a: {b: c}", - M{"a": M{"b": "c"}}, - }, - - // Support encoding.TextUnmarshaler. - { - "a: 1.2.3.4\n", - map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, - }, - { - "a: 2015-02-24T18:19:39Z\n", - map[string]time.Time{"a": time.Unix(1424801979, 0)}, - }, - - // Encode empty lists as zero-length slices. - { - "a: []", - &struct{ A []int }{[]int{}}, - }, -} - -type M map[interface{}]interface{} - -type inlineB struct { - B int - inlineC `yaml:",inline"` -} - -type inlineC struct { - C int -} - -func (s *S) TestUnmarshal(c *C) { - for _, item := range unmarshalTests { - t := reflect.ValueOf(item.value).Type() - var value interface{} - switch t.Kind() { - case reflect.Map: - value = reflect.MakeMap(t).Interface() - case reflect.String: - value = reflect.New(t).Interface() - case reflect.Ptr: - value = reflect.New(t.Elem()).Interface() - default: - c.Fatalf("missing case for %s", t) - } - err := yaml.Unmarshal([]byte(item.data), value) - if _, ok := err.(*yaml.TypeError); !ok { - c.Assert(err, IsNil) - } - if t.Kind() == reflect.String { - c.Assert(*value.(*string), Equals, item.value) - } else { - c.Assert(value, DeepEquals, item.value) - } - } -} - -func (s *S) TestUnmarshalNaN(c *C) { - value := map[string]interface{}{} - err := yaml.Unmarshal([]byte("notanum: .NaN"), &value) - c.Assert(err, IsNil) - c.Assert(math.IsNaN(value["notanum"].(float64)), Equals, true) -} - -var unmarshalErrorTests = []struct { - data, error string -}{ - {"v: !!float 'error'", "yaml: cannot decode !!str `error` as a !!float"}, - {"v: [A,", "yaml: line 1: did not find expected node content"}, - {"v:\n- [A,", "yaml: line 2: did not find expected node content"}, - {"a: *b\n", "yaml: unknown anchor 'b' referenced"}, - {"a: &a\n b: *a\n", "yaml: anchor 'a' value contains itself"}, - {"value: -", "yaml: block sequence entries are not allowed in this context"}, - {"a: !!binary ==", "yaml: !!binary value contains invalid base64 data"}, - {"{[.]}", `yaml: invalid map key: \[\]interface \{\}\{"\."\}`}, - {"{{.}}", `yaml: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`}, -} - -func (s *S) TestUnmarshalErrors(c *C) { - for _, item := range unmarshalErrorTests { - var value interface{} - err := yaml.Unmarshal([]byte(item.data), &value) - c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value)) - } -} - -var unmarshalerTests = []struct { - data, tag string - value interface{} -}{ - {"_: {hi: there}", "!!map", map[interface{}]interface{}{"hi": "there"}}, - {"_: [1,A]", "!!seq", []interface{}{1, "A"}}, - {"_: 10", "!!int", 10}, - {"_: null", "!!null", nil}, - {`_: BAR!`, "!!str", "BAR!"}, - {`_: "BAR!"`, "!!str", "BAR!"}, - {"_: !!foo 'BAR!'", "!!foo", "BAR!"}, -} - -var unmarshalerResult = map[int]error{} - -type unmarshalerType struct { - value interface{} -} - -func (o *unmarshalerType) UnmarshalYAML(unmarshal func(v interface{}) error) error { - if err := unmarshal(&o.value); err != nil { - return err - } - if i, ok := o.value.(int); ok { - if result, ok := unmarshalerResult[i]; ok { - return result - } - } - return nil -} - -type unmarshalerPointer struct { - Field *unmarshalerType "_" -} - -type unmarshalerValue struct { - Field unmarshalerType "_" -} - -func (s *S) TestUnmarshalerPointerField(c *C) { - for _, item := range unmarshalerTests { - obj := &unmarshalerPointer{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - if item.value == nil { - c.Assert(obj.Field, IsNil) - } else { - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.value, DeepEquals, item.value) - } - } -} - -func (s *S) TestUnmarshalerValueField(c *C) { - for _, item := range unmarshalerTests { - obj := &unmarshalerValue{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.value, DeepEquals, item.value) - } -} - -func (s *S) TestUnmarshalerWholeDocument(c *C) { - obj := &unmarshalerType{} - err := yaml.Unmarshal([]byte(unmarshalerTests[0].data), obj) - c.Assert(err, IsNil) - value, ok := obj.value.(map[interface{}]interface{}) - c.Assert(ok, Equals, true, Commentf("value: %#v", obj.value)) - c.Assert(value["_"], DeepEquals, unmarshalerTests[0].value) -} - -func (s *S) TestUnmarshalerTypeError(c *C) { - unmarshalerResult[2] = &yaml.TypeError{[]string{"foo"}} - unmarshalerResult[4] = &yaml.TypeError{[]string{"bar"}} - defer func() { - delete(unmarshalerResult, 2) - delete(unmarshalerResult, 4) - }() - - type T struct { - Before int - After int - M map[string]*unmarshalerType - } - var v T - data := `{before: A, m: {abc: 1, def: 2, ghi: 3, jkl: 4}, after: B}` - err := yaml.Unmarshal([]byte(data), &v) - c.Assert(err, ErrorMatches, ""+ - "yaml: unmarshal errors:\n"+ - " line 1: cannot unmarshal !!str `A` into int\n"+ - " foo\n"+ - " bar\n"+ - " line 1: cannot unmarshal !!str `B` into int") - c.Assert(v.M["abc"], NotNil) - c.Assert(v.M["def"], IsNil) - c.Assert(v.M["ghi"], NotNil) - c.Assert(v.M["jkl"], IsNil) - - c.Assert(v.M["abc"].value, Equals, 1) - c.Assert(v.M["ghi"].value, Equals, 3) -} - -type proxyTypeError struct{} - -func (v *proxyTypeError) UnmarshalYAML(unmarshal func(interface{}) error) error { - var s string - var a int32 - var b int64 - if err := unmarshal(&s); err != nil { - panic(err) - } - if s == "a" { - if err := unmarshal(&b); err == nil { - panic("should have failed") - } - return unmarshal(&a) - } - if err := unmarshal(&a); err == nil { - panic("should have failed") - } - return unmarshal(&b) -} - -func (s *S) TestUnmarshalerTypeErrorProxying(c *C) { - type T struct { - Before int - After int - M map[string]*proxyTypeError - } - var v T - data := `{before: A, m: {abc: a, def: b}, after: B}` - err := yaml.Unmarshal([]byte(data), &v) - c.Assert(err, ErrorMatches, ""+ - "yaml: unmarshal errors:\n"+ - " line 1: cannot unmarshal !!str `A` into int\n"+ - " line 1: cannot unmarshal !!str `a` into int32\n"+ - " line 1: cannot unmarshal !!str `b` into int64\n"+ - " line 1: cannot unmarshal !!str `B` into int") -} - -type failingUnmarshaler struct{} - -var failingErr = errors.New("failingErr") - -func (ft *failingUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { - return failingErr -} - -func (s *S) TestUnmarshalerError(c *C) { - err := yaml.Unmarshal([]byte("a: b"), &failingUnmarshaler{}) - c.Assert(err, Equals, failingErr) -} - -type sliceUnmarshaler []int - -func (su *sliceUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { - var slice []int - err := unmarshal(&slice) - if err == nil { - *su = slice - return nil - } - - var intVal int - err = unmarshal(&intVal) - if err == nil { - *su = []int{intVal} - return nil - } - - return err -} - -func (s *S) TestUnmarshalerRetry(c *C) { - var su sliceUnmarshaler - err := yaml.Unmarshal([]byte("[1, 2, 3]"), &su) - c.Assert(err, IsNil) - c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1, 2, 3})) - - err = yaml.Unmarshal([]byte("1"), &su) - c.Assert(err, IsNil) - c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1})) -} - -// From http://yaml.org/type/merge.html -var mergeTests = ` -anchors: - list: - - &CENTER { "x": 1, "y": 2 } - - &LEFT { "x": 0, "y": 2 } - - &BIG { "r": 10 } - - &SMALL { "r": 1 } - -# All the following maps are equal: - -plain: - # Explicit keys - "x": 1 - "y": 2 - "r": 10 - label: center/big - -mergeOne: - # Merge one map - << : *CENTER - "r": 10 - label: center/big - -mergeMultiple: - # Merge multiple maps - << : [ *CENTER, *BIG ] - label: center/big - -override: - # Override - << : [ *BIG, *LEFT, *SMALL ] - "x": 1 - label: center/big - -shortTag: - # Explicit short merge tag - !!merge "<<" : [ *CENTER, *BIG ] - label: center/big - -longTag: - # Explicit merge long tag - !<tag:yaml.org,2002:merge> "<<" : [ *CENTER, *BIG ] - label: center/big - -inlineMap: - # Inlined map - << : {"x": 1, "y": 2, "r": 10} - label: center/big - -inlineSequenceMap: - # Inlined map in sequence - << : [ *CENTER, {"r": 10} ] - label: center/big -` - -func (s *S) TestMerge(c *C) { - var want = map[interface{}]interface{}{ - "x": 1, - "y": 2, - "r": 10, - "label": "center/big", - } - - var m map[interface{}]interface{} - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, DeepEquals, want, Commentf("test %q failed", name)) - } -} - -func (s *S) TestMergeStruct(c *C) { - type Data struct { - X, Y, R int - Label string - } - want := Data{1, 2, 10, "center/big"} - - var m map[string]Data - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, Equals, want, Commentf("test %q failed", name)) - } -} - -var unmarshalNullTests = []func() interface{}{ - func() interface{} { var v interface{}; v = "v"; return &v }, - func() interface{} { var s = "s"; return &s }, - func() interface{} { var s = "s"; sptr := &s; return &sptr }, - func() interface{} { var i = 1; return &i }, - func() interface{} { var i = 1; iptr := &i; return &iptr }, - func() interface{} { m := map[string]int{"s": 1}; return &m }, - func() interface{} { m := map[string]int{"s": 1}; return m }, -} - -func (s *S) TestUnmarshalNull(c *C) { - for _, test := range unmarshalNullTests { - item := test() - zero := reflect.Zero(reflect.TypeOf(item).Elem()).Interface() - err := yaml.Unmarshal([]byte("null"), item) - c.Assert(err, IsNil) - if reflect.TypeOf(item).Kind() == reflect.Map { - c.Assert(reflect.ValueOf(item).Interface(), DeepEquals, reflect.MakeMap(reflect.TypeOf(item)).Interface()) - } else { - c.Assert(reflect.ValueOf(item).Elem().Interface(), DeepEquals, zero) - } - } -} - -func (s *S) TestUnmarshalSliceOnPreset(c *C) { - // Issue #48. - v := struct{ A []int }{[]int{1}} - yaml.Unmarshal([]byte("a: [2]"), &v) - c.Assert(v.A, DeepEquals, []int{2}) -} - -//var data []byte -//func init() { -// var err error -// data, err = ioutil.ReadFile("/tmp/file.yaml") -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkUnmarshal(c *C) { -// var err error -// for i := 0; i < c.N; i++ { -// var v map[string]interface{} -// err = yaml.Unmarshal(data, &v) -// } -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkMarshal(c *C) { -// var v map[string]interface{} -// yaml.Unmarshal(data, &v) -// c.ResetTimer() -// for i := 0; i < c.N; i++ { -// yaml.Marshal(&v) -// } -//} diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/encode_test.go b/Godeps/_workspace/src/gopkg.in/yaml.v2/encode_test.go deleted file mode 100644 index 5770e3c..0000000 --- a/Godeps/_workspace/src/gopkg.in/yaml.v2/encode_test.go +++ /dev/null @@ -1,501 +0,0 @@ -package yaml_test - -import ( - "fmt" - "math" - "strconv" - "strings" - "time" - - . "gopkg.in/check.v1" - "gopkg.in/yaml.v2" - "net" - "os" -) - -var marshalIntTest = 123 - -var marshalTests = []struct { - value interface{} - data string -}{ - { - nil, - "null\n", - }, { - &struct{}{}, - "{}\n", - }, { - map[string]string{"v": "hi"}, - "v: hi\n", - }, { - map[string]interface{}{"v": "hi"}, - "v: hi\n", - }, { - map[string]string{"v": "true"}, - "v: \"true\"\n", - }, { - map[string]string{"v": "false"}, - "v: \"false\"\n", - }, { - map[string]interface{}{"v": true}, - "v: true\n", - }, { - map[string]interface{}{"v": false}, - "v: false\n", - }, { - map[string]interface{}{"v": 10}, - "v: 10\n", - }, { - map[string]interface{}{"v": -10}, - "v: -10\n", - }, { - map[string]uint{"v": 42}, - "v: 42\n", - }, { - map[string]interface{}{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]int64{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]uint64{"v": 4294967296}, - "v: 4294967296\n", - }, { - map[string]interface{}{"v": "10"}, - "v: \"10\"\n", - }, { - map[string]interface{}{"v": 0.1}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": float64(0.1)}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": -0.1}, - "v: -0.1\n", - }, { - map[string]interface{}{"v": math.Inf(+1)}, - "v: .inf\n", - }, { - map[string]interface{}{"v": math.Inf(-1)}, - "v: -.inf\n", - }, { - map[string]interface{}{"v": math.NaN()}, - "v: .nan\n", - }, { - map[string]interface{}{"v": nil}, - "v: null\n", - }, { - map[string]interface{}{"v": ""}, - "v: \"\"\n", - }, { - map[string][]string{"v": {"A", "B"}}, - "v:\n- A\n- B\n", - }, { - map[string][]string{"v": {"A", "B\nC"}}, - "v:\n- A\n- |-\n B\n C\n", - }, { - map[string][]interface{}{"v": {"A", 1, map[string][]int{"B": {2, 3}}}}, - "v:\n- A\n- 1\n- B:\n - 2\n - 3\n", - }, { - map[string]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - "a:\n b: c\n", - }, { - map[string]interface{}{"a": "-"}, - "a: '-'\n", - }, - - // Simple values. - { - &marshalIntTest, - "123\n", - }, - - // Structures - { - &struct{ Hello string }{"world"}, - "hello: world\n", - }, { - &struct { - A struct { - B string - } - }{struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{&struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{}, - "a: null\n", - }, { - &struct{ A int }{1}, - "a: 1\n", - }, { - &struct{ A []int }{[]int{1, 2}}, - "a:\n- 1\n- 2\n", - }, { - &struct { - B int "a" - }{1}, - "a: 1\n", - }, { - &struct{ A bool }{true}, - "a: true\n", - }, - - // Conditional flag - { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{1, 0}, - "a: 1\n", - }, { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{0, 0}, - "{}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{&struct{ X, y int }{1, 2}}, - "a: {x: 1}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{nil}, - "{}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{&struct{ X, y int }{}}, - "a: {x: 0}\n", - }, { - &struct { - A struct{ X, y int } "a,omitempty,flow" - }{struct{ X, y int }{1, 2}}, - "a: {x: 1}\n", - }, { - &struct { - A struct{ X, y int } "a,omitempty,flow" - }{struct{ X, y int }{0, 1}}, - "{}\n", - }, { - &struct { - A float64 "a,omitempty" - B float64 "b,omitempty" - }{1, 0}, - "a: 1\n", - }, - - // Flow flag - { - &struct { - A []int "a,flow" - }{[]int{1, 2}}, - "a: [1, 2]\n", - }, { - &struct { - A map[string]string "a,flow" - }{map[string]string{"b": "c", "d": "e"}}, - "a: {b: c, d: e}\n", - }, { - &struct { - A struct { - B, D string - } "a,flow" - }{struct{ B, D string }{"c", "e"}}, - "a: {b: c, d: e}\n", - }, - - // Unexported field - { - &struct { - u int - A int - }{0, 1}, - "a: 1\n", - }, - - // Ignored field - { - &struct { - A int - B int "-" - }{1, 2}, - "a: 1\n", - }, - - // Struct inlining - { - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Map inlining - { - &struct { - A int - C map[string]int `yaml:",inline"` - }{1, map[string]int{"b": 2, "c": 3}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Duration - { - map[string]time.Duration{"a": 3 * time.Second}, - "a: 3s\n", - }, - - // Issue #24: bug in map merging logic. - { - map[string]string{"a": "<foo>"}, - "a: <foo>\n", - }, - - // Issue #34: marshal unsupported base 60 floats quoted for compatibility - // with old YAML 1.1 parsers. - { - map[string]string{"a": "1:1"}, - "a: \"1:1\"\n", - }, - - // Binary data. - { - map[string]string{"a": "\x00"}, - "a: \"\\0\"\n", - }, { - map[string]string{"a": "\x80\x81\x82"}, - "a: !!binary gIGC\n", - }, { - map[string]string{"a": strings.Repeat("\x90", 54)}, - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - }, - - // Ordered maps. - { - &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, - "b: 2\na: 1\nd: 4\nc: 3\nsub:\n e: 5\n", - }, - - // Encode unicode as utf-8 rather than in escaped form. - { - map[string]string{"a": "你好"}, - "a: 你好\n", - }, - - // Support encoding.TextMarshaler. - { - map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, - "a: 1.2.3.4\n", - }, - { - map[string]time.Time{"a": time.Unix(1424801979, 0)}, - "a: 2015-02-24T18:19:39Z\n", - }, - - // Ensure strings containing ": " are quoted (reported as PR #43, but not reproducible). - { - map[string]string{"a": "b: c"}, - "a: 'b: c'\n", - }, - - // Containing hash mark ('#') in string should be quoted - { - map[string]string{"a": "Hello #comment"}, - "a: 'Hello #comment'\n", - }, - { - map[string]string{"a": "你好 #comment"}, - "a: '你好 #comment'\n", - }, -} - -func (s *S) TestMarshal(c *C) { - defer os.Setenv("TZ", os.Getenv("TZ")) - os.Setenv("TZ", "UTC") - for _, item := range marshalTests { - data, err := yaml.Marshal(item.value) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, item.data) - } -} - -var marshalErrorTests = []struct { - value interface{} - error string - panic string -}{{ - value: &struct { - B int - inlineB ",inline" - }{1, inlineB{2, inlineC{3}}}, - panic: `Duplicated key 'b' in struct struct \{ B int; .*`, -}, { - value: &struct { - A int - B map[string]int ",inline" - }{1, map[string]int{"a": 2}}, - panic: `Can't have key "a" in inlined map; conflicts with struct field`, -}} - -func (s *S) TestMarshalErrors(c *C) { - for _, item := range marshalErrorTests { - if item.panic != "" { - c.Assert(func() { yaml.Marshal(item.value) }, PanicMatches, item.panic) - } else { - _, err := yaml.Marshal(item.value) - c.Assert(err, ErrorMatches, item.error) - } - } -} - -func (s *S) TestMarshalTypeCache(c *C) { - var data []byte - var err error - func() { - type T struct{ A int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - func() { - type T struct{ B int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - c.Assert(string(data), Equals, "b: 0\n") -} - -var marshalerTests = []struct { - data string - value interface{} -}{ - {"_:\n hi: there\n", map[interface{}]interface{}{"hi": "there"}}, - {"_:\n- 1\n- A\n", []interface{}{1, "A"}}, - {"_: 10\n", 10}, - {"_: null\n", nil}, - {"_: BAR!\n", "BAR!"}, -} - -type marshalerType struct { - value interface{} -} - -func (o marshalerType) MarshalText() ([]byte, error) { - panic("MarshalText called on type with MarshalYAML") -} - -func (o marshalerType) MarshalYAML() (interface{}, error) { - return o.value, nil -} - -type marshalerValue struct { - Field marshalerType "_" -} - -func (s *S) TestMarshaler(c *C) { - for _, item := range marshalerTests { - obj := &marshalerValue{} - obj.Field.value = item.value - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, string(item.data)) - } -} - -func (s *S) TestMarshalerWholeDocument(c *C) { - obj := &marshalerType{} - obj.value = map[string]string{"hello": "world!"} - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, "hello: world!\n") -} - -type failingMarshaler struct{} - -func (ft *failingMarshaler) MarshalYAML() (interface{}, error) { - return nil, failingErr -} - -func (s *S) TestMarshalerError(c *C) { - _, err := yaml.Marshal(&failingMarshaler{}) - c.Assert(err, Equals, failingErr) -} - -func (s *S) TestSortedOutput(c *C) { - order := []interface{}{ - false, - true, - 1, - uint(1), - 1.0, - 1.1, - 1.2, - 2, - uint(2), - 2.0, - 2.1, - "", - ".1", - ".2", - ".a", - "1", - "2", - "a!10", - "a/2", - "a/10", - "a~10", - "ab/1", - "b/1", - "b/01", - "b/2", - "b/02", - "b/3", - "b/03", - "b1", - "b01", - "b3", - "c2.10", - "c10.2", - "d1", - "d12", - "d12a", - } - m := make(map[interface{}]int) - for _, k := range order { - m[k] = 1 - } - data, err := yaml.Marshal(m) - c.Assert(err, IsNil) - out := "\n" + string(data) - last := 0 - for i, k := range order { - repr := fmt.Sprint(k) - if s, ok := k.(string); ok { - if _, err = strconv.ParseFloat(repr, 32); s == "" || err == nil { - repr = `"` + repr + `"` - } - } - index := strings.Index(out, "\n"+repr+":") - if index == -1 { - c.Fatalf("%#v is not in the output: %#v", k, out) - } - if index < last { - c.Fatalf("%#v was generated before %#v: %q", k, order[i-1], out) - } - last = index - } -} diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/suite_test.go b/Godeps/_workspace/src/gopkg.in/yaml.v2/suite_test.go deleted file mode 100644 index c5cf1ed..0000000 --- a/Godeps/_workspace/src/gopkg.in/yaml.v2/suite_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package yaml_test - -import ( - . "gopkg.in/check.v1" - "testing" -) - -func Test(t *testing.T) { TestingT(t) } - -type S struct{} - -var _ = Suite(&S{}) diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE new file mode 100644 index 0000000..8bff971 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Phillip Bond + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE new file mode 100644 index 0000000..08b5e20 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE new file mode 100644 index 0000000..df83a9c --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE @@ -0,0 +1,8 @@ +Copyright (c) 2012 Dave Grijalva + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE new file mode 100644 index 0000000..dc91298 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE @@ -0,0 +1,16 @@ +libcontainer +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (http://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see http://www.bis.doc.gov + +See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE new file mode 100644 index 0000000..5782c72 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2014, Elazar Leibovich +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE new file mode 100644 index 0000000..ece7ec6 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012,2013 Ernest Micklei + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE new file mode 100644 index 0000000..0eb9b72 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2014, Evan Phoenix +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the Evan Phoenix nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE new file mode 100644 index 0000000..4e11de1 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE new file mode 100644 index 0000000..6866802 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml new file mode 100644 index 0000000..62fdb61 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml @@ -0,0 +1,3 @@ +import: ../../../../fossene/db/schema/thing.yml +fields: + site: string diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE new file mode 100644 index 0000000..ade9307 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License new file mode 100644 index 0000000..6b7558b --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License @@ -0,0 +1,23 @@ +Copyright (c) 2011 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT new file mode 100644 index 0000000..35702b1 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT @@ -0,0 +1,9 @@ +Copyright 2009 The Go Authors. All rights reserved. Use of this source code +is governed by a BSD-style license that can be found in the LICENSE file. +Extensions of the original work are copyright (c) 2011 Miek Gieben + +Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. + +Copyright 2014 CloudFlare. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE new file mode 100644 index 0000000..5763fa7 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE @@ -0,0 +1,32 @@ +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE new file mode 100644 index 0000000..fbbbc9e --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE @@ -0,0 +1,191 @@ +Copyright 2012-2013 Rackspace, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +------ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE new file mode 100644 index 0000000..b0a9e76 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of gcfg's source code have been derived from Go, and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE new file mode 100644 index 0000000..968b453 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2013 Vaughan Newton + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE new file mode 100644 index 0000000..145d387 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Alexander F Rødseth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE new file mode 100644 index 0000000..c3d4cc3 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nate Finch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE new file mode 100644 index 0000000..a68e67f --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE @@ -0,0 +1,188 @@ + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml new file mode 100644 index 0000000..8da58fb --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml @@ -0,0 +1,31 @@ +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright b/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright new file mode 100644 index 0000000..a0b409a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright @@ -0,0 +1,13 @@ +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright b/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright new file mode 100644 index 0000000..a0b409a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright @@ -0,0 +1,13 @@ +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular new file mode 100644 index 0000000..020f87a --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010-2014 Google, Inc. http://angularjs.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_example_test.go b/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_example_test.go deleted file mode 100644 index 48c3d25..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_example_test.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resource_test - -import ( - "fmt" - - "k8s.io/kubernetes/pkg/api/resource" -) - -func ExampleFormat() { - memorySize := resource.NewQuantity(5*1024*1024*1024, resource.BinarySI) - fmt.Printf("memorySize = %v\n", memorySize) - - diskSize := resource.NewQuantity(5*1000*1000*1000, resource.DecimalSI) - fmt.Printf("diskSize = %v\n", diskSize) - - cores := resource.NewMilliQuantity(5300, resource.DecimalSI) - fmt.Printf("cores = %v\n", cores) - - // Output: - // memorySize = 5Gi - // diskSize = 5G - // cores = 5300m -} - -func ExampleMustParse() { - memorySize := resource.MustParse("5Gi") - fmt.Printf("memorySize = %v (%v)\n", memorySize.Value(), memorySize.Format) - - diskSize := resource.MustParse("5G") - fmt.Printf("diskSize = %v (%v)\n", diskSize.Value(), diskSize.Format) - - cores := resource.MustParse("5300m") - fmt.Printf("milliCores = %v (%v)\n", cores.MilliValue(), cores.Format) - - cores2 := resource.MustParse("5.4") - fmt.Printf("milliCores = %v (%v)\n", cores2.MilliValue(), cores2.Format) - - // Output: - // memorySize = 5368709120 (BinarySI) - // diskSize = 5000000000 (DecimalSI) - // milliCores = 5300 (DecimalSI) - // milliCores = 5400 (DecimalSI) -} diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_test.go b/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_test.go deleted file mode 100644 index 70f4836..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity_test.go +++ /dev/null @@ -1,517 +0,0 @@ -/* -Copyright 2014 The Kubernetes Authors All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package resource - -import ( - //"reflect" - "encoding/json" - "testing" - - fuzz "github.com/google/gofuzz" - "github.com/spf13/pflag" - "speter.net/go/exp/math/dec/inf" -) - -var ( - testQuantityFlag = QuantityFlag("quantityFlag", "1M", "dummy flag for testing the quantity flag mechanism") -) - -func dec(i int64, exponent int) *inf.Dec { - // See the below test-- scale is the negative of an exponent. - return inf.NewDec(i, inf.Scale(-exponent)) -} - -func TestDec(t *testing.T) { - table := []struct { - got *inf.Dec - expect string - }{ - {dec(1, 0), "1"}, - {dec(1, 1), "10"}, - {dec(5, 2), "500"}, - {dec(8, 3), "8000"}, - {dec(2, 0), "2"}, - {dec(1, -1), "0.1"}, - {dec(3, -2), "0.03"}, - {dec(4, -3), "0.004"}, - } - - for _, item := range table { - if e, a := item.expect, item.got.String(); e != a { - t.Errorf("expected %v, got %v", e, a) - } - } -} - -// TestQuantityParseZero ensures that when a 0 quantity is passed, its string value is 0 -func TestQuantityParseZero(t *testing.T) { - zero := MustParse("0") - if expected, actual := "0", zero.String(); expected != actual { - t.Errorf("Expected %v, actual %v", expected, actual) - } -} - -// Verifies that you get 0 as canonical value if internal value is 0, and not 0<suffix> -func TestQuantityCanocicalizeZero(t *testing.T) { - val := MustParse("1000m") - x := val.Amount - y := dec(1, 0) - z := val.Amount.Sub(x, y) - zero := Quantity{z, DecimalSI} - if expected, actual := "0", zero.String(); expected != actual { - t.Errorf("Expected %v, actual %v", expected, actual) - } -} - -func TestQuantityParse(t *testing.T) { - table := []struct { - input string - expect Quantity - }{ - {"0", Quantity{dec(0, 0), DecimalSI}}, - {"0m", Quantity{dec(0, 0), DecimalSI}}, - {"0Ki", Quantity{dec(0, 0), BinarySI}}, - {"0k", Quantity{dec(0, 0), DecimalSI}}, - {"0Mi", Quantity{dec(0, 0), BinarySI}}, - {"0M", Quantity{dec(0, 0), DecimalSI}}, - {"0Gi", Quantity{dec(0, 0), BinarySI}}, - {"0G", Quantity{dec(0, 0), DecimalSI}}, - {"0Ti", Quantity{dec(0, 0), BinarySI}}, - {"0T", Quantity{dec(0, 0), DecimalSI}}, - - // Binary suffixes - {"1Ki", Quantity{dec(1024, 0), BinarySI}}, - {"8Ki", Quantity{dec(8*1024, 0), BinarySI}}, - {"7Mi", Quantity{dec(7*1024*1024, 0), BinarySI}}, - {"6Gi", Quantity{dec(6*1024*1024*1024, 0), BinarySI}}, - {"5Ti", Quantity{dec(5*1024*1024*1024*1024, 0), BinarySI}}, - {"4Pi", Quantity{dec(4*1024*1024*1024*1024*1024, 0), BinarySI}}, - {"3Ei", Quantity{dec(3*1024*1024*1024*1024*1024*1024, 0), BinarySI}}, - - {"10Ti", Quantity{dec(10*1024*1024*1024*1024, 0), BinarySI}}, - {"100Ti", Quantity{dec(100*1024*1024*1024*1024, 0), BinarySI}}, - - // Decimal suffixes - {"3m", Quantity{dec(3, -3), DecimalSI}}, - {"9", Quantity{dec(9, 0), DecimalSI}}, - {"8k", Quantity{dec(8, 3), DecimalSI}}, - {"7M", Quantity{dec(7, 6), DecimalSI}}, - {"6G", Quantity{dec(6, 9), DecimalSI}}, - {"5T", Quantity{dec(5, 12), DecimalSI}}, - {"40T", Quantity{dec(4, 13), DecimalSI}}, - {"300T", Quantity{dec(3, 14), DecimalSI}}, - {"2P", Quantity{dec(2, 15), DecimalSI}}, - {"1E", Quantity{dec(1, 18), DecimalSI}}, - - // Decimal exponents - {"1E-3", Quantity{dec(1, -3), DecimalExponent}}, - {"1e3", Quantity{dec(1, 3), DecimalExponent}}, - {"1E6", Quantity{dec(1, 6), DecimalExponent}}, - {"1e9", Quantity{dec(1, 9), DecimalExponent}}, - {"1E12", Quantity{dec(1, 12), DecimalExponent}}, - {"1e15", Quantity{dec(1, 15), DecimalExponent}}, - {"1E18", Quantity{dec(1, 18), DecimalExponent}}, - - // Nonstandard but still parsable - {"1e14", Quantity{dec(1, 14), DecimalExponent}}, - {"1e13", Quantity{dec(1, 13), DecimalExponent}}, - {"1e3", Quantity{dec(1, 3), DecimalExponent}}, - {"100.035k", Quantity{dec(100035, 0), DecimalSI}}, - - // Things that look like floating point - {"0.001", Quantity{dec(1, -3), DecimalSI}}, - {"0.0005k", Quantity{dec(5, -1), DecimalSI}}, - {"0.005", Quantity{dec(5, -3), DecimalSI}}, - {"0.05", Quantity{dec(5, -2), DecimalSI}}, - {"0.5", Quantity{dec(5, -1), DecimalSI}}, - {"0.00050k", Quantity{dec(5, -1), DecimalSI}}, - {"0.00500", Quantity{dec(5, -3), DecimalSI}}, - {"0.05000", Quantity{dec(5, -2), DecimalSI}}, - {"0.50000", Quantity{dec(5, -1), DecimalSI}}, - {"0.5e0", Quantity{dec(5, -1), DecimalExponent}}, - {"0.5e-1", Quantity{dec(5, -2), DecimalExponent}}, - {"0.5e-2", Quantity{dec(5, -3), DecimalExponent}}, - {"0.5e0", Quantity{dec(5, -1), DecimalExponent}}, - {"10.035M", Quantity{dec(10035, 3), DecimalSI}}, - - {"1.2e3", Quantity{dec(12, 2), DecimalExponent}}, - {"1.3E+6", Quantity{dec(13, 5), DecimalExponent}}, - {"1.40e9", Quantity{dec(14, 8), DecimalExponent}}, - {"1.53E12", Quantity{dec(153, 10), DecimalExponent}}, - {"1.6e15", Quantity{dec(16, 14), DecimalExponent}}, - {"1.7E18", Quantity{dec(17, 17), DecimalExponent}}, - - {"9.01", Quantity{dec(901, -2), DecimalSI}}, - {"8.1k", Quantity{dec(81, 2), DecimalSI}}, - {"7.123456M", Quantity{dec(7123456, 0), DecimalSI}}, - {"6.987654321G", Quantity{dec(6987654321, 0), DecimalSI}}, - {"5.444T", Quantity{dec(5444, 9), DecimalSI}}, - {"40.1T", Quantity{dec(401, 11), DecimalSI}}, - {"300.2T", Quantity{dec(3002, 11), DecimalSI}}, - {"2.5P", Quantity{dec(25, 14), DecimalSI}}, - {"1.01E", Quantity{dec(101, 16), DecimalSI}}, - - // Things that saturate/round - {"3.001m", Quantity{dec(4, -3), DecimalSI}}, - {"1.1E-3", Quantity{dec(2, -3), DecimalExponent}}, - {"0.0001", Quantity{dec(1, -3), DecimalSI}}, - {"0.0005", Quantity{dec(1, -3), DecimalSI}}, - {"0.00050", Quantity{dec(1, -3), DecimalSI}}, - {"0.5e-3", Quantity{dec(1, -3), DecimalExponent}}, - {"0.9m", Quantity{dec(1, -3), DecimalSI}}, - {"0.12345", Quantity{dec(124, -3), DecimalSI}}, - {"0.12354", Quantity{dec(124, -3), DecimalSI}}, - {"9Ei", Quantity{maxAllowed, BinarySI}}, - {"9223372036854775807Ki", Quantity{maxAllowed, BinarySI}}, - {"12E", Quantity{maxAllowed, DecimalSI}}, - - // We'll accept fractional binary stuff, too. - {"100.035Ki", Quantity{dec(10243584, -2), BinarySI}}, - {"0.5Mi", Quantity{dec(.5*1024*1024, 0), BinarySI}}, - {"0.05Gi", Quantity{dec(536870912, -1), BinarySI}}, - {"0.025Ti", Quantity{dec(274877906944, -1), BinarySI}}, - - // Things written by trolls - {"0.000001Ki", Quantity{dec(2, -3), DecimalSI}}, // rounds up, changes format - {".001", Quantity{dec(1, -3), DecimalSI}}, - {".0001k", Quantity{dec(100, -3), DecimalSI}}, - {"1.", Quantity{dec(1, 0), DecimalSI}}, - {"1.G", Quantity{dec(1, 9), DecimalSI}}, - } - - for _, item := range table { - got, err := ParseQuantity(item.input) - if err != nil { - t.Errorf("%v: unexpected error: %v", item.input, err) - continue - } - if e, a := item.expect.Amount, got.Amount; e.Cmp(a) != 0 { - t.Errorf("%v: expected %v, got %v", item.input, e, a) - } - if e, a := item.expect.Format, got.Format; e != a { - t.Errorf("%v: expected %#v, got %#v", item.input, e, a) - } - } - - // Try the negative version of everything - desired := &inf.Dec{} - for _, item := range table { - got, err := ParseQuantity("-" + item.input) - if err != nil { - t.Errorf("-%v: unexpected error: %v", item.input, err) - continue - } - desired.Neg(item.expect.Amount) - if e, a := desired, got.Amount; e.Cmp(a) != 0 { - t.Errorf("%v: expected %v, got %v", item.input, e, a) - } - if e, a := item.expect.Format, got.Format; e != a { - t.Errorf("%v: expected %#v, got %#v", item.input, e, a) - } - } - - // Try everything with an explicit + - for _, item := range table { - got, err := ParseQuantity("+" + item.input) - if err != nil { - t.Errorf("-%v: unexpected error: %v", item.input, err) - continue - } - if e, a := item.expect.Amount, got.Amount; e.Cmp(a) != 0 { - t.Errorf("%v: expected %v, got %v", item.input, e, a) - } - if e, a := item.expect.Format, got.Format; e != a { - t.Errorf("%v: expected %#v, got %#v", item.input, e, a) - } - } - - invalid := []string{ - "1.1.M", - "1+1.0M", - "0.1mi", - "0.1am", - "aoeu", - ".5i", - "1i", - "-3.01i", - } - for _, item := range invalid { - _, err := ParseQuantity(item) - if err == nil { - t.Errorf("%v parsed unexpectedly", item) - } - } -} - -func TestQuantityString(t *testing.T) { - table := []struct { - in Quantity - expect string - }{ - {Quantity{dec(1024*1024*1024, 0), BinarySI}, "1Gi"}, - {Quantity{dec(300*1024*1024, 0), BinarySI}, "300Mi"}, - {Quantity{dec(6*1024, 0), BinarySI}, "6Ki"}, - {Quantity{dec(1001*1024*1024*1024, 0), BinarySI}, "1001Gi"}, - {Quantity{dec(1024*1024*1024*1024, 0), BinarySI}, "1Ti"}, - {Quantity{dec(5, 0), BinarySI}, "5"}, - {Quantity{dec(500, -3), BinarySI}, "500m"}, - {Quantity{dec(1, 9), DecimalSI}, "1G"}, - {Quantity{dec(1000, 6), DecimalSI}, "1G"}, - {Quantity{dec(1000000, 3), DecimalSI}, "1G"}, - {Quantity{dec(1000000000, 0), DecimalSI}, "1G"}, - {Quantity{dec(1, -3), DecimalSI}, "1m"}, - {Quantity{dec(80, -3), DecimalSI}, "80m"}, - {Quantity{dec(1080, -3), DecimalSI}, "1080m"}, - {Quantity{dec(108, -2), DecimalSI}, "1080m"}, - {Quantity{dec(10800, -4), DecimalSI}, "1080m"}, - {Quantity{dec(300, 6), DecimalSI}, "300M"}, - {Quantity{dec(1, 12), DecimalSI}, "1T"}, - {Quantity{dec(1234567, 6), DecimalSI}, "1234567M"}, - {Quantity{dec(1234567, -3), BinarySI}, "1234567m"}, - {Quantity{dec(3, 3), DecimalSI}, "3k"}, - {Quantity{dec(1025, 0), BinarySI}, "1025"}, - {Quantity{dec(0, 0), DecimalSI}, "0"}, - {Quantity{dec(0, 0), BinarySI}, "0"}, - {Quantity{dec(1, 9), DecimalExponent}, "1e9"}, - {Quantity{dec(1, -3), DecimalExponent}, "1e-3"}, - {Quantity{dec(80, -3), DecimalExponent}, "80e-3"}, - {Quantity{dec(300, 6), DecimalExponent}, "300e6"}, - {Quantity{dec(1, 12), DecimalExponent}, "1e12"}, - {Quantity{dec(1, 3), DecimalExponent}, "1e3"}, - {Quantity{dec(3, 3), DecimalExponent}, "3e3"}, - {Quantity{dec(3, 3), DecimalSI}, "3k"}, - {Quantity{dec(0, 0), DecimalExponent}, "0"}, - } - for _, item := range table { - got := item.in.String() - if e, a := item.expect, got; e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - } - desired := &inf.Dec{} // Avoid modifying the values in the table. - for _, item := range table { - if item.in.Amount.Cmp(decZero) == 0 { - // Don't expect it to print "-0" ever - continue - } - q := item.in - q.Amount = desired.Neg(q.Amount) - if e, a := "-"+item.expect, q.String(); e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - } -} - -func TestQuantityParseEmit(t *testing.T) { - table := []struct { - in string - expect string - }{ - {"1Ki", "1Ki"}, - {"1Mi", "1Mi"}, - {"1Gi", "1Gi"}, - {"1024Mi", "1Gi"}, - {"1000M", "1G"}, - {".000001Ki", "2m"}, - } - - for _, item := range table { - q, err := ParseQuantity(item.in) - if err != nil { - t.Errorf("Couldn't parse %v", item.in) - continue - } - if e, a := item.expect, q.String(); e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - } - for _, item := range table { - q, err := ParseQuantity("-" + item.in) - if err != nil { - t.Errorf("Couldn't parse %v", item.in) - continue - } - if q.Amount.Cmp(decZero) == 0 { - continue - } - if e, a := "-"+item.expect, q.String(); e != a { - t.Errorf("%#v: expected %v, got %v", item.in, e, a) - } - } -} - -var fuzzer = fuzz.New().Funcs( - func(q *Quantity, c fuzz.Continue) { - q.Amount = &inf.Dec{} - if c.RandBool() { - q.Format = BinarySI - if c.RandBool() { - q.Amount.SetScale(0) - q.Amount.SetUnscaled(c.Int63()) - return - } - // Be sure to test cases like 1Mi - q.Amount.SetScale(0) - q.Amount.SetUnscaled(c.Int63n(1024) << uint(10*c.Intn(5))) - return - } - if c.RandBool() { - q.Format = DecimalSI - } else { - q.Format = DecimalExponent - } - if c.RandBool() { - q.Amount.SetScale(inf.Scale(c.Intn(4))) - q.Amount.SetUnscaled(c.Int63()) - return - } - // Be sure to test cases like 1M - q.Amount.SetScale(inf.Scale(3 - c.Intn(15))) - q.Amount.SetUnscaled(c.Int63n(1000)) - }, -) - -func TestJSON(t *testing.T) { - for i := 0; i < 500; i++ { - q := &Quantity{} - fuzzer.Fuzz(q) - b, err := json.Marshal(q) - if err != nil { - t.Errorf("error encoding %v", q) - } - q2 := &Quantity{} - err = json.Unmarshal(b, q2) - if err != nil { - t.Errorf("%v: error decoding %v", q, string(b)) - } - if q2.Amount.Cmp(q.Amount) != 0 { - t.Errorf("Expected equal: %v, %v (json was '%v')", q, q2, string(b)) - } - } -} - -func TestMilliNewSet(t *testing.T) { - table := []struct { - value int64 - format Format - expect string - exact bool - }{ - {1, DecimalSI, "1m", true}, - {1000, DecimalSI, "1", true}, - {1234000, DecimalSI, "1234", true}, - {1024, BinarySI, "1024m", false}, // Format changes - {1000000, "invalidFormatDefaultsToExponent", "1e3", true}, - {1024 * 1024, BinarySI, "1048576m", false}, // Format changes - } - - for _, item := range table { - q := NewMilliQuantity(item.value, item.format) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Expected %v, got %v; %#v", e, a, q) - } - if !item.exact { - continue - } - q2, err := ParseQuantity(q.String()) - if err != nil { - t.Errorf("Round trip failed on %v", q) - } - if e, a := item.value, q2.MilliValue(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - } - - for _, item := range table { - q := NewQuantity(0, item.format) - q.SetMilli(item.value) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Set: Expected %v, got %v; %#v", e, a, q) - } - } -} - -func TestNewSet(t *testing.T) { - table := []struct { - value int64 - format Format - expect string - }{ - {1, DecimalSI, "1"}, - {1000, DecimalSI, "1k"}, - {1234000, DecimalSI, "1234k"}, - {1024, BinarySI, "1Ki"}, - {1000000, "invalidFormatDefaultsToExponent", "1e6"}, - {1024 * 1024, BinarySI, "1Mi"}, - } - - for _, item := range table { - q := NewQuantity(item.value, item.format) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Expected %v, got %v; %#v", e, a, q) - } - q2, err := ParseQuantity(q.String()) - if err != nil { - t.Errorf("Round trip failed on %v", q) - } - if e, a := item.value, q2.Value(); e != a { - t.Errorf("Expected %v, got %v", e, a) - } - } - - for _, item := range table { - q := NewQuantity(0, item.format) - q.Set(item.value) - if e, a := item.expect, q.String(); e != a { - t.Errorf("Set: Expected %v, got %v; %#v", e, a, q) - } - } -} - -func TestUninitializedNoCrash(t *testing.T) { - var q Quantity - - q.Value() - q.MilliValue() - q.Copy() - _ = q.String() - q.MarshalJSON() -} - -func TestCopy(t *testing.T) { - q := NewQuantity(5, DecimalSI) - c := q.Copy() - c.Set(6) - if q.Value() == 6 { - t.Errorf("Copy didn't") - } -} - -func TestQFlagSet(t *testing.T) { - qf := qFlag{&Quantity{}} - qf.Set("1Ki") - if e, a := "1Ki", qf.String(); e != a { - t.Errorf("Unexpected result %v != %v", e, a) - } -} - -func TestQFlagIsPFlag(t *testing.T) { - var pfv pflag.Value = qFlag{} - if e, a := "quantity", pfv.Type(); e != a { - t.Errorf("Unexpected result %v != %v", e, a) - } -} diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING new file mode 100644 index 0000000..c6b097c --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING @@ -0,0 +1,28 @@ +Copyright (C) 2003-2013 Edgewall Software +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE new file mode 100644 index 0000000..2b5e5ff --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE @@ -0,0 +1,19 @@ +The Expat/MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE new file mode 100644 index 0000000..9f93e06 --- /dev/null +++ b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE @@ -0,0 +1,11 @@ +Copyright 2014 Reverb Technologies, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/benchmark_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/benchmark_test.go deleted file mode 100644 index 27071da..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/benchmark_test.go +++ /dev/null @@ -1,210 +0,0 @@ -package inf - -import ( - "fmt" - "math/big" - "math/rand" - "sync" - "testing" -) - -const maxcap = 1024 * 1024 -const bits = 256 -const maxscale = 32 - -var once sync.Once - -var decInput [][2]Dec -var intInput [][2]big.Int - -var initBench = func() { - decInput = make([][2]Dec, maxcap) - intInput = make([][2]big.Int, maxcap) - max := new(big.Int).Lsh(big.NewInt(1), bits) - r := rand.New(rand.NewSource(0)) - for i := 0; i < cap(decInput); i++ { - decInput[i][0].SetUnscaledBig(new(big.Int).Rand(r, max)). - SetScale(Scale(r.Int31n(int32(2*maxscale-1)) - int32(maxscale))) - decInput[i][1].SetUnscaledBig(new(big.Int).Rand(r, max)). - SetScale(Scale(r.Int31n(int32(2*maxscale-1)) - int32(maxscale))) - } - for i := 0; i < cap(intInput); i++ { - intInput[i][0].Rand(r, max) - intInput[i][1].Rand(r, max) - } -} - -func doBenchmarkDec1(b *testing.B, f func(z *Dec)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&decInput[i%maxcap][0]) - } -} - -func doBenchmarkDec2(b *testing.B, f func(x, y *Dec)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&decInput[i%maxcap][0], &decInput[i%maxcap][1]) - } -} - -func doBenchmarkInt1(b *testing.B, f func(z *big.Int)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&intInput[i%maxcap][0]) - } -} - -func doBenchmarkInt2(b *testing.B, f func(x, y *big.Int)) { - once.Do(initBench) - b.ResetTimer() - b.StartTimer() - for i := 0; i < b.N; i++ { - f(&intInput[i%maxcap][0], &intInput[i%maxcap][1]) - } -} - -func Benchmark_Dec_String(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - x.String() - }) -} - -func Benchmark_Dec_StringScan(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - s := x.String() - d := new(Dec) - fmt.Sscan(s, d) - }) -} - -func Benchmark_Dec_GobEncode(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - x.GobEncode() - }) -} - -func Benchmark_Dec_GobEnDecode(b *testing.B) { - doBenchmarkDec1(b, func(x *Dec) { - g, _ := x.GobEncode() - new(Dec).GobDecode(g) - }) -} - -func Benchmark_Dec_Add(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - ys := y.Scale() - y.SetScale(x.Scale()) - _ = new(Dec).Add(x, y) - y.SetScale(ys) - }) -} - -func Benchmark_Dec_AddMixed(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).Add(x, y) - }) -} - -func Benchmark_Dec_Sub(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - ys := y.Scale() - y.SetScale(x.Scale()) - _ = new(Dec).Sub(x, y) - y.SetScale(ys) - }) -} - -func Benchmark_Dec_SubMixed(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).Sub(x, y) - }) -} - -func Benchmark_Dec_Mul(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).Mul(x, y) - }) -} - -func Benchmark_Dec_Mul_QuoExact(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - v := new(Dec).Mul(x, y) - _ = new(Dec).QuoExact(v, y) - }) -} - -func Benchmark_Dec_QuoRound_Fixed_Down(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).QuoRound(x, y, 0, RoundDown) - }) -} - -func Benchmark_Dec_QuoRound_Fixed_HalfUp(b *testing.B) { - doBenchmarkDec2(b, func(x, y *Dec) { - _ = new(Dec).QuoRound(x, y, 0, RoundHalfUp) - }) -} - -func Benchmark_Int_String(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - x.String() - }) -} - -func Benchmark_Int_StringScan(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - s := x.String() - d := new(big.Int) - fmt.Sscan(s, d) - }) -} - -func Benchmark_Int_GobEncode(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - x.GobEncode() - }) -} - -func Benchmark_Int_GobEnDecode(b *testing.B) { - doBenchmarkInt1(b, func(x *big.Int) { - g, _ := x.GobEncode() - new(big.Int).GobDecode(g) - }) -} - -func Benchmark_Int_Add(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Add(x, y) - }) -} - -func Benchmark_Int_Sub(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Sub(x, y) - }) -} - -func Benchmark_Int_Mul(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Mul(x, y) - }) -} - -func Benchmark_Int_Quo(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _ = new(big.Int).Quo(x, y) - }) -} - -func Benchmark_Int_QuoRem(b *testing.B) { - doBenchmarkInt2(b, func(x, y *big.Int) { - _, _ = new(big.Int).QuoRem(x, y, new(big.Int)) - }) -} diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_go1_2_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_go1_2_test.go deleted file mode 100644 index 5df0f7b..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_go1_2_test.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build go1.2 - -package inf - -import ( - "encoding" - "encoding/json" - "testing" -) - -var _ encoding.TextMarshaler = new(Dec) -var _ encoding.TextUnmarshaler = new(Dec) - -type Obj struct { - Val *Dec -} - -func TestDecJsonMarshalUnmarshal(t *testing.T) { - o := Obj{Val: NewDec(123, 2)} - js, err := json.Marshal(o) - if err != nil { - t.Fatalf("json.Marshal(%v): got %v, want ok", o, err) - } - o2 := &Obj{} - err = json.Unmarshal(js, o2) - if err != nil { - t.Fatalf("json.Unmarshal(%#q): got %v, want ok", js, err) - } - if o.Val.Scale() != o2.Val.Scale() || - o.Val.UnscaledBig().Cmp(o2.Val.UnscaledBig()) != 0 { - t.Fatalf("json.Unmarshal(json.Marshal(%v)): want %v, got %v", o, o, o2) - } -} diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_internal_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_internal_test.go deleted file mode 100644 index d4fbe3e..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_internal_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package inf - -import ( - "math/big" - "testing" -) - -var decQuoRemZZZ = []struct { - z, x, y *Dec - r *big.Rat - srA, srB int -}{ - // basic examples - {NewDec(1, 0), NewDec(2, 0), NewDec(2, 0), big.NewRat(0, 1), 0, 1}, - {NewDec(15, 1), NewDec(3, 0), NewDec(2, 0), big.NewRat(0, 1), 0, 1}, - {NewDec(1, 1), NewDec(1, 0), NewDec(10, 0), big.NewRat(0, 1), 0, 1}, - {NewDec(0, 0), NewDec(2, 0), NewDec(3, 0), big.NewRat(2, 3), 1, 1}, - {NewDec(0, 0), NewDec(2, 0), NewDec(6, 0), big.NewRat(1, 3), 1, 1}, - {NewDec(1, 1), NewDec(2, 0), NewDec(12, 0), big.NewRat(2, 3), 1, 1}, - - // examples from the Go Language Specification - {NewDec(1, 0), NewDec(5, 0), NewDec(3, 0), big.NewRat(2, 3), 1, 1}, - {NewDec(-1, 0), NewDec(-5, 0), NewDec(3, 0), big.NewRat(-2, 3), -1, 1}, - {NewDec(-1, 0), NewDec(5, 0), NewDec(-3, 0), big.NewRat(-2, 3), 1, -1}, - {NewDec(1, 0), NewDec(-5, 0), NewDec(-3, 0), big.NewRat(2, 3), -1, -1}, -} - -func TestDecQuoRem(t *testing.T) { - for i, a := range decQuoRemZZZ { - z, rA, rB := new(Dec), new(big.Int), new(big.Int) - s := scaleQuoExact{}.Scale(a.x, a.y) - z.quoRem(a.x, a.y, s, true, rA, rB) - if a.z.Cmp(z) != 0 || a.r.Cmp(new(big.Rat).SetFrac(rA, rB)) != 0 { - t.Errorf("#%d QuoRemZZZ got %v, %v, %v; expected %v, %v", i, z, rA, rB, a.z, a.r) - } - if a.srA != rA.Sign() || a.srB != rB.Sign() { - t.Errorf("#%d QuoRemZZZ wrong signs, got %v, %v; expected %v, %v", i, rA.Sign(), rB.Sign(), a.srA, a.srB) - } - } -} diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_test.go deleted file mode 100644 index 01ac771..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec_test.go +++ /dev/null @@ -1,379 +0,0 @@ -package inf_test - -import ( - "bytes" - "encoding/gob" - "fmt" - "math/big" - "strings" - "testing" - - "speter.net/go/exp/math/dec/inf" -) - -type decFunZZ func(z, x, y *inf.Dec) *inf.Dec -type decArgZZ struct { - z, x, y *inf.Dec -} - -var decSumZZ = []decArgZZ{ - {inf.NewDec(0, 0), inf.NewDec(0, 0), inf.NewDec(0, 0)}, - {inf.NewDec(1, 0), inf.NewDec(1, 0), inf.NewDec(0, 0)}, - {inf.NewDec(1111111110, 0), inf.NewDec(123456789, 0), inf.NewDec(987654321, 0)}, - {inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(0, 0)}, - {inf.NewDec(864197532, 0), inf.NewDec(-123456789, 0), inf.NewDec(987654321, 0)}, - {inf.NewDec(-1111111110, 0), inf.NewDec(-123456789, 0), inf.NewDec(-987654321, 0)}, - {inf.NewDec(12, 2), inf.NewDec(1, 1), inf.NewDec(2, 2)}, -} - -var decProdZZ = []decArgZZ{ - {inf.NewDec(0, 0), inf.NewDec(0, 0), inf.NewDec(0, 0)}, - {inf.NewDec(0, 0), inf.NewDec(1, 0), inf.NewDec(0, 0)}, - {inf.NewDec(1, 0), inf.NewDec(1, 0), inf.NewDec(1, 0)}, - {inf.NewDec(-991*991, 0), inf.NewDec(991, 0), inf.NewDec(-991, 0)}, - {inf.NewDec(2, 3), inf.NewDec(1, 1), inf.NewDec(2, 2)}, - {inf.NewDec(2, -3), inf.NewDec(1, -1), inf.NewDec(2, -2)}, - {inf.NewDec(2, 3), inf.NewDec(1, 1), inf.NewDec(2, 2)}, -} - -func TestDecSignZ(t *testing.T) { - var zero inf.Dec - for _, a := range decSumZZ { - s := a.z.Sign() - e := a.z.Cmp(&zero) - if s != e { - t.Errorf("got %d; want %d for z = %v", s, e, a.z) - } - } -} - -func TestDecAbsZ(t *testing.T) { - var zero inf.Dec - for _, a := range decSumZZ { - var z inf.Dec - z.Abs(a.z) - var e inf.Dec - e.Set(a.z) - if e.Cmp(&zero) < 0 { - e.Sub(&zero, &e) - } - if z.Cmp(&e) != 0 { - t.Errorf("got z = %v; want %v", z, e) - } - } -} - -func testDecFunZZ(t *testing.T, msg string, f decFunZZ, a decArgZZ) { - var z inf.Dec - f(&z, a.x, a.y) - if (&z).Cmp(a.z) != 0 { - t.Errorf("%s%+v\n\tgot z = %v; want %v", msg, a, &z, a.z) - } -} - -func TestDecSumZZ(t *testing.T) { - AddZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Add(x, y) } - SubZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Sub(x, y) } - for _, a := range decSumZZ { - arg := a - testDecFunZZ(t, "AddZZ", AddZZ, arg) - - arg = decArgZZ{a.z, a.y, a.x} - testDecFunZZ(t, "AddZZ symmetric", AddZZ, arg) - - arg = decArgZZ{a.x, a.z, a.y} - testDecFunZZ(t, "SubZZ", SubZZ, arg) - - arg = decArgZZ{a.y, a.z, a.x} - testDecFunZZ(t, "SubZZ symmetric", SubZZ, arg) - } -} - -func TestDecProdZZ(t *testing.T) { - MulZZ := func(z, x, y *inf.Dec) *inf.Dec { return z.Mul(x, y) } - for _, a := range decProdZZ { - arg := a - testDecFunZZ(t, "MulZZ", MulZZ, arg) - - arg = decArgZZ{a.z, a.y, a.x} - testDecFunZZ(t, "MulZZ symmetric", MulZZ, arg) - } -} - -var decUnscaledTests = []struct { - d *inf.Dec - u int64 // ignored when ok == false - ok bool -}{ - {new(inf.Dec), 0, true}, - {inf.NewDec(-1<<63, 0), -1 << 63, true}, - {inf.NewDec(-(-1<<63 + 1), 0), -(-1<<63 + 1), true}, - {new(inf.Dec).Neg(inf.NewDec(-1<<63, 0)), 0, false}, - {new(inf.Dec).Sub(inf.NewDec(-1<<63, 0), inf.NewDec(1, 0)), 0, false}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), 0, false}, -} - -func TestDecUnscaled(t *testing.T) { - for i, tt := range decUnscaledTests { - u, ok := tt.d.Unscaled() - if ok != tt.ok { - t.Errorf("#%d Unscaled: got %v, expected %v", i, ok, tt.ok) - } else if ok && u != tt.u { - t.Errorf("#%d Unscaled: got %v, expected %v", i, u, tt.u) - } - } -} - -var decRoundTests = [...]struct { - in *inf.Dec - s inf.Scale - r inf.Rounder - exp *inf.Dec -}{ - {inf.NewDec(123424999999999993, 15), 2, inf.RoundHalfUp, inf.NewDec(12342, 2)}, - {inf.NewDec(123425000000000001, 15), 2, inf.RoundHalfUp, inf.NewDec(12343, 2)}, - {inf.NewDec(123424999999999993, 15), 15, inf.RoundHalfUp, inf.NewDec(123424999999999993, 15)}, - {inf.NewDec(123424999999999993, 15), 16, inf.RoundHalfUp, inf.NewDec(1234249999999999930, 16)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -1, inf.RoundHalfUp, inf.NewDec(1844674407370955162, -1)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -2, inf.RoundHalfUp, inf.NewDec(184467440737095516, -2)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -3, inf.RoundHalfUp, inf.NewDec(18446744073709552, -3)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -4, inf.RoundHalfUp, inf.NewDec(1844674407370955, -4)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -5, inf.RoundHalfUp, inf.NewDec(184467440737096, -5)}, - {inf.NewDecBig(new(big.Int).Lsh(big.NewInt(1), 64), 0), -6, inf.RoundHalfUp, inf.NewDec(18446744073710, -6)}, -} - -func TestDecRound(t *testing.T) { - for i, tt := range decRoundTests { - z := new(inf.Dec).Round(tt.in, tt.s, tt.r) - if tt.exp.Cmp(z) != 0 { - t.Errorf("#%d Round got %v; expected %v", i, z, tt.exp) - } - } -} - -var decStringTests = []struct { - in string - out string - val int64 - scale inf.Scale // skip SetString if negative - ok bool - scanOk bool -}{ - {in: "", ok: false, scanOk: false}, - {in: "a", ok: false, scanOk: false}, - {in: "z", ok: false, scanOk: false}, - {in: "+", ok: false, scanOk: false}, - {in: "-", ok: false, scanOk: false}, - {in: "g", ok: false, scanOk: false}, - {in: ".", ok: false, scanOk: false}, - {in: ".-0", ok: false, scanOk: false}, - {in: ".+0", ok: false, scanOk: false}, - // Scannable but not SetStringable - {"0b", "ignored", 0, 0, false, true}, - {"0x", "ignored", 0, 0, false, true}, - {"0xg", "ignored", 0, 0, false, true}, - {"0.0g", "ignored", 0, 1, false, true}, - // examples from godoc for Dec - {"0", "0", 0, 0, true, true}, - {"0.00", "0.00", 0, 2, true, true}, - {"ignored", "0", 0, -2, true, false}, - {"1", "1", 1, 0, true, true}, - {"1.00", "1.00", 100, 2, true, true}, - {"10", "10", 10, 0, true, true}, - {"ignored", "10", 1, -1, true, false}, - // other tests - {"+0", "0", 0, 0, true, true}, - {"-0", "0", 0, 0, true, true}, - {"0.0", "0.0", 0, 1, true, true}, - {"0.1", "0.1", 1, 1, true, true}, - {"0.", "0", 0, 0, true, true}, - {"-10", "-10", -1, -1, true, true}, - {"-1", "-1", -1, 0, true, true}, - {"-0.1", "-0.1", -1, 1, true, true}, - {"-0.01", "-0.01", -1, 2, true, true}, - {"+0.", "0", 0, 0, true, true}, - {"-0.", "0", 0, 0, true, true}, - {".0", "0.0", 0, 1, true, true}, - {"+.0", "0.0", 0, 1, true, true}, - {"-.0", "0.0", 0, 1, true, true}, - {"0.0000000000", "0.0000000000", 0, 10, true, true}, - {"0.0000000001", "0.0000000001", 1, 10, true, true}, - {"-0.0000000000", "0.0000000000", 0, 10, true, true}, - {"-0.0000000001", "-0.0000000001", -1, 10, true, true}, - {"-10", "-10", -10, 0, true, true}, - {"+10", "10", 10, 0, true, true}, - {"00", "0", 0, 0, true, true}, - {"023", "23", 23, 0, true, true}, // decimal, not octal - {"-02.3", "-2.3", -23, 1, true, true}, // decimal, not octal -} - -func TestDecGetString(t *testing.T) { - z := new(inf.Dec) - for i, test := range decStringTests { - if !test.ok { - continue - } - z.SetUnscaled(test.val) - z.SetScale(test.scale) - - s := z.String() - if s != test.out { - t.Errorf("#%da got %s; want %s", i, s, test.out) - } - - s = fmt.Sprintf("%d", z) - if s != test.out { - t.Errorf("#%db got %s; want %s", i, s, test.out) - } - } -} - -func TestDecSetString(t *testing.T) { - tmp := new(inf.Dec) - for i, test := range decStringTests { - if test.scale < 0 { - // SetString only supports scale >= 0 - continue - } - // initialize to a non-zero value so that issues with parsing - // 0 are detected - tmp.Set(inf.NewDec(1234567890, 123)) - n1, ok1 := new(inf.Dec).SetString(test.in) - n2, ok2 := tmp.SetString(test.in) - expected := inf.NewDec(test.val, test.scale) - if ok1 != test.ok || ok2 != test.ok { - t.Errorf("#%d (input '%s') ok incorrect (should be %t)", i, test.in, test.ok) - continue - } - if !ok1 { - if n1 != nil { - t.Errorf("#%d (input '%s') n1 != nil", i, test.in) - } - continue - } - if !ok2 { - if n2 != nil { - t.Errorf("#%d (input '%s') n2 != nil", i, test.in) - } - continue - } - - if n1.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val) - } - if n2.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val) - } - } -} - -func TestDecScan(t *testing.T) { - tmp := new(inf.Dec) - for i, test := range decStringTests { - if test.scale < 0 { - // SetString only supports scale >= 0 - continue - } - // initialize to a non-zero value so that issues with parsing - // 0 are detected - tmp.Set(inf.NewDec(1234567890, 123)) - n1, n2 := new(inf.Dec), tmp - nn1, err1 := fmt.Sscan(test.in, n1) - nn2, err2 := fmt.Sscan(test.in, n2) - if !test.scanOk { - if err1 == nil || err2 == nil { - t.Errorf("#%d (input '%s') ok incorrect, should be %t", i, test.in, test.scanOk) - } - continue - } - expected := inf.NewDec(test.val, test.scale) - if nn1 != 1 || err1 != nil || nn2 != 1 || err2 != nil { - t.Errorf("#%d (input '%s') error %d %v, %d %v", i, test.in, nn1, err1, nn2, err2) - continue - } - if n1.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n1, test.val) - } - if n2.Cmp(expected) != 0 { - t.Errorf("#%d (input '%s') got: %s want: %d", i, test.in, n2, test.val) - } - } -} - -var decScanNextTests = []struct { - in string - ok bool - next rune -}{ - {"", false, 0}, - {"a", false, 'a'}, - {"z", false, 'z'}, - {"+", false, 0}, - {"-", false, 0}, - {"g", false, 'g'}, - {".", false, 0}, - {".-0", false, '-'}, - {".+0", false, '+'}, - {"0b", true, 'b'}, - {"0x", true, 'x'}, - {"0xg", true, 'x'}, - {"0.0g", true, 'g'}, -} - -func TestDecScanNext(t *testing.T) { - for i, test := range decScanNextTests { - rdr := strings.NewReader(test.in) - n1 := new(inf.Dec) - nn1, _ := fmt.Fscan(rdr, n1) - if (test.ok && nn1 == 0) || (!test.ok && nn1 > 0) { - t.Errorf("#%d (input '%s') ok incorrect should be %t", i, test.in, test.ok) - continue - } - r := rune(0) - nn2, err := fmt.Fscanf(rdr, "%c", &r) - if test.next != r { - t.Errorf("#%d (input '%s') next incorrect, got %c should be %c, %d, %v", i, test.in, r, test.next, nn2, err) - } - } -} - -var decGobEncodingTests = []string{ - "0", - "1", - "2", - "10", - "42", - "1234567890", - "298472983472983471903246121093472394872319615612417471234712061", -} - -func TestDecGobEncoding(t *testing.T) { - var medium bytes.Buffer - enc := gob.NewEncoder(&medium) - dec := gob.NewDecoder(&medium) - for i, test := range decGobEncodingTests { - for j := 0; j < 2; j++ { - for k := inf.Scale(-5); k <= 5; k++ { - medium.Reset() // empty buffer for each test case (in case of failures) - stest := test - if j != 0 { - // negative numbers - stest = "-" + test - } - var tx inf.Dec - tx.SetString(stest) - tx.SetScale(k) // test with positive, negative, and zero scale - if err := enc.Encode(&tx); err != nil { - t.Errorf("#%d%c: encoding failed: %s", i, 'a'+j, err) - } - var rx inf.Dec - if err := dec.Decode(&rx); err != nil { - t.Errorf("#%d%c: decoding failed: %s", i, 'a'+j, err) - } - if rx.Cmp(&tx) != 0 { - t.Errorf("#%d%c: transmission failed: got %s want %s", i, 'a'+j, &rx, &tx) - } - } - } - } -} diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/example_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/example_test.go deleted file mode 100644 index 52029e0..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/example_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package inf_test - -import ( - "fmt" - "log" -) - -import "speter.net/go/exp/math/dec/inf" - -func ExampleDec_SetString() { - d := new(inf.Dec) - d.SetString("012345.67890") // decimal; leading 0 ignored; trailing 0 kept - fmt.Println(d) - // Output: 12345.67890 -} - -func ExampleDec_Scan() { - // The Scan function is rarely used directly; - // the fmt package recognizes it as an implementation of fmt.Scanner. - d := new(inf.Dec) - _, err := fmt.Sscan("184467440.73709551617", d) - if err != nil { - log.Println("error scanning value:", err) - } else { - fmt.Println(d) - } - // Output: 184467440.73709551617 -} - -func ExampleDec_QuoRound_scale2RoundDown() { - // 10 / 3 is an infinite decimal; it has no exact Dec representation - x, y := inf.NewDec(10, 0), inf.NewDec(3, 0) - // use 2 digits beyond the decimal point, round towards 0 - z := new(inf.Dec).QuoRound(x, y, 2, inf.RoundDown) - fmt.Println(z) - // Output: 3.33 -} - -func ExampleDec_QuoRound_scale2RoundCeil() { - // -42 / 400 is an finite decimal with 3 digits beyond the decimal point - x, y := inf.NewDec(-42, 0), inf.NewDec(400, 0) - // use 2 digits beyond decimal point, round towards positive infinity - z := new(inf.Dec).QuoRound(x, y, 2, inf.RoundCeil) - fmt.Println(z) - // Output: -0.10 -} - -func ExampleDec_QuoExact_ok() { - // 1 / 25 is a finite decimal; it has exact Dec representation - x, y := inf.NewDec(1, 0), inf.NewDec(25, 0) - z := new(inf.Dec).QuoExact(x, y) - fmt.Println(z) - // Output: 0.04 -} - -func ExampleDec_QuoExact_fail() { - // 1 / 3 is an infinite decimal; it has no exact Dec representation - x, y := inf.NewDec(1, 0), inf.NewDec(3, 0) - z := new(inf.Dec).QuoExact(x, y) - fmt.Println(z) - // Output: <nil> -} diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_example_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_example_test.go deleted file mode 100644 index 5c5e4df..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_example_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package inf_test - -import ( - "fmt" - "os" - "text/tabwriter" - - "speter.net/go/exp/math/dec/inf" -) - -// This example displays the results of Dec.Round with each of the Rounders. -// -func ExampleRounder() { - var vals = []struct { - x string - s inf.Scale - }{ - {"-0.18", 1}, {"-0.15", 1}, {"-0.12", 1}, {"-0.10", 1}, - {"-0.08", 1}, {"-0.05", 1}, {"-0.02", 1}, {"0.00", 1}, - {"0.02", 1}, {"0.05", 1}, {"0.08", 1}, {"0.10", 1}, - {"0.12", 1}, {"0.15", 1}, {"0.18", 1}, - } - - var rounders = []struct { - name string - rounder inf.Rounder - }{ - {"RoundDown", inf.RoundDown}, {"RoundUp", inf.RoundUp}, - {"RoundCeil", inf.RoundCeil}, {"RoundFloor", inf.RoundFloor}, - {"RoundHalfDown", inf.RoundHalfDown}, {"RoundHalfUp", inf.RoundHalfUp}, - {"RoundHalfEven", inf.RoundHalfEven}, {"RoundExact", inf.RoundExact}, - } - - fmt.Println("The results of new(inf.Dec).Round(x, s, inf.RoundXXX):\n") - w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', tabwriter.AlignRight) - fmt.Fprint(w, "x\ts\t|\t") - for _, r := range rounders { - fmt.Fprintf(w, "%s\t", r.name[5:]) - } - fmt.Fprintln(w) - for _, v := range vals { - fmt.Fprintf(w, "%s\t%d\t|\t", v.x, v.s) - for _, r := range rounders { - x, _ := new(inf.Dec).SetString(v.x) - z := new(inf.Dec).Round(x, v.s, r.rounder) - fmt.Fprintf(w, "%d\t", z) - } - fmt.Fprintln(w) - } - w.Flush() - - // Output: - // The results of new(inf.Dec).Round(x, s, inf.RoundXXX): - // - // x s | Down Up Ceil Floor HalfDown HalfUp HalfEven Exact - // -0.18 1 | -0.1 -0.2 -0.1 -0.2 -0.2 -0.2 -0.2 <nil> - // -0.15 1 | -0.1 -0.2 -0.1 -0.2 -0.1 -0.2 -0.2 <nil> - // -0.12 1 | -0.1 -0.2 -0.1 -0.2 -0.1 -0.1 -0.1 <nil> - // -0.10 1 | -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 -0.1 - // -0.08 1 | 0.0 -0.1 0.0 -0.1 -0.1 -0.1 -0.1 <nil> - // -0.05 1 | 0.0 -0.1 0.0 -0.1 0.0 -0.1 0.0 <nil> - // -0.02 1 | 0.0 -0.1 0.0 -0.1 0.0 0.0 0.0 <nil> - // 0.00 1 | 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 - // 0.02 1 | 0.0 0.1 0.1 0.0 0.0 0.0 0.0 <nil> - // 0.05 1 | 0.0 0.1 0.1 0.0 0.0 0.1 0.0 <nil> - // 0.08 1 | 0.0 0.1 0.1 0.0 0.1 0.1 0.1 <nil> - // 0.10 1 | 0.1 0.1 0.1 0.1 0.1 0.1 0.1 0.1 - // 0.12 1 | 0.1 0.2 0.2 0.1 0.1 0.1 0.1 <nil> - // 0.15 1 | 0.1 0.2 0.2 0.1 0.1 0.2 0.2 <nil> - // 0.18 1 | 0.1 0.2 0.2 0.1 0.2 0.2 0.2 <nil> - -} diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_test.go b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_test.go deleted file mode 100644 index 757ab97..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder_test.go +++ /dev/null @@ -1,109 +0,0 @@ -package inf_test - -import ( - "math/big" - "testing" - - "speter.net/go/exp/math/dec/inf" -) - -var decRounderInputs = [...]struct { - quo *inf.Dec - rA, rB *big.Int -}{ - // examples from go language spec - {inf.NewDec(1, 0), big.NewInt(2), big.NewInt(3)}, // 5 / 3 - {inf.NewDec(-1, 0), big.NewInt(-2), big.NewInt(3)}, // -5 / 3 - {inf.NewDec(-1, 0), big.NewInt(2), big.NewInt(-3)}, // 5 / -3 - {inf.NewDec(1, 0), big.NewInt(-2), big.NewInt(-3)}, // -5 / -3 - // examples from godoc - {inf.NewDec(-1, 1), big.NewInt(-8), big.NewInt(10)}, - {inf.NewDec(-1, 1), big.NewInt(-5), big.NewInt(10)}, - {inf.NewDec(-1, 1), big.NewInt(-2), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(-8), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(-5), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(-2), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(0), big.NewInt(1)}, - {inf.NewDec(0, 1), big.NewInt(2), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(5), big.NewInt(10)}, - {inf.NewDec(0, 1), big.NewInt(8), big.NewInt(10)}, - {inf.NewDec(1, 1), big.NewInt(2), big.NewInt(10)}, - {inf.NewDec(1, 1), big.NewInt(5), big.NewInt(10)}, - {inf.NewDec(1, 1), big.NewInt(8), big.NewInt(10)}, -} - -var decRounderResults = [...]struct { - rounder inf.Rounder - results [len(decRounderInputs)]*inf.Dec -}{ - {inf.RoundExact, [...]*inf.Dec{nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, - inf.NewDec(0, 1), nil, nil, nil, nil, nil, nil}}, - {inf.RoundDown, [...]*inf.Dec{ - inf.NewDec(1, 0), inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(1, 0), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1)}}, - {inf.RoundUp, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-2, 1), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), - inf.NewDec(2, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, - {inf.RoundHalfDown, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(-1, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(1, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(2, 1)}}, - {inf.RoundHalfUp, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-1, 1), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), - inf.NewDec(1, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, - {inf.RoundHalfEven, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(2, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-1, 1), - inf.NewDec(-1, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(1, 1), - inf.NewDec(1, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, - {inf.RoundFloor, [...]*inf.Dec{ - inf.NewDec(1, 0), inf.NewDec(-2, 0), inf.NewDec(-2, 0), inf.NewDec(1, 0), - inf.NewDec(-2, 1), inf.NewDec(-2, 1), inf.NewDec(-2, 1), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1)}}, - {inf.RoundCeil, [...]*inf.Dec{ - inf.NewDec(2, 0), inf.NewDec(-1, 0), inf.NewDec(-1, 0), inf.NewDec(2, 0), - inf.NewDec(-1, 1), inf.NewDec(-1, 1), inf.NewDec(-1, 1), - inf.NewDec(0, 1), inf.NewDec(0, 1), inf.NewDec(0, 1), - inf.NewDec(0, 1), - inf.NewDec(1, 1), inf.NewDec(1, 1), inf.NewDec(1, 1), - inf.NewDec(2, 1), inf.NewDec(2, 1), inf.NewDec(2, 1)}}, -} - -func TestDecRounders(t *testing.T) { - for i, a := range decRounderResults { - for j, input := range decRounderInputs { - q := new(inf.Dec).Set(input.quo) - rA, rB := new(big.Int).Set(input.rA), new(big.Int).Set(input.rB) - res := a.rounder.Round(new(inf.Dec), q, rA, rB) - if a.results[j] == nil && res == nil { - continue - } - if (a.results[j] == nil && res != nil) || - (a.results[j] != nil && res == nil) || - a.results[j].Cmp(res) != 0 { - t.Errorf("#%d,%d Rounder got %v; expected %v", i, j, res, a.results[j]) - } - } - } -} diff --git a/utils/attribute-files.go b/utils/attribute-files.go index be79d4f..8a20654 100644 --- a/utils/attribute-files.go +++ b/utils/attribute-files.go @@ -2,7 +2,7 @@ package utils import ( "github.com/blablacar/attributes-merger/attributes" - "k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/cadvisor/utils" + "github.com/google/cadvisor/utils" ) func AttributeFiles(path string) ([]string, error) { From bf0ea63f2ff160337f67b9f7acf3c2db436d79e6 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 12 Nov 2015 16:49:30 +0100 Subject: [PATCH 022/163] fix diff of units and do no check status after starting service --- work/env/service.go | 24 ++++++++++++++++-------- work/env/service/unit.go | 22 +++++++++++++--------- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/work/env/service.go b/work/env/service.go index 7aee10a..0c1302d 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -103,7 +103,10 @@ func (s *Service) Unlock() { s.log.Info("Unlocking") kapi := s.env.EtcdClient() - kapi.Delete(context.Background(), s.lockPath, nil) + _, err := kapi.Delete(context.Background(), s.lockPath, nil) + if cerr, ok := err.(*client.ClusterError); ok { + s.log.WithError(cerr).Panic("Cannot unlock service") + } } func (s *Service) Lock(ttl time.Duration, message string) { @@ -179,13 +182,18 @@ units: return err } time.Sleep(time.Second * 2) - _, err = u.Status() - if err != nil { - log.WithError(err).Error("Unit failed just after start") - return err - } - - s.checkServiceRunning() + // status, err2 := u.Status() + // u.Log.WithField("status", status).Debug("Log status") + // if err2 != nil { + // log.WithError(err2).WithField("status", status).Panic("Unit failed just after start") + // return err2 + // } + // if status == "inactive" { + // log.WithField("status", status).Panic("Unit failed just after start") + // return errors.New("unit is inactive just after start") + // } + // + // s.checkServiceRunning() // TODO ask deploy pod version () // TODO YES/NO diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 414491a..1362c1c 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -2,13 +2,13 @@ package service import ( "bufio" - "errors" "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" "github.com/blablacar/green-garden/spec" "github.com/coreos/fleet/unit" "io/ioutil" "os" + "regexp" "strings" ) @@ -42,8 +42,7 @@ func (u Unit) GetUnitContentAsFleeted() (string, error) { if err != nil { return "", err } - return fleetunit.String(), nil - // return convertMultilineUnitToString(unitFileContent), nil + return convertMultilineUnitToString([]byte(fleetunit.String())), nil } func (u Unit) DisplayDiff() error { @@ -58,7 +57,7 @@ func (u Unit) DisplayDiff() error { defer os.Remove("/tmp/ggn-local") ioutil.WriteFile("/tmp/ggn-remote", []byte(remote), 0644) defer os.Remove("/tmp/ggn-remote") - utils.ExecCmd("git", "diff", "/tmp/ggn-local", "/tmp/ggn-remote") + utils.ExecCmd("git", "diff", "/tmp/ggn-remote", "/tmp/ggn-local") return nil } @@ -78,7 +77,6 @@ func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { } remoteContent, err := u.service.GetFleetUnitContent(u.Name) - remoteContent += "\n" if err != nil { u.Log.WithError(err).Error("Cannot read unit file") return "", "", err @@ -109,14 +107,20 @@ func (u Unit) Destroy() error { func (u Unit) Status() (string, error) { content, err := u.service.GetEnv().RunFleetCmdGetOutput("status", u.Name) if err != nil { - return content, err + return "", err } - if !strings.Contains(content, "Active: active (running)") { // Active: failed - return content, errors.New("unit is not in running state") + reg, err := regexp.Compile(`Active: (active|inactive|deactivating|activating)`) + if err != nil { + u.Log.Panic("Cannot compule regex") } + matched := reg.FindStringSubmatch(content) + + // if !strings.Contains(content, "Active: %s ") { // Active: failed + // return content, errors.New("unit is not in running state") + // } - return content, err + return matched[1], err } //func (u Unit) Stop() { From 4b199f658f5eb6e46bb792950241fc6d80c7eb4d Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 11:10:08 +0100 Subject: [PATCH 023/163] support multiple hosts for fleet endpoint --- work/env.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/work/env.go b/work/env.go index 9270bd0..121f717 100644 --- a/work/env.go +++ b/work/env.go @@ -149,7 +149,7 @@ func (e Env) RunFleetCmdGetOutput(args ...string) (string, error) { func (e Env) EtcdClient() client.KeysAPI { cfg := client.Config{ - Endpoints: []string{"http://" + e.config.Fleet.Endpoint}, + Endpoints: strings.Split(e.config.Fleet.Endpoint, ","), Username: e.config.Fleet.Username, Password: e.config.Fleet.Password, Transport: client.DefaultTransport, @@ -167,7 +167,7 @@ func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) if e.config.Fleet.Endpoint == "" { return "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") } - endpoint := "http://" + e.config.Fleet.Endpoint + endpoint := e.config.Fleet.Endpoint os.Setenv(FLEETCTL_ENDPOINT, endpoint) if e.config.Fleet.Username != "" { os.Setenv(FLEETCTL_SSH_USERNAME, e.config.Fleet.Username) From d2c7d4291fe123245eeec7dbb62819ef53b5a076 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 11:57:16 +0100 Subject: [PATCH 024/163] [#4] add genautocomplete command, support only bash for the moment --- build.sh | 8 +++---- commands/genautocomplete.go | 46 +++++++++++++++++++++++++++++++++++++ commands/gg.go | 4 ++-- 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 commands/genautocomplete.go diff --git a/build.sh b/build.sh index 7bccec4..123fabe 100755 --- a/build.sh +++ b/build.sh @@ -29,16 +29,16 @@ godep go test -cover $dir/... # build if `command -v parallel >/dev/null 2>&1`; then - echo -e "$ENVS" | parallel --will-cite -j10 --workdir . "GOOS={} GOARCH=amd64 godep go build -o dist/{}-amd64/green-garden" -# mv dist/windows-amd64/green-garden dist/windows-amd64/green-garden.exe + echo -e "$ENVS" | parallel --will-cite -j10 --workdir . "GOOS={} GOARCH=amd64 godep go build -o dist/{}-amd64/ggn" +# mv dist/windows-amd64/ggn dist/windows-amd64/ggn.exe else for e in `echo -e "$ENVS"`; do - GOOS="$e" GOARCH=amd64 godep go build -o "dist/${e}-amd64/green-garden" + GOOS="$e" GOARCH=amd64 godep go build -o "dist/${e}-amd64/ggn" done fi # install -cp $dir/dist/linux-amd64/green-garden $GOPATH/bin/green-garden +cp $dir/dist/linux-amd64/ggn $GOPATH/bin/ggn end=`date +%s` echo "Duration : $((end-start))s" diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go new file mode 100644 index 0000000..eeffa82 --- /dev/null +++ b/commands/genautocomplete.go @@ -0,0 +1,46 @@ +package commands + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/config" + "github.com/spf13/cobra" + "os" +) + +var autocompleteTarget string + +var autocompleteType string + +var genautocompleteCmd = &cobra.Command{ + Use: "genautocomplete", + Short: "Generate shell autocompletion script", + Long: `Generates a shell autocompletion script. +NOTE: The current version supports Bash only. + This should work for *nix systems with Bash installed. +By default, the file is written directly to ~/.config/green-garden/ +Add ` + "`--completionfile=/path/to/file`" + ` flag to set alternative +file-path and name. +Logout and in again to reload the completion scripts, +or just source them in directly: + $ . /etc/bash_completion`, + + Run: func(cmd *cobra.Command, args []string) { + + if autocompleteType != "bash" { + logrus.WithField("type", autocompleteType).Fatalln("Only Bash is supported for now") + } + err := cmd.Root().GenBashCompletionFile(autocompleteTarget) + if err != nil { + logrus.WithError(err).Fatalln("Failed to generate shell completion file") + } else { + logrus.WithField("path", autocompleteTarget).Println("Bash completion saved") + } + os.Exit(0) + }, +} + +func init() { + + genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", config.GetConfig().Path+"/ggn_completion.sh", "Autocompletion file") + genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "Autocompletion type (currently only bash supported)") +} diff --git a/commands/gg.go b/commands/gg.go index 09b895b..e504966 100644 --- a/commands/gg.go +++ b/commands/gg.go @@ -23,7 +23,7 @@ func Execute() { var logLevel string var rootCmd = &cobra.Command{ - Use: "green-garden", + Use: "ggn", PersistentPreRun: func(cmd *cobra.Command, args []string) { level, err := log.ParseLevel(logLevel) if err != nil { @@ -34,7 +34,7 @@ func Execute() { }, } rootCmd.PersistentFlags().StringVarP(&logLevel, "loglevel", "L", "info", "Set log level") - rootCmd.AddCommand(versionCmd, generateCmd) + rootCmd.AddCommand(versionCmd, generateCmd, genautocompleteCmd) loadEnvCommands(rootCmd) From e6ed7ec39d320d76ea9ea3201666ea92f46c3a07 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 13:43:15 +0100 Subject: [PATCH 025/163] #8 skip up to date units by default and add flag to (-a to force) --- builder/build.go | 6 ++++-- commands/env.go | 2 ++ commands/genautocomplete.go | 1 - commands/gg.go | 3 --- work/env/service.go | 6 +++++- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/builder/build.go b/builder/build.go index 42dac38..72f08c1 100644 --- a/builder/build.go +++ b/builder/build.go @@ -1,5 +1,7 @@ package builder -type BuildArgs struct { - // Env string +type Flags struct { + All bool } + +var BuildFlags = Flags{} diff --git a/commands/env.go b/commands/env.go index d52e7f4..2b89ba6 100644 --- a/commands/env.go +++ b/commands/env.go @@ -2,6 +2,7 @@ package commands import ( log "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/builder" "github.com/blablacar/green-garden/config" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" @@ -95,6 +96,7 @@ func loadEnvCommands(rootCmd *cobra.Command) { update(cmd, args, work, env, service) }, } + updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd) diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index eeffa82..ec3dc59 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -40,7 +40,6 @@ or just source them in directly: } func init() { - genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", config.GetConfig().Path+"/ggn_completion.sh", "Autocompletion file") genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "Autocompletion type (currently only bash supported)") } diff --git a/commands/gg.go b/commands/gg.go index e504966..f089896 100644 --- a/commands/gg.go +++ b/commands/gg.go @@ -5,7 +5,6 @@ import ( "fmt" log "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" - "github.com/blablacar/green-garden/builder" "github.com/blablacar/green-garden/config" "github.com/coreos/go-semver/semver" "github.com/spf13/cobra" @@ -13,8 +12,6 @@ import ( "strings" ) -var buildArgs = builder.BuildArgs{} - const FLEET_SUPPORTED_VERSION = "0.11.5" func Execute() { diff --git a/work/env/service.go b/work/env/service.go index 0c1302d..48c495d 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -6,6 +6,7 @@ import ( "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" + "github.com/blablacar/green-garden/builder" "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" "github.com/blablacar/green-garden/work/env/service" @@ -151,7 +152,10 @@ units: u.Log.WithError(err).Warn("Cannot compare local and remote service") } if same { - u.Log.Warn("Remote service is already up to date") + u.Log.Info("Remote service is already up to date") + if !builder.BuildFlags.All { + continue units + } } action := s.askToProcessService(i, u) switch action { From 35e28803b645fc385bcf963a60dc5ab571c02cef Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 13:57:28 +0100 Subject: [PATCH 026/163] #8 add flag to force update without asking --- builder/build.go | 1 + commands/env.go | 1 + work/env/service.go | 3 +++ 3 files changed, 5 insertions(+) diff --git a/builder/build.go b/builder/build.go index 72f08c1..f84d405 100644 --- a/builder/build.go +++ b/builder/build.go @@ -2,6 +2,7 @@ package builder type Flags struct { All bool + Yes bool } var BuildFlags = Flags{} diff --git a/commands/env.go b/commands/env.go index 2b89ba6..51c32c1 100644 --- a/commands/env.go +++ b/commands/env.go @@ -97,6 +97,7 @@ func loadEnvCommands(rootCmd *cobra.Command) { }, } updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") + updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd) diff --git a/work/env/service.go b/work/env/service.go index 48c495d..bf23e4b 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -157,6 +157,9 @@ units: continue units } } + if builder.BuildFlags.Yes { + break ask + } action := s.askToProcessService(i, u) switch action { case ACTION_DIFF: From 1d60ff22e16834169827ec2514c64cf75a5e8c64 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 14:17:25 +0100 Subject: [PATCH 027/163] update release script --- release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.sh b/release.sh index e019d02..9366578 100755 --- a/release.sh +++ b/release.sh @@ -50,7 +50,7 @@ for i in ${dir}/dist/*-amd64/ ; do if [ -d "$i" ]; then cd $i platform=${PWD##*/} - tar cvzf green-garden-$platform-$version.tar.gz green-garden + tar cvzf green-garden-$platform-$version.tar.gz ggn cd - fi done From 5a2da0a01bb28c96414f78bb7efc79ca73d68a67 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 17:15:58 +0100 Subject: [PATCH 028/163] use same code for env diff, service diff and unit update diff --- commands/check.go | 26 +++++--------------------- work/env/service.go | 20 ++------------------ work/env/service/unit.go | 31 ++++++++++++++++++++++--------- 3 files changed, 29 insertions(+), 48 deletions(-) diff --git a/commands/check.go b/commands/check.go index 9bb5102..1aa00ec 100644 --- a/commands/check.go +++ b/commands/check.go @@ -18,29 +18,13 @@ func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString stri logEnv.WithError(err).Fatal("Cannot list unit files") } - for _, unit := range strings.Split(units, "\n") { - logUnit := logEnv.WithField("unit", unit) - - content, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) - if err != nil { - logUnit.WithError(err).Fatal("Fleetctl failed to cat service content") - } - unitInfo := strings.Split(unit, "_") - if unitInfo[0] != cmd.Use { - logUnit.Warn("Unknown unit") - continue - } - - res, err := env.LoadService(unitInfo[1]).LoadUnit(unit).GetUnitContentAsFleeted() - if err != nil { - logUnit.WithError(err).Warn("Cannot read unit file") + for _, unitName := range strings.Split(units, "\n") { + unitInfo := strings.Split(unitName, "_") + if len(unitInfo) != 3 { + logEnv.WithField("unit", unitName).Warn("Unknown unit format for GGN") continue } - if res != content { - logUnit.Info("Unit is not up to date") - logUnit.WithField("source", "fleet").Debug(content) - logUnit.WithField("source", "file").Debug(res) - } + env.LoadService(unitInfo[1]).LoadUnit(unitName).Check() } } diff --git a/work/env/service.go b/work/env/service.go index bf23e4b..28a5851 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -75,24 +75,8 @@ func (s *Service) ListUnits() []string { func (s *Service) Check() { unitNames := s.ListUnits() - for _, unit := range unitNames { - logUnit := s.log.WithField("unit", unit) - localContent, err := s.LoadUnit(unit).GetUnitContentAsFleeted() - if err != nil { - logUnit.WithError(err).Error("Cannot read unit file") - continue - } - remoteContent, err := s.GetFleetUnitContent(unit) - if err != nil { - logUnit.WithError(err).Error("Cannot read unit file") - continue - } - - if localContent != remoteContent { - logUnit.Error("Unit is not up to date") - logUnit.WithField("source", "fleet").Debug(remoteContent) - logUnit.WithField("source", "file").Debug(localContent) - } + for _, unitName := range unitNames { + s.LoadUnit(unitName).Check() } } diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 1362c1c..4740b91 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -32,6 +32,17 @@ func NewUnit(path string, name string, service spec.Service) *Unit { return unit } +func (u Unit) Check() { + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Warn("Cannot diff with remote") + } + if !same { + u.Log.Info("Unit is not up to date") + u.DisplayDiff() + } +} + func (u Unit) GetUnitContentAsFleeted() (string, error) { unitFileContent, err := ioutil.ReadFile(u.unitPath) if err != nil { @@ -46,19 +57,21 @@ func (u Unit) GetUnitContentAsFleeted() (string, error) { } func (u Unit) DisplayDiff() error { - u.Log.Info("Diff") + u.Log.Debug("Diff") local, remote, err := u.serviceLocalAndRemoteContent() if err != nil { return err } - ioutil.WriteFile("/tmp/ggn-local", []byte(local), 0644) - defer os.Remove("/tmp/ggn-local") - ioutil.WriteFile("/tmp/ggn-remote", []byte(remote), 0644) - defer os.Remove("/tmp/ggn-remote") - utils.ExecCmd("git", "diff", "/tmp/ggn-remote", "/tmp/ggn-local") - return nil + localPath := "/tmp/" + u.Name + "__local" + remotePath := "/tmp/" + u.Name + "__remote" + + ioutil.WriteFile(localPath, []byte(local), 0644) + defer os.Remove(localPath) + ioutil.WriteFile(remotePath, []byte(remote), 0644) + defer os.Remove(remotePath) + return utils.ExecCmd("git", "diff", remotePath, localPath) } func (u Unit) IsLocalContentSameAsRemote() (bool, error) { @@ -85,7 +98,7 @@ func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { } func (u Unit) Start() error { - u.Log.Info("Starting") + u.Log.Debug("Starting") _, err := u.service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) if err != nil { logrus.WithError(err).Error("Cannot start unit") @@ -95,7 +108,7 @@ func (u Unit) Start() error { } func (u Unit) Destroy() error { - u.Log.Info("Destroying") // todo check that service exists before destroy + u.Log.Debug("Destroying") // todo check that service exists before destroy _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") From 5b95331352edf04beecff4439ff50f1ddd11c68e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 17:16:15 +0100 Subject: [PATCH 029/163] move victory to debug level --- commands/gg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/gg.go b/commands/gg.go index f089896..31935e7 100644 --- a/commands/gg.go +++ b/commands/gg.go @@ -39,7 +39,7 @@ func Execute() { if err != nil { os.Exit(1) } - log.Info("Victory !") + log.Debug("Victory !") } func checkFleetVersion() { From 45af75c14aeafa1e0927df9622593d5b506153cd Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 17:48:33 +0100 Subject: [PATCH 030/163] generate units before check --- commands/check.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/check.go b/commands/check.go index 1aa00ec..ba37682 100644 --- a/commands/check.go +++ b/commands/check.go @@ -12,6 +12,7 @@ func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString stri logEnv.Info("Running command") env := work.LoadEnv(envString) + env.Generate() units, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") if err != nil { @@ -30,5 +31,6 @@ func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString stri func checkService(cmd *cobra.Command, args []string, work *work.Work, env string, serviceName string) { service := work.LoadEnv(env).LoadService(serviceName) + service.GenerateUnits(nil) service.Check() } From 0f740b00c0a8b3ed2e5a214f6a331fcf0e50f68d Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 18 Nov 2015 17:49:16 +0100 Subject: [PATCH 031/163] fix difference in unit compare when line continue with an empty line --- work/env/service/unit.go | 1 - 1 file changed, 1 deletion(-) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 4740b91..d25c19a 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -155,7 +155,6 @@ func convertMultilineUnitToString(content []byte) string { line := scanner.Text() if line == "" && currentLine != "" { currentLine = strings.TrimRight(currentLine, " ") - line = "\n" } currentLine += strings.TrimRight(line, " ") if strings.HasSuffix(currentLine, "\\") { From 04f96ee6de57d5ba2325b21eb6dcb192e6a688e9 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 20 Nov 2015 11:50:25 +0100 Subject: [PATCH 032/163] update appc --- Godeps/Godeps.json | 24 +- .../appc/spec/discovery/discovery.go | 38 +- .../github.com/appc/spec/discovery/http.go | 23 +- .../github.com/appc/spec/discovery/parse.go | 35 +- .../appc/spec/schema/common/common.go | 40 ++ .../src/github.com/appc/spec/schema/image.go | 8 + .../appc/spec/schema/lastditch/image.go | 1 + .../appc/spec/schema/lastditch/labels.go | 38 ++ .../appc/spec/schema/lastditch/pod.go | 11 +- .../src/github.com/appc/spec/schema/pod.go | 19 +- .../github.com/appc/spec/schema/types/app.go | 25 +- .../github.com/appc/spec/schema/types/exec.go | 12 +- .../appc/spec/schema/types/isolator.go | 26 +- .../schema/types/isolator_linux_specific.go | 77 +++- .../spec/schema/types/isolator_resources.go | 94 +++-- .../appc/spec/schema/types/mountpoint.go | 10 +- .../github.com/appc/spec/schema/types/port.go | 10 +- .../appc/spec/schema/types/volume.go | 62 ++- .../github.com/appc/spec/schema/version.go | 2 +- .../src/github.com/spf13/pflag/LICENSE | 28 ++ .../speter.net/go/exp/math/dec/inf/LICENSE | 57 +++ .../src/github.com/appc/spec/LICENSE | 202 ++++++++++ .../github.com/camlistore/camlistore/COPYING | 202 ++++++++++ .../clients/chrome/clip-it-good/LICENSE | 13 + .../camlistore/camlistore/misc/copyrightifity | 68 ++++ .../camlistore/camlistore/pkg/legal/legal.go | 50 +++ .../pkg/legal/legalprint/legalprint.go | 42 ++ .../third_party/bazil.org/fuse/LICENSE | 93 +++++ .../third_party/closure/lib/LICENSE | 176 +++++++++ .../code.google.com/p/goauth2/LICENSE | 27 ++ .../code.google.com/p/goauth2/PATENTS | 22 ++ .../code.google.com/p/leveldb-go/LICENSE | 27 ++ .../code.google.com/p/snappy-go/LICENSE | 27 ++ .../code.google.com/p/xsrftoken/COPYING | 202 ++++++++++ .../third_party/fontawesome/LICENSE.txt | 4 + .../github.com/camlistore/lock/COPYING | 202 ++++++++++ .../github.com/cznic/exp/dbm/LICENSE | 27 ++ .../github.com/cznic/exp/lldb/LICENSE | 27 ++ .../github.com/cznic/fileutil/LICENSE | 27 ++ .../github.com/cznic/fileutil/falloc/LICENSE | 27 ++ .../github.com/cznic/fileutil/hdb/LICENSE | 27 ++ .../github.com/cznic/fileutil/storage/LICENSE | 27 ++ .../third_party/github.com/cznic/kv/LICENSE | 27 ++ .../github.com/cznic/mathutil/LICENSE | 27 ++ .../cznic/mathutil/mersenne/LICENSE | 27 ++ .../github.com/cznic/sortutil/LICENSE | 27 ++ .../github.com/cznic/zappy/LICENSE | 27 ++ .../github.com/davecgh/go-spew/LICENSE | 13 + .../github.com/go-sql-driver/mysql/LICENSE | 373 ++++++++++++++++++ .../github.com/golang/glog/LICENSE | 191 +++++++++ .../github.com/gorilla/websocket/LICENSE | 23 ++ .../third_party/github.com/lib/pq/LICENSE.md | 8 + .../russross/blackfriday/LICENSE.txt | 29 ++ .../github.com/rwcarlsen/goexif/LICENSE | 24 ++ .../camlistore/third_party/glitch/LICENSE | 19 + .../third_party/golang.org/x/image/LICENSE | 27 ++ .../third_party/golang.org/x/image/PATENTS | 22 ++ .../third_party/labix.org/v2/mgo/LICENSE | 25 ++ .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 ++ .../camlistore/third_party/react/LICENSE.txt | 201 ++++++++++ .../github.com/hjfreyer/taglib-go/LICENSE | 191 +++++++++ .../vendor/golang.org/x/oauth2/LICENSE | 27 ++ .../googleapi/internal/uritemplates/LICENSE | 18 + .../vendor/google.golang.org/cloud/LICENSE | 202 ++++++++++ .../vendor/google.golang.org/grpc/LICENSE | 28 ++ .../vendor/google.golang.org/grpc/PATENTS | 22 ++ .../blablacar/cnt/spec/ac-fullname.go | 2 +- .../blablacar/cnt/utils/image-manifest.go | 40 -- .../github.com/camlistore/camlistore/COPYING | 202 ++++++++++ .../clients/chrome/clip-it-good/LICENSE | 13 + .../camlistore/camlistore/misc/copyrightifity | 68 ++++ .../camlistore/pkg/errorutil/highlight.go | 58 +++ .../camlistore/camlistore/pkg/legal/legal.go | 50 +++ .../pkg/legal/legalprint/legalprint.go | 42 ++ .../third_party/bazil.org/fuse/LICENSE | 93 +++++ .../third_party/closure/lib/LICENSE | 176 +++++++++ .../code.google.com/p/goauth2/LICENSE | 27 ++ .../code.google.com/p/goauth2/PATENTS | 22 ++ .../code.google.com/p/leveldb-go/LICENSE | 27 ++ .../code.google.com/p/snappy-go/LICENSE | 27 ++ .../code.google.com/p/xsrftoken/COPYING | 202 ++++++++++ .../third_party/fontawesome/LICENSE.txt | 4 + .../github.com/camlistore/lock/COPYING | 202 ++++++++++ .../github.com/cznic/exp/dbm/LICENSE | 27 ++ .../github.com/cznic/exp/lldb/LICENSE | 27 ++ .../github.com/cznic/fileutil/LICENSE | 27 ++ .../github.com/cznic/fileutil/falloc/LICENSE | 27 ++ .../github.com/cznic/fileutil/hdb/LICENSE | 27 ++ .../github.com/cznic/fileutil/storage/LICENSE | 27 ++ .../third_party/github.com/cznic/kv/LICENSE | 27 ++ .../github.com/cznic/mathutil/LICENSE | 27 ++ .../cznic/mathutil/mersenne/LICENSE | 27 ++ .../github.com/cznic/sortutil/LICENSE | 27 ++ .../github.com/cznic/zappy/LICENSE | 27 ++ .../github.com/davecgh/go-spew/LICENSE | 13 + .../github.com/go-sql-driver/mysql/LICENSE | 373 ++++++++++++++++++ .../github.com/golang/glog/LICENSE | 191 +++++++++ .../github.com/gorilla/websocket/LICENSE | 23 ++ .../third_party/github.com/lib/pq/LICENSE.md | 8 + .../russross/blackfriday/LICENSE.txt | 29 ++ .../github.com/rwcarlsen/goexif/LICENSE | 24 ++ .../camlistore/third_party/glitch/LICENSE | 19 + .../third_party/golang.org/x/image/LICENSE | 27 ++ .../third_party/golang.org/x/image/PATENTS | 22 ++ .../third_party/labix.org/v2/mgo/LICENSE | 25 ++ .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 ++ .../camlistore/third_party/react/LICENSE.txt | 201 ++++++++++ .../github.com/hjfreyer/taglib-go/LICENSE | 191 +++++++++ .../vendor/golang.org/x/oauth2/LICENSE | 27 ++ .../googleapi/internal/uritemplates/LICENSE | 18 + .../vendor/google.golang.org/cloud/LICENSE | 202 ++++++++++ .../vendor/google.golang.org/grpc/LICENSE | 28 ++ .../vendor/google.golang.org/grpc/PATENTS | 22 ++ work/env/service-generate.go | 2 +- work/env/service.go | 4 +- work/env/service/unit.go | 6 +- 116 files changed, 6626 insertions(+), 168 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/common/common.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index cf55a61..638ac89 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -9,13 +9,13 @@ }, { "ImportPath": "github.com/appc/spec/discovery", - "Comment": "v0.6.1-42-g2981bdf", - "Rev": "2981bdf7017cc2cd04fcaf0caf6342e552fa176e" + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" }, { "ImportPath": "github.com/appc/spec/schema", - "Comment": "v0.6.1-42-g2981bdf", - "Rev": "2981bdf7017cc2cd04fcaf0caf6342e552fa176e" + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" }, { "ImportPath": "github.com/blablacar/attributes-merger/attributes", @@ -24,18 +24,22 @@ }, { "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "44-4-g391f15a", - "Rev": "391f15a12d3723708f03fda1923732dfc60cce4a" + "Comment": "45-1-g7074012", + "Rev": "70740129b4c83de5a87c3d7eadf34271c4f1d7e4" }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "44-4-g391f15a", - "Rev": "391f15a12d3723708f03fda1923732dfc60cce4a" + "Comment": "45-1-g7074012", + "Rev": "70740129b4c83de5a87c3d7eadf34271c4f1d7e4" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "44-4-g391f15a", - "Rev": "391f15a12d3723708f03fda1923732dfc60cce4a" + "Comment": "45-1-g7074012", + "Rev": "70740129b4c83de5a87c3d7eadf34271c4f1d7e4" + }, + { + "ImportPath": "github.com/camlistore/camlistore/pkg/errorutil", + "Rev": "58958f44ee2eaa5139097dec3e02f47df0aba180" }, { "ImportPath": "github.com/coreos/etcd/client", diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go b/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go index eb772d7..6da2d85 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go +++ b/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go @@ -18,6 +18,7 @@ import ( "errors" "fmt" "io" + "net/http" "regexp" "strings" @@ -123,13 +124,13 @@ func createTemplateVars(app App) []string { return tplVars } -func doDiscover(pre string, app App, insecure bool) (*Endpoints, error) { +func doDiscover(pre string, hostHeaders map[string]http.Header, app App, insecure bool) (*Endpoints, error) { app = *app.Copy() if app.Labels["version"] == "" { app.Labels["version"] = defaultVersion } - _, body, err := httpsOrHTTP(pre, insecure) + _, body, err := httpsOrHTTP(pre, hostHeaders, insecure) if err != nil { return nil, err } @@ -169,9 +170,10 @@ func doDiscover(pre string, app App, insecure bool) (*Endpoints, error) { } // DiscoverWalk will make HTTPS requests to find discovery meta tags and -// optionally will use HTTP if insecure is set. Based on the response of the -// discoverFn it will continue to recurse up the tree. -func DiscoverWalk(app App, insecure bool, discoverFn DiscoverWalkFunc) (err error) { +// optionally will use HTTP if insecure is set. hostHeaders specifies the +// header to apply depending on the host (e.g. authentication). Based on the +// response of the discoverFn it will continue to recurse up the tree. +func DiscoverWalk(app App, hostHeaders map[string]http.Header, insecure bool, discoverFn DiscoverWalkFunc) (err error) { var ( eps *Endpoints ) @@ -181,10 +183,9 @@ func DiscoverWalk(app App, insecure bool, discoverFn DiscoverWalkFunc) (err erro end := len(parts) - i pre := strings.Join(parts[:end], "/") - eps, err = doDiscover(pre, app, insecure) - derr := discoverFn(pre, eps, err) - if derr != nil { - return err + eps, err = doDiscover(pre, hostHeaders, app, insecure) + if derr := discoverFn(pre, eps, err); derr != nil { + return derr } } @@ -216,9 +217,11 @@ func walker(out *Endpoints, attempts *[]FailedAttempt, testFn DiscoverWalkFunc) } // DiscoverEndpoints will make HTTPS requests to find the ac-discovery meta -// tags and optionally will use HTTP if insecure is set. It will not give up -// until it has exhausted the path or found an image discovery. -func DiscoverEndpoints(app App, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error) { +// tags and optionally will use HTTP if insecure is set. hostHeaders +// specifies the header to apply depending on the host (e.g. authentication). +// It will not give up until it has exhausted the path or found an image +// discovery. +func DiscoverEndpoints(app App, hostHeaders map[string]http.Header, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error) { out = &Endpoints{} testFn := func(pre string, eps *Endpoints, err error) error { if len(out.ACIEndpoints) != 0 { @@ -227,7 +230,7 @@ func DiscoverEndpoints(app App, insecure bool) (out *Endpoints, attempts []Faile return nil } - err = DiscoverWalk(app, insecure, walker(out, &attempts, testFn)) + err = DiscoverWalk(app, hostHeaders, insecure, walker(out, &attempts, testFn)) if err != nil && err != errEnough { return nil, attempts, err } @@ -236,9 +239,10 @@ func DiscoverEndpoints(app App, insecure bool) (out *Endpoints, attempts []Faile } // DiscoverPublicKey will make HTTPS requests to find the ac-public-keys meta -// tags and optionally will use HTTP if insecure is set. It will not give up -// until it has exhausted the path or found an public key. -func DiscoverPublicKeys(app App, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error) { +// tags and optionally will use HTTP if insecure is set. hostHeaders +// specifies the header to apply depending on the host (e.g. authentication). +// It will not give up until it has exhausted the path or found an public key. +func DiscoverPublicKeys(app App, hostHeaders map[string]http.Header, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error) { out = &Endpoints{} testFn := func(pre string, eps *Endpoints, err error) error { if len(out.Keys) != 0 { @@ -247,7 +251,7 @@ func DiscoverPublicKeys(app App, insecure bool) (out *Endpoints, attempts []Fail return nil } - err = DiscoverWalk(app, insecure, walker(out, &attempts, testFn)) + err = DiscoverWalk(app, hostHeaders, insecure, walker(out, &attempts, testFn)) if err != nil && err != errEnough { return nil, attempts, err } diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/http.go b/Godeps/_workspace/src/github.com/appc/spec/discovery/http.go index 4198201..3b0d1d4 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/http.go +++ b/Godeps/_workspace/src/github.com/appc/spec/discovery/http.go @@ -31,15 +31,15 @@ var ( // Client is the default http.Client used for discovery requests. Client *http.Client - // httpGet is the internal object used by discovery to retrieve URLs; it is + // httpDo is the internal object used by discovery to retrieve URLs; it is // defined here so it can be overridden for testing - httpGet httpGetter + httpDo httpDoer ) -// httpGetter is an interface used to wrap http.Client for real requests and +// httpDoer is an interface used to wrap http.Client for real requests and // allow easy mocking in local tests. -type httpGetter interface { - Get(url string) (resp *http.Response, err error) +type httpDoer interface { + Do(req *http.Request) (resp *http.Response, err error) } func init() { @@ -52,10 +52,10 @@ func init() { Client = &http.Client{ Transport: t, } - httpGet = Client + httpDo = Client } -func httpsOrHTTP(name string, insecure bool) (urlStr string, body io.ReadCloser, err error) { +func httpsOrHTTP(name string, hostHeaders map[string]http.Header, insecure bool) (urlStr string, body io.ReadCloser, err error) { fetch := func(scheme string) (urlStr string, res *http.Response, err error) { u, err := url.Parse(scheme + "://" + name) if err != nil { @@ -63,7 +63,14 @@ func httpsOrHTTP(name string, insecure bool) (urlStr string, body io.ReadCloser, } u.RawQuery = "ac-discovery=1" urlStr = u.String() - res, err = httpGet.Get(urlStr) + req, err := http.NewRequest("GET", urlStr, nil) + if err != nil { + return "", nil, err + } + if hostHeader, ok := hostHeaders[u.Host]; ok { + req.Header = hostHeader + } + res, err = httpDo.Do(req) return } closeBody := func(res *http.Response) { diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/parse.go b/Godeps/_workspace/src/github.com/appc/spec/discovery/parse.go index 2576d41..7b9d574 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/parse.go +++ b/Godeps/_workspace/src/github.com/appc/spec/discovery/parse.go @@ -19,6 +19,7 @@ import ( "net/url" "strings" + "github.com/appc/spec/schema/common" "github.com/appc/spec/schema/types" ) @@ -46,15 +47,22 @@ func NewApp(name string, labels map[types.ACIdentifier]string) (*App, error) { // Example app parameters: // example.com/reduce-worker:1.0.0 // example.com/reduce-worker,channel=alpha,label=value +// example.com/reduce-worker:1.0.0,label=value +// +// As can be seen in above examples - colon, comma and equal sign have +// special meaning. If any of them has to be a part of a label's value +// then consider writing your own string to App parser. func NewAppFromString(app string) (*App, error) { var ( name string labels map[types.ACIdentifier]string ) - app = strings.Replace(app, ":", ",version=", -1) - app = "name=" + app - v, err := url.ParseQuery(strings.Replace(app, ",", "&", -1)) + preparedApp, err := prepareAppString(app) + if err != nil { + return nil, err + } + v, err := url.ParseQuery(preparedApp) if err != nil { return nil, err } @@ -80,6 +88,27 @@ func NewAppFromString(app string) (*App, error) { return a, nil } +func prepareAppString(app string) (string, error) { + if err := checkColon(app); err != nil { + return "", err + } + + app = "name=" + strings.Replace(app, ":", ",version=", 1) + return common.MakeQueryString(app) +} + +func checkColon(app string) error { + firstComma := strings.IndexRune(app, ',') + firstColon := strings.IndexRune(app, ':') + if firstColon > firstComma && firstComma > -1 { + return fmt.Errorf("malformed app string - colon may appear only right after the app name") + } + if strings.Count(app, ":") > 1 { + return fmt.Errorf("malformed app string - colon may appear at most once") + } + return nil +} + func (a *App) Copy() *App { ac := &App{ Name: a.Name, diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/common/common.go b/Godeps/_workspace/src/github.com/appc/spec/schema/common/common.go new file mode 100644 index 0000000..ffc0f6f --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/common/common.go @@ -0,0 +1,40 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package common + +import ( + "fmt" + "net/url" + "strings" +) + +// MakeQueryString takes a comma-separated LABEL=VALUE string and returns an +// "&"-separated string with URL escaped values. +// +// Examples: +// version=1.0.0,label=v1+v2 -> version=1.0.0&label=v1%2Bv2 +// name=db,source=/tmp$1 -> name=db&source=%2Ftmp%241 +func MakeQueryString(app string) (string, error) { + parts := strings.Split(app, ",") + escapedParts := make([]string, len(parts)) + for i, s := range parts { + p := strings.SplitN(s, "=", 2) + if len(p) != 2 { + return "", fmt.Errorf("malformed string %q - has a label without a value: %s", app, p[0]) + } + escapedParts[i] = fmt.Sprintf("%s=%s", p[0], url.QueryEscape(p[1])) + } + return strings.Join(escapedParts, "&"), nil +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/image.go b/Godeps/_workspace/src/github.com/appc/spec/schema/image.go index ddc99ef..5aa536f 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/image.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/image.go @@ -15,10 +15,14 @@ package schema import ( + "bytes" "encoding/json" "errors" + "fmt" "github.com/appc/spec/schema/types" + + "github.com/camlistore/camlistore/pkg/errorutil" ) const ( @@ -49,6 +53,10 @@ func (im *ImageManifest) UnmarshalJSON(data []byte) error { a := imageManifest(*im) err := json.Unmarshal(data, &a) if err != nil { + if serr, ok := err.(*json.SyntaxError); ok { + line, col, highlight := errorutil.HighlightBytePosition(bytes.NewReader(data), serr.Offset) + return fmt.Errorf("\nError at line %d, column %d\n%s%v", line, col, highlight, err) + } return err } nim := ImageManifest(a) diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go index b5787d0..dc5055a 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go @@ -25,6 +25,7 @@ type ImageManifest struct { ACVersion string `json:"acVersion"` ACKind string `json:"acKind"` Name string `json:"name"` + Labels Labels `json:"labels,omitempty"` } // a type just to avoid a recursion during unmarshalling diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go new file mode 100644 index 0000000..5cf93a0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go @@ -0,0 +1,38 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package lastditch + +import ( + "encoding/json" +) + +type Labels []Label + +// a type just to avoid a recursion during unmarshalling +type labels Labels + +type Label struct { + Name string `json:"name"` + Value string `json:"value"` +} + +func (l *Labels) UnmarshalJSON(data []byte) error { + var jl labels + if err := json.Unmarshal(data, &jl); err != nil { + return err + } + *l = Labels(jl) + return nil +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go index 04e60d7..2e9d845 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go @@ -30,13 +30,14 @@ type PodManifest struct { type AppList []RuntimeApp type RuntimeApp struct { - Name string `json:"name"` - Image Image `json:"image"` + Name string `json:"name"` + Image RuntimeImage `json:"image"` } -type Image struct { - Name string `json:"name"` - ID string `json:"id"` +type RuntimeImage struct { + Name string `json:"name"` + ID string `json:"id"` + Labels Labels `json:"labels,omitempty"` } // a type just to avoid a recursion during unmarshalling diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/pod.go b/Godeps/_workspace/src/github.com/appc/spec/schema/pod.go index 9c1333b..4046816 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/pod.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/pod.go @@ -15,11 +15,14 @@ package schema import ( + "bytes" "encoding/json" "errors" "fmt" "github.com/appc/spec/schema/types" + + "github.com/camlistore/camlistore/pkg/errorutil" ) const PodManifestKind = types.ACKind("PodManifest") @@ -46,6 +49,10 @@ func (pm *PodManifest) UnmarshalJSON(data []byte) error { p := podManifest(*pm) err := json.Unmarshal(data, &p) if err != nil { + if serr, ok := err.(*json.SyntaxError); ok { + line, col, highlight := errorutil.HighlightBytePosition(bytes.NewReader(data), serr.Offset) + return fmt.Errorf("\nError at line %d, column %d\n%s%v", line, col, highlight, err) + } return err } npm := PodManifest(p) @@ -126,19 +133,19 @@ func (al AppList) Get(name types.ACName) *RuntimeApp { return nil } -// Mount describes the mapping between a volume and an apps -// MountPoint that will be fulfilled at runtime. +// Mount describes the mapping between a volume and the path it is mounted +// inside of an app's filesystem. type Mount struct { - Volume types.ACName `json:"volume"` - MountPoint types.ACName `json:"mountPoint"` + Volume types.ACName `json:"volume"` + Path string `json:"path"` } func (r Mount) assertValid() error { if r.Volume.Empty() { return errors.New("volume must be set") } - if r.MountPoint.Empty() { - return errors.New("mountPoint must be set") + if r.Path == "" { + return errors.New("path must be set") } return nil } diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/app.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/app.go index 9f25a33..df13bf1 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/app.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/app.go @@ -22,15 +22,16 @@ import ( ) type App struct { - Exec Exec `json:"exec"` - EventHandlers []EventHandler `json:"eventHandlers,omitempty"` - User string `json:"user"` - Group string `json:"group"` - WorkingDirectory string `json:"workingDirectory,omitempty"` - Environment Environment `json:"environment,omitempty"` - MountPoints []MountPoint `json:"mountPoints,omitempty"` - Ports []Port `json:"ports,omitempty"` - Isolators Isolators `json:"isolators,omitempty"` + Exec Exec `json:"exec"` + EventHandlers []EventHandler `json:"eventHandlers,omitempty"` + User string `json:"user"` + Group string `json:"group"` + SupplementaryGIDs []int `json:"supplementaryGIDs,omitempty"` + WorkingDirectory string `json:"workingDirectory,omitempty"` + Environment Environment `json:"environment,omitempty"` + MountPoints []MountPoint `json:"mountPoints,omitempty"` + Ports []Port `json:"ports,omitempty"` + Isolators Isolators `json:"isolators,omitempty"` } // app is a model to facilitate extra validation during the @@ -66,13 +67,13 @@ func (a *App) assertValid() error { return err } if a.User == "" { - return errors.New(`User is required`) + return errors.New(`user is required`) } if a.Group == "" { - return errors.New(`Group is required`) + return errors.New(`group is required`) } if !path.IsAbs(a.WorkingDirectory) && a.WorkingDirectory != "" { - return errors.New("WorkingDirectory must be an absolute path") + return errors.New("workingDirectory must be an absolute path") } eh := make(map[string]bool) for _, e := range a.EventHandlers { diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec.go index 0ba7b98..fa8b156 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec.go @@ -14,23 +14,13 @@ package types -import ( - "encoding/json" - "errors" - "path/filepath" -) +import "encoding/json" type Exec []string type exec Exec func (e Exec) assertValid() error { - if len(e) < 1 { - return errors.New(`Exec cannot be empty`) - } - if !filepath.IsAbs(e[0]) { - return errors.New(`Exec[0] must be absolute path`) - } return nil } diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator.go index 49c7da9..ecdab00 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator.go @@ -36,6 +36,8 @@ func AddIsolatorName(n ACIdentifier, ns map[ACIdentifier]struct{}) { ns[n] = struct{}{} } +// Isolators encapsulates a list of individual Isolators for the ImageManifest +// and PodManifest schemas. type Isolators []Isolator // GetByName returns the last isolator in the list by the given name. @@ -63,21 +65,41 @@ func (is *Isolators) Unrecognized() Isolators { return u } +// IsolatorValue encapsulates the actual value of an Isolator which may be +// serialized as any arbitrary JSON blob. Specific Isolator types should +// implement this interface to facilitate unmarshalling and validation. type IsolatorValue interface { UnmarshalJSON(b []byte) error AssertValid() error } + +// Isolator is a model for unmarshalling isolator types from their JSON-encoded +// representation. type Isolator struct { - Name ACIdentifier `json:"name"` + // Name is the name of the Isolator type as defined in the specification. + Name ACIdentifier `json:"name"` + // ValueRaw captures the raw JSON value of an Isolator that was + // unmarshalled. This field is used for unmarshalling only. It MUST NOT + // be referenced by external users of the Isolator struct. It is + // exported only to satisfy Go's unfortunate requirement that fields + // must be capitalized to be unmarshalled successfully. ValueRaw *json.RawMessage `json:"value"` - value IsolatorValue + // value captures the "true" value of the isolator. + value IsolatorValue } + +// isolator is a shadow type used for unmarshalling. type isolator Isolator +// Value returns the raw Value of this Isolator. Users should perform a type +// switch/assertion on this value to extract the underlying isolator type. func (i *Isolator) Value() IsolatorValue { return i.value } +// UnmarshalJSON populates this Isolator from a JSON-encoded representation. To +// unmarshal the Value of the Isolator, it will use the appropriate constructor +// as registered by AddIsolatorValueConstructor. func (i *Isolator) UnmarshalJSON(b []byte) error { var ii isolator err := json.Unmarshal(b, &ii) diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_linux_specific.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_linux_specific.go index 23d4653..ae4bfee 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_linux_specific.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_linux_specific.go @@ -27,11 +27,13 @@ const ( var LinuxIsolatorNames = make(map[ACIdentifier]struct{}) func init() { - AddIsolatorName(LinuxCapabilitiesRetainSetName, LinuxIsolatorNames) - AddIsolatorName(LinuxCapabilitiesRevokeSetName, LinuxIsolatorNames) - - AddIsolatorValueConstructor(LinuxCapabilitiesRetainSetName, NewLinuxCapabilitiesRetainSet) - AddIsolatorValueConstructor(LinuxCapabilitiesRevokeSetName, NewLinuxCapabilitiesRevokeSet) + for name, con := range map[ACIdentifier]IsolatorValueConstructor{ + LinuxCapabilitiesRevokeSetName: func() IsolatorValue { return &LinuxCapabilitiesRevokeSet{} }, + LinuxCapabilitiesRetainSetName: func() IsolatorValue { return &LinuxCapabilitiesRetainSet{} }, + } { + AddIsolatorName(name, LinuxIsolatorNames) + AddIsolatorValueConstructor(name, con) + } } type LinuxCapabilitiesSet interface { @@ -40,6 +42,7 @@ type LinuxCapabilitiesSet interface { } type LinuxCapability string + type linuxCapabilitiesSetValue struct { Set []LinuxCapability `json:"set"` } @@ -71,18 +74,70 @@ func (l linuxCapabilitiesSetBase) Set() []LinuxCapability { return l.val.Set } -func NewLinuxCapabilitiesRetainSet() IsolatorValue { - return &LinuxCapabilitiesRetainSet{} -} - type LinuxCapabilitiesRetainSet struct { linuxCapabilitiesSetBase } -func NewLinuxCapabilitiesRevokeSet() IsolatorValue { - return &LinuxCapabilitiesRevokeSet{} +func NewLinuxCapabilitiesRetainSet(caps ...string) (*LinuxCapabilitiesRetainSet, error) { + l := LinuxCapabilitiesRetainSet{ + linuxCapabilitiesSetBase{ + linuxCapabilitiesSetValue{ + make([]LinuxCapability, len(caps)), + }, + }, + } + for i, c := range caps { + l.linuxCapabilitiesSetBase.val.Set[i] = LinuxCapability(c) + } + if err := l.AssertValid(); err != nil { + return nil, err + } + return &l, nil +} + +func (l LinuxCapabilitiesRetainSet) AsIsolator() Isolator { + b, err := json.Marshal(l) + if err != nil { + panic(err) + } + rm := json.RawMessage(b) + return Isolator{ + Name: LinuxCapabilitiesRetainSetName, + ValueRaw: &rm, + value: &l, + } } type LinuxCapabilitiesRevokeSet struct { linuxCapabilitiesSetBase } + +func NewLinuxCapabilitiesRevokeSet(caps ...string) (*LinuxCapabilitiesRevokeSet, error) { + l := LinuxCapabilitiesRevokeSet{ + linuxCapabilitiesSetBase{ + linuxCapabilitiesSetValue{ + make([]LinuxCapability, len(caps)), + }, + }, + } + for i, c := range caps { + l.linuxCapabilitiesSetBase.val.Set[i] = LinuxCapability(c) + } + if err := l.AssertValid(); err != nil { + return nil, err + } + return &l, nil +} + +func (l LinuxCapabilitiesRevokeSet) AsIsolator() Isolator { + b, err := json.Marshal(l) + if err != nil { + panic(err) + } + rm := json.RawMessage(b) + return Isolator{ + Name: LinuxCapabilitiesRevokeSetName, + ValueRaw: &rm, + value: &l, + } +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go index 46fe83f..eb791ef 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go @@ -17,6 +17,7 @@ package types import ( "encoding/json" "errors" + "fmt" "k8s.io/kubernetes/pkg/api/resource" ) @@ -38,33 +39,16 @@ const ( ) func init() { - AddIsolatorName(ResourceBlockBandwidthName, ResourceIsolatorNames) - AddIsolatorName(ResourceBlockIOPSName, ResourceIsolatorNames) - AddIsolatorName(ResourceCPUName, ResourceIsolatorNames) - AddIsolatorName(ResourceMemoryName, ResourceIsolatorNames) - AddIsolatorName(ResourceNetworkBandwidthName, ResourceIsolatorNames) - - AddIsolatorValueConstructor(ResourceBlockBandwidthName, NewResourceBlockBandwidth) - AddIsolatorValueConstructor(ResourceBlockIOPSName, NewResourceBlockIOPS) - AddIsolatorValueConstructor(ResourceCPUName, NewResourceCPU) - AddIsolatorValueConstructor(ResourceMemoryName, NewResourceMemory) - AddIsolatorValueConstructor(ResourceNetworkBandwidthName, NewResourceNetworkBandwidth) -} - -func NewResourceBlockBandwidth() IsolatorValue { - return &ResourceBlockBandwidth{} -} -func NewResourceBlockIOPS() IsolatorValue { - return &ResourceBlockIOPS{} -} -func NewResourceCPU() IsolatorValue { - return &ResourceCPU{} -} -func NewResourceNetworkBandwidth() IsolatorValue { - return &ResourceNetworkBandwidth{} -} -func NewResourceMemory() IsolatorValue { - return &ResourceMemory{} + for name, con := range map[ACIdentifier]IsolatorValueConstructor{ + ResourceBlockBandwidthName: func() IsolatorValue { return &ResourceBlockBandwidth{} }, + ResourceBlockIOPSName: func() IsolatorValue { return &ResourceBlockIOPS{} }, + ResourceCPUName: func() IsolatorValue { return &ResourceCPU{} }, + ResourceMemoryName: func() IsolatorValue { return &ResourceMemory{} }, + ResourceNetworkBandwidthName: func() IsolatorValue { return &ResourceNetworkBandwidth{} }, + } { + AddIsolatorName(name, ResourceIsolatorNames) + AddIsolatorValueConstructor(name, con) + } } type Resource interface { @@ -133,6 +117,10 @@ type ResourceCPU struct { ResourceBase } +func (r ResourceCPU) String() string { + return fmt.Sprintf("ResourceCPU(request=%s, limit=%s)", r.Request(), r.Limit()) +} + func (r ResourceCPU) AssertValid() error { if r.Default() != false { return ErrDefaultTrue @@ -140,10 +128,38 @@ func (r ResourceCPU) AssertValid() error { return nil } +func NewResourceCPUIsolator(request, limit string) (*ResourceCPU, error) { + req, err := resource.ParseQuantity(request) + if err != nil { + return nil, fmt.Errorf("error parsing request: %v", err) + } + lim, err := resource.ParseQuantity(limit) + if err != nil { + return nil, fmt.Errorf("error parsing limit: %v", err) + } + res := &ResourceCPU{ + ResourceBase{ + resourceValue{ + Request: req, + Limit: lim, + }, + }, + } + if err := res.AssertValid(); err != nil { + // should never happen + return nil, err + } + return res, nil +} + type ResourceMemory struct { ResourceBase } +func (r ResourceMemory) String() string { + return fmt.Sprintf("ResourceMemory(request=%s, limit=%s)", r.Request(), r.Limit()) +} + func (r ResourceMemory) AssertValid() error { if r.Default() != false { return ErrDefaultTrue @@ -151,6 +167,30 @@ func (r ResourceMemory) AssertValid() error { return nil } +func NewResourceMemoryIsolator(request, limit string) (*ResourceMemory, error) { + req, err := resource.ParseQuantity(request) + if err != nil { + return nil, fmt.Errorf("error parsing request: %v", err) + } + lim, err := resource.ParseQuantity(limit) + if err != nil { + return nil, fmt.Errorf("error parsing limit: %v", err) + } + res := &ResourceMemory{ + ResourceBase{ + resourceValue{ + Request: req, + Limit: lim, + }, + }, + } + if err := res.AssertValid(); err != nil { + // should never happen + return nil, err + } + return res, nil +} + type ResourceNetworkBandwidth struct { ResourceBase } diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint.go index 69ff114..80eab94 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint.go @@ -19,7 +19,8 @@ import ( "fmt" "net/url" "strconv" - "strings" + + "github.com/appc/spec/schema/common" ) type MountPoint struct { @@ -48,7 +49,12 @@ func MountPointFromString(mp string) (*MountPoint, error) { var mount MountPoint mp = "name=" + mp - v, err := url.ParseQuery(strings.Replace(mp, ",", "&", -1)) + mpQuery, err := common.MakeQueryString(mp) + if err != nil { + return nil, err + } + + v, err := url.ParseQuery(mpQuery) if err != nil { return nil, err } diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/port.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/port.go index 519025e..78d6de4 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/port.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/port.go @@ -20,7 +20,8 @@ import ( "fmt" "net/url" "strconv" - "strings" + + "github.com/appc/spec/schema/common" ) type Port struct { @@ -84,7 +85,12 @@ func PortFromString(pt string) (*Port, error) { var port Port pt = "name=" + pt - v, err := url.ParseQuery(strings.Replace(pt, ",", "&", -1)) + ptQuery, err := common.MakeQueryString(pt) + if err != nil { + return nil, err + } + + v, err := url.ParseQuery(ptQuery) if err != nil { return nil, err } diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume.go b/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume.go index eeee3a6..6f49078 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume.go @@ -21,7 +21,8 @@ import ( "net/url" "path/filepath" "strconv" - "strings" + + "github.com/appc/spec/schema/common" ) // Volume encapsulates a volume which should be mounted into the filesystem @@ -34,6 +35,11 @@ type Volume struct { // TODO(jonboulle): factor out? Source string `json:"source,omitempty"` ReadOnly *bool `json:"readOnly,omitempty"` + + // currently used only by "empty" + Mode string `json:"mode,omitempty"` + UID int `json:"uid,omitempty"` + GID int `json:"gid,omitempty"` } type volume Volume @@ -48,6 +54,15 @@ func (v Volume) assertValid() error { if v.Source != "" { return errors.New("source for empty volume must be empty") } + if v.Mode == "" { + return errors.New("mode for empty volume must be set") + } + if v.UID == -1 { + return errors.New("uid for empty volume must be set") + } + if v.GID == -1 { + return errors.New("gid for empty volume must be set") + } return nil case "host": if v.Source == "" { @@ -64,6 +79,9 @@ func (v Volume) assertValid() error { func (v *Volume) UnmarshalJSON(data []byte) error { var vv volume + vv.Mode = "0755" + vv.UID = 0 + vv.GID = 0 if err := json.Unmarshal(data, &vv); err != nil { return err } @@ -71,6 +89,11 @@ func (v *Volume) UnmarshalJSON(data []byte) error { if err := nv.assertValid(); err != nil { return err } + if nv.Kind != "empty" { + nv.Mode = "" + nv.UID = -1 + nv.GID = -1 + } *v = nv return nil } @@ -85,7 +108,10 @@ func (v Volume) MarshalJSON() ([]byte, error) { func (v Volume) String() string { s := fmt.Sprintf("%s,kind=%s,readOnly=%t", v.Name, v.Kind, *v.ReadOnly) if v.Source != "" { - s = s + fmt.Sprintf("source=%s", v.Source) + s = s + fmt.Sprintf(",source=%s", v.Source) + } + if v.Mode != "" && v.UID != -1 && v.GID != -1 { + s = s + fmt.Sprintf(",mode=%s,uid=%d,gid=%d", v.Mode, v.UID, v.GID) } return s } @@ -95,10 +121,19 @@ func (v Volume) String() string { // Example volume parameters: // database,kind=host,source=/tmp,readOnly=true func VolumeFromString(vp string) (*Volume, error) { - var vol Volume + vol := Volume{ + Mode: "0755", + UID: 0, + GID: 0, + } vp = "name=" + vp - v, err := url.ParseQuery(strings.Replace(vp, ",", "&", -1)) + vpQuery, err := common.MakeQueryString(vp) + if err != nil { + return nil, err + } + + v, err := url.ParseQuery(vpQuery) if err != nil { return nil, err } @@ -124,6 +159,20 @@ func VolumeFromString(vp string) (*Volume, error) { return nil, err } vol.ReadOnly = &ro + case "mode": + vol.Mode = val[0] + case "uid": + u, err := strconv.Atoi(val[0]) + if err != nil { + return nil, err + } + vol.UID = u + case "gid": + g, err := strconv.Atoi(val[0]) + if err != nil { + return nil, err + } + vol.GID = g default: return nil, fmt.Errorf("unknown volume parameter %q", key) } @@ -132,6 +181,11 @@ func VolumeFromString(vp string) (*Volume, error) { if err != nil { return nil, err } + if vol.Kind != "empty" { + vol.Mode = "" + vol.UID = -1 + vol.GID = -1 + } return &vol, nil } diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/version.go b/Godeps/_workspace/src/github.com/appc/spec/schema/version.go index 412a634..395ec35 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/version.go +++ b/Godeps/_workspace/src/github.com/appc/spec/schema/version.go @@ -22,7 +22,7 @@ const ( // version represents the canonical version of the appc spec and tooling. // For now, the schema and tooling is coupled with the spec itself, so // this must be kept in sync with the VERSION file in the root of the repo. - version string = "0.6.1+git" + version string = "0.7.1+git" ) var ( diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE new file mode 100644 index 0000000..055361b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010 Brett Slatkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity new file mode 100644 index 0000000..14db513 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This script adds copyright headers to files. + +use strict; +my $header = do { local $/; <DATA> }; +$header =~ s!\s+$!\n!; +my $yyyy = (localtime())[5] + 1900; +$header =~ s/YYYY/$yyyy/ or die; + +unless (@ARGV == 1) { + die "Usage: copyrightify <filename>\n"; +} + +my $file = shift; +open(my $fh, $file) or die "Open $file error: $!\n"; +my $source = do { local $/; <$fh> }; +close($fh); +if ($source =~ /Copyright \d\d\d\d/) { + print STDERR "# $file - OK\n"; + exit; +} + +my $newsource = $source; +if ($file =~ /\.(go|java|aidl)$/) { + $header = "/*\n$header*/\n\n"; + $newsource = $header . $source; +} elsif ($file =~ /\.py$/) { + $header = join("", map { "# $_\n" } split(/\n/, $header)); + $newsource = $header . $source; +} else { + die "File type not supported."; +} + + +open(my $fh, ">$file") or die "Open $file error: $!\n"; +print $fh $newsource; +close($fh) or die; + +__END__ +Copyright YYYY The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go new file mode 100644 index 0000000..a75283f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go @@ -0,0 +1,50 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legal provides project-wide storage for compiled-in licenses. +package legal + +var licenses []string + +func init() { + RegisterLicense(` +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +`) +} + +// RegisterLicense stores the license text. +// It doesn't check whether the text was already present. +func RegisterLicense(text string) { + licenses = append(licenses, text) + return +} + +// Licenses returns a slice of the licenses. +func Licenses() []string { + return licenses +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go new file mode 100644 index 0000000..e4a3205 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go @@ -0,0 +1,42 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legalprint provides a printing helper for the legal package. +package legalprint + +import ( + "flag" + "fmt" + "io" + + "camlistore.org/pkg/legal" +) + +var ( + flagLegal = flag.Bool("legal", false, "show licenses") +) + +// MaybePrint will print the licenses if flagLegal has been set. +// It will return the value of the flagLegal. +func MaybePrint(out io.Writer) bool { + if !*flagLegal { + return false + } + for _, text := range legal.Licenses() { + fmt.Fprintln(out, text) + } + return true +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE new file mode 100644 index 0000000..d369cb8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE @@ -0,0 +1,93 @@ +Copyright (c) 2013, 2014 Tommi Virtanen. +Copyright (c) 2009, 2011, 2012 The Go Authors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The following included software components have additional copyright +notices and license terms that may differ from the above. + + +File fuse.go: + +// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, +// which carries this notice: +// +// The files in this directory are subject to the following license. +// +// The author of this software is Russ Cox. +// +// Copyright (c) 2006 Russ Cox +// +// Permission to use, copy, modify, and distribute this software for any +// purpose without fee is hereby granted, provided that this entire notice +// is included in all copies of any software which is or includes a copy +// or modification of this software and in all copies of the supporting +// documentation for such software. +// +// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY +// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS +// FITNESS FOR ANY PARTICULAR PURPOSE. + + +File fuse_kernel.go: + +// Derived from FUSE's fuse_kernel.h +/* + This file defines the kernel interface of FUSE + Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> + + + This -- and only this -- header file may also be distributed under + the terms of the BSD Licence as follows: + + Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE new file mode 100644 index 0000000..6765f09 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The goauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS new file mode 100644 index 0000000..9e87163 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the goauth2 project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE new file mode 100644 index 0000000..fec05ce --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE new file mode 100644 index 0000000..6050c10 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt new file mode 100644 index 0000000..1066d2f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt @@ -0,0 +1,4 @@ +fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) +css/*: MIT (http://opensource.org/licenses/mit-license.html) + +Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE new file mode 100644 index 0000000..50bbdd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The fileutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE new file mode 100644 index 0000000..7150ce3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 jnml. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of jnml nor the names of his +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE new file mode 100644 index 0000000..2a7cfd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2012-2013 Dave Collins <dave@davec.name> + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE new file mode 100644 index 0000000..14e2f77 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE new file mode 100644 index 0000000..09e5be6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Gorilla web toolkit +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md new file mode 100644 index 0000000..5773904 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md @@ -0,0 +1,8 @@ +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE new file mode 100644 index 0000000..aa62504 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE @@ -0,0 +1,24 @@ + +Copyright (c) 2012, Robert Carlsen & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE new file mode 100644 index 0000000..7efba3b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE @@ -0,0 +1,19 @@ +The files in here come from www.glitchthegame.com. + +License here: http://www.glitchthegame.com/public-domain-game-art/#licensing + +All files are provided by Tiny Speck under the Creative Commons CC0 1.0 +Universal License. This is a broadly permissive "No Rights Reserved" license — +you may do what you please with what we've provided. Our intention is to +dedicate these works to the public domain and make them freely available to all, +without restriction. All files are provided AS-IS. Tiny Speck cannot provide any +support to help you bring these assets into your own projects. + +Note: the Glitch logo and trademark are not among the things we are making +available under this license. Only items in the files explicitly included herein +are covered. + +There is no obligation to link or credit the works, but if you do, please link +to glitchthegame.com, our permanent "retirement" site for the game and these +assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack +(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE new file mode 100644 index 0000000..770c767 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE @@ -0,0 +1,25 @@ +mgo - MongoDB driver for Go + +Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE new file mode 100644 index 0000000..8903260 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE @@ -0,0 +1,25 @@ +BSON library for Go + +Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE new file mode 100644 index 0000000..a4c5efd --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE new file mode 100644 index 0000000..f4988b4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE @@ -0,0 +1,28 @@ +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS new file mode 100644 index 0000000..619f9db --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go index 457ed7a..ab7613c 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go @@ -31,7 +31,7 @@ func (n ACFullname) LatestVersion() (string, error) { app.Labels["arch"] = "amd64" } - endpoint, _, err := discovery.DiscoverEndpoints(*app, false) + endpoint, _, err := discovery.DiscoverEndpoints(*app, nil, false) if err != nil { return "", errors.Annotate(err, "Latest discovery fail") } diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go index bd4048e..db5bd85 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go @@ -7,46 +7,6 @@ import ( "io/ioutil" ) -const IMAGE_MANIFEST = `{ - "acKind": "ImageManifest", - "acVersion": "0.6.1", - "name": "xxx/xxx", - "labels": [ - { - "name": "version", - "value": "0.0.0" - }, - { - "name": "os", - "value": "linux" - }, - { - "name": "arch", - "value": "amd64" - } - ], - "app": { - "exec": [ - "/bin/bash" - ], - "user": "0", - "group": "0", - "environment": [ - { - "name": "PATH", - "value": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - } - ] - } -} -` - -func BasicImageManifest() *schema.ImageManifest { - im := new(schema.ImageManifest) - im.UnmarshalJSON([]byte(IMAGE_MANIFEST)) - return im -} - // //func ReadManifest(path string) *schema.ImageManifest { // im := new(schema.ImageManifest) diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE new file mode 100644 index 0000000..055361b --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010 Brett Slatkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity new file mode 100644 index 0000000..14db513 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This script adds copyright headers to files. + +use strict; +my $header = do { local $/; <DATA> }; +$header =~ s!\s+$!\n!; +my $yyyy = (localtime())[5] + 1900; +$header =~ s/YYYY/$yyyy/ or die; + +unless (@ARGV == 1) { + die "Usage: copyrightify <filename>\n"; +} + +my $file = shift; +open(my $fh, $file) or die "Open $file error: $!\n"; +my $source = do { local $/; <$fh> }; +close($fh); +if ($source =~ /Copyright \d\d\d\d/) { + print STDERR "# $file - OK\n"; + exit; +} + +my $newsource = $source; +if ($file =~ /\.(go|java|aidl)$/) { + $header = "/*\n$header*/\n\n"; + $newsource = $header . $source; +} elsif ($file =~ /\.py$/) { + $header = join("", map { "# $_\n" } split(/\n/, $header)); + $newsource = $header . $source; +} else { + die "File type not supported."; +} + + +open(my $fh, ">$file") or die "Open $file error: $!\n"; +print $fh $newsource; +close($fh) or die; + +__END__ +Copyright YYYY The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go new file mode 100644 index 0000000..aace6a4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go @@ -0,0 +1,58 @@ +/* +Copyright 2011 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package errorutil helps make better error messages. +package errorutil + +import ( + "bufio" + "bytes" + "fmt" + "io" + "strings" +) + +// HighlightBytePosition takes a reader and the location in bytes of a parse +// error (for instance, from json.SyntaxError.Offset) and returns the line, column, +// and pretty-printed context around the error with an arrow indicating the exact +// position of the syntax error. +func HighlightBytePosition(f io.Reader, pos int64) (line, col int, highlight string) { + line = 1 + br := bufio.NewReader(f) + lastLine := "" + thisLine := new(bytes.Buffer) + for n := int64(0); n < pos; n++ { + b, err := br.ReadByte() + if err != nil { + break + } + if b == '\n' { + lastLine = thisLine.String() + thisLine.Reset() + line++ + col = 1 + } else { + col++ + thisLine.WriteByte(b) + } + } + if line > 1 { + highlight += fmt.Sprintf("%5d: %s\n", line-1, lastLine) + } + highlight += fmt.Sprintf("%5d: %s\n", line, thisLine.String()) + highlight += fmt.Sprintf("%s^\n", strings.Repeat(" ", col+5)) + return +} diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go new file mode 100644 index 0000000..a75283f --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go @@ -0,0 +1,50 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legal provides project-wide storage for compiled-in licenses. +package legal + +var licenses []string + +func init() { + RegisterLicense(` +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +`) +} + +// RegisterLicense stores the license text. +// It doesn't check whether the text was already present. +func RegisterLicense(text string) { + licenses = append(licenses, text) + return +} + +// Licenses returns a slice of the licenses. +func Licenses() []string { + return licenses +} diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go new file mode 100644 index 0000000..e4a3205 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go @@ -0,0 +1,42 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legalprint provides a printing helper for the legal package. +package legalprint + +import ( + "flag" + "fmt" + "io" + + "camlistore.org/pkg/legal" +) + +var ( + flagLegal = flag.Bool("legal", false, "show licenses") +) + +// MaybePrint will print the licenses if flagLegal has been set. +// It will return the value of the flagLegal. +func MaybePrint(out io.Writer) bool { + if !*flagLegal { + return false + } + for _, text := range legal.Licenses() { + fmt.Fprintln(out, text) + } + return true +} diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE new file mode 100644 index 0000000..d369cb8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE @@ -0,0 +1,93 @@ +Copyright (c) 2013, 2014 Tommi Virtanen. +Copyright (c) 2009, 2011, 2012 The Go Authors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The following included software components have additional copyright +notices and license terms that may differ from the above. + + +File fuse.go: + +// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, +// which carries this notice: +// +// The files in this directory are subject to the following license. +// +// The author of this software is Russ Cox. +// +// Copyright (c) 2006 Russ Cox +// +// Permission to use, copy, modify, and distribute this software for any +// purpose without fee is hereby granted, provided that this entire notice +// is included in all copies of any software which is or includes a copy +// or modification of this software and in all copies of the supporting +// documentation for such software. +// +// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY +// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS +// FITNESS FOR ANY PARTICULAR PURPOSE. + + +File fuse_kernel.go: + +// Derived from FUSE's fuse_kernel.h +/* + This file defines the kernel interface of FUSE + Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> + + + This -- and only this -- header file may also be distributed under + the terms of the BSD Licence as follows: + + Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE new file mode 100644 index 0000000..6765f09 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The goauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS new file mode 100644 index 0000000..9e87163 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the goauth2 project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE new file mode 100644 index 0000000..fec05ce --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE new file mode 100644 index 0000000..6050c10 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt new file mode 100644 index 0000000..1066d2f --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt @@ -0,0 +1,4 @@ +fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) +css/*: MIT (http://opensource.org/licenses/mit-license.html) + +Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE new file mode 100644 index 0000000..50bbdd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The fileutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE new file mode 100644 index 0000000..7150ce3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 jnml. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of jnml nor the names of his +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE new file mode 100644 index 0000000..2a7cfd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2012-2013 Dave Collins <dave@davec.name> + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE new file mode 100644 index 0000000..14e2f77 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE new file mode 100644 index 0000000..09e5be6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Gorilla web toolkit +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md new file mode 100644 index 0000000..5773904 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md @@ -0,0 +1,8 @@ +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE new file mode 100644 index 0000000..aa62504 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE @@ -0,0 +1,24 @@ + +Copyright (c) 2012, Robert Carlsen & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE new file mode 100644 index 0000000..7efba3b --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE @@ -0,0 +1,19 @@ +The files in here come from www.glitchthegame.com. + +License here: http://www.glitchthegame.com/public-domain-game-art/#licensing + +All files are provided by Tiny Speck under the Creative Commons CC0 1.0 +Universal License. This is a broadly permissive "No Rights Reserved" license — +you may do what you please with what we've provided. Our intention is to +dedicate these works to the public domain and make them freely available to all, +without restriction. All files are provided AS-IS. Tiny Speck cannot provide any +support to help you bring these assets into your own projects. + +Note: the Glitch logo and trademark are not among the things we are making +available under this license. Only items in the files explicitly included herein +are covered. + +There is no obligation to link or credit the works, but if you do, please link +to glitchthegame.com, our permanent "retirement" site for the game and these +assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack +(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE new file mode 100644 index 0000000..770c767 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE @@ -0,0 +1,25 @@ +mgo - MongoDB driver for Go + +Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE new file mode 100644 index 0000000..8903260 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE @@ -0,0 +1,25 @@ +BSON library for Go + +Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE new file mode 100644 index 0000000..a4c5efd --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE new file mode 100644 index 0000000..f4988b4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE @@ -0,0 +1,28 @@ +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS new file mode 100644 index 0000000..619f9db --- /dev/null +++ b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 820c72b..1b4ba33 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -171,7 +171,7 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { app.Labels["arch"] = "amd64" } - endpoint, _, err := discovery.DiscoverEndpoints(*app, false) + endpoint, _, err := discovery.DiscoverEndpoints(*app, nil, false) if err != nil { logAci.WithError(err).Fatal("pod discovery failed") } diff --git a/work/env/service.go b/work/env/service.go index 28a5851..4e45ce2 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -149,14 +149,14 @@ units: case ACTION_DIFF: u.DisplayDiff() case ACTION_QUIT: - u.Log.Info("User want to quit") + u.Log.Debug("User want to quit") if i == 0 { s.Unlock() lock = false } return errors.New("User want to quit") case ACTION_SKIP: - u.Log.Info("User skip this service") + u.Log.Debug("User skip this service") continue units case ACTION_YES: break ask diff --git a/work/env/service/unit.go b/work/env/service/unit.go index d25c19a..f64d22d 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -85,14 +85,14 @@ func (u Unit) IsLocalContentSameAsRemote() (bool, error) { func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { localContent, err := u.GetUnitContentAsFleeted() if err != nil { - u.Log.WithError(err).Error("Cannot read unit file") + u.Log.WithError(err).Error("Cannot read local unit file") return "", "", err } remoteContent, err := u.service.GetFleetUnitContent(u.Name) if err != nil { - u.Log.WithError(err).Error("Cannot read unit file") - return "", "", err + u.Log.WithError(err).Error("Cannot read remote unit file") + return localContent, "", err } return localContent, remoteContent, nil } From 8c0a2726c0f260963f026cee3247900ee88140ea Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 20 Nov 2015 13:00:17 +0100 Subject: [PATCH 033/163] add word-diff to unit diff --- work/env/service/unit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index f64d22d..1c65b9d 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -71,7 +71,7 @@ func (u Unit) DisplayDiff() error { defer os.Remove(localPath) ioutil.WriteFile(remotePath, []byte(remote), 0644) defer os.Remove(remotePath) - return utils.ExecCmd("git", "diff", remotePath, localPath) + return utils.ExecCmd("git", "diff", "--word-diff", remotePath, localPath) } func (u Unit) IsLocalContentSameAsRemote() (bool, error) { From 3d105475f7c148e0412bd2a4960e09673d527b46 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 20 Nov 2015 14:30:09 +0100 Subject: [PATCH 034/163] [#13] hide error and show full unit when service does not exists on remote --- Godeps/Godeps.json | 12 ++++++------ .../src/github.com/blablacar/cnt/utils/utils.go | 13 +++++++++++++ commands/check.go | 2 +- spec/env.go | 2 +- work/env.go | 17 +++++++++-------- work/env/service.go | 8 ++++++-- work/env/service/unit.go | 9 ++++++--- 7 files changed, 42 insertions(+), 21 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 638ac89..af27722 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,18 +24,18 @@ }, { "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "45-1-g7074012", - "Rev": "70740129b4c83de5a87c3d7eadf34271c4f1d7e4" + "Comment": "45-2-g38f2d71", + "Rev": "38f2d711554c4ffd4558a8b85794eab215fd48e1" }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "45-1-g7074012", - "Rev": "70740129b4c83de5a87c3d7eadf34271c4f1d7e4" + "Comment": "45-2-g38f2d71", + "Rev": "38f2d711554c4ffd4558a8b85794eab215fd48e1" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "45-1-g7074012", - "Rev": "70740129b4c83de5a87c3d7eadf34271c4f1d7e4" + "Comment": "45-2-g38f2d71", + "Rev": "38f2d711554c4ffd4558a8b85794eab215fd48e1" }, { "ImportPath": "github.com/camlistore/camlistore/pkg/errorutil", diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go index 9eccfcd..a3f70d4 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go @@ -21,6 +21,19 @@ func UserHomeOrFatal() string { return usr } +func ExecCmdGetStdoutAndStderr(head string, parts ...string) (string, string, error) { + var stdout bytes.Buffer + var stderr bytes.Buffer + + log.Debug("Exec > ", head, " ", strings.Join(parts, " ")) + cmd := exec.Command(head, parts...) + cmd.Stdout = &stdout + cmd.Stderr = &stderr + cmd.Start() + err := cmd.Wait() + return strings.TrimSpace(stdout.String()), strings.TrimSpace(stderr.String()), err +} + func ExecCmdGetOutput(head string, parts ...string) (string, error) { var stdout bytes.Buffer diff --git a/commands/check.go b/commands/check.go index ba37682..e81b605 100644 --- a/commands/check.go +++ b/commands/check.go @@ -14,7 +14,7 @@ func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString stri env := work.LoadEnv(envString) env.Generate() - units, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + units, _, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") if err != nil { logEnv.WithError(err).Fatal("Cannot list unit files") } diff --git a/spec/env.go b/spec/env.go index 50296e3..8f798bb 100644 --- a/spec/env.go +++ b/spec/env.go @@ -12,6 +12,6 @@ type Env interface { GetLog() logrus.Entry GetAttributes() map[string]interface{} ListMachineNames() []string - RunFleetCmdGetOutput(args ...string) (string, error) + RunFleetCmdGetOutput(args ...string) (string, string, error) EtcdClient() client.KeysAPI } diff --git a/work/env.go b/work/env.go index 121f717..632e0ab 100644 --- a/work/env.go +++ b/work/env.go @@ -113,7 +113,7 @@ func (e Env) ListServices() []string { } func (e Env) ListMachineNames() []string { - out, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") + out, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") if err != nil { e.log.WithError(err).Fatal("Cannot list-machines") } @@ -139,11 +139,11 @@ const FLEETCTL_STRICT_HOST_KEY_CHECKING = "FLEETCTL_STRICT_HOST_KEY_CHECKING" const FLEETCTL_SUDO = "FLEETCTL_SUDO" func (e Env) RunFleetCmd(args ...string) error { - _, err := e.runFleetCmdInternal(false, args...) + _, _, err := e.runFleetCmdInternal(false, args...) return err } -func (e Env) RunFleetCmdGetOutput(args ...string) (string, error) { +func (e Env) RunFleetCmdGetOutput(args ...string) (string, string, error) { return e.runFleetCmdInternal(true, args...) } @@ -163,9 +163,9 @@ func (e Env) EtcdClient() client.KeysAPI { return kapi } -func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) { +func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, string, error) { if e.config.Fleet.Endpoint == "" { - return "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") + return "", "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") } endpoint := e.config.Fleet.Endpoint os.Setenv(FLEETCTL_ENDPOINT, endpoint) @@ -175,10 +175,11 @@ func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, fmt.Sprintf("%t", e.config.Fleet.Strict_host_key_checking)) os.Setenv(FLEETCTL_SUDO, fmt.Sprintf("%t", e.config.Fleet.Sudo)) - var out string + var stdout string + var stderr string var err error if getOutput { - out, err = cntUtils.ExecCmdGetOutput("fleetctl", args...) + stdout, stderr, err = cntUtils.ExecCmdGetStdoutAndStderr("fleetctl", args...) } else { err = cntUtils.ExecCmd("fleetctl", args...) } @@ -187,5 +188,5 @@ func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, error) os.Setenv(FLEETCTL_SSH_USERNAME, "") os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, "") os.Setenv(FLEETCTL_SUDO, "") - return out, err + return stdout, stderr, err } diff --git a/work/env/service.go b/work/env/service.go index 4e45ce2..bb4e780 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -80,8 +80,12 @@ func (s *Service) Check() { } } -func (s *Service) GetFleetUnitContent(unit string) (string, error) { - return s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) +func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this method should be in unit + stdout, stderr, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) + if err != nil && stderr == "Unit "+unit+" not found" { + return "", nil + } + return stdout, err } func (s *Service) Unlock() { diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 1c65b9d..1309b69 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -76,6 +76,9 @@ func (u Unit) DisplayDiff() error { func (u Unit) IsLocalContentSameAsRemote() (bool, error) { local, remote, err := u.serviceLocalAndRemoteContent() + if local != "" && err != nil { + return false, nil + } if err != nil { return false, err } @@ -99,7 +102,7 @@ func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { func (u Unit) Start() error { u.Log.Debug("Starting") - _, err := u.service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) + _, _, err := u.service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) if err != nil { logrus.WithError(err).Error("Cannot start unit") return err @@ -109,7 +112,7 @@ func (u Unit) Start() error { func (u Unit) Destroy() error { u.Log.Debug("Destroying") // todo check that service exists before destroy - _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) + _, _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") return err @@ -118,7 +121,7 @@ func (u Unit) Destroy() error { } func (u Unit) Status() (string, error) { - content, err := u.service.GetEnv().RunFleetCmdGetOutput("status", u.Name) + content, _, err := u.service.GetEnv().RunFleetCmdGetOutput("status", u.Name) if err != nil { return "", err } From 50c65634ec93fc0a4b388277aa48bc259a463818 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 20 Nov 2015 15:56:15 +0100 Subject: [PATCH 035/163] pre-version of status --- commands/check.go | 26 ++------------------------ commands/env.go | 21 ++++++++++++++------- commands/fleetctl.go | 4 +--- commands/generate.go | 2 -- commands/status.go | 10 ++++++++++ work/env-check.go | 25 +++++++++++++++++++++++++ work/{env-run.go => env-fleetctl.go} | 3 ++- work/env-generate.go | 1 + work/env-status.go | 23 +++++++++++++++++++++++ work/env/service.go | 2 ++ work/env/service/unit.go | 14 ++++++++++++-- 11 files changed, 92 insertions(+), 39 deletions(-) create mode 100644 commands/status.go create mode 100644 work/env-check.go rename work/{env-run.go => env-fleetctl.go} (63%) create mode 100644 work/env-status.go diff --git a/commands/check.go b/commands/check.go index e81b605..9bcc9ef 100644 --- a/commands/check.go +++ b/commands/check.go @@ -1,36 +1,14 @@ package commands import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" - "strings" ) func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString string) { - logEnv := logrus.WithField("env", envString) - logEnv.Info("Running command") - - env := work.LoadEnv(envString) - env.Generate() - - units, _, err := env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") - if err != nil { - logEnv.WithError(err).Fatal("Cannot list unit files") - } - - for _, unitName := range strings.Split(units, "\n") { - unitInfo := strings.Split(unitName, "_") - if len(unitInfo) != 3 { - logEnv.WithField("unit", unitName).Warn("Unknown unit format for GGN") - continue - } - env.LoadService(unitInfo[1]).LoadUnit(unitName).Check() - } + work.LoadEnv(envString).Check() } func checkService(cmd *cobra.Command, args []string, work *work.Work, env string, serviceName string) { - service := work.LoadEnv(env).LoadService(serviceName) - service.GenerateUnits(nil) - service.Check() + work.LoadEnv(env).LoadService(serviceName).Check() } diff --git a/commands/env.go b/commands/env.go index 51c32c1..937fcf2 100644 --- a/commands/env.go +++ b/commands/env.go @@ -13,13 +13,13 @@ func loadEnvCommands(rootCmd *cobra.Command) { work := work.NewWork(config.GetConfig().WorkPath) for _, f := range work.ListEnvs() { - var env = f - var envCmd = &cobra.Command{ + env := f + envCmd := &cobra.Command{ Use: env, Short: "Run command for " + env, } - var check = &cobra.Command{ + checkCmd := &cobra.Command{ Use: "check", Short: "Check local units with what is running on fleet on " + env, Run: func(cmd *cobra.Command, args []string) { @@ -27,23 +27,30 @@ func loadEnvCommands(rootCmd *cobra.Command) { }, } - var runCmd = &cobra.Command{ + statusCmd := &cobra.Command{ + Use: "status", + Short: "Status of " + env, + Run: func(cmd *cobra.Command, args []string) { + statusEnv(cmd, args, work, env) + }, + } + + fleetctlCmd := &cobra.Command{ Use: "fleetctl", Short: "Run fleetctl command on " + env, Run: func(cmd *cobra.Command, args []string) { fleetctl(cmd, args, work, env) }, } - envCmd.AddCommand(runCmd, check) - var generateCmd = &cobra.Command{ + generateCmd := &cobra.Command{ Use: "generate", Short: "Generate units for " + env, Run: func(cmd *cobra.Command, args []string) { generateEnv(cmd, args, work, env) }, } - envCmd.AddCommand(generateCmd) + envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd/*, statusCmd*/) rootCmd.AddCommand(envCmd) diff --git a/commands/fleetctl.go b/commands/fleetctl.go index f5707c6..228f044 100644 --- a/commands/fleetctl.go +++ b/commands/fleetctl.go @@ -1,12 +1,10 @@ package commands import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" ) func fleetctl(cmd *cobra.Command, args []string, work *work.Work, env string) { - logrus.WithField("env", env).Debug("Running command") - work.LoadEnv(env).Run(args) + work.LoadEnv(env).Fleetctl(args) } diff --git a/commands/generate.go b/commands/generate.go index 774146c..15a4c58 100644 --- a/commands/generate.go +++ b/commands/generate.go @@ -1,7 +1,6 @@ package commands import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/green-garden/config" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" @@ -24,6 +23,5 @@ func generateService(cmd *cobra.Command, args []string, work *work.Work, env str } func generateEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { - logrus.WithField("env", env).Debug("Generating units") work.LoadEnv(env).Generate() } diff --git a/commands/status.go b/commands/status.go new file mode 100644 index 0000000..759e78d --- /dev/null +++ b/commands/status.go @@ -0,0 +1,10 @@ +package commands + +import ( + "github.com/blablacar/green-garden/work" + "github.com/spf13/cobra" +) + +func statusEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { + work.LoadEnv(env).Status() +} diff --git a/work/env-check.go b/work/env-check.go new file mode 100644 index 0000000..2e790a7 --- /dev/null +++ b/work/env-check.go @@ -0,0 +1,25 @@ +package work + +import ( + "strings" +) + +func (e Env) Check() { + e.log.Debug("Running command") + + e.Generate() + + units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + if err != nil { + e.log.WithError(err).Fatal("Cannot list unit files") + } + + for _, unitName := range strings.Split(units, "\n") { + unitInfo := strings.Split(unitName, "_") + if len(unitInfo) != 3 { + e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") + continue + } + e.LoadService(unitInfo[1]).LoadUnit(unitName).Check() + } +} diff --git a/work/env-run.go b/work/env-fleetctl.go similarity index 63% rename from work/env-run.go rename to work/env-fleetctl.go index f4c44f6..895a88d 100644 --- a/work/env-run.go +++ b/work/env-fleetctl.go @@ -1,6 +1,7 @@ package work -func (e Env) Run(args []string) { +func (e Env) Fleetctl(args []string) { + e.log.Debug("Running fleetctl") err := e.RunFleetCmd(args...) if err != nil { e.log.WithError(err).Error("Fleetctl command failed") diff --git a/work/env-generate.go b/work/env-generate.go index c40c826..fc3a77e 100644 --- a/work/env-generate.go +++ b/work/env-generate.go @@ -1,6 +1,7 @@ package work func (e Env) Generate() { + e.log.Debug("Generating units") services := e.ListServices() for _, service := range services { diff --git a/work/env-status.go b/work/env-status.go new file mode 100644 index 0000000..78f73f1 --- /dev/null +++ b/work/env-status.go @@ -0,0 +1,23 @@ +package work + +import "strings" + +func (e Env) Status() { + e.log.Debug("Running status") + + e.Generate() + + units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + if err != nil { + e.log.WithError(err).Fatal("Cannot list unit files") + } + + for _, unitName := range strings.Split(units, "\n") { + unitInfo := strings.Split(unitName, "_") + if len(unitInfo) != 3 { + e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") + continue + } + e.LoadService(unitInfo[1]).LoadUnit(unitName).Status() + } +} diff --git a/work/env/service.go b/work/env/service.go index bb4e780..9e6bb36 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -74,6 +74,8 @@ func (s *Service) ListUnits() []string { } func (s *Service) Check() { + s.log.Debug("Check") + s.GenerateUnits(nil) unitNames := s.ListUnits() for _, unitName := range unitNames { s.LoadUnit(unitName).Check() diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 1309b69..eaee834 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -32,6 +32,16 @@ func NewUnit(path string, name string, service spec.Service) *Unit { return unit } +func (u Unit) Status() { + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Panic("Cannot read remote unit") + } + if !same { + u.Log.Warn("Unit is not up to date") + } +} + func (u Unit) Check() { same, err := u.IsLocalContentSameAsRemote() if err != nil { @@ -120,7 +130,7 @@ func (u Unit) Destroy() error { return nil } -func (u Unit) Status() (string, error) { +func (u Unit) State() (string, error) { content, _, err := u.service.GetEnv().RunFleetCmdGetOutput("status", u.Name) if err != nil { return "", err @@ -128,7 +138,7 @@ func (u Unit) Status() (string, error) { reg, err := regexp.Compile(`Active: (active|inactive|deactivating|activating)`) if err != nil { - u.Log.Panic("Cannot compule regex") + u.Log.Panic("Cannot compile regex") } matched := reg.FindStringSubmatch(content) From 7be3fec53c2d3262d901f0ac3e455c7400a53f48 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 23 Nov 2015 15:57:16 +0100 Subject: [PATCH 036/163] add hook support for env; add status command --- commands/env.go | 12 ++++++++++-- commands/generate.go | 2 +- commands/restart.go | 1 - commands/status.go | 4 ++++ release.sh | 2 -- spec/env.go | 2 ++ work/env-generate.go | 2 +- work/env.go | 33 +++++++++++++++++++++++++++++++++ work/env/service-generate.go | 2 +- work/env/service-status.go | 27 +++++++++++++++++++++++++++ work/env/service.go | 8 ++++++-- work/env/service/unit.go | 9 ++++----- 12 files changed, 89 insertions(+), 15 deletions(-) delete mode 100644 commands/restart.go create mode 100644 work/env/service-status.go diff --git a/commands/env.go b/commands/env.go index 937fcf2..24321ec 100644 --- a/commands/env.go +++ b/commands/env.go @@ -50,7 +50,7 @@ func loadEnvCommands(rootCmd *cobra.Command) { generateEnv(cmd, args, work, env) }, } - envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd/*, statusCmd*/) + envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, statusCmd) rootCmd.AddCommand(envCmd) @@ -78,6 +78,14 @@ func loadEnvCommands(rootCmd *cobra.Command) { }, } + var statusCmd = &cobra.Command{ + Use: "status [manifest...]", + Short: "status units for " + service + " on env " + env, + Run: func(cmd *cobra.Command, args []string) { + statusService(cmd, args, work, env, service) + }, + } + var ttl string var lockCmd = &cobra.Command{ Use: "lock [message...]", @@ -106,7 +114,7 @@ func loadEnvCommands(rootCmd *cobra.Command) { updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd) + serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, statusCmd) envCmd.AddCommand(serviceCmd) } diff --git a/commands/generate.go b/commands/generate.go index 15a4c58..77d8a4b 100644 --- a/commands/generate.go +++ b/commands/generate.go @@ -19,7 +19,7 @@ var generateCmd = &cobra.Command{ } func generateService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).GenerateUnits(args) + work.LoadEnv(env).LoadService(service).Generate(args) } func generateEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { diff --git a/commands/restart.go b/commands/restart.go deleted file mode 100644 index cdff10d..0000000 --- a/commands/restart.go +++ /dev/null @@ -1 +0,0 @@ -package commands diff --git a/commands/status.go b/commands/status.go index 759e78d..698f6c4 100644 --- a/commands/status.go +++ b/commands/status.go @@ -8,3 +8,7 @@ import ( func statusEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { work.LoadEnv(env).Status() } + +func statusService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { + work.LoadEnv(env).LoadService(service).Status() +} diff --git a/release.sh b/release.sh index 9366578..e5292a4 100755 --- a/release.sh +++ b/release.sh @@ -11,8 +11,6 @@ fi version=$1 access_token=$2 - - require_clean_work_tree () { # Update the index git update-index -q --ignore-submodules --refresh diff --git a/spec/env.go b/spec/env.go index 8f798bb..26feb24 100644 --- a/spec/env.go +++ b/spec/env.go @@ -14,4 +14,6 @@ type Env interface { ListMachineNames() []string RunFleetCmdGetOutput(args ...string) (string, string, error) EtcdClient() client.KeysAPI + RunEarlyHook(service string, action string) + RunLateHook(service string, action string) } diff --git a/work/env-generate.go b/work/env-generate.go index fc3a77e..06256a4 100644 --- a/work/env-generate.go +++ b/work/env-generate.go @@ -6,6 +6,6 @@ func (e Env) Generate() { for _, service := range services { service := e.LoadService(service) - service.GenerateUnits(nil) + service.Generate(nil) } } diff --git a/work/env.go b/work/env.go index 632e0ab..a434ae5 100644 --- a/work/env.go +++ b/work/env.go @@ -133,6 +133,39 @@ func (e Env) ListMachineNames() []string { return names } +const PATH_HOOKS = "/hooks" + +func (e Env) RunEarlyHook(service string, action string) { + e.runHook("/early", service, action) +} + +func (e Env) RunLateHook(service string, action string) { + e.runHook("/late", service, action) +} + +func (e Env) runHook(path string, service string, action string) { + e.log.WithField("path", path).Debug("Running hook") + files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) + if err != nil { + log.WithError(err).Debug("Cannot read hood directory") + return + } + + os.Setenv("SERVICE", service) + hostname, _ := os.Hostname() + os.Setenv("WHO", os.Getenv("USER")+"@"+hostname) + os.Setenv("ACTION", action) + for _, f := range files { + if !f.IsDir() { + hookLog := log.WithField("name", f.Name()) + hookLog.Debug("Running Hook") + if err := cntUtils.ExecCmd(e.path + PATH_HOOKS + path + "/" + f.Name()); err != nil { + hookLog.Fatal("Hook status is failed") + } + } + } +} + const FLEETCTL_ENDPOINT = "FLEETCTL_ENDPOINT" const FLEETCTL_SSH_USERNAME = "FLEETCTL_SSH_USERNAME" const FLEETCTL_STRICT_HOST_KEY_CHECKING = "FLEETCTL_STRICT_HOST_KEY_CHECKING" diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 1b4ba33..f7b5fa1 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -15,7 +15,7 @@ import ( "strings" ) -func (s Service) GenerateUnits(sources []string) { +func (s Service) Generate(sources []string) { s.log.Debug("Generating units") tmpl, err := s.loadUnitTemplate() diff --git a/work/env/service-status.go b/work/env/service-status.go new file mode 100644 index 0000000..0e2830d --- /dev/null +++ b/work/env/service-status.go @@ -0,0 +1,27 @@ +package env + +import ( + "strings" +) + +func (s *Service) Status() { + s.log.Debug("Running status") + + s.Generate(nil) + + units, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + if err != nil { + s.log.WithError(err).Fatal("Cannot list unit files") + } + + for _, unitName := range strings.Split(units, "\n") { + unitInfo := strings.Split(unitName, "_") + if len(unitInfo) != 3 { + continue + } + if unitInfo[1] != s.name { + continue + } + s.LoadUnit(unitName).Status() + } +} diff --git a/work/env/service.go b/work/env/service.go index 9e6bb36..e4ba71a 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -75,7 +75,7 @@ func (s *Service) ListUnits() []string { func (s *Service) Check() { s.log.Debug("Check") - s.GenerateUnits(nil) + s.Generate(nil) unitNames := s.ListUnits() for _, unitName := range unitNames { s.LoadUnit(unitName).Check() @@ -92,16 +92,19 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this func (s *Service) Unlock() { s.log.Info("Unlocking") + s.env.RunEarlyHook(s.name, "unlock") kapi := s.env.EtcdClient() _, err := kapi.Delete(context.Background(), s.lockPath, nil) if cerr, ok := err.(*client.ClusterError); ok { s.log.WithError(cerr).Panic("Cannot unlock service") } + s.env.RunLateHook(s.name, "unlock") } func (s *Service) Lock(ttl time.Duration, message string) { s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") + s.env.RunEarlyHook(s.name, "lock") kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) @@ -117,11 +120,12 @@ func (s *Service) Lock(ttl time.Duration, message string) { WithField("ttl", resp.Node.TTLDuration().String()). Fatal("Service is already locked") } + s.env.RunLateHook(s.name, "lock") } func (s *Service) Update() error { s.log.Info("Updating service") - s.GenerateUnits(nil) + s.Generate(nil) hostname, _ := os.Hostname() s.Lock(time.Hour*1, "["+os.Getenv("USER")+"@"+hostname+"] Updating") diff --git a/work/env/service/unit.go b/work/env/service/unit.go index eaee834..d95fc68 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -6,6 +6,7 @@ import ( "github.com/blablacar/cnt/utils" "github.com/blablacar/green-garden/spec" "github.com/coreos/fleet/unit" + "github.com/juju/errors" "io/ioutil" "os" "regexp" @@ -35,7 +36,7 @@ func NewUnit(path string, name string, service spec.Service) *Unit { func (u Unit) Status() { same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.WithError(err).Panic("Cannot read remote unit") + u.Log.Warn("Cannot read unit") } if !same { u.Log.Warn("Unit is not up to date") @@ -98,14 +99,12 @@ func (u Unit) IsLocalContentSameAsRemote() (bool, error) { func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { localContent, err := u.GetUnitContentAsFleeted() if err != nil { - u.Log.WithError(err).Error("Cannot read local unit file") - return "", "", err + return "", "", errors.Annotate(err, "Cannot read local unit file") } remoteContent, err := u.service.GetFleetUnitContent(u.Name) if err != nil { - u.Log.WithError(err).Error("Cannot read remote unit file") - return localContent, "", err + return localContent, "", errors.Annotate(err, "CanCannot read remote unit file") } return localContent, remoteContent, nil } From facc8f480cd48b4d1769d58735958ff02dcd7ffc Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 10:39:11 +0100 Subject: [PATCH 037/163] big refacto moving unit generate to unit, and prepare commands on units --- commands/check.go | 14 --- commands/env.go | 122 -------------------------- commands/fleetctl.go | 10 --- commands/{gg.go => ggn.go} | 0 commands/lock.go | 27 ------ commands/prepare-env.go | 53 ++++++++++++ commands/prepare-service.go | 93 ++++++++++++++++++++ commands/prepare-unit.go | 25 ++++++ commands/{generate.go => prepare.go} | 13 +-- commands/status.go | 14 --- commands/update.go | 14 --- spec/service.go | 1 + {work/env => utils}/templating.go | 2 +- work/env/service-generate.go | 55 ++---------- work/env/service-status.go | 2 +- work/env/service-update.go | 95 ++++++++++++++++++++ work/env/service.go | 124 +++++---------------------- work/env/service/unit-generate.go | 46 ++++++++++ work/env/service/unit.go | 27 +++--- 19 files changed, 366 insertions(+), 371 deletions(-) delete mode 100644 commands/check.go delete mode 100644 commands/env.go delete mode 100644 commands/fleetctl.go rename commands/{gg.go => ggn.go} (100%) delete mode 100644 commands/lock.go create mode 100644 commands/prepare-env.go create mode 100644 commands/prepare-service.go create mode 100644 commands/prepare-unit.go rename commands/{generate.go => prepare.go} (57%) delete mode 100644 commands/status.go delete mode 100644 commands/update.go rename {work/env => utils}/templating.go (99%) create mode 100644 work/env/service-update.go create mode 100644 work/env/service/unit-generate.go diff --git a/commands/check.go b/commands/check.go deleted file mode 100644 index 9bcc9ef..0000000 --- a/commands/check.go +++ /dev/null @@ -1,14 +0,0 @@ -package commands - -import ( - "github.com/blablacar/green-garden/work" - "github.com/spf13/cobra" -) - -func checkEnv(cmd *cobra.Command, args []string, work *work.Work, envString string) { - work.LoadEnv(envString).Check() -} - -func checkService(cmd *cobra.Command, args []string, work *work.Work, env string, serviceName string) { - work.LoadEnv(env).LoadService(serviceName).Check() -} diff --git a/commands/env.go b/commands/env.go deleted file mode 100644 index 24321ec..0000000 --- a/commands/env.go +++ /dev/null @@ -1,122 +0,0 @@ -package commands - -import ( - log "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/builder" - "github.com/blablacar/green-garden/config" - "github.com/blablacar/green-garden/work" - "github.com/spf13/cobra" -) - -func loadEnvCommands(rootCmd *cobra.Command) { - log.WithField("path", config.GetConfig().WorkPath).Debug("Loading envs") - work := work.NewWork(config.GetConfig().WorkPath) - - for _, f := range work.ListEnvs() { - env := f - envCmd := &cobra.Command{ - Use: env, - Short: "Run command for " + env, - } - - checkCmd := &cobra.Command{ - Use: "check", - Short: "Check local units with what is running on fleet on " + env, - Run: func(cmd *cobra.Command, args []string) { - checkEnv(cmd, args, work, env) - }, - } - - statusCmd := &cobra.Command{ - Use: "status", - Short: "Status of " + env, - Run: func(cmd *cobra.Command, args []string) { - statusEnv(cmd, args, work, env) - }, - } - - fleetctlCmd := &cobra.Command{ - Use: "fleetctl", - Short: "Run fleetctl command on " + env, - Run: func(cmd *cobra.Command, args []string) { - fleetctl(cmd, args, work, env) - }, - } - - generateCmd := &cobra.Command{ - Use: "generate", - Short: "Generate units for " + env, - Run: func(cmd *cobra.Command, args []string) { - generateEnv(cmd, args, work, env) - }, - } - envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, statusCmd) - - rootCmd.AddCommand(envCmd) - - for _, g := range work.LoadEnv(env).ListServices() { - var service = g - var serviceCmd = &cobra.Command{ - Use: service, - Short: "run command for " + service + " on env " + env, - } - - var checkCmd = &cobra.Command{ - Use: "check", - Short: "Check local units matches what is running on " + env + " for " + service, - Run: func(cmd *cobra.Command, args []string) { - checkService(cmd, args, work, env, service) - }, - } - - var generateCmd = &cobra.Command{ - Use: "generate [manifest...]", - Short: "generate units for " + service + " on env " + env, - Long: `generate units using remote resolved or local pod/aci manifests`, - Run: func(cmd *cobra.Command, args []string) { - generateService(cmd, args, work, env, service) - }, - } - - var statusCmd = &cobra.Command{ - Use: "status [manifest...]", - Short: "status units for " + service + " on env " + env, - Run: func(cmd *cobra.Command, args []string) { - statusService(cmd, args, work, env, service) - }, - } - - var ttl string - var lockCmd = &cobra.Command{ - Use: "lock [message...]", - Short: "lock " + service + " on env " + env, - Run: func(cmd *cobra.Command, args []string) { - lock(cmd, args, work, env, service, ttl) - }, - } - lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") - - var unlockCmd = &cobra.Command{ - Use: "unlock", - Short: "unlock " + service + " on env " + env, - Run: func(cmd *cobra.Command, args []string) { - unLock(cmd, args, work, env, service) - }, - } - - var updateCmd = &cobra.Command{ - Use: "update", - Short: "update " + service + " on env " + env, - Run: func(cmd *cobra.Command, args []string) { - update(cmd, args, work, env, service) - }, - } - updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") - updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - - serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, statusCmd) - - envCmd.AddCommand(serviceCmd) - } - } -} diff --git a/commands/fleetctl.go b/commands/fleetctl.go deleted file mode 100644 index 228f044..0000000 --- a/commands/fleetctl.go +++ /dev/null @@ -1,10 +0,0 @@ -package commands - -import ( - "github.com/blablacar/green-garden/work" - "github.com/spf13/cobra" -) - -func fleetctl(cmd *cobra.Command, args []string, work *work.Work, env string) { - work.LoadEnv(env).Fleetctl(args) -} diff --git a/commands/gg.go b/commands/ggn.go similarity index 100% rename from commands/gg.go rename to commands/ggn.go diff --git a/commands/lock.go b/commands/lock.go deleted file mode 100644 index c30f052..0000000 --- a/commands/lock.go +++ /dev/null @@ -1,27 +0,0 @@ -package commands - -import ( - "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/work" - "github.com/spf13/cobra" - "strings" - "time" -) - -func unLock(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).Unlock() -} - -func lock(cmd *cobra.Command, args []string, work *work.Work, env string, service string, duration string) { - if len(args) == 0 { - logrus.Fatal("Please add a message to describe lock") - } - - message := strings.Join(args, " ") - ttl, err := time.ParseDuration(duration) - if err != nil { - logrus.WithError(err).Fatal("Wrong value for ttl") - } - - work.LoadEnv(env).LoadService(service).Lock(ttl, message) -} diff --git a/commands/prepare-env.go b/commands/prepare-env.go new file mode 100644 index 0000000..7a9024b --- /dev/null +++ b/commands/prepare-env.go @@ -0,0 +1,53 @@ +package commands + +import ( + "github.com/blablacar/green-garden/work" + "github.com/spf13/cobra" +) + +func prepareEnvCommands(env *work.Env) *cobra.Command { + envCmd := &cobra.Command{ + Use: env.GetName(), + Short: "Run command for " + env.GetName(), + } + + checkCmd := &cobra.Command{ + Use: env.GetName(), + Short: "Check local units with what is running on fleet on " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + env.Check() + }, + } + + statusCmd := &cobra.Command{ + Use: "status", + Short: "Status of " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + env.Status() + }, + } + + fleetctlCmd := &cobra.Command{ + Use: "fleetctl", + Short: "Run fleetctl command on " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + env.Fleetctl(args) + }, + } + + generateCmd := &cobra.Command{ + Use: "generate", + Short: "Generate units for " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + env.Generate() + }, + } + envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, statusCmd) + + for _, serviceName := range env.ListServices() { + service := env.LoadService(serviceName) + envCmd.AddCommand(prepareServiceCommands(service)) + } + + return envCmd +} diff --git a/commands/prepare-service.go b/commands/prepare-service.go new file mode 100644 index 0000000..c0aa284 --- /dev/null +++ b/commands/prepare-service.go @@ -0,0 +1,93 @@ +package commands + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/builder" + "github.com/blablacar/green-garden/work/env" + "github.com/spf13/cobra" + "os" + "strings" + "time" +) + +func prepareServiceCommands(service *env.Service) *cobra.Command { + var serviceCmd = &cobra.Command{ + Use: service.Name, + Short: "run command for " + service.Name + " on env " + service.GetEnv().GetName(), + } + + var checkCmd = &cobra.Command{ + Use: "check", + Short: "Check local units matches what is running on " + service.GetEnv().GetName() + " for " + service.GetName(), + Run: func(cmd *cobra.Command, args []string) { + service.Check() + }, + } + + var generateCmd = &cobra.Command{ + Use: "generate [manifest...]", + Short: "generate units for " + service.Name + " on env " + service.GetEnv().GetName(), + Long: `generate units using remote resolved or local pod/aci manifests`, + Run: func(cmd *cobra.Command, args []string) { + service.Generate(args) + }, + } + + var statusCmd = &cobra.Command{ + Use: "status [manifest...]", + Short: "status units for " + service.Name + " on env " + service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + service.Status() + }, + } + + var ttl string + var lockCmd = &cobra.Command{ + Use: "lock [message...]", + Short: "lock " + service.Name + " on env " + service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + if len(args) == 0 { + logrus.Fatal("Please add a message to describe lock") + } + + message := strings.Join(args, " ") + ttl, err := time.ParseDuration(ttl) + if err != nil { + logrus.WithError(err).Fatal("Wrong value for ttl") + } + + service.Lock(ttl, message) + }, + } + lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") + + var unlockCmd = &cobra.Command{ + Use: "unlock", + Short: "unlock " + service.Name + " on env " + service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + service.Unlock() + }, + } + + var updateCmd = &cobra.Command{ + Use: "update", + Short: "update " + service.Name + " on env " + service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + err := service.Update() + if err != nil { + os.Exit(1) + } + }, + } + updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") + updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") + + serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, statusCmd) + + for _, unitName := range service.ListUnits() { + unit := service.LoadUnit(unitName) + serviceCmd.AddCommand(prepareUnitCommands(unit)) + } + + return serviceCmd +} diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go new file mode 100644 index 0000000..736c76f --- /dev/null +++ b/commands/prepare-unit.go @@ -0,0 +1,25 @@ +package commands + +import ( + "github.com/blablacar/green-garden/work/env/service" + "github.com/spf13/cobra" +) + +func prepareUnitCommands(unit *service.Unit) *cobra.Command { + var unitCmd = &cobra.Command{ + Use: unit.Name, + Short: "run command for " + unit.Name + " on " + unit.Service.GetName() + " on env " + unit.Service.GetEnv().GetName(), + } + + var startCmd = &cobra.Command{ + Use: "start", + Short: "start " + unit.Name + " from " + unit.Service.GetName() + " on env " + unit.Service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + unit.Start() + }, + } + + unitCmd.AddCommand(startCmd) + + return unitCmd +} diff --git a/commands/generate.go b/commands/prepare.go similarity index 57% rename from commands/generate.go rename to commands/prepare.go index 77d8a4b..9da5ae1 100644 --- a/commands/generate.go +++ b/commands/prepare.go @@ -1,6 +1,7 @@ package commands import ( + "github.com/Sirupsen/logrus" "github.com/blablacar/green-garden/config" "github.com/blablacar/green-garden/work" "github.com/spf13/cobra" @@ -18,10 +19,12 @@ var generateCmd = &cobra.Command{ }, } -func generateService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).Generate(args) -} +func loadEnvCommands(rootCmd *cobra.Command) { + logrus.WithField("path", config.GetConfig().WorkPath).Debug("Loading envs") + work := work.NewWork(config.GetConfig().WorkPath) -func generateEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { - work.LoadEnv(env).Generate() + for _, envNames := range work.ListEnvs() { + env := work.LoadEnv(envNames) + rootCmd.AddCommand(prepareEnvCommands(env)) + } } diff --git a/commands/status.go b/commands/status.go deleted file mode 100644 index 698f6c4..0000000 --- a/commands/status.go +++ /dev/null @@ -1,14 +0,0 @@ -package commands - -import ( - "github.com/blablacar/green-garden/work" - "github.com/spf13/cobra" -) - -func statusEnv(cmd *cobra.Command, args []string, work *work.Work, env string) { - work.LoadEnv(env).Status() -} - -func statusService(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - work.LoadEnv(env).LoadService(service).Status() -} diff --git a/commands/update.go b/commands/update.go deleted file mode 100644 index c919e12..0000000 --- a/commands/update.go +++ /dev/null @@ -1,14 +0,0 @@ -package commands - -import ( - "github.com/blablacar/green-garden/work" - "github.com/spf13/cobra" - "os" -) - -func update(cmd *cobra.Command, args []string, work *work.Work, env string, service string) { - err := work.LoadEnv(env).LoadService(service).Update() - if err != nil { - os.Exit(1) - } -} diff --git a/spec/service.go b/spec/service.go index aa276b7..11323f7 100644 --- a/spec/service.go +++ b/spec/service.go @@ -23,6 +23,7 @@ type ServiceManifest struct { } type Service interface { + GetName() string GetEnv() Env GetLog() logrus.Entry GetFleetUnitContent(unit string) (string, error) diff --git a/work/env/templating.go b/utils/templating.go similarity index 99% rename from work/env/templating.go rename to utils/templating.go index 6d93383..bdacfba 100644 --- a/work/env/templating.go +++ b/utils/templating.go @@ -1,4 +1,4 @@ -package env +package utils import ( "bufio" diff --git a/work/env/service-generate.go b/work/env/service-generate.go index f7b5fa1..0e88a36 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -1,17 +1,13 @@ package env import ( - "bytes" - "encoding/json" "github.com/appc/spec/discovery" "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" - "github.com/peterbourgon/mergemap" "io/ioutil" "net/http" - "os" "strings" ) @@ -54,51 +50,12 @@ func (s Service) Generate(sources []string) { } for i, node := range nodes { - s.writeUnit(i, node, tmpl, acis) - } -} - -func (s Service) UnitName(hostname string) string { - return s.env.GetName() + "_" + s.name + "_" + hostname + ".service" -} - -func (s Service) writeUnit(i int, node map[string]interface{}, tmpl *Templating, acis string) { - if node[spec.NODE_HOSTNAME].(string) == "" { - s.log.WithField("index", i).Error("hostname is mandatory in node informations") - } - s.log.Debug("Processing node :" + node[spec.NODE_HOSTNAME].(string)) - - unitName := s.UnitName(node[spec.NODE_HOSTNAME].(string)) - - data := make(map[string]interface{}) - - data["node"] = node - data["node"].(map[string]interface{})["acis"] = acis - - data["attribute"] = utils.CopyMap(s.attributes) - if data["node"].(map[string]interface{})["attributes"] != nil { - source := utils.CopyMapInterface(data["node"].(map[string]interface{})["attributes"].(map[interface{}]interface{})) - data["attribute"] = mergemap.Merge(data["attribute"].(map[string]interface{}), source.(map[string]interface{})) - } - - out, err := json.Marshal(data["attribute"]) - if err != nil { - s.log.WithError(err).Panic("Cannot marshall attributes") - } - data["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) - - var b bytes.Buffer - err = tmpl.Execute(&b, data) - if err != nil { - s.log.Error("Failed to run templating for unit "+unitName, err) - } - ok, err := utils.Exists(s.path + "/units") - if !ok || err != nil { - os.Mkdir(s.path+"/units", 0755) - } - err = ioutil.WriteFile(s.path+"/units"+"/"+unitName, b.Bytes(), 0644) - if err != nil { - s.log.WithError(err).WithField("path", s.path+"/units"+"/"+unitName).Error("Cannot writer unit") + hostname := node[spec.NODE_HOSTNAME].(string) + if hostname == "" { + s.log.WithField("index", i).Error("hostname is mandatory in node informations") + } + unit := s.LoadUnit(hostname) + unit.Generate(node, tmpl, acis, s.attributes) } } diff --git a/work/env/service-status.go b/work/env/service-status.go index 0e2830d..2d725bd 100644 --- a/work/env/service-status.go +++ b/work/env/service-status.go @@ -19,7 +19,7 @@ func (s *Service) Status() { if len(unitInfo) != 3 { continue } - if unitInfo[1] != s.name { + if unitInfo[1] != s.Name { continue } s.LoadUnit(unitName).Status() diff --git a/work/env/service-update.go b/work/env/service-update.go new file mode 100644 index 0000000..0ee823a --- /dev/null +++ b/work/env/service-update.go @@ -0,0 +1,95 @@ +package env + +import ( + "errors" + "github.com/blablacar/green-garden/builder" + "os" + "time" +) + +func (s *Service) Update() error { + s.log.Info("Updating service") + s.Generate(nil) + + hostname, _ := os.Hostname() + s.Lock(time.Hour*1, "["+os.Getenv("USER")+"@"+hostname+"] Updating") + lock := true + defer func() { + if lock { + s.log.WithField("service", s.Name).Warn("!! Leaving but Service is still lock !!") + } + }() +units: + for i, unit := range s.ListUnits() { + u := s.LoadUnit(unit) + + ask: + for { + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Warn("Cannot compare local and remote service") + } + if same { + u.Log.Info("Remote service is already up to date") + if !builder.BuildFlags.All { + continue units + } + } + if builder.BuildFlags.Yes { + break ask + } + action := s.askToProcessService(i, u) + switch action { + case ACTION_DIFF: + u.DisplayDiff() + case ACTION_QUIT: + u.Log.Debug("User want to quit") + if i == 0 { + s.Unlock() + lock = false + } + return errors.New("User want to quit") + case ACTION_SKIP: + u.Log.Debug("User skip this service") + continue units + case ACTION_YES: + break ask + default: + u.Log.Fatal("Should not be here") + } + } + + u.Destroy() + time.Sleep(time.Second * 2) + err := u.Start() + if err != nil { + s.log.WithError(err).Error("Failed to start service. Keeping lock") + return err + } + time.Sleep(time.Second * 2) + // status, err2 := u.Status() + // u.Log.WithField("status", status).Debug("Log status") + // if err2 != nil { + // log.WithError(err2).WithField("status", status).Panic("Unit failed just after start") + // return err2 + // } + // if status == "inactive" { + // log.WithField("status", status).Panic("Unit failed just after start") + // return errors.New("unit is inactive just after start") + // } + // + // s.checkServiceRunning() + + // TODO ask deploy pod version () + // TODO YES/NO + // TODO check running tmux + // TODO running as root ?? + // TODO notify slack + // TODO store old version + // TODO !!!!! check that service is running well before going to next server !!! + + } + s.Unlock() + lock = false + return nil +} diff --git a/work/env/service.go b/work/env/service.go index e4ba71a..c2b593b 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -6,7 +6,6 @@ import ( "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" - "github.com/blablacar/green-garden/builder" "github.com/blablacar/green-garden/spec" "github.com/blablacar/green-garden/utils" "github.com/blablacar/green-garden/work/env/service" @@ -24,7 +23,7 @@ import ( type Service struct { env spec.Env path string - name string + Name string manifest spec.ServiceManifest log log.Entry lockPath string @@ -36,7 +35,7 @@ func NewService(path string, name string, env spec.Env) *Service { service := &Service{ log: *l.WithField("service", name), path: path + "/" + name, - name: name, + Name: name, env: env, lockPath: "/ggn-lock/" + name + "/lock", } @@ -45,6 +44,10 @@ func NewService(path string, name string, env spec.Env) *Service { return service } +func (s *Service) GetName() string { + return s.Name +} + func (s *Service) GetEnv() spec.Env { return s.env } @@ -53,21 +56,25 @@ func (s *Service) GetLog() logrus.Entry { return s.log } -func (s *Service) LoadUnit(name string) *service.Unit { - unit := service.NewUnit(s.path+"/units", name, s) +func (s *Service) LoadUnit(hostname string) *service.Unit { + unit := service.NewUnit(s.path+"/units", hostname, s) return unit } func (s *Service) ListUnits() []string { res := []string{} + if len(s.manifest.Nodes) == 0 { + return res + } + if s.manifest.Nodes[0][spec.NODE_HOSTNAME].(string) == "*" { machines := s.env.ListMachineNames() for _, node := range machines { - res = append(res, s.UnitName(node)) + res = append(res, node) } } else { for _, node := range s.manifest.Nodes { - res = append(res, s.UnitName(node[spec.NODE_HOSTNAME].(string))) + res = append(res, node[spec.NODE_HOSTNAME].(string)) } } return res @@ -92,19 +99,19 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this func (s *Service) Unlock() { s.log.Info("Unlocking") - s.env.RunEarlyHook(s.name, "unlock") + s.env.RunEarlyHook(s.Name, "unlock") kapi := s.env.EtcdClient() _, err := kapi.Delete(context.Background(), s.lockPath, nil) if cerr, ok := err.(*client.ClusterError); ok { s.log.WithError(cerr).Panic("Cannot unlock service") } - s.env.RunLateHook(s.name, "unlock") + s.env.RunLateHook(s.Name, "unlock") } func (s *Service) Lock(ttl time.Duration, message string) { s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") - s.env.RunEarlyHook(s.name, "lock") + s.env.RunEarlyHook(s.Name, "lock") kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) @@ -120,94 +127,7 @@ func (s *Service) Lock(ttl time.Duration, message string) { WithField("ttl", resp.Node.TTLDuration().String()). Fatal("Service is already locked") } - s.env.RunLateHook(s.name, "lock") -} - -func (s *Service) Update() error { - s.log.Info("Updating service") - s.Generate(nil) - - hostname, _ := os.Hostname() - s.Lock(time.Hour*1, "["+os.Getenv("USER")+"@"+hostname+"] Updating") - lock := true - defer func() { - if lock { - s.log.WithField("service", s.name).Warn("!! Leaving but Service is still lock !!") - } - }() -units: - for i, unit := range s.ListUnits() { - u := s.LoadUnit(unit) - - ask: - for { - same, err := u.IsLocalContentSameAsRemote() - if err != nil { - u.Log.WithError(err).Warn("Cannot compare local and remote service") - } - if same { - u.Log.Info("Remote service is already up to date") - if !builder.BuildFlags.All { - continue units - } - } - if builder.BuildFlags.Yes { - break ask - } - action := s.askToProcessService(i, u) - switch action { - case ACTION_DIFF: - u.DisplayDiff() - case ACTION_QUIT: - u.Log.Debug("User want to quit") - if i == 0 { - s.Unlock() - lock = false - } - return errors.New("User want to quit") - case ACTION_SKIP: - u.Log.Debug("User skip this service") - continue units - case ACTION_YES: - break ask - default: - u.Log.Fatal("Should not be here") - } - } - - u.Destroy() - time.Sleep(time.Second * 2) - err := u.Start() - if err != nil { - log.WithError(err).Error("Failed to start service. Keeping lock") - return err - } - time.Sleep(time.Second * 2) - // status, err2 := u.Status() - // u.Log.WithField("status", status).Debug("Log status") - // if err2 != nil { - // log.WithError(err2).WithField("status", status).Panic("Unit failed just after start") - // return err2 - // } - // if status == "inactive" { - // log.WithField("status", status).Panic("Unit failed just after start") - // return errors.New("unit is inactive just after start") - // } - // - // s.checkServiceRunning() - - // TODO ask deploy pod version () - // TODO YES/NO - // TODO check running tmux - // TODO running as root ?? - // TODO notify slack - // TODO store old version - // TODO !!!!! check that service is running well before going to next server !!! - - } - s.Unlock() - lock = false - return nil + s.env.RunLateHook(s.Name, "lock") } ///////////////////////////////////////////////// @@ -244,10 +164,6 @@ func (s *Service) askToProcessService(index int, unit *service.Unit) Action { return ACTION_QUIT } -func (s *Service) checkServiceRunning() { - -} - func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) @@ -259,13 +175,13 @@ func (s *Service) loadAttributes() { s.log.WithField("attributes", s.attributes).Debug("Attributes loaded") } -func (s *Service) loadUnitTemplate() (*Templating, error) { +func (s *Service) loadUnitTemplate() (*utils.Templating, error) { path := s.path + spec.PATH_UNIT_TEMPLATE source, err := ioutil.ReadFile(path) if err != nil { return nil, errors.Annotate(err, "Cannot read unit template file") } - template := NewTemplating(s.name, string(source)) + template := utils.NewTemplating(s.Name, string(source)) template.Parse() return template, nil } diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go new file mode 100644 index 0000000..6e0926b --- /dev/null +++ b/work/env/service/unit-generate.go @@ -0,0 +1,46 @@ +package service + +import ( + "bytes" + "encoding/json" + "github.com/blablacar/green-garden/utils" + "github.com/peterbourgon/mergemap" + "io/ioutil" + "os" + "strings" +) + +func (u Unit) Generate(node map[string]interface{}, tmpl *utils.Templating, acis string, attributes map[string]interface{}) { + u.Log.Debug("Generate") + + data := make(map[string]interface{}) + + data["node"] = node + data["node"].(map[string]interface{})["acis"] = acis + + data["attribute"] = utils.CopyMap(attributes) + if data["node"].(map[string]interface{})["attributes"] != nil { + source := utils.CopyMapInterface(data["node"].(map[string]interface{})["attributes"].(map[interface{}]interface{})) + data["attribute"] = mergemap.Merge(data["attribute"].(map[string]interface{}), source.(map[string]interface{})) + } + + out, err := json.Marshal(data["attribute"]) + if err != nil { + u.Log.WithError(err).Panic("Cannot marshall attributes") + } + data["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + + var b bytes.Buffer + err = tmpl.Execute(&b, data) + if err != nil { + u.Log.Error("Failed to run templating", err) + } + ok, err := utils.Exists(u.path) + if !ok || err != nil { + os.Mkdir(u.path, 0755) + } + err = ioutil.WriteFile(u.path+"/"+u.Filename, b.Bytes(), 0644) + if err != nil { + u.Log.WithError(err).WithField("path", u.path+"/"+u.Filename).Error("Cannot writer unit") + } +} diff --git a/work/env/service/unit.go b/work/env/service/unit.go index d95fc68..9c6c424 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -17,18 +17,25 @@ type Unit struct { Log logrus.Entry path string Name string + Filename string unitPath string - service spec.Service + Service spec.Service } -func NewUnit(path string, name string, service spec.Service) *Unit { +func NewUnit(path string, hostname string, service spec.Service) *Unit { l := service.GetLog() + + unitInfo := strings.Split(hostname, "_") + if len(unitInfo) != 3 { + } + unit := &Unit{ - Log: *l.WithField("unit", name), - service: service, + Log: *l.WithField("unit", hostname), + Service: service, path: path, - Name: name, - unitPath: path + "/" + name, + Name: hostname, + Filename: service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + ".service", + unitPath: path + "/" + hostname, } return unit } @@ -102,7 +109,7 @@ func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { return "", "", errors.Annotate(err, "Cannot read local unit file") } - remoteContent, err := u.service.GetFleetUnitContent(u.Name) + remoteContent, err := u.Service.GetFleetUnitContent(u.Name) if err != nil { return localContent, "", errors.Annotate(err, "CanCannot read remote unit file") } @@ -111,7 +118,7 @@ func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { func (u Unit) Start() error { u.Log.Debug("Starting") - _, _, err := u.service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) + _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) if err != nil { logrus.WithError(err).Error("Cannot start unit") return err @@ -121,7 +128,7 @@ func (u Unit) Start() error { func (u Unit) Destroy() error { u.Log.Debug("Destroying") // todo check that service exists before destroy - _, _, err := u.service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) + _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") return err @@ -130,7 +137,7 @@ func (u Unit) Destroy() error { } func (u Unit) State() (string, error) { - content, _, err := u.service.GetEnv().RunFleetCmdGetOutput("status", u.Name) + content, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Name) if err != nil { return "", err } From c502245012ff542779f31304fdab5d93d1df8fd9 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 12:05:34 +0100 Subject: [PATCH 038/163] add commands on units --- commands/prepare-service.go | 10 ++-- commands/prepare-unit.go | 61 ++++++++++++++++++-- work/env/service-status.go | 7 ++- work/env/service-update.go | 9 +-- work/env/service/unit-mutable.go | 59 +++++++++++++++++++ work/env/service/unit.go | 97 ++++++++++++++------------------ 6 files changed, 168 insertions(+), 75 deletions(-) create mode 100644 work/env/service/unit-mutable.go diff --git a/commands/prepare-service.go b/commands/prepare-service.go index c0aa284..c8071ae 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -33,11 +33,11 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { }, } - var statusCmd = &cobra.Command{ - Use: "status [manifest...]", - Short: "status units for " + service.Name + " on env " + service.GetEnv().GetName(), + var diffCmd = &cobra.Command{ + Use: "diff [manifest...]", + Short: "diff units for " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { - service.Status() + service.Diff() }, } @@ -82,7 +82,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, statusCmd) + serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, diffCmd) for _, unitName := range service.ListUnits() { unit := service.LoadUnit(unitName) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 736c76f..a99eaed 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -6,20 +6,71 @@ import ( ) func prepareUnitCommands(unit *service.Unit) *cobra.Command { - var unitCmd = &cobra.Command{ + unitCmd := &cobra.Command{ Use: unit.Name, - Short: "run command for " + unit.Name + " on " + unit.Service.GetName() + " on env " + unit.Service.GetEnv().GetName(), + Short: getShortDescription(unit, "Run command for"), } - var startCmd = &cobra.Command{ + startCmd := &cobra.Command{ Use: "start", - Short: "start " + unit.Name + " from " + unit.Service.GetName() + " on env " + unit.Service.GetEnv().GetName(), + Short: getShortDescription(unit, "Start"), Run: func(cmd *cobra.Command, args []string) { unit.Start() }, } - unitCmd.AddCommand(startCmd) + stopCmd := &cobra.Command{ + Use: "stop", + Short: getShortDescription(unit, "Stop"), + Run: func(cmd *cobra.Command, args []string) { + unit.Stop() + }, + } + + updateCmd := &cobra.Command{ + Use: "update", + Short: getShortDescription(unit, "Update"), + Run: func(cmd *cobra.Command, args []string) { + unit.Update() + }, + } + destroyCmd := &cobra.Command{ + Use: "destroy", + Short: getShortDescription(unit, "Destroy"), + Run: func(cmd *cobra.Command, args []string) { + unit.Destroy() + }, + } + + statusCmd := &cobra.Command{ + Use: "status", + Short: getShortDescription(unit, "Get status of"), + Run: func(cmd *cobra.Command, args []string) { + unit.Status() + }, + } + + diffCmd := &cobra.Command{ + Use: "diff", + Short: getShortDescription(unit, "Diff"), + Run: func(cmd *cobra.Command, args []string) { + unit.Diff() + }, + } + + unloadCmd := &cobra.Command{ + Use: "unload", + Short: getShortDescription(unit, "Unload"), + Run: func(cmd *cobra.Command, args []string) { + unit.Unload() + }, + } + + unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd) return unitCmd } + +func getShortDescription(unit *service.Unit, action string) string { + return action + " '" + unit.Name + "' from '" + unit.Service.GetName() + "' on env '" + unit.Service.GetEnv().GetName() + "'" +} diff --git a/work/env/service-status.go b/work/env/service-status.go index 2d725bd..0e4d452 100644 --- a/work/env/service-status.go +++ b/work/env/service-status.go @@ -4,8 +4,8 @@ import ( "strings" ) -func (s *Service) Status() { - s.log.Debug("Running status") +func (s *Service) Diff() { + s.log.Debug("Running diff") s.Generate(nil) @@ -22,6 +22,7 @@ func (s *Service) Status() { if unitInfo[1] != s.Name { continue } - s.LoadUnit(unitName).Status() + split := strings.Split(unitInfo[2], ".") + s.LoadUnit(split[0]).Diff() } } diff --git a/work/env/service-update.go b/work/env/service-update.go index 0ee823a..78e02f5 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -59,14 +59,9 @@ units: } } - u.Destroy() - time.Sleep(time.Second * 2) - err := u.Start() - if err != nil { - s.log.WithError(err).Error("Failed to start service. Keeping lock") - return err - } + u.Update() time.Sleep(time.Second * 2) + // status, err2 := u.Status() // u.Log.WithField("status", status).Debug("Log status") // if err2 != nil { diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go new file mode 100644 index 0000000..59173b5 --- /dev/null +++ b/work/env/service/unit-mutable.go @@ -0,0 +1,59 @@ +package service + +import ( + "github.com/Sirupsen/logrus" + "time" +) + +func (u Unit) Start() error { + return u.runAction("start") +} + +func (u Unit) Unload() error { + return u.runAction("unload") +} + +func (u Unit) Stop() error { + return u.runAction("stop") +} + +func (u Unit) Destroy() error { + return u.runAction("destroy") +} + +func (u Unit) Update() error { + u.Log.Debug("Update") + u.Service.GetEnv().RunEarlyHook(u.Name, "Update") + defer u.Service.GetEnv().RunLateHook(u.Name, "Update") + + // destroy + _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) + if err != nil { + logrus.WithError(err).Warn("Cannot destroy unit") + return err + } + + // start + time.Sleep(time.Second * 2) + _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) + if err != nil { + logrus.WithError(err).Error("Cannot start unit") + return err + } + return nil +} + +///////////////////////////// + +func (u Unit) runAction(action string) error { + u.Log.Debug(action) + u.Service.GetEnv().RunEarlyHook(u.Name, action) + defer u.Service.GetEnv().RunLateHook(u.Name, action) + + _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput(action, u.unitPath) + if err != nil { + logrus.WithError(err).Error("Cannot " + action + " unit") + return err + } + return nil +} diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 9c6c424..0b85ab4 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -9,7 +9,6 @@ import ( "github.com/juju/errors" "io/ioutil" "os" - "regexp" "strings" ) @@ -29,18 +28,19 @@ func NewUnit(path string, hostname string, service spec.Service) *Unit { if len(unitInfo) != 3 { } + filename := service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + ".service" unit := &Unit{ Log: *l.WithField("unit", hostname), Service: service, path: path, Name: hostname, - Filename: service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + ".service", - unitPath: path + "/" + hostname, + Filename: filename, + unitPath: path + "/" + filename, } return unit } -func (u Unit) Status() { +func (u Unit) Diff() { same, err := u.IsLocalContentSameAsRemote() if err != nil { u.Log.Warn("Cannot read unit") @@ -74,6 +74,31 @@ func (u Unit) GetUnitContentAsFleeted() (string, error) { return convertMultilineUnitToString([]byte(fleetunit.String())), nil } +func (u Unit) Status() error { + u.Log.Debug("status") + content, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) + if err != nil { + logrus.WithError(err).Fatal("Failed to run status") + } + os.Stdout.WriteString(content) + return nil + // if err != nil { + // return "", err + // } + // + // reg, err := regexp.Compile(`Active: (active|inactive|deactivating|activating)`) + // if err != nil { + // u.Log.Panic("Cannot compile regex") + // } + // matched := reg.FindStringSubmatch(content) + // + // // if !strings.Contains(content, "Active: %s ") { // Active: failed + // // return content, errors.New("unit is not in running state") + // // } + // + // return matched[1], err +} + func (u Unit) DisplayDiff() error { u.Log.Debug("Diff") @@ -103,69 +128,31 @@ func (u Unit) IsLocalContentSameAsRemote() (bool, error) { return local == remote, nil } +//func (u Unit) Stop() { +// u.service.GetEnv().RunFleetCmdGetOutput("stop", u.name) +//} +// +// +//func (u Unit) Cat() { +// u.service.GetEnv().RunFleetCmdGetOutput("cat ", u.name) +//} + +/////////////////////////////////////////// + func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { localContent, err := u.GetUnitContentAsFleeted() if err != nil { + u.Log.WithError(err).Debug("Cannot get local unit content") return "", "", errors.Annotate(err, "Cannot read local unit file") } - remoteContent, err := u.Service.GetFleetUnitContent(u.Name) + remoteContent, err := u.Service.GetFleetUnitContent(u.Filename) if err != nil { return localContent, "", errors.Annotate(err, "CanCannot read remote unit file") } return localContent, remoteContent, nil } -func (u Unit) Start() error { - u.Log.Debug("Starting") - _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) - if err != nil { - logrus.WithError(err).Error("Cannot start unit") - return err - } - return nil -} - -func (u Unit) Destroy() error { - u.Log.Debug("Destroying") // todo check that service exists before destroy - _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Name) - if err != nil { - logrus.WithError(err).Warn("Cannot destroy unit") - return err - } - return nil -} - -func (u Unit) State() (string, error) { - content, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Name) - if err != nil { - return "", err - } - - reg, err := regexp.Compile(`Active: (active|inactive|deactivating|activating)`) - if err != nil { - u.Log.Panic("Cannot compile regex") - } - matched := reg.FindStringSubmatch(content) - - // if !strings.Contains(content, "Active: %s ") { // Active: failed - // return content, errors.New("unit is not in running state") - // } - - return matched[1], err -} - -//func (u Unit) Stop() { -// u.service.GetEnv().RunFleetCmdGetOutput("stop", u.name) -//} -// -// -//func (u Unit) Cat() { -// u.service.GetEnv().RunFleetCmdGetOutput("cat ", u.name) -//} - -/////////////////////////////////////////// - func convertMultilineUnitToString(content []byte) string { var lines []string var currentLine string From de49c7145f312edcd2d7b9409841b9413819c0f1 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 12:16:40 +0100 Subject: [PATCH 039/163] remove hook on lock/unlock --- work/env/service.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/work/env/service.go b/work/env/service.go index c2b593b..fd45d7e 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -99,19 +99,16 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this func (s *Service) Unlock() { s.log.Info("Unlocking") - s.env.RunEarlyHook(s.Name, "unlock") kapi := s.env.EtcdClient() _, err := kapi.Delete(context.Background(), s.lockPath, nil) if cerr, ok := err.(*client.ClusterError); ok { s.log.WithError(cerr).Panic("Cannot unlock service") } - s.env.RunLateHook(s.Name, "unlock") } func (s *Service) Lock(ttl time.Duration, message string) { s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") - s.env.RunEarlyHook(s.Name, "lock") kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) @@ -127,7 +124,6 @@ func (s *Service) Lock(ttl time.Duration, message string) { WithField("ttl", resp.Node.TTLDuration().String()). Fatal("Service is already locked") } - s.env.RunLateHook(s.Name, "lock") } ///////////////////////////////////////////////// From 6697587646f0b52d7d00036754596bc031c90445 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 14:00:57 +0100 Subject: [PATCH 040/163] lock on mutable unit actions. add flag to force (-f) unit update --- builder/build.go | 5 ++-- commands/prepare-unit.go | 4 ++- spec/service.go | 3 +++ work/env/service-update.go | 28 +++------------------ work/env/service.go | 9 +++++++ work/env/service/unit-mutable.go | 43 ++++++++++++++++++++++++++++++-- 6 files changed, 62 insertions(+), 30 deletions(-) diff --git a/builder/build.go b/builder/build.go index f84d405..31bda34 100644 --- a/builder/build.go +++ b/builder/build.go @@ -1,8 +1,9 @@ package builder type Flags struct { - All bool - Yes bool + All bool + Yes bool + Force bool } var BuildFlags = Flags{} diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index a99eaed..2a2f6cd 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -1,6 +1,7 @@ package commands import ( + "github.com/blablacar/green-garden/builder" "github.com/blablacar/green-garden/work/env/service" "github.com/spf13/cobra" ) @@ -31,9 +32,10 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "update", Short: getShortDescription(unit, "Update"), Run: func(cmd *cobra.Command, args []string) { - unit.Update() + unit.Update(true) }, } + updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") destroyCmd := &cobra.Command{ Use: "destroy", diff --git a/spec/service.go b/spec/service.go index 11323f7..e905001 100644 --- a/spec/service.go +++ b/spec/service.go @@ -3,6 +3,7 @@ package spec import ( "github.com/Sirupsen/logrus" cntspec "github.com/blablacar/cnt/spec" + "time" ) const PATH_SERVICE_MANIFEST = "/service-manifest.yml" @@ -23,6 +24,8 @@ type ServiceManifest struct { } type Service interface { + Unlock() + Lock(ttl time.Duration, message string) GetName() string GetEnv() Env GetLog() logrus.Entry diff --git a/work/env/service-update.go b/work/env/service-update.go index 78e02f5..3d36730 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -3,7 +3,6 @@ package env import ( "errors" "github.com/blablacar/green-garden/builder" - "os" "time" ) @@ -11,8 +10,7 @@ func (s *Service) Update() error { s.log.Info("Updating service") s.Generate(nil) - hostname, _ := os.Hostname() - s.Lock(time.Hour*1, "["+os.Getenv("USER")+"@"+hostname+"] Updating") + s.Lock(1*time.Hour, "Updating") lock := true defer func() { if lock { @@ -59,30 +57,10 @@ units: } } - u.Update() + builder.BuildFlags.Force = true + u.Update(false) time.Sleep(time.Second * 2) - // status, err2 := u.Status() - // u.Log.WithField("status", status).Debug("Log status") - // if err2 != nil { - // log.WithError(err2).WithField("status", status).Panic("Unit failed just after start") - // return err2 - // } - // if status == "inactive" { - // log.WithField("status", status).Panic("Unit failed just after start") - // return errors.New("unit is inactive just after start") - // } - // - // s.checkServiceRunning() - - // TODO ask deploy pod version () - // TODO YES/NO - // TODO check running tmux - // TODO running as root ?? - // TODO notify slack - // TODO store old version - // TODO !!!!! check that service is running well before going to next server !!! - } s.Unlock() lock = false diff --git a/work/env/service.go b/work/env/service.go index fd45d7e..0baebc3 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -108,6 +108,10 @@ func (s *Service) Unlock() { } func (s *Service) Lock(ttl time.Duration, message string) { + hostname, _ := os.Hostname() + who := "[" + os.Getenv("USER") + "@" + hostname + "] " + message = who + message + s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") kapi := s.env.EtcdClient() @@ -119,6 +123,11 @@ func (s *Service) Lock(ttl time.Duration, message string) { if err != nil { s.log.WithError(err).Fatal("Cannot write lock") } + } else if strings.HasPrefix(resp.Node.Value, who) { + _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttl}) + if err != nil { + s.log.WithError(err).Fatal("Cannot write lock") + } } else { s.log.WithField("message", resp.Node.Value). WithField("ttl", resp.Node.TTLDuration().String()). diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index 59173b5..7b59652 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -2,6 +2,7 @@ package service import ( "github.com/Sirupsen/logrus" + "github.com/blablacar/green-garden/builder" "time" ) @@ -21,13 +22,28 @@ func (u Unit) Destroy() error { return u.runAction("destroy") } -func (u Unit) Update() error { +func (u Unit) Update(lock bool) error { u.Log.Debug("Update") + + if lock { + u.Service.Lock(1*time.Hour, "Update") + u.Service.Unlock() + } + + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Warn("Cannot compare local and remote service") + } + if same && !builder.BuildFlags.Force { + u.Log.Info("Remote service is already up to date, not updating") + return nil + } + u.Service.GetEnv().RunEarlyHook(u.Name, "Update") defer u.Service.GetEnv().RunLateHook(u.Name, "Update") // destroy - _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) + _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") return err @@ -40,12 +56,35 @@ func (u Unit) Update() error { logrus.WithError(err).Error("Cannot start unit") return err } + + // status, err2 := u.Status() + // u.Log.WithField("status", status).Debug("Log status") + // if err2 != nil { + // log.WithError(err2).WithField("status", status).Panic("Unit failed just after start") + // return err2 + // } + // if status == "inactive" { + // log.WithField("status", status).Panic("Unit failed just after start") + // return errors.New("unit is inactive just after start") + // } + // + // s.checkServiceRunning() + + // TODO ask deploy pod version () + // TODO YES/NO + // TODO check running tmux + // TODO running as root ?? + // TODO notify slack + // TODO store old version + // TODO !!!!! check that service is running well before going to next server !!! return nil } ///////////////////////////// func (u Unit) runAction(action string) error { + u.Service.Lock(1*time.Hour, action) + u.Service.Unlock() u.Log.Debug(action) u.Service.GetEnv().RunEarlyHook(u.Name, action) defer u.Service.GetEnv().RunLateHook(u.Name, action) From 76cc75378e835455f49817bfac9caa250e28b069 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 14:18:23 +0100 Subject: [PATCH 041/163] use diff for status on env/service --- commands/prepare-service.go | 10 +++++----- work/env-status.go | 2 +- work/env/service-status.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index c8071ae..c0aa284 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -33,11 +33,11 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { }, } - var diffCmd = &cobra.Command{ - Use: "diff [manifest...]", - Short: "diff units for " + service.Name + " on env " + service.GetEnv().GetName(), + var statusCmd = &cobra.Command{ + Use: "status [manifest...]", + Short: "status units for " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { - service.Diff() + service.Status() }, } @@ -82,7 +82,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, diffCmd) + serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, statusCmd) for _, unitName := range service.ListUnits() { unit := service.LoadUnit(unitName) diff --git a/work/env-status.go b/work/env-status.go index 78f73f1..f9ddd35 100644 --- a/work/env-status.go +++ b/work/env-status.go @@ -18,6 +18,6 @@ func (e Env) Status() { e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") continue } - e.LoadService(unitInfo[1]).LoadUnit(unitName).Status() + e.LoadService(unitInfo[1]).LoadUnit(unitName).Diff() } } diff --git a/work/env/service-status.go b/work/env/service-status.go index 0e4d452..424c617 100644 --- a/work/env/service-status.go +++ b/work/env/service-status.go @@ -4,8 +4,8 @@ import ( "strings" ) -func (s *Service) Diff() { - s.log.Debug("Running diff") +func (s *Service) Status() { + s.log.Debug("Running status") s.Generate(nil) From 9233f035da3e6aed0d1a34843add4451636b13a8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 14:25:19 +0100 Subject: [PATCH 042/163] add unit information when locking unit --- work/env/service/unit-mutable.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index 7b59652..166796f 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -26,7 +26,7 @@ func (u Unit) Update(lock bool) error { u.Log.Debug("Update") if lock { - u.Service.Lock(1*time.Hour, "Update") + u.Service.Lock(1*time.Hour, "Update " + u.Name) u.Service.Unlock() } @@ -83,7 +83,7 @@ func (u Unit) Update(lock bool) error { ///////////////////////////// func (u Unit) runAction(action string) error { - u.Service.Lock(1*time.Hour, action) + u.Service.Lock(1*time.Hour, action + " " + u.Name) u.Service.Unlock() u.Log.Debug(action) u.Service.GetEnv().RunEarlyHook(u.Name, action) From d48b3f2dfb61d527a61e02742a7582ba053ef2fb Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 15:05:54 +0100 Subject: [PATCH 043/163] fix status on env --- work/env-status.go | 3 ++- work/env/service/unit-mutable.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/work/env-status.go b/work/env-status.go index f9ddd35..a839037 100644 --- a/work/env-status.go +++ b/work/env-status.go @@ -18,6 +18,7 @@ func (e Env) Status() { e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") continue } - e.LoadService(unitInfo[1]).LoadUnit(unitName).Diff() + split := strings.Split(unitInfo[2], ".") + e.LoadService(unitInfo[1]).LoadUnit(split[0]).Diff() } } diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index 166796f..7a465ea 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -26,7 +26,7 @@ func (u Unit) Update(lock bool) error { u.Log.Debug("Update") if lock { - u.Service.Lock(1*time.Hour, "Update " + u.Name) + u.Service.Lock(1*time.Hour, "Update "+u.Name) u.Service.Unlock() } @@ -83,7 +83,7 @@ func (u Unit) Update(lock bool) error { ///////////////////////////// func (u Unit) runAction(action string) error { - u.Service.Lock(1*time.Hour, action + " " + u.Name) + u.Service.Lock(1*time.Hour, action+" "+u.Name) u.Service.Unlock() u.Log.Debug(action) u.Service.GetEnv().RunEarlyHook(u.Name, action) From ff761dc6224dec1d4c84b70328e1163362dcdf91 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 16:11:51 +0100 Subject: [PATCH 044/163] merge check and status command. fix generate for mutable cmd --- commands/prepare-env.go | 14 ++----- commands/prepare-service.go | 42 ++++++++++--------- commands/prepare-unit.go | 10 ++++- spec/service.go | 1 + work/env-check.go | 33 ++++++++++++--- work/env-status.go | 24 ----------- .../{service-status.go => service-check.go} | 7 ++-- work/env/service.go | 16 ++++--- work/env/service/unit-mutable.go | 3 +- work/env/service/unit.go | 9 ++-- 10 files changed, 80 insertions(+), 79 deletions(-) delete mode 100644 work/env-status.go rename work/env/{service-status.go => service-check.go} (84%) diff --git a/commands/prepare-env.go b/commands/prepare-env.go index 7a9024b..8463f7b 100644 --- a/commands/prepare-env.go +++ b/commands/prepare-env.go @@ -12,21 +12,13 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { } checkCmd := &cobra.Command{ - Use: env.GetName(), - Short: "Check local units with what is running on fleet on " + env.GetName(), + Use: "check", + Short: "Check of " + env.GetName(), Run: func(cmd *cobra.Command, args []string) { env.Check() }, } - statusCmd := &cobra.Command{ - Use: "status", - Short: "Status of " + env.GetName(), - Run: func(cmd *cobra.Command, args []string) { - env.Status() - }, - } - fleetctlCmd := &cobra.Command{ Use: "fleetctl", Short: "Run fleetctl command on " + env.GetName(), @@ -42,7 +34,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { env.Generate() }, } - envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, statusCmd) + envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd) for _, serviceName := range env.ListServices() { service := env.LoadService(serviceName) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index c0aa284..158ddd4 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -11,20 +11,14 @@ import ( ) func prepareServiceCommands(service *env.Service) *cobra.Command { - var serviceCmd = &cobra.Command{ + var ttl string + + serviceCmd := &cobra.Command{ Use: service.Name, Short: "run command for " + service.Name + " on env " + service.GetEnv().GetName(), } - var checkCmd = &cobra.Command{ - Use: "check", - Short: "Check local units matches what is running on " + service.GetEnv().GetName() + " for " + service.GetName(), - Run: func(cmd *cobra.Command, args []string) { - service.Check() - }, - } - - var generateCmd = &cobra.Command{ + generateCmd := &cobra.Command{ Use: "generate [manifest...]", Short: "generate units for " + service.Name + " on env " + service.GetEnv().GetName(), Long: `generate units using remote resolved or local pod/aci manifests`, @@ -33,16 +27,23 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { }, } - var statusCmd = &cobra.Command{ - Use: "status [manifest...]", - Short: "status units for " + service.Name + " on env " + service.GetEnv().GetName(), + checkCmd := &cobra.Command{ + Use: "check [manifest...]", + Short: "Check units for " + service.Name + " on env " + service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + service.Check() + }, + } + + diffCmd := &cobra.Command{ + Use: "diff [manifest...]", + Short: "diff units for " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { - service.Status() + service.Diff() }, } - var ttl string - var lockCmd = &cobra.Command{ + lockCmd := &cobra.Command{ Use: "lock [message...]", Short: "lock " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { @@ -59,9 +60,8 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { service.Lock(ttl, message) }, } - lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") - var unlockCmd = &cobra.Command{ + unlockCmd := &cobra.Command{ Use: "unlock", Short: "unlock " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { @@ -69,7 +69,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { }, } - var updateCmd = &cobra.Command{ + updateCmd := &cobra.Command{ Use: "update", Short: "update " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { @@ -79,10 +79,12 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { } }, } + + lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - serviceCmd.AddCommand(generateCmd, checkCmd, lockCmd, unlockCmd, updateCmd, statusCmd) + serviceCmd.AddCommand(generateCmd /*checkCmd,*/, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd) for _, unitName := range service.ListUnits() { unit := service.LoadUnit(unitName) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 2a2f6cd..7206ed8 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -61,6 +61,14 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { }, } + checkCmd := &cobra.Command{ + Use: "check", + Short: getShortDescription(unit, "check"), + Run: func(cmd *cobra.Command, args []string) { + unit.Check() + }, + } + unloadCmd := &cobra.Command{ Use: "unload", Short: getShortDescription(unit, "Unload"), @@ -69,7 +77,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { }, } - unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd) + unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd, checkCmd) return unitCmd } diff --git a/spec/service.go b/spec/service.go index e905001..63f4eb9 100644 --- a/spec/service.go +++ b/spec/service.go @@ -24,6 +24,7 @@ type ServiceManifest struct { } type Service interface { + Generate(sources []string) Unlock() Lock(ttl time.Duration, message string) GetName() string diff --git a/work/env-check.go b/work/env-check.go index 2e790a7..80cf4a8 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -1,11 +1,9 @@ package work -import ( - "strings" -) +import "strings" func (e Env) Check() { - e.log.Debug("Running command") + e.log.Debug("Running check") e.Generate() @@ -20,6 +18,31 @@ func (e Env) Check() { e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") continue } - e.LoadService(unitInfo[1]).LoadUnit(unitName).Check() + split := strings.Split(unitInfo[2], ".") + e.LoadService(unitInfo[1]).LoadUnit(split[0]).Check() } } + +//import ( +// "strings" +//) +// +//func (e Env) Check() { +// e.log.Debug("Running command") +// +// e.Generate() +// +// units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") +// if err != nil { +// e.log.WithError(err).Fatal("Cannot list unit files") +// } +// +// for _, unitName := range strings.Split(units, "\n") { +// unitInfo := strings.Split(unitName, "_") +// if len(unitInfo) != 3 { +// e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") +// continue +// } +// e.LoadService(unitInfo[1]).LoadUnit(unitName).Check() +// } +//} diff --git a/work/env-status.go b/work/env-status.go deleted file mode 100644 index a839037..0000000 --- a/work/env-status.go +++ /dev/null @@ -1,24 +0,0 @@ -package work - -import "strings" - -func (e Env) Status() { - e.log.Debug("Running status") - - e.Generate() - - units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") - if err != nil { - e.log.WithError(err).Fatal("Cannot list unit files") - } - - for _, unitName := range strings.Split(units, "\n") { - unitInfo := strings.Split(unitName, "_") - if len(unitInfo) != 3 { - e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") - continue - } - split := strings.Split(unitInfo[2], ".") - e.LoadService(unitInfo[1]).LoadUnit(split[0]).Diff() - } -} diff --git a/work/env/service-status.go b/work/env/service-check.go similarity index 84% rename from work/env/service-status.go rename to work/env/service-check.go index 424c617..2e517ae 100644 --- a/work/env/service-status.go +++ b/work/env/service-check.go @@ -4,8 +4,8 @@ import ( "strings" ) -func (s *Service) Status() { - s.log.Debug("Running status") +func (s *Service) Check() { + s.log.Debug("Running check") s.Generate(nil) @@ -23,6 +23,7 @@ func (s *Service) Status() { continue } split := strings.Split(unitInfo[2], ".") - s.LoadUnit(split[0]).Diff() + + s.LoadUnit(split[0]).Check() } } diff --git a/work/env/service.go b/work/env/service.go index 0baebc3..68cfdcf 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -61,6 +61,13 @@ func (s *Service) LoadUnit(hostname string) *service.Unit { return unit } +func (s *Service) Diff() { + for _, unitName := range s.ListUnits() { + unit := s.LoadUnit(unitName) + unit.Diff() + } +} + func (s *Service) ListUnits() []string { res := []string{} if len(s.manifest.Nodes) == 0 { @@ -80,15 +87,6 @@ func (s *Service) ListUnits() []string { return res } -func (s *Service) Check() { - s.log.Debug("Check") - s.Generate(nil) - unitNames := s.ListUnits() - for _, unitName := range unitNames { - s.LoadUnit(unitName).Check() - } -} - func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this method should be in unit stdout, stderr, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) if err != nil && stderr == "Unit "+unit+" not found" { diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index 7a465ea..c28d6fb 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -7,6 +7,7 @@ import ( ) func (u Unit) Start() error { + u.Service.Generate(nil) return u.runAction("start") } @@ -23,6 +24,7 @@ func (u Unit) Destroy() error { } func (u Unit) Update(lock bool) error { + u.Service.Generate(nil) u.Log.Debug("Update") if lock { @@ -46,7 +48,6 @@ func (u Unit) Update(lock bool) error { _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") - return err } // start diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 0b85ab4..1b24475 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -40,23 +40,22 @@ func NewUnit(path string, hostname string, service spec.Service) *Unit { return unit } -func (u Unit) Diff() { +func (u Unit) Check() { same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.Warn("Cannot read unit") + u.Log.Error("Cannot read unit") } if !same { u.Log.Warn("Unit is not up to date") } } -func (u Unit) Check() { +func (u Unit) Diff() { same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.WithError(err).Warn("Cannot diff with remote") + u.Log.Warn("Cannot read unit") } if !same { - u.Log.Info("Unit is not up to date") u.DisplayDiff() } } From 88837e5aec719fcae680b0390439a72a0c077388 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 16:58:34 +0100 Subject: [PATCH 045/163] add journal command on units --- commands/prepare-unit.go | 18 ++++++++++++++++-- spec/env.go | 1 + work/env/service/unit.go | 15 +++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 7206ed8..0a35d0e 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -7,6 +7,9 @@ import ( ) func prepareUnitCommands(unit *service.Unit) *cobra.Command { + var follow bool + var lines int + unitCmd := &cobra.Command{ Use: unit.Name, Short: getShortDescription(unit, "Run command for"), @@ -35,7 +38,6 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { unit.Update(true) }, } - updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") destroyCmd := &cobra.Command{ Use: "destroy", @@ -53,6 +55,14 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { }, } + journalCmd := &cobra.Command{ + Use: "journal", + Short: getShortDescription(unit, "Get journal of"), + Run: func(cmd *cobra.Command, args []string) { + unit.Journal(follow, lines) + }, + } + diffCmd := &cobra.Command{ Use: "diff", Short: getShortDescription(unit, "Diff"), @@ -77,7 +87,11 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { }, } - unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd, checkCmd) + journalCmd.Flags().BoolVarP(&follow, "follow", "f", false, "follow") + journalCmd.Flags().IntVarP(&lines, "lines", "l", 10, "lines") + updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") + + unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd, checkCmd, journalCmd) return unitCmd } diff --git a/spec/env.go b/spec/env.go index 26feb24..fce5e4f 100644 --- a/spec/env.go +++ b/spec/env.go @@ -13,6 +13,7 @@ type Env interface { GetAttributes() map[string]interface{} ListMachineNames() []string RunFleetCmdGetOutput(args ...string) (string, string, error) + RunFleetCmd(args ...string) error EtcdClient() client.KeysAPI RunEarlyHook(service string, action string) RunLateHook(service string, action string) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 1b24475..abddd2a 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -9,6 +9,7 @@ import ( "github.com/juju/errors" "io/ioutil" "os" + "strconv" "strings" ) @@ -50,6 +51,20 @@ func (u Unit) Check() { } } +func (u Unit) Journal(follow bool, lines int) { + u.Log.Debug("journal") + args := []string{"journal", "-lines", strconv.Itoa(lines)} + if follow { + args = append(args, "-f") + } + args = append(args, u.Filename) + + err := u.Service.GetEnv().RunFleetCmd(args...) + if err != nil { + logrus.WithError(err).Fatal("Failed to run status") + } +} + func (u Unit) Diff() { same, err := u.IsLocalContentSameAsRemote() if err != nil { From f1722a300c52f1898b1aac4eb259aaf40eb48768 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 24 Nov 2015 17:34:09 +0100 Subject: [PATCH 046/163] add ssh and load command --- Godeps/Godeps.json | 12 ++++++------ .../github.com/blablacar/cnt/utils/utils.go | 1 + commands/prepare-unit.go | 18 +++++++++++++++++- work/env/service/unit-mutable.go | 4 ++++ work/env/service/unit.go | 9 +++++++++ 5 files changed, 37 insertions(+), 7 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index af27722..a72c468 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -24,18 +24,18 @@ }, { "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "45-2-g38f2d71", - "Rev": "38f2d711554c4ffd4558a8b85794eab215fd48e1" + "Comment": "45-5-g226d271", + "Rev": "226d271434d899ba1ff5502a36783f7ffcf48dc9" }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "45-2-g38f2d71", - "Rev": "38f2d711554c4ffd4558a8b85794eab215fd48e1" + "Comment": "45-5-g226d271", + "Rev": "226d271434d899ba1ff5502a36783f7ffcf48dc9" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "45-2-g38f2d71", - "Rev": "38f2d711554c4ffd4558a8b85794eab215fd48e1" + "Comment": "45-5-g226d271", + "Rev": "226d271434d899ba1ff5502a36783f7ffcf48dc9" }, { "ImportPath": "github.com/camlistore/camlistore/pkg/errorutil", diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go index a3f70d4..40399c0 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go @@ -50,6 +50,7 @@ func ExecCmd(head string, parts ...string) error { log.Debug("Exec > ", head, " ", strings.Join(parts, " ")) cmd := exec.Command(head, parts...) cmd.Stdout = os.Stdout + cmd.Stdin = os.Stdin cmd.Stderr = os.Stderr return cmd.Run() } diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 0a35d0e..568ffa8 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -86,12 +86,28 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { unit.Unload() }, } + loadCmd := &cobra.Command{ + Use: "load", + Short: getShortDescription(unit, "load"), + Run: func(cmd *cobra.Command, args []string) { + unit.Load() + }, + } + + sshCmd := &cobra.Command{ + Use: "ssh", + Short: getShortDescription(unit, "ssh"), + Run: func(cmd *cobra.Command, args []string) { + unit.Ssh() + }, + } journalCmd.Flags().BoolVarP(&follow, "follow", "f", false, "follow") journalCmd.Flags().IntVarP(&lines, "lines", "l", 10, "lines") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") - unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd, checkCmd, journalCmd) + unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, + diffCmd, checkCmd, journalCmd, loadCmd, sshCmd) return unitCmd } diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index c28d6fb..fce4c4f 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -15,6 +15,10 @@ func (u Unit) Unload() error { return u.runAction("unload") } +func (u Unit) Load() error { + return u.runAction("load") +} + func (u Unit) Stop() error { return u.runAction("stop") } diff --git a/work/env/service/unit.go b/work/env/service/unit.go index abddd2a..e547649 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -60,6 +60,15 @@ func (u Unit) Journal(follow bool, lines int) { args = append(args, u.Filename) err := u.Service.GetEnv().RunFleetCmd(args...) + if err != nil { + logrus.WithError(err).Fatal("Failed to run journal") + } +} + +func (u Unit) Ssh() { + u.Log.Debug("ssh") + + err := u.Service.GetEnv().RunFleetCmd("ssh", u.Filename) if err != nil { logrus.WithError(err).Fatal("Failed to run status") } From 183256fb2b10d203e991826d9d6cf2f9e2beeb20 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 11:13:27 +0100 Subject: [PATCH 047/163] rename packages --- Godeps/Godeps.json | 2 +- build.sh | 1 - commands/genautocomplete.go | 2 +- commands/ggn.go | 2 +- commands/prepare-env.go | 2 +- commands/prepare-service.go | 4 ++-- commands/prepare-unit.go | 4 ++-- commands/prepare.go | 4 ++-- commands/version.go | 2 +- main.go | 2 +- work/env.go | 6 +++--- work/env/service-generate.go | 4 ++-- work/env/service-update.go | 2 +- work/env/service.go | 6 +++--- work/env/service/unit-generate.go | 2 +- work/env/service/unit-mutable.go | 2 +- work/env/service/unit.go | 2 +- work/work.go | 2 +- 18 files changed, 25 insertions(+), 26 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a72c468..011a577 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,5 +1,5 @@ { - "ImportPath": "github.com/blablacar/green-garden", + "ImportPath": "github.com/blablacar/ggn", "GoVersion": "go1.5.1", "Deps": [ { diff --git a/build.sh b/build.sh index 123fabe..a3b9eb3 100755 --- a/build.sh +++ b/build.sh @@ -37,7 +37,6 @@ else done fi -# install cp $dir/dist/linux-amd64/ggn $GOPATH/bin/ggn end=`date +%s` diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index ec3dc59..3af6b22 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -2,7 +2,7 @@ package commands import ( "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/config" + "github.com/blablacar/ggn/config" "github.com/spf13/cobra" "os" ) diff --git a/commands/ggn.go b/commands/ggn.go index 31935e7..e3dab09 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -5,7 +5,7 @@ import ( "fmt" log "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" - "github.com/blablacar/green-garden/config" + "github.com/blablacar/ggn/config" "github.com/coreos/go-semver/semver" "github.com/spf13/cobra" "os" diff --git a/commands/prepare-env.go b/commands/prepare-env.go index 8463f7b..2791271 100644 --- a/commands/prepare-env.go +++ b/commands/prepare-env.go @@ -1,7 +1,7 @@ package commands import ( - "github.com/blablacar/green-garden/work" + "github.com/blablacar/ggn/work" "github.com/spf13/cobra" ) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 158ddd4..36da586 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -2,8 +2,8 @@ package commands import ( "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/builder" - "github.com/blablacar/green-garden/work/env" + "github.com/blablacar/ggn/builder" + "github.com/blablacar/ggn/work/env" "github.com/spf13/cobra" "os" "strings" diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 568ffa8..1809ccb 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -1,8 +1,8 @@ package commands import ( - "github.com/blablacar/green-garden/builder" - "github.com/blablacar/green-garden/work/env/service" + "github.com/blablacar/ggn/builder" + "github.com/blablacar/ggn/work/env/service" "github.com/spf13/cobra" ) diff --git a/commands/prepare.go b/commands/prepare.go index 9da5ae1..fafbaf3 100644 --- a/commands/prepare.go +++ b/commands/prepare.go @@ -2,8 +2,8 @@ package commands import ( "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/config" - "github.com/blablacar/green-garden/work" + "github.com/blablacar/ggn/config" + "github.com/blablacar/ggn/work" "github.com/spf13/cobra" ) diff --git a/commands/version.go b/commands/version.go index bbdf51e..4de2bed 100644 --- a/commands/version.go +++ b/commands/version.go @@ -2,7 +2,7 @@ package commands import ( "fmt" - "github.com/blablacar/green-garden/application" + "github.com/blablacar/ggn/application" "github.com/spf13/cobra" "os" ) diff --git a/main.go b/main.go index cbf3f04..5b322ce 100644 --- a/main.go +++ b/main.go @@ -3,7 +3,7 @@ package main import ( "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/log" - "github.com/blablacar/green-garden/commands" + "github.com/blablacar/ggn/commands" ) //go:generate go run compile/version_generate.go diff --git a/work/env.go b/work/env.go index a434ae5..b09d712 100644 --- a/work/env.go +++ b/work/env.go @@ -6,9 +6,9 @@ import ( log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" cntUtils "github.com/blablacar/cnt/utils" - "github.com/blablacar/green-garden/spec" - "github.com/blablacar/green-garden/utils" - "github.com/blablacar/green-garden/work/env" + "github.com/blablacar/ggn/spec" + "github.com/blablacar/ggn/utils" + "github.com/blablacar/ggn/work/env" "github.com/coreos/etcd/client" "github.com/juju/errors" "gopkg.in/yaml.v2" diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 0e88a36..8c33c62 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -4,8 +4,8 @@ import ( "github.com/appc/spec/discovery" "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" - "github.com/blablacar/green-garden/spec" - "github.com/blablacar/green-garden/utils" + "github.com/blablacar/ggn/spec" + "github.com/blablacar/ggn/utils" "io/ioutil" "net/http" "strings" diff --git a/work/env/service-update.go b/work/env/service-update.go index 3d36730..f4a3d02 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -2,7 +2,7 @@ package env import ( "errors" - "github.com/blablacar/green-garden/builder" + "github.com/blablacar/ggn/builder" "time" ) diff --git a/work/env/service.go b/work/env/service.go index 68cfdcf..353300f 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -6,9 +6,9 @@ import ( "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" - "github.com/blablacar/green-garden/spec" - "github.com/blablacar/green-garden/utils" - "github.com/blablacar/green-garden/work/env/service" + "github.com/blablacar/ggn/spec" + "github.com/blablacar/ggn/utils" + "github.com/blablacar/ggn/work/env/service" "github.com/coreos/etcd/client" "github.com/juju/errors" "github.com/mgutz/ansi" diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index 6e0926b..3d35b28 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -3,7 +3,7 @@ package service import ( "bytes" "encoding/json" - "github.com/blablacar/green-garden/utils" + "github.com/blablacar/ggn/utils" "github.com/peterbourgon/mergemap" "io/ioutil" "os" diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index fce4c4f..abf44d3 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -2,7 +2,7 @@ package service import ( "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/builder" + "github.com/blablacar/ggn/builder" "time" ) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index e547649..4e8a7e4 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -4,7 +4,7 @@ import ( "bufio" "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" - "github.com/blablacar/green-garden/spec" + "github.com/blablacar/ggn/spec" "github.com/coreos/fleet/unit" "github.com/juju/errors" "io/ioutil" diff --git a/work/work.go b/work/work.go index 36d0ed8..61bf16e 100644 --- a/work/work.go +++ b/work/work.go @@ -2,7 +2,7 @@ package work import ( log "github.com/Sirupsen/logrus" - "github.com/blablacar/green-garden/config" + "github.com/blablacar/ggn/config" "io/ioutil" "os" ) From b934487843b68baca01bdd6ccc16e6e768f754b1 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 11:24:53 +0100 Subject: [PATCH 048/163] use go install to install package --- build.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/build.sh b/build.sh index a3b9eb3..3ccd4b1 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -x set -e start=`date +%s` dir=$( dirname $0 ) @@ -12,17 +13,6 @@ ENVS="darwin\nlinux" # clean rm -Rf $dir/dist/*-amd64 -# binary -#[ -f $GOPATH/bin/go-bindata ] || go get -u github.com/jteeuwen/go-bindata/... -#mkdir -p $dir/dist/bindata - -#[ -f $dir/aci-bats/aci-bats.aci ] || $dir/aci-bats/build.sh -#cp $dir/aci-bats/aci-bats.aci $dir/dist/bindata -#[ -f $dir/dist/bindata/busybox ] || cp /bin/busybox $dir/dist/bindata/ -#[ -f $dir/dist/bindata/attributes-merger ] || wget "https://github.com/blablacar/attributes-merger/releases/download/0.1/attributes-merger" -O $dir/dist/bindata/attributes-merger -#[ -f $dir/dist/bindata/confd ] || wget "https://github.com/kelseyhightower/confd/releases/download/v0.10.0/confd-0.10.0-linux-amd64" -O $dir/dist/bindata/confd -#go-bindata -nomemcopy -pkg dist -o $dir/dist/bindata.go $dir/dist/bindata/... - # format && test gofmt -w -s . godep go test -cover $dir/... @@ -30,14 +20,13 @@ godep go test -cover $dir/... # build if `command -v parallel >/dev/null 2>&1`; then echo -e "$ENVS" | parallel --will-cite -j10 --workdir . "GOOS={} GOARCH=amd64 godep go build -o dist/{}-amd64/ggn" -# mv dist/windows-amd64/ggn dist/windows-amd64/ggn.exe else for e in `echo -e "$ENVS"`; do GOOS="$e" GOARCH=amd64 godep go build -o "dist/${e}-amd64/ggn" done fi -cp $dir/dist/linux-amd64/ggn $GOPATH/bin/ggn +godep go install end=`date +%s` echo "Duration : $((end-start))s" From f21f2633f89468718c6eafeafb653be184bb14bb Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 11:27:56 +0100 Subject: [PATCH 049/163] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0327fe..a954eb4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # green-garden -[![GoDoc](https://godoc.org/blablacar/green-garden?status.png)](https://godoc.org/blablacar/green-garden) [![Build Status](https://travis-ci.org/blablacar/green-garden.svg?branch=master)](https://travis-ci.org/blablacar/green-garden) +[![GoDoc](https://godoc.org/blablacar/ggn?status.png)](https://godoc.org/blablacar/ggn) [![Build Status](https://travis-ci.org/blablacar/ggn.svg?branch=master)](https://travis-ci.org/blablacar/ggn) From 871ff0a1c588fb343ad371162c2d9ccc00847285 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 11:30:37 +0100 Subject: [PATCH 050/163] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a954eb4..cacae21 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# green-garden +# GGN -[![GoDoc](https://godoc.org/blablacar/ggn?status.png)](https://godoc.org/blablacar/ggn) [![Build Status](https://travis-ci.org/blablacar/ggn.svg?branch=master)](https://travis-ci.org/blablacar/ggn) +[![GoDoc](https://godoc.org/blablacar/ggn?status.png)](https://godoc.org/github.com/blablacar/ggn) [![Build Status](https://travis-ci.org/blablacar/ggn.svg?branch=master)](https://travis-ci.org/blablacar/ggn) From 59eff0e6c81eabc94de97cf101809aae9bfd33be Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 11:48:32 +0100 Subject: [PATCH 051/163] save dep on build --- Godeps/Godeps.json | 3 +++ build.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 011a577..853fbc9 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,9 @@ { "ImportPath": "github.com/blablacar/ggn", "GoVersion": "go1.5.1", + "Packages": [ + "./..." + ], "Deps": [ { "ImportPath": "github.com/Sirupsen/logrus", diff --git a/build.sh b/build.sh index 3ccd4b1..c634114 100755 --- a/build.sh +++ b/build.sh @@ -13,6 +13,9 @@ ENVS="darwin\nlinux" # clean rm -Rf $dir/dist/*-amd64 +#save dep +godep save ./... + # format && test gofmt -w -s . godep go test -cover $dir/... From 65fbeb6e8a6ccc7406856fafeee8061a25695e09 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 11:50:28 +0100 Subject: [PATCH 052/163] ignore if cannot save dep --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index c634114..578be4a 100755 --- a/build.sh +++ b/build.sh @@ -14,7 +14,7 @@ ENVS="darwin\nlinux" rm -Rf $dir/dist/*-amd64 #save dep -godep save ./... +godep save ./... || true # format && test gofmt -w -s . From 35ee895c62d4ce21b2f75664af06a0521a37b0c4 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 14:17:54 +0100 Subject: [PATCH 053/163] add user config attribute (override $USER) --- config/config.go | 19 ++++++++++--------- work/env-list-units.go | 20 ++++++++++++++++++++ work/env.go | 7 ++++++- work/env/service/unit.go | 18 +++++++++--------- 4 files changed, 45 insertions(+), 19 deletions(-) create mode 100644 work/env-list-units.go diff --git a/config/config.go b/config/config.go index d544207..eb0a3b2 100644 --- a/config/config.go +++ b/config/config.go @@ -7,29 +7,30 @@ import ( "io/ioutil" ) -var ggConfig GgConfig +var ggnConfig GgnConfig -type GgConfig struct { +type GgnConfig struct { Path string WorkPath string `yaml:"workPath,omitempty"` + User string `yaml:"user,omitempty"` } -func GetConfig() *GgConfig { - return &ggConfig +func GetConfig() *GgnConfig { + return &ggnConfig } -func (c *GgConfig) Load() { +func (c *GgnConfig) Load() { } func init() { - ggConfig = GgConfig{Path: utils.UserHomeOrFatal() + "/.config/green-garden"} + ggnConfig = GgnConfig{Path: utils.UserHomeOrFatal() + "/.config/green-garden"} - if source, err := ioutil.ReadFile(ggConfig.Path + "/config.yml"); err == nil { - err = yaml.Unmarshal([]byte(source), &ggConfig) + if source, err := ioutil.ReadFile(ggnConfig.Path + "/config.yml"); err == nil { + err = yaml.Unmarshal([]byte(source), &ggnConfig) if err != nil { panic(err) } } - log.Debug("Home folder is " + ggConfig.Path) + log.Debug("Home folder is " + ggnConfig.Path) } diff --git a/work/env-list-units.go b/work/env-list-units.go new file mode 100644 index 0000000..0649133 --- /dev/null +++ b/work/env-list-units.go @@ -0,0 +1,20 @@ +package work + +//import ( +// "bufio" +// "strings" +//) +// +//func (e Env) ListUnits() { +// stdout, _, err := e.RunFleetCmdGetOutput("list-units", "-no-legend") +// if err != nil { +// +// } +// +// var lines []string +// scanner := bufio.NewScanner(strings.NewReader(stdout)) +// for scanner.Scan() { +// lines = append(lines, scanner.Text()) +// } +// +//} diff --git a/work/env.go b/work/env.go index b09d712..49b56f9 100644 --- a/work/env.go +++ b/work/env.go @@ -6,6 +6,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" cntUtils "github.com/blablacar/cnt/utils" + "github.com/blablacar/ggn/config" "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" "github.com/blablacar/ggn/work/env" @@ -153,7 +154,11 @@ func (e Env) runHook(path string, service string, action string) { os.Setenv("SERVICE", service) hostname, _ := os.Hostname() - os.Setenv("WHO", os.Getenv("USER")+"@"+hostname) + user := os.Getenv("USER") + if config.GetConfig().User != "" { + user = config.GetConfig().User + } + os.Setenv("WHO", user+"@"+hostname) os.Setenv("ACTION", action) for _, f := range files { if !f.IsDir() { diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 4e8a7e4..5c3081f 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -42,6 +42,11 @@ func NewUnit(path string, hostname string, service spec.Service) *Unit { } func (u Unit) Check() { + u.Log.Debug("Check") + + u.Service.GetEnv().RunEarlyHook(u.Name, "check") + defer u.Service.GetEnv().RunLateHook(u.Name, "check") + same, err := u.IsLocalContentSameAsRemote() if err != nil { u.Log.Error("Cannot read unit") @@ -53,6 +58,7 @@ func (u Unit) Check() { func (u Unit) Journal(follow bool, lines int) { u.Log.Debug("journal") + args := []string{"journal", "-lines", strconv.Itoa(lines)} if follow { args = append(args, "-f") @@ -75,6 +81,8 @@ func (u Unit) Ssh() { } func (u Unit) Diff() { + u.Log.Debug("diff") + same, err := u.IsLocalContentSameAsRemote() if err != nil { u.Log.Warn("Cannot read unit") @@ -99,6 +107,7 @@ func (u Unit) GetUnitContentAsFleeted() (string, error) { func (u Unit) Status() error { u.Log.Debug("status") + content, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) if err != nil { logrus.WithError(err).Fatal("Failed to run status") @@ -151,15 +160,6 @@ func (u Unit) IsLocalContentSameAsRemote() (bool, error) { return local == remote, nil } -//func (u Unit) Stop() { -// u.service.GetEnv().RunFleetCmdGetOutput("stop", u.name) -//} -// -// -//func (u Unit) Cat() { -// u.service.GetEnv().RunFleetCmdGetOutput("cat ", u.name) -//} - /////////////////////////////////////////// func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { From dad5e26bfcddb4ae06f863012410f4c59b11f801 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 15:05:23 +0100 Subject: [PATCH 054/163] add hook on all check --- work/env-check.go | 3 +++ work/env.go | 4 ++++ work/env/service-check.go | 3 +++ 3 files changed, 10 insertions(+) diff --git a/work/env-check.go b/work/env-check.go index 80cf4a8..b6e1b16 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -5,6 +5,9 @@ import "strings" func (e Env) Check() { e.log.Debug("Running check") + e.RunEarlyHook(e.name, "check") + defer e.RunLateHook(e.name, "check") + e.Generate() units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") diff --git a/work/env.go b/work/env.go index 49b56f9..a243286 100644 --- a/work/env.go +++ b/work/env.go @@ -108,6 +108,10 @@ func (e Env) ListServices() []string { if !file.IsDir() { continue } + if _, err := os.Stat(path + "/" + file.Name() + spec.PATH_SERVICE_MANIFEST); os.IsNotExist(err) { + continue + } + services = append(services, file.Name()) } return services diff --git a/work/env/service-check.go b/work/env/service-check.go index 2e517ae..d50a813 100644 --- a/work/env/service-check.go +++ b/work/env/service-check.go @@ -7,6 +7,9 @@ import ( func (s *Service) Check() { s.log.Debug("Running check") + s.GetEnv().RunEarlyHook(s.Name, "check") + defer s.GetEnv().RunLateHook(s.Name, "check") + s.Generate(nil) units, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") From 9bae8750e571c8cb97e8f3497782df27e8cf81d3 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 16:10:12 +0100 Subject: [PATCH 055/163] add check unit status on check command --- spec/env.go | 11 +++++++ work/env-list-units.go | 51 +++++++++++++++++++++----------- work/env/service/unit-mutable.go | 4 +-- work/env/service/unit.go | 20 +++++++++++++ 4 files changed, 66 insertions(+), 20 deletions(-) diff --git a/spec/env.go b/spec/env.go index fce5e4f..4b37901 100644 --- a/spec/env.go +++ b/spec/env.go @@ -7,6 +7,16 @@ import ( const PATH_ATTRIBUTES = "/attributes" +const ACTIVE_ACTIVE = "active" +const SUB_RUNNING = "running" + +type UnitStatus struct { + Unit string + Machine string + Active string + Sub string +} + type Env interface { GetName() string GetLog() logrus.Entry @@ -17,4 +27,5 @@ type Env interface { EtcdClient() client.KeysAPI RunEarlyHook(service string, action string) RunLateHook(service string, action string) + ListUnits() map[string]UnitStatus } diff --git a/work/env-list-units.go b/work/env-list-units.go index 0649133..675fe05 100644 --- a/work/env-list-units.go +++ b/work/env-list-units.go @@ -1,20 +1,35 @@ package work -//import ( -// "bufio" -// "strings" -//) -// -//func (e Env) ListUnits() { -// stdout, _, err := e.RunFleetCmdGetOutput("list-units", "-no-legend") -// if err != nil { -// -// } -// -// var lines []string -// scanner := bufio.NewScanner(strings.NewReader(stdout)) -// for scanner.Scan() { -// lines = append(lines, scanner.Text()) -// } -// -//} +import ( + "bufio" + "github.com/blablacar/ggn/spec" + "strings" +) + +var statusCache map[string]spec.UnitStatus + +func (e Env) ListUnits() map[string]spec.UnitStatus { + if statusCache != nil { + return statusCache + } + + stdout, _, err := e.RunFleetCmdGetOutput("list-units", "-no-legend") + if err != nil { + e.log.WithError(err).Fatal("Cannot list units") + } + + var lines []string + scanner := bufio.NewScanner(strings.NewReader(stdout)) + for scanner.Scan() { + lines = append(lines, scanner.Text()) + } + + status := make(map[string]spec.UnitStatus) + for _, line := range lines { + split := strings.Fields(line) + status[split[0]] = spec.UnitStatus{Unit: split[0], Machine: split[1], Active: split[2], Sub: split[3]} + } + + statusCache = status + return status +} diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index abf44d3..69fa666 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -45,8 +45,8 @@ func (u Unit) Update(lock bool) error { return nil } - u.Service.GetEnv().RunEarlyHook(u.Name, "Update") - defer u.Service.GetEnv().RunLateHook(u.Name, "Update") + u.Service.GetEnv().RunEarlyHook(u.Name, "update") + defer u.Service.GetEnv().RunLateHook(u.Name, "update") // destroy _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 5c3081f..68822ad 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -47,12 +47,32 @@ func (u Unit) Check() { u.Service.GetEnv().RunEarlyHook(u.Name, "check") defer u.Service.GetEnv().RunLateHook(u.Name, "check") + statuses := u.Service.GetEnv().ListUnits() + var status spec.UnitStatus + if _, ok := statuses[u.Filename]; !ok { + u.Log.Warn("cannot find unit on fleet") + return + } + status = statuses[u.Filename] + logrus.WithField("status", status).Debug("status") + + if status.Active != spec.ACTIVE_ACTIVE { + u.Log.WithField("active", status.Active).Warn("unit status is not active") + return + } + if status.Sub != spec.SUB_RUNNING { + u.Log.WithField("sub", status.Sub).Warn("unit sub is not running") + return + } + same, err := u.IsLocalContentSameAsRemote() if err != nil { u.Log.Error("Cannot read unit") + return } if !same { u.Log.Warn("Unit is not up to date") + return } } From 40b547a52cb8b02e0173900a4a0a31c3f843d759 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 16:29:13 +0100 Subject: [PATCH 056/163] add service name to hook notification --- spec/env.go | 6 ++++-- spec/unit.go | 5 +++++ work/env-check.go | 4 ++-- work/env.go | 24 ++++++++++++++++++++---- work/env/service-check.go | 4 ++-- work/env/service/unit-mutable.go | 22 +++++++++++----------- work/env/service/unit.go | 30 +++++++++++++++++++----------- 7 files changed, 63 insertions(+), 32 deletions(-) diff --git a/spec/env.go b/spec/env.go index 4b37901..cc8bb92 100644 --- a/spec/env.go +++ b/spec/env.go @@ -25,7 +25,9 @@ type Env interface { RunFleetCmdGetOutput(args ...string) (string, string, error) RunFleetCmd(args ...string) error EtcdClient() client.KeysAPI - RunEarlyHook(service string, action string) - RunLateHook(service string, action string) + RunEarlyHookUnit(unit Unit, action string) + RunLateHookUnit(unit Unit, action string) + RunEarlyHookService(service Service, action string) + RunLateHookService(service Service, action string) ListUnits() map[string]UnitStatus } diff --git a/spec/unit.go b/spec/unit.go index 5e537b8..6812ab7 100644 --- a/spec/unit.go +++ b/spec/unit.go @@ -1,3 +1,8 @@ package spec const PATH_UNIT_TEMPLATE = "/unit.tmpl" + +type Unit interface { + GetName() string + GetService() Service +} diff --git a/work/env-check.go b/work/env-check.go index b6e1b16..d3560ea 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -5,8 +5,8 @@ import "strings" func (e Env) Check() { e.log.Debug("Running check") - e.RunEarlyHook(e.name, "check") - defer e.RunLateHook(e.name, "check") + e.RunEarlyHookEnv("check") + defer e.RunLateHookEnv("check") e.Generate() diff --git a/work/env.go b/work/env.go index a243286..98b7c67 100644 --- a/work/env.go +++ b/work/env.go @@ -140,12 +140,28 @@ func (e Env) ListMachineNames() []string { const PATH_HOOKS = "/hooks" -func (e Env) RunEarlyHook(service string, action string) { - e.runHook("/early", service, action) +func (e Env) RunEarlyHookEnv(action string) { + e.runHook("/early", "", action) } -func (e Env) RunLateHook(service string, action string) { - e.runHook("/late", service, action) +func (e Env) RunLateHookEnv(action string) { + e.runHook("/late", "", action) +} + +func (e Env) RunEarlyHookUnit(unit spec.Unit, action string) { + e.runHook("/early", unit.GetService().GetName()+":"+unit.GetName(), action) +} + +func (e Env) RunLateHookUnit(unit spec.Unit, action string) { + e.runHook("/late", unit.GetService().GetName()+":"+unit.GetName(), action) +} + +func (e Env) RunEarlyHookService(service spec.Service, action string) { + e.runHook("/early", service.GetName(), action) +} + +func (e Env) RunLateHookService(service spec.Service, action string) { + e.runHook("/late", service.GetName(), action) } func (e Env) runHook(path string, service string, action string) { diff --git a/work/env/service-check.go b/work/env/service-check.go index d50a813..6d6fba3 100644 --- a/work/env/service-check.go +++ b/work/env/service-check.go @@ -7,8 +7,8 @@ import ( func (s *Service) Check() { s.log.Debug("Running check") - s.GetEnv().RunEarlyHook(s.Name, "check") - defer s.GetEnv().RunLateHook(s.Name, "check") + s.GetEnv().RunEarlyHookService(s, "check") + defer s.GetEnv().RunLateHookService(s, "check") s.Generate(nil) diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index 69fa666..617528b 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -6,28 +6,28 @@ import ( "time" ) -func (u Unit) Start() error { +func (u *Unit) Start() error { u.Service.Generate(nil) return u.runAction("start") } -func (u Unit) Unload() error { +func (u *Unit) Unload() error { return u.runAction("unload") } -func (u Unit) Load() error { +func (u *Unit) Load() error { return u.runAction("load") } -func (u Unit) Stop() error { +func (u *Unit) Stop() error { return u.runAction("stop") } -func (u Unit) Destroy() error { +func (u *Unit) Destroy() error { return u.runAction("destroy") } -func (u Unit) Update(lock bool) error { +func (u *Unit) Update(lock bool) error { u.Service.Generate(nil) u.Log.Debug("Update") @@ -45,8 +45,8 @@ func (u Unit) Update(lock bool) error { return nil } - u.Service.GetEnv().RunEarlyHook(u.Name, "update") - defer u.Service.GetEnv().RunLateHook(u.Name, "update") + u.Service.GetEnv().RunEarlyHookUnit(u, "update") + defer u.Service.GetEnv().RunLateHookUnit(u, "update") // destroy _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) @@ -87,12 +87,12 @@ func (u Unit) Update(lock bool) error { ///////////////////////////// -func (u Unit) runAction(action string) error { +func (u *Unit) runAction(action string) error { u.Service.Lock(1*time.Hour, action+" "+u.Name) u.Service.Unlock() u.Log.Debug(action) - u.Service.GetEnv().RunEarlyHook(u.Name, action) - defer u.Service.GetEnv().RunLateHook(u.Name, action) + u.Service.GetEnv().RunEarlyHookUnit(u, action) + defer u.Service.GetEnv().RunLateHookUnit(u, action) _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput(action, u.unitPath) if err != nil { diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 68822ad..618a5ad 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -41,11 +41,19 @@ func NewUnit(path string, hostname string, service spec.Service) *Unit { return unit } -func (u Unit) Check() { +func (u *Unit) GetName() string { + return u.Name +} + +func (u *Unit) GetService() spec.Service { + return u.Service +} + +func (u *Unit) Check() { u.Log.Debug("Check") - u.Service.GetEnv().RunEarlyHook(u.Name, "check") - defer u.Service.GetEnv().RunLateHook(u.Name, "check") + u.Service.GetEnv().RunEarlyHookUnit(u, "check") + defer u.Service.GetEnv().RunLateHookUnit(u, "check") statuses := u.Service.GetEnv().ListUnits() var status spec.UnitStatus @@ -76,7 +84,7 @@ func (u Unit) Check() { } } -func (u Unit) Journal(follow bool, lines int) { +func (u *Unit) Journal(follow bool, lines int) { u.Log.Debug("journal") args := []string{"journal", "-lines", strconv.Itoa(lines)} @@ -91,7 +99,7 @@ func (u Unit) Journal(follow bool, lines int) { } } -func (u Unit) Ssh() { +func (u *Unit) Ssh() { u.Log.Debug("ssh") err := u.Service.GetEnv().RunFleetCmd("ssh", u.Filename) @@ -100,7 +108,7 @@ func (u Unit) Ssh() { } } -func (u Unit) Diff() { +func (u *Unit) Diff() { u.Log.Debug("diff") same, err := u.IsLocalContentSameAsRemote() @@ -112,7 +120,7 @@ func (u Unit) Diff() { } } -func (u Unit) GetUnitContentAsFleeted() (string, error) { +func (u *Unit) GetUnitContentAsFleeted() (string, error) { unitFileContent, err := ioutil.ReadFile(u.unitPath) if err != nil { return "", err @@ -125,7 +133,7 @@ func (u Unit) GetUnitContentAsFleeted() (string, error) { return convertMultilineUnitToString([]byte(fleetunit.String())), nil } -func (u Unit) Status() error { +func (u *Unit) Status() error { u.Log.Debug("status") content, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) @@ -151,7 +159,7 @@ func (u Unit) Status() error { // return matched[1], err } -func (u Unit) DisplayDiff() error { +func (u *Unit) DisplayDiff() error { u.Log.Debug("Diff") local, remote, err := u.serviceLocalAndRemoteContent() @@ -169,7 +177,7 @@ func (u Unit) DisplayDiff() error { return utils.ExecCmd("git", "diff", "--word-diff", remotePath, localPath) } -func (u Unit) IsLocalContentSameAsRemote() (bool, error) { +func (u *Unit) IsLocalContentSameAsRemote() (bool, error) { local, remote, err := u.serviceLocalAndRemoteContent() if local != "" && err != nil { return false, nil @@ -182,7 +190,7 @@ func (u Unit) IsLocalContentSameAsRemote() (bool, error) { /////////////////////////////////////////// -func (u Unit) serviceLocalAndRemoteContent() (string, string, error) { +func (u *Unit) serviceLocalAndRemoteContent() (string, string, error) { localContent, err := u.GetUnitContentAsFleeted() if err != nil { u.Log.WithError(err).Debug("Cannot get local unit content") From 8882704da1168cc8b8d0eb40950e7f81612e098f Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 25 Nov 2015 16:33:18 +0100 Subject: [PATCH 057/163] update release script --- release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.sh b/release.sh index e5292a4..992e3f2 100755 --- a/release.sh +++ b/release.sh @@ -48,7 +48,7 @@ for i in ${dir}/dist/*-amd64/ ; do if [ -d "$i" ]; then cd $i platform=${PWD##*/} - tar cvzf green-garden-$platform-$version.tar.gz ggn + tar cvzf ggn-$platform-$version.tar.gz ggn cd - fi done @@ -58,7 +58,7 @@ git push --tags sleep 5 -posturl=$(curl --data "{\"tag_name\": \"$1\",\"target_commitish\": \"master\",\"name\": \"$1\",\"body\": \"Release of version $1\",\"draft\": false,\"prerelease\": true}" https://api.github.com/repos/blablacar/green-garden/releases?access_token=${access_token} | grep "\"upload_url\"" | sed -ne 's/.*\(http[^"]*\).*/\1/p') +posturl=$(curl --data "{\"tag_name\": \"$1\",\"target_commitish\": \"master\",\"name\": \"$1\",\"body\": \"Release of version $1\",\"draft\": false,\"prerelease\": true}" https://api.github.com/repos/blablacar/ggn/releases?access_token=${access_token} | grep "\"upload_url\"" | sed -ne 's/.*\(http[^"]*\).*/\1/p') for i in ${dir}/dist/*-amd64/ ; do if [ -d "$i" ]; then From 2d03716a672770e40a91a21db633d761aa1d3632 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 27 Nov 2015 09:24:12 +0100 Subject: [PATCH 058/163] fix unlock not run with defer. run hook only once for service update --- .../src/github.com/afex/hystrix-go/LICENSE | 20 +++++++++++++++++++ commands/prepare-service.go | 12 ++++++++++- work/env.go | 2 ++ work/env/service-update.go | 9 +++++++-- work/env/service/unit-mutable.go | 18 +++++++++++------ 5 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE diff --git a/Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE b/Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE new file mode 100644 index 0000000..998eea7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 keith + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 36da586..61b25da 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -84,7 +84,17 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - serviceCmd.AddCommand(generateCmd /*checkCmd,*/, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd) + serviceCmd.AddCommand(generateCmd, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd) + + // var units []string + // hystrix.Go("list_units", func() error { + // units = service.ListUnits() + // return nil + // }, func(err error) error { + // entry := service.GetLog() + // entry.WithError(err).Warn("Cannot list units. Some command may be missing") + // return nil + // }) for _, unitName := range service.ListUnits() { unit := service.LoadUnit(unitName) diff --git a/work/env.go b/work/env.go index 98b7c67..9e9dec6 100644 --- a/work/env.go +++ b/work/env.go @@ -118,6 +118,7 @@ func (e Env) ListServices() []string { } func (e Env) ListMachineNames() []string { + e.log.Debug("list machines") out, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") if err != nil { e.log.WithError(err).Fatal("Cannot list-machines") @@ -222,6 +223,7 @@ func (e Env) EtcdClient() client.KeysAPI { } func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, string, error) { + e.log.WithField("command", strings.Join(args, " ")).Debug("Running command on fleet") if e.config.Fleet.Endpoint == "" { return "", "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") } diff --git a/work/env/service-update.go b/work/env/service-update.go index f4a3d02..90e07d9 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -17,6 +17,7 @@ func (s *Service) Update() error { s.log.WithField("service", s.Name).Warn("!! Leaving but Service is still lock !!") } }() + units: for i, unit := range s.ListUnits() { u := s.LoadUnit(unit) @@ -57,8 +58,12 @@ units: } } - builder.BuildFlags.Force = true - u.Update(false) + if i == 0 { + s.GetEnv().RunEarlyHookService(s, "update") + defer s.GetEnv().RunLateHookService(s, "update") + } + + u.UpdateInside() time.Sleep(time.Second * 2) } diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go index 617528b..1972044 100644 --- a/work/env/service/unit-mutable.go +++ b/work/env/service/unit-mutable.go @@ -31,10 +31,8 @@ func (u *Unit) Update(lock bool) error { u.Service.Generate(nil) u.Log.Debug("Update") - if lock { - u.Service.Lock(1*time.Hour, "Update "+u.Name) - u.Service.Unlock() - } + u.Service.Lock(1*time.Hour, "Update "+u.Name) + defer u.Service.Unlock() same, err := u.IsLocalContentSameAsRemote() if err != nil { @@ -48,8 +46,14 @@ func (u *Unit) Update(lock bool) error { u.Service.GetEnv().RunEarlyHookUnit(u, "update") defer u.Service.GetEnv().RunLateHookUnit(u, "update") + u.UpdateInside() + + return nil +} + +func (u *Unit) UpdateInside() error { // destroy - _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) + _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) if err != nil { logrus.WithError(err).Warn("Cannot destroy unit") } @@ -89,8 +93,10 @@ func (u *Unit) Update(lock bool) error { func (u *Unit) runAction(action string) error { u.Service.Lock(1*time.Hour, action+" "+u.Name) - u.Service.Unlock() + defer u.Service.Unlock() + u.Log.Debug(action) + u.Service.GetEnv().RunEarlyHookUnit(u, action) defer u.Service.GetEnv().RunLateHookUnit(u, action) From 956b4da721a332ffedc35b9efa4bcb76930ae2bf Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 27 Nov 2015 10:20:34 +0100 Subject: [PATCH 059/163] fix name set in lock --- application/context.go | 14 ++++++++++++++ work/env.go | 9 ++------- work/env/service.go | 8 ++++---- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/application/context.go b/application/context.go index 6242273..f617f47 100644 --- a/application/context.go +++ b/application/context.go @@ -1,6 +1,20 @@ package application +import ( + "github.com/blablacar/ggn/config" + "os" +) + var CommitHash = "" var Version = "DEV" var BuildDate = "" var PathSkip = 0 + +func GetUserAndHost() string { + user := os.Getenv("USER") + if config.GetConfig().User != "" { + user = config.GetConfig().User + } + hostname, _ := os.Hostname() + return user + "@" + hostname +} diff --git a/work/env.go b/work/env.go index 9e9dec6..0500a04 100644 --- a/work/env.go +++ b/work/env.go @@ -6,7 +6,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" cntUtils "github.com/blablacar/cnt/utils" - "github.com/blablacar/ggn/config" + "github.com/blablacar/ggn/application" "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" "github.com/blablacar/ggn/work/env" @@ -174,12 +174,7 @@ func (e Env) runHook(path string, service string, action string) { } os.Setenv("SERVICE", service) - hostname, _ := os.Hostname() - user := os.Getenv("USER") - if config.GetConfig().User != "" { - user = config.GetConfig().User - } - os.Setenv("WHO", user+"@"+hostname) + os.Setenv("WHO", application.GetUserAndHost()) os.Setenv("ACTION", action) for _, f := range files { if !f.IsDir() { diff --git a/work/env/service.go b/work/env/service.go index 353300f..95db0cf 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -6,6 +6,7 @@ import ( "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" + "github.com/blablacar/ggn/application" "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" "github.com/blablacar/ggn/work/env/service" @@ -106,9 +107,8 @@ func (s *Service) Unlock() { } func (s *Service) Lock(ttl time.Duration, message string) { - hostname, _ := os.Hostname() - who := "[" + os.Getenv("USER") + "@" + hostname + "] " - message = who + message + userAndHost := "[" + application.GetUserAndHost() + "] " + message = userAndHost + message s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") @@ -121,7 +121,7 @@ func (s *Service) Lock(ttl time.Duration, message string) { if err != nil { s.log.WithError(err).Fatal("Cannot write lock") } - } else if strings.HasPrefix(resp.Node.Value, who) { + } else if strings.HasPrefix(resp.Node.Value, userAndHost) { _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttl}) if err != nil { s.log.WithError(err).Fatal("Cannot write lock") From 60d86238c972c242807f74687c0aea4803ee95c5 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 2 Dec 2015 11:14:45 +0100 Subject: [PATCH 060/163] generate before diff --- work/env/service.go | 1 + work/env/service/unit.go | 1 + 2 files changed, 2 insertions(+) diff --git a/work/env/service.go b/work/env/service.go index 95db0cf..f1a604f 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -63,6 +63,7 @@ func (s *Service) LoadUnit(hostname string) *service.Unit { } func (s *Service) Diff() { + s.Generate(nil) for _, unitName := range s.ListUnits() { unit := s.LoadUnit(unitName) unit.Diff() diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 618a5ad..a8a9507 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -110,6 +110,7 @@ func (u *Unit) Ssh() { func (u *Unit) Diff() { u.Log.Debug("diff") + u.Service.Generate(nil) same, err := u.IsLocalContentSameAsRemote() if err != nil { From 3ec7763c30431bd41ab7d85757d902388015a618 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 3 Dec 2015 11:06:36 +0100 Subject: [PATCH 061/163] add -H to override home folder --- commands/genautocomplete.go | 4 +-- commands/ggn.go | 62 ++++++++++++++++++++++++++------- commands/prepare-service.go | 6 +++- commands/prepare.go | 9 ++--- commands/version.go | 12 +++---- compile/version_generate.go | 6 ++-- config/config.go | 36 ------------------- {application => ggn}/context.go | 8 ++--- ggn/home.go | 41 ++++++++++++++++++++++ ggn/version.go | 7 ++++ spec/env.go | 2 +- work/env.go | 10 +++--- work/env/service-generate.go | 5 ++- work/env/service-update.go | 8 +++-- work/env/service.go | 21 +++++++---- work/work.go | 18 +++++----- 16 files changed, 163 insertions(+), 92 deletions(-) delete mode 100644 config/config.go rename {application => ggn}/context.go (63%) create mode 100644 ggn/home.go create mode 100644 ggn/version.go diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index 3af6b22..0e667c5 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -2,7 +2,7 @@ package commands import ( "github.com/Sirupsen/logrus" - "github.com/blablacar/ggn/config" + "github.com/blablacar/ggn/ggn" "github.com/spf13/cobra" "os" ) @@ -40,6 +40,6 @@ or just source them in directly: } func init() { - genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", config.GetConfig().Path+"/ggn_completion.sh", "Autocompletion file") + genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", ggn.Home.Config.Path+"/ggn_completion.sh", "Autocompletion file") genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "Autocompletion type (currently only bash supported)") } diff --git a/commands/ggn.go b/commands/ggn.go index e3dab09..b210926 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -5,7 +5,7 @@ import ( "fmt" log "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" - "github.com/blablacar/ggn/config" + "github.com/blablacar/ggn/ggn" "github.com/coreos/go-semver/semver" "github.com/spf13/cobra" "os" @@ -15,24 +15,47 @@ import ( const FLEET_SUPPORTED_VERSION = "0.11.5" func Execute() { - config.GetConfig().Load() checkFleetVersion() - var logLevel string - var rootCmd = &cobra.Command{ + homefolder := ggn.DefaultHomeRoot() + if argsHome := homeFolderFromArgs(); argsHome != "" { + homefolder = argsHome + } else { + _, err := os.Stat(homefolder + "/green-garden") + _, err2 := os.Stat(homefolder + "/ggn") + if os.IsNotExist(err2) && err == nil { + log.WithField("oldPath", homefolder+"/green-garden"). + WithField("newPath", homefolder+"/ggn"). + Warn("You are using the old home folder") + homefolder += "/green-garden" + } else { + homefolder += "/ggn" + } + } + ggn.Home = ggn.NewHome(homefolder) + + rootCmd := &cobra.Command{ Use: "ggn", - PersistentPreRun: func(cmd *cobra.Command, args []string) { - level, err := log.ParseLevel(logLevel) - if err != nil { - fmt.Printf("Unknown log level : %s\n", logLevel) - os.Exit(1) - } - log.SetLevel(level) - }, } + + var useless string + var logLevel string + rootCmd.PersistentFlags().StringVarP(&logLevel, "loglevel", "L", "info", "Set log level") + rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot(), "Set home folder") rootCmd.AddCommand(versionCmd, generateCmd, genautocompleteCmd) + rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { + + // logs + level, err := log.ParseLevel(logLevel) + if err != nil { + fmt.Printf("Unknown log level : %s", logLevel) + os.Exit(1) + } + log.SetLevel(level) + + } loadEnvCommands(rootCmd) err := rootCmd.Execute() @@ -42,6 +65,21 @@ func Execute() { log.Debug("Victory !") } +func homeFolderFromArgs() string { + for i, arg := range os.Args { + if arg == "--" { + return "" + } + if arg == "-H" { + return os.Args[i+1] + } + if strings.HasPrefix(arg, "--home-path=") { + return arg[12:] + } + } + return "" +} + func checkFleetVersion() { output, err := utils.ExecCmdGetOutput("fleetctl") if err != nil { diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 61b25da..89fe08c 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -96,7 +96,11 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { // return nil // }) - for _, unitName := range service.ListUnits() { + units, err := service.ListUnits() + if err != nil { + logrus.WithError(err).Fatal("Cannot list units to generate arguments") + } + for _, unitName := range units { unit := service.LoadUnit(unitName) serviceCmd.AddCommand(prepareUnitCommands(unit)) } diff --git a/commands/prepare.go b/commands/prepare.go index fafbaf3..cc15696 100644 --- a/commands/prepare.go +++ b/commands/prepare.go @@ -2,7 +2,7 @@ package commands import ( "github.com/Sirupsen/logrus" - "github.com/blablacar/ggn/config" + "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/work" "github.com/spf13/cobra" ) @@ -11,7 +11,7 @@ var generateCmd = &cobra.Command{ Use: "generate", Short: "generate units for all envs", Run: func(cmd *cobra.Command, args []string) { - work := work.NewWork(config.GetConfig().WorkPath) + work := work.NewWork(ggn.Home.Config.WorkPath) for _, envName := range work.ListEnvs() { env := work.LoadEnv(envName) env.Generate() @@ -20,11 +20,12 @@ var generateCmd = &cobra.Command{ } func loadEnvCommands(rootCmd *cobra.Command) { - logrus.WithField("path", config.GetConfig().WorkPath).Debug("Loading envs") - work := work.NewWork(config.GetConfig().WorkPath) + logrus.WithField("path", ggn.Home.Config.WorkPath).Debug("Loading envs") + work := work.NewWork(ggn.Home.Config.WorkPath) for _, envNames := range work.ListEnvs() { env := work.LoadEnv(envNames) rootCmd.AddCommand(prepareEnvCommands(env)) } + } diff --git a/commands/version.go b/commands/version.go index 4de2bed..fdad4a4 100644 --- a/commands/version.go +++ b/commands/version.go @@ -2,7 +2,7 @@ package commands import ( "fmt" - "github.com/blablacar/ggn/application" + "github.com/blablacar/ggn/ggn" "github.com/spf13/cobra" "os" ) @@ -13,12 +13,12 @@ var versionCmd = &cobra.Command{ Long: `Print the version number of cnt`, Run: func(cmd *cobra.Command, args []string) { fmt.Print("ggn\n\n") - fmt.Printf("version : %s\n", application.Version) - if application.BuildDate != "" { - fmt.Printf("build date : %s\n", application.BuildDate) + fmt.Printf("version : %s\n", ggn.Version) + if ggn.BuildDate != "" { + fmt.Printf("build date : %s\n", ggn.BuildDate) } - if application.CommitHash != "" { - fmt.Printf("CommitHash : %s\n", application.CommitHash) + if ggn.CommitHash != "" { + fmt.Printf("CommitHash : %s\n", ggn.CommitHash) } os.Exit(0) }, diff --git a/compile/version_generate.go b/compile/version_generate.go index 597a063..d65b1cd 100644 --- a/compile/version_generate.go +++ b/compile/version_generate.go @@ -8,7 +8,7 @@ import ( "time" ) -const version_template = `package application +const version_template = `package ggn func init() { Version = "X.X.X" @@ -21,7 +21,7 @@ func main() { version := os.Getenv("VERSION") if version == "" { - panic("You must set gg version into VERSION env to generate. ex: # VERSION=1.0 go generate") + panic("You must set ggn version into VERSION env to generate. ex: # VERSION=1.0 go generate") } buildDate := time.Now() @@ -29,5 +29,5 @@ func main() { res = strings.Replace(res, "HASH", hash, 1) res = strings.Replace(res, "DATE", buildDate.Format(time.RFC3339), 1) - ioutil.WriteFile("application/version.go", []byte(res), 0644) + ioutil.WriteFile("ggn/version.go", []byte(res), 0644) } diff --git a/config/config.go b/config/config.go deleted file mode 100644 index eb0a3b2..0000000 --- a/config/config.go +++ /dev/null @@ -1,36 +0,0 @@ -package config - -import ( - log "github.com/Sirupsen/logrus" - "github.com/blablacar/cnt/utils" - "gopkg.in/yaml.v2" - "io/ioutil" -) - -var ggnConfig GgnConfig - -type GgnConfig struct { - Path string - WorkPath string `yaml:"workPath,omitempty"` - User string `yaml:"user,omitempty"` -} - -func GetConfig() *GgnConfig { - return &ggnConfig -} - -func (c *GgnConfig) Load() { -} - -func init() { - ggnConfig = GgnConfig{Path: utils.UserHomeOrFatal() + "/.config/green-garden"} - - if source, err := ioutil.ReadFile(ggnConfig.Path + "/config.yml"); err == nil { - err = yaml.Unmarshal([]byte(source), &ggnConfig) - if err != nil { - panic(err) - } - } - - log.Debug("Home folder is " + ggnConfig.Path) -} diff --git a/application/context.go b/ggn/context.go similarity index 63% rename from application/context.go rename to ggn/context.go index f617f47..ed7bbd1 100644 --- a/application/context.go +++ b/ggn/context.go @@ -1,10 +1,10 @@ -package application +package ggn import ( - "github.com/blablacar/ggn/config" "os" ) +var Home HomeStruct var CommitHash = "" var Version = "DEV" var BuildDate = "" @@ -12,8 +12,8 @@ var PathSkip = 0 func GetUserAndHost() string { user := os.Getenv("USER") - if config.GetConfig().User != "" { - user = config.GetConfig().User + if Home.Config.User != "" { + user = Home.Config.User } hostname, _ := os.Hostname() return user + "@" + hostname diff --git a/ggn/home.go b/ggn/home.go new file mode 100644 index 0000000..6fe56ca --- /dev/null +++ b/ggn/home.go @@ -0,0 +1,41 @@ +package ggn + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/cnt/utils" + "github.com/ghodss/yaml" + "io/ioutil" +) + +type Config struct { + Path string + WorkPath string `yaml:"workPath,omitempty"` + User string `yaml:"user,omitempty"` +} + +type HomeStruct struct { + path string + Config Config +} + +func NewHome(path string) HomeStruct { + logrus.WithField("path", path).Debug("loading home") + + var config Config + if source, err := ioutil.ReadFile(path + "/config.yml"); err == nil { + err = yaml.Unmarshal([]byte(source), &config) + if err != nil { + panic(err) + } + } else { + logrus.WithField("path", path).WithField("file", "config.yml").Fatal("Cannot read configuration file") + } + return HomeStruct{ + path: path, + Config: config, + } +} + +func DefaultHomeRoot() string { + return utils.UserHomeOrFatal() + "/.config" +} diff --git a/ggn/version.go b/ggn/version.go new file mode 100644 index 0000000..7b379d6 --- /dev/null +++ b/ggn/version.go @@ -0,0 +1,7 @@ +package ggn + +func init() { + Version = "22" + CommitHash = "2d03716" + BuildDate = "2015-11-27T09:25:18+01:00" +} diff --git a/spec/env.go b/spec/env.go index cc8bb92..daa219d 100644 --- a/spec/env.go +++ b/spec/env.go @@ -21,7 +21,7 @@ type Env interface { GetName() string GetLog() logrus.Entry GetAttributes() map[string]interface{} - ListMachineNames() []string + ListMachineNames() ([]string, error) RunFleetCmdGetOutput(args ...string) (string, string, error) RunFleetCmd(args ...string) error EtcdClient() client.KeysAPI diff --git a/work/env.go b/work/env.go index 0500a04..13d6004 100644 --- a/work/env.go +++ b/work/env.go @@ -6,7 +6,7 @@ import ( log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" cntUtils "github.com/blablacar/cnt/utils" - "github.com/blablacar/ggn/application" + "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" "github.com/blablacar/ggn/work/env" @@ -117,11 +117,11 @@ func (e Env) ListServices() []string { return services } -func (e Env) ListMachineNames() []string { +func (e Env) ListMachineNames() ([]string, error) { e.log.Debug("list machines") out, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") if err != nil { - e.log.WithError(err).Fatal("Cannot list-machines") + return nil, errors.Annotate(err, "Cannot list-machines") } var names []string @@ -136,7 +136,7 @@ func (e Env) ListMachineNames() []string { } } } - return names + return names, nil } const PATH_HOOKS = "/hooks" @@ -174,7 +174,7 @@ func (e Env) runHook(path string, service string, action string) { } os.Setenv("SERVICE", service) - os.Setenv("WHO", application.GetUserAndHost()) + os.Setenv("WHO", ggn.GetUserAndHost()) os.Setenv("ACTION", action) for _, f := range files { if !f.IsDir() { diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 8c33c62..4ae3680 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -33,7 +33,10 @@ func (s Service) Generate(sources []string) { } newNodes := *new([]map[string]interface{}) - machines := s.env.ListMachineNames() + machines, err := s.env.ListMachineNames() + if err != nil { + s.log.WithError(err).Fatal("Cannot list machines to generate units") + } for _, machine := range machines { node := utils.CopyMap(s.manifest.Nodes[0]) node[spec.NODE_HOSTNAME] = machine diff --git a/work/env/service-update.go b/work/env/service-update.go index 90e07d9..16fb44b 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -1,8 +1,8 @@ package env import ( - "errors" "github.com/blablacar/ggn/builder" + "github.com/juju/errors" "time" ) @@ -18,8 +18,12 @@ func (s *Service) Update() error { } }() + units, err := s.ListUnits() + if err != nil { + return errors.Annotate(err, "Cannot list units to update") + } units: - for i, unit := range s.ListUnits() { + for i, unit := range units { u := s.LoadUnit(unit) ask: diff --git a/work/env/service.go b/work/env/service.go index f1a604f..b49dd44 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -6,7 +6,7 @@ import ( "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" - "github.com/blablacar/ggn/application" + "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" "github.com/blablacar/ggn/work/env/service" @@ -64,20 +64,27 @@ func (s *Service) LoadUnit(hostname string) *service.Unit { func (s *Service) Diff() { s.Generate(nil) - for _, unitName := range s.ListUnits() { + units, err := s.ListUnits() + if err != nil { + s.log.WithError(err).Fatal("Cannot list units to run diff") + } + for _, unitName := range units { unit := s.LoadUnit(unitName) unit.Diff() } } -func (s *Service) ListUnits() []string { +func (s *Service) ListUnits() ([]string, error) { res := []string{} if len(s.manifest.Nodes) == 0 { - return res + return res, nil } if s.manifest.Nodes[0][spec.NODE_HOSTNAME].(string) == "*" { - machines := s.env.ListMachineNames() + machines, err := s.env.ListMachineNames() + if err != nil { + return nil, errors.Annotate(err, "Cannot generate unit list from list of machines") + } for _, node := range machines { res = append(res, node) } @@ -86,7 +93,7 @@ func (s *Service) ListUnits() []string { res = append(res, node[spec.NODE_HOSTNAME].(string)) } } - return res + return res, nil } func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this method should be in unit @@ -108,7 +115,7 @@ func (s *Service) Unlock() { } func (s *Service) Lock(ttl time.Duration, message string) { - userAndHost := "[" + application.GetUserAndHost() + "] " + userAndHost := "[" + ggn.GetUserAndHost() + "] " message = userAndHost + message s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") diff --git a/work/work.go b/work/work.go index 61bf16e..a1716c9 100644 --- a/work/work.go +++ b/work/work.go @@ -1,8 +1,8 @@ package work import ( - log "github.com/Sirupsen/logrus" - "github.com/blablacar/ggn/config" + "github.com/Sirupsen/logrus" + "github.com/blablacar/ggn/ggn" "io/ioutil" "os" ) @@ -11,12 +11,14 @@ const PATH_ENV = "/env" type Work struct { path string + log logrus.Entry } func NewWork(path string) *Work { - work := new(Work) - work.path = path - return work + return &Work{ + path: path, + log: *logrus.WithField("path", path), + } } func (w Work) LoadEnv(name string) *Env { @@ -24,15 +26,15 @@ func (w Work) LoadEnv(name string) *Env { } func (w Work) ListEnvs() []string { - path := config.GetConfig().WorkPath + PATH_ENV + path := ggn.Home.Config.WorkPath + PATH_ENV if _, err := os.Stat(path); os.IsNotExist(err) { - log.Error("env directory not found in " + config.GetConfig().WorkPath) + w.log.Error("env directory not found" + ggn.Home.Config.WorkPath) os.Exit(1) } files, err := ioutil.ReadDir(path) if err != nil { - log.Error("Cannot read env directory : "+path, err) + w.log.Error("Cannot read env directory : "+path, err) os.Exit(1) } From d549c552d0cca3def20eaf820f90e2196c760b46 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 3 Dec 2015 11:10:00 +0100 Subject: [PATCH 062/163] do not store version file in git --- .gitignore | 2 +- ggn/version.go | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 ggn/version.go diff --git a/.gitignore b/.gitignore index edab96e..8aa0c42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ dist/ -application/version.go +ggn/version.go diff --git a/ggn/version.go b/ggn/version.go deleted file mode 100644 index 7b379d6..0000000 --- a/ggn/version.go +++ /dev/null @@ -1,7 +0,0 @@ -package ggn - -func init() { - Version = "22" - CommitHash = "2d03716" - BuildDate = "2015-11-27T09:25:18+01:00" -} From 75c6584dc9d51fb3e788d460c4739f9c55ce1a7c Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 3 Dec 2015 16:06:30 +0100 Subject: [PATCH 063/163] [#31] add list-machines file cache --- ggn/home.go | 31 +++++++++++++++++++++++++++++-- work/env.go | 15 +++++++++++---- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/ggn/home.go b/ggn/home.go index 6fe56ca..adc37e5 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -5,6 +5,8 @@ import ( "github.com/blablacar/cnt/utils" "github.com/ghodss/yaml" "io/ioutil" + "os" + "time" ) type Config struct { @@ -14,12 +16,14 @@ type Config struct { } type HomeStruct struct { + log logrus.Entry path string Config Config } func NewHome(path string) HomeStruct { - logrus.WithField("path", path).Debug("loading home") + log := logrus.WithField("path", path) + log.Debug("loading home") var config Config if source, err := ioutil.ReadFile(path + "/config.yml"); err == nil { @@ -28,14 +32,37 @@ func NewHome(path string) HomeStruct { panic(err) } } else { - logrus.WithField("path", path).WithField("file", "config.yml").Fatal("Cannot read configuration file") + log.WithField("file", "config.yml").Fatal("Cannot read configuration file") } return HomeStruct{ + log: *log, path: path, Config: config, } } +const PATH_LIST_MACHINES_CACHE = "/list-machines.cache" + +func (h *HomeStruct) LoadMachinesCacheWithDate(env string) (string, time.Time) { + h.log.WithField("env", env).Debug("Loading list machines cache") + info, err := os.Stat(h.path + PATH_LIST_MACHINES_CACHE + "." + env) + if err != nil { + return "", time.Now() + } + content, err := ioutil.ReadFile(h.path + PATH_LIST_MACHINES_CACHE + "." + env) + if err != nil { + return "", time.Now() + } + return string(content), info.ModTime() +} + +func (h *HomeStruct) SaveMachinesCache(env string, data string) { + h.log.WithField("env", env).Debug("save machines cache") + if err := ioutil.WriteFile(h.path+PATH_LIST_MACHINES_CACHE+"."+env, []byte(data), 0644); err != nil { + logrus.WithError(err).Warn("Cannot persist list-machines cache") + } +} + func DefaultHomeRoot() string { return utils.UserHomeOrFatal() + "/.config" } diff --git a/work/env.go b/work/env.go index 13d6004..fc472bc 100644 --- a/work/env.go +++ b/work/env.go @@ -119,14 +119,21 @@ func (e Env) ListServices() []string { func (e Env) ListMachineNames() ([]string, error) { e.log.Debug("list machines") - out, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") - if err != nil { - return nil, errors.Annotate(err, "Cannot list-machines") + + data, modification := ggn.Home.LoadMachinesCacheWithDate(e.name) + if data == "" || modification.Add(12*time.Hour).Before(time.Now()) { + e.log.Debug("reloading list machines cache") + datatmp, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") + if err != nil { + return nil, errors.Annotate(err, "Cannot list-machines") + } + data = datatmp + ggn.Home.SaveMachinesCache(e.name, data) } var names []string - machines := strings.Split(out, "\n") + machines := strings.Split(data, "\n") for _, machine := range machines { metas := strings.Split(machine, ",") for _, meta := range metas { From 9233dd108e6bca913f3844f55effc4d96174cdff Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 3 Dec 2015 16:18:54 +0100 Subject: [PATCH 064/163] calculate list machines only once and keep it in memory --- work/env.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/work/env.go b/work/env.go index fc472bc..07793fe 100644 --- a/work/env.go +++ b/work/env.go @@ -117,8 +117,13 @@ func (e Env) ListServices() []string { return services } +var inMemoryNames []string + func (e Env) ListMachineNames() ([]string, error) { e.log.Debug("list machines") + if inMemoryNames != nil { + return inMemoryNames, nil + } data, modification := ggn.Home.LoadMachinesCacheWithDate(e.name) if data == "" || modification.Add(12*time.Hour).Before(time.Now()) { @@ -143,6 +148,7 @@ func (e Env) ListMachineNames() ([]string, error) { } } } + inMemoryNames = names return names, nil } From 374f66ebc8b86e129051bb5d99c312cf6eb62826 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 3 Dec 2015 16:39:07 +0100 Subject: [PATCH 065/163] fix genautocomplete default file path --- commands/genautocomplete.go | 7 +++++-- ggn/home.go | 11 +++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index 0e667c5..582c7dd 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -25,10 +25,13 @@ or just source them in directly: $ . /etc/bash_completion`, Run: func(cmd *cobra.Command, args []string) { - + if autocompleteTarget == "" { + autocompleteTarget = ggn.Home.Path + "/ggn_completion.sh" + } if autocompleteType != "bash" { logrus.WithField("type", autocompleteType).Fatalln("Only Bash is supported for now") } + err := cmd.Root().GenBashCompletionFile(autocompleteTarget) if err != nil { logrus.WithError(err).Fatalln("Failed to generate shell completion file") @@ -40,6 +43,6 @@ or just source them in directly: } func init() { - genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", ggn.Home.Config.Path+"/ggn_completion.sh", "Autocompletion file") + genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteTarget, "completionfile", "", "", "Autocompletion file") genautocompleteCmd.PersistentFlags().StringVarP(&autocompleteType, "type", "", "bash", "Autocompletion type (currently only bash supported)") } diff --git a/ggn/home.go b/ggn/home.go index adc37e5..aa31fcc 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -10,14 +10,13 @@ import ( ) type Config struct { - Path string WorkPath string `yaml:"workPath,omitempty"` User string `yaml:"user,omitempty"` } type HomeStruct struct { log logrus.Entry - path string + Path string Config Config } @@ -36,7 +35,7 @@ func NewHome(path string) HomeStruct { } return HomeStruct{ log: *log, - path: path, + Path: path, Config: config, } } @@ -45,11 +44,11 @@ const PATH_LIST_MACHINES_CACHE = "/list-machines.cache" func (h *HomeStruct) LoadMachinesCacheWithDate(env string) (string, time.Time) { h.log.WithField("env", env).Debug("Loading list machines cache") - info, err := os.Stat(h.path + PATH_LIST_MACHINES_CACHE + "." + env) + info, err := os.Stat(h.Path + PATH_LIST_MACHINES_CACHE + "." + env) if err != nil { return "", time.Now() } - content, err := ioutil.ReadFile(h.path + PATH_LIST_MACHINES_CACHE + "." + env) + content, err := ioutil.ReadFile(h.Path + PATH_LIST_MACHINES_CACHE + "." + env) if err != nil { return "", time.Now() } @@ -58,7 +57,7 @@ func (h *HomeStruct) LoadMachinesCacheWithDate(env string) (string, time.Time) { func (h *HomeStruct) SaveMachinesCache(env string, data string) { h.log.WithField("env", env).Debug("save machines cache") - if err := ioutil.WriteFile(h.path+PATH_LIST_MACHINES_CACHE+"."+env, []byte(data), 0644); err != nil { + if err := ioutil.WriteFile(h.Path+PATH_LIST_MACHINES_CACHE+"."+env, []byte(data), 0644); err != nil { logrus.WithError(err).Warn("Cannot persist list-machines cache") } } From 1f39ab408fa8c6fd0a403c9c83251fc3cef0fba8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 4 Dec 2015 10:58:39 +0100 Subject: [PATCH 066/163] add stderr content on unit status --- work/env/service/unit.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index a8a9507..9ddb57e 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -137,9 +137,9 @@ func (u *Unit) GetUnitContentAsFleeted() (string, error) { func (u *Unit) Status() error { u.Log.Debug("status") - content, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) + content, stderr, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) if err != nil { - logrus.WithError(err).Fatal("Failed to run status") + logrus.WithError(err).WithField("stderr", stderr).Fatal("Failed to run status") } os.Stdout.WriteString(content) return nil From a3ee607c707299275427e2c98ed5b022e27c47bf Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Dec 2015 14:38:45 +0100 Subject: [PATCH 067/163] rebuild hooks to notify more --- commands/prepare-unit.go | 22 ++--- spec/env.go | 14 +++- spec/service.go | 3 + work/env-check.go | 12 ++- work/env.go | 36 +++------ work/env/service-check.go | 7 +- work/env/service-generate.go | 49 +++++++----- work/env/service-update.go | 6 +- work/env/service.go | 30 ++++++- work/env/service/unit-command.go | 128 ++++++++++++++++++++++++++++++ work/env/service/unit-generate.go | 28 ++++--- work/env/service/unit-mutable.go | 109 ------------------------- work/env/service/unit.go | 106 +++++++++---------------- 13 files changed, 292 insertions(+), 258 deletions(-) create mode 100644 work/env/service/unit-command.go delete mode 100644 work/env/service/unit-mutable.go diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 1809ccb..e3f9307 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -19,7 +19,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "start", Short: getShortDescription(unit, "Start"), Run: func(cmd *cobra.Command, args []string) { - unit.Start() + unit.Start("unit/start") }, } @@ -27,7 +27,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "stop", Short: getShortDescription(unit, "Stop"), Run: func(cmd *cobra.Command, args []string) { - unit.Stop() + unit.Stop("unit/stop") }, } @@ -35,7 +35,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "update", Short: getShortDescription(unit, "Update"), Run: func(cmd *cobra.Command, args []string) { - unit.Update(true) + unit.Update("unit/update") }, } @@ -43,7 +43,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "destroy", Short: getShortDescription(unit, "Destroy"), Run: func(cmd *cobra.Command, args []string) { - unit.Destroy() + unit.Destroy("unit/destroy") }, } @@ -51,7 +51,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "status", Short: getShortDescription(unit, "Get status of"), Run: func(cmd *cobra.Command, args []string) { - unit.Status() + unit.Status("unit/status") }, } @@ -59,7 +59,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "journal", Short: getShortDescription(unit, "Get journal of"), Run: func(cmd *cobra.Command, args []string) { - unit.Journal(follow, lines) + unit.Journal("unit/journal", follow, lines) }, } @@ -67,7 +67,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "diff", Short: getShortDescription(unit, "Diff"), Run: func(cmd *cobra.Command, args []string) { - unit.Diff() + unit.Diff("unit/diff") }, } @@ -75,7 +75,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "check", Short: getShortDescription(unit, "check"), Run: func(cmd *cobra.Command, args []string) { - unit.Check() + unit.Check("unit/check") }, } @@ -83,14 +83,14 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "unload", Short: getShortDescription(unit, "Unload"), Run: func(cmd *cobra.Command, args []string) { - unit.Unload() + unit.Unload("unit/unload") }, } loadCmd := &cobra.Command{ Use: "load", Short: getShortDescription(unit, "load"), Run: func(cmd *cobra.Command, args []string) { - unit.Load() + unit.Load("unit/load") }, } @@ -98,7 +98,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { Use: "ssh", Short: getShortDescription(unit, "ssh"), Run: func(cmd *cobra.Command, args []string) { - unit.Ssh() + unit.Ssh("unit/ssh") }, } diff --git a/spec/env.go b/spec/env.go index daa219d..119d792 100644 --- a/spec/env.go +++ b/spec/env.go @@ -17,6 +17,14 @@ type UnitStatus struct { Sub string } +type HookInfo struct { + Command string + Service Service + Unit Unit + Action string + Attributes string +} + type Env interface { GetName() string GetLog() logrus.Entry @@ -25,9 +33,7 @@ type Env interface { RunFleetCmdGetOutput(args ...string) (string, string, error) RunFleetCmd(args ...string) error EtcdClient() client.KeysAPI - RunEarlyHookUnit(unit Unit, action string) - RunLateHookUnit(unit Unit, action string) - RunEarlyHookService(service Service, action string) - RunLateHookService(service Service, action string) + RunEarlyHook(info HookInfo) + RunLateHook(info HookInfo) ListUnits() map[string]UnitStatus } diff --git a/spec/service.go b/spec/service.go index 63f4eb9..a54b51e 100644 --- a/spec/service.go +++ b/spec/service.go @@ -24,6 +24,9 @@ type ServiceManifest struct { } type Service interface { + PrepareAciList(sources []string) string + NodeAttributes(hostname string) map[string]interface{} + GetAttributes() map[string]interface{} Generate(sources []string) Unlock() Lock(ttl time.Duration, message string) diff --git a/work/env-check.go b/work/env-check.go index d3560ea..672ce7c 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -1,12 +1,16 @@ package work -import "strings" +import ( + "github.com/blablacar/ggn/spec" + "strings" +) func (e Env) Check() { e.log.Debug("Running check") - e.RunEarlyHookEnv("check") - defer e.RunLateHookEnv("check") + info := spec.HookInfo{Command: "env/check", Action: "env/check"} + e.RunEarlyHook(info) + defer e.RunLateHook(info) e.Generate() @@ -22,7 +26,7 @@ func (e Env) Check() { continue } split := strings.Split(unitInfo[2], ".") - e.LoadService(unitInfo[1]).LoadUnit(split[0]).Check() + e.LoadService(unitInfo[1]).LoadUnit(split[0]).Check("env/check") } } diff --git a/work/env.go b/work/env.go index 07793fe..7d98c27 100644 --- a/work/env.go +++ b/work/env.go @@ -154,31 +154,15 @@ func (e Env) ListMachineNames() ([]string, error) { const PATH_HOOKS = "/hooks" -func (e Env) RunEarlyHookEnv(action string) { - e.runHook("/early", "", action) +func (e Env) RunEarlyHook(info spec.HookInfo) { + e.runHook("/early", info) } -func (e Env) RunLateHookEnv(action string) { - e.runHook("/late", "", action) +func (e Env) RunLateHook(info spec.HookInfo) { + e.runHook("/late", info) } -func (e Env) RunEarlyHookUnit(unit spec.Unit, action string) { - e.runHook("/early", unit.GetService().GetName()+":"+unit.GetName(), action) -} - -func (e Env) RunLateHookUnit(unit spec.Unit, action string) { - e.runHook("/late", unit.GetService().GetName()+":"+unit.GetName(), action) -} - -func (e Env) RunEarlyHookService(service spec.Service, action string) { - e.runHook("/early", service.GetName(), action) -} - -func (e Env) RunLateHookService(service spec.Service, action string) { - e.runHook("/late", service.GetName(), action) -} - -func (e Env) runHook(path string, service string, action string) { +func (e Env) runHook(path string, info spec.HookInfo) { e.log.WithField("path", path).Debug("Running hook") files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) if err != nil { @@ -186,9 +170,15 @@ func (e Env) runHook(path string, service string, action string) { return } - os.Setenv("SERVICE", service) + os.Setenv("COMMAND", info.Command) + if info.Unit != nil { + os.Setenv("UNIT", info.Unit.GetName()) + } + os.Setenv("SERVICE", info.Service.GetName()) os.Setenv("WHO", ggn.GetUserAndHost()) - os.Setenv("ACTION", action) + os.Setenv("ACTION", info.Action) + os.Setenv("ATTRIBUTES", info.Attributes) + for _, f := range files { if !f.IsDir() { hookLog := log.WithField("name", f.Name()) diff --git a/work/env/service-check.go b/work/env/service-check.go index 6d6fba3..608f010 100644 --- a/work/env/service-check.go +++ b/work/env/service-check.go @@ -6,9 +6,8 @@ import ( func (s *Service) Check() { s.log.Debug("Running check") - - s.GetEnv().RunEarlyHookService(s, "check") - defer s.GetEnv().RunLateHookService(s, "check") + s.runHook(EARLY, "service/check", "check") + defer s.runHook(LATE, "service/check", "check") s.Generate(nil) @@ -27,6 +26,6 @@ func (s *Service) Check() { } split := strings.Split(unitInfo[2], ".") - s.LoadUnit(split[0]).Check() + s.LoadUnit(split[0]).Check("service/check") } } diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 4ae3680..f749362 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -1,6 +1,7 @@ package env import ( + "github.com/Sirupsen/logrus" "github.com/appc/spec/discovery" "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" @@ -25,11 +26,33 @@ func (s Service) Generate(sources []string) { return } + for i, node := range s.nodes() { + hostname := node[spec.NODE_HOSTNAME].(string) + if hostname == "" { + s.log.WithField("index", i).Error("hostname is mandatory in node informations") + } + unit := s.LoadUnit(hostname) + unit.Generate(tmpl) + } +} + +func (s Service) NodeAttributes(hostname string) map[string]interface{} { + for _, node := range s.nodes() { + host := node[spec.NODE_HOSTNAME].(string) + if host == hostname { + return node + } + } + logrus.WithField("hostname", hostname).Panic("Cannot find host in service list") + return nil +} + +func (s Service) nodes() []map[string]interface{} { nodes := s.manifest.Nodes if s.manifest.Nodes[0][spec.NODE_HOSTNAME].(string) == "*" { if len(s.manifest.Nodes) > 1 { s.log.Error("You cannot mix all nodes with single node. Yet ?") - return + return nil } newNodes := *new([]map[string]interface{}) @@ -45,21 +68,7 @@ func (s Service) Generate(sources []string) { nodes = newNodes } - - acis, err := s.prepareAciList(sources) - if err != nil { - s.log.WithError(err).Error("Cannot prepare aci list") - return - } - - for i, node := range nodes { - hostname := node[spec.NODE_HOSTNAME].(string) - if hostname == "" { - s.log.WithField("index", i).Error("hostname is mandatory in node informations") - } - unit := s.LoadUnit(hostname) - unit.Generate(node, tmpl, acis, s.attributes) - } + return nodes } func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, contents []byte) error { @@ -169,9 +178,9 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { } } -func (s Service) prepareAciList(sources []string) (string, error) { +func (s Service) PrepareAciList(sources []string) string { if len(s.manifest.Containers) == 0 { - return "", nil + return "" } override := s.sources(sources) @@ -204,7 +213,7 @@ func (s Service) prepareAciList(sources []string) (string, error) { taci = *aciTmp if err != nil { containerLog.Fatal("Cannot resolve aci") - return "", err + return "" } } acis += taci.String() + " " @@ -213,5 +222,5 @@ func (s Service) prepareAciList(sources []string) (string, error) { if acis == "" { s.log.Error("Aci list is empty after discovery") } - return acis, nil + return acis } diff --git a/work/env/service-update.go b/work/env/service-update.go index 16fb44b..463ad05 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -63,11 +63,11 @@ units: } if i == 0 { - s.GetEnv().RunEarlyHookService(s, "update") - defer s.GetEnv().RunLateHookService(s, "update") + s.runHook(EARLY, "service/update", "update") + defer s.runHook(LATE, "service/update", "update") } - u.UpdateInside() + u.UpdateInside("service/update") time.Sleep(time.Second * 2) } diff --git a/work/env/service.go b/work/env/service.go index b49dd44..1769bcf 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -2,6 +2,7 @@ package env import ( "bufio" + "encoding/json" "fmt" "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" @@ -45,6 +46,10 @@ func NewService(path string, name string, env spec.Env) *Service { return service } +func (s *Service) GetAttributes() map[string]interface{} { + return s.attributes +} + func (s *Service) GetName() string { return s.Name } @@ -70,7 +75,7 @@ func (s *Service) Diff() { } for _, unitName := range units { unit := s.LoadUnit(unitName) - unit.Diff() + unit.Diff("service/diff") } } @@ -175,6 +180,29 @@ func (s *Service) askToProcessService(index int, unit *service.Unit) Action { return ACTION_QUIT } +const EARLY = true +const LATE = false + +func (s *Service) runHook(isEarly bool, command string, action string) { + out, err := json.Marshal(s.attributes) + if err != nil { + s.log.WithError(err).Panic("Cannot marshall attributes") + } + + info := spec.HookInfo{ + Service: s, + Action: "service/" + action, + Command: command, + Attributes: string(out), + } + if isEarly { + s.GetEnv().RunEarlyHook(info) + } else { + s.GetEnv().RunLateHook(info) + } + +} + func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go new file mode 100644 index 0000000..a7eef84 --- /dev/null +++ b/work/env/service/unit-command.go @@ -0,0 +1,128 @@ +package service + +import ( + "github.com/Sirupsen/logrus" + "github.com/blablacar/ggn/builder" + "os" + "strconv" + "time" +) + +func (u *Unit) Start(command string) error { + return u.runAction(command, "start") +} + +func (u *Unit) Unload(command string) error { + return u.runAction(command, "unload") +} + +func (u *Unit) Load(command string) error { + u.Service.Generate(nil) + return u.runAction(command, "load") +} + +func (u *Unit) Stop(command string) error { + return u.runAction(command, "stop") +} + +func (u *Unit) Destroy(command string) error { + return u.runAction(command, "destroy") +} + +func (u *Unit) Update(command string) error { + u.Service.Generate(nil) + u.Log.Debug("Update") + u.runHook(EARLY, command, "update") + defer u.runHook(LATE, command, "update") + + u.Service.Lock(1*time.Hour, "Update "+u.Name) + defer u.Service.Unlock() + + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Warn("Cannot compare local and remote service") + } + if same && !builder.BuildFlags.Force { + u.Log.Info("Remote service is already up to date, not updating") + return nil + } + + u.UpdateInside(command) + + return nil +} + +func (u *Unit) Journal(command string, follow bool, lines int) { + u.Log.Debug("journal") + u.runHook(EARLY, command, "journal") + defer u.runHook(LATE, command, "journal") + + args := []string{"journal", "-lines", strconv.Itoa(lines)} + if follow { + args = append(args, "-f") + } + args = append(args, u.Filename) + + err := u.Service.GetEnv().RunFleetCmd(args...) + if err != nil { + logrus.WithError(err).Fatal("Failed to run journal") + } +} + +func (u *Unit) Ssh(command string) { + u.Log.Debug("ssh") + u.runHook(EARLY, command, "ssh") + defer u.runHook(LATE, command, "ssh") + + err := u.Service.GetEnv().RunFleetCmd("ssh", u.Filename) + if err != nil { + logrus.WithError(err).Fatal("Failed to run status") + } +} + +func (u *Unit) Diff(command string) { + u.Log.Debug("diff") + u.Service.Generate(nil) + u.runHook(EARLY, command, "diff") + defer u.runHook(LATE, command, "diff") + + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.Warn("Cannot read unit") + } + if !same { + u.DisplayDiff() + } +} + +func (u *Unit) Status(command string) { + u.Log.Debug("status") + u.runHook(EARLY, command, "status") + defer u.runHook(LATE, command, "status") + + content, stderr, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) + if err != nil { + logrus.WithError(err).WithField("stderr", stderr).Fatal("Failed to run status") + } + os.Stdout.WriteString(content) +} + +//////////////////////////////////////////// + +func (u *Unit) runAction(command string, action string) error { + if command == action { + u.Service.Lock(1*time.Hour, action+" "+u.Name) + defer u.Service.Unlock() + } + + u.Log.Debug(action) + u.runHook(EARLY, command, action) + defer u.runHook(LATE, command, action) + + _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput(action, u.unitPath) + if err != nil { + logrus.WithError(err).Error("Cannot " + action + " unit") + return err + } + return nil +} diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index 3d35b28..d67b746 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -10,19 +10,9 @@ import ( "strings" ) -func (u Unit) Generate(node map[string]interface{}, tmpl *utils.Templating, acis string, attributes map[string]interface{}) { +func (u Unit) Generate(tmpl *utils.Templating) { u.Log.Debug("Generate") - - data := make(map[string]interface{}) - - data["node"] = node - data["node"].(map[string]interface{})["acis"] = acis - - data["attribute"] = utils.CopyMap(attributes) - if data["node"].(map[string]interface{})["attributes"] != nil { - source := utils.CopyMapInterface(data["node"].(map[string]interface{})["attributes"].(map[interface{}]interface{})) - data["attribute"] = mergemap.Merge(data["attribute"].(map[string]interface{}), source.(map[string]interface{})) - } + data := u.GenerateAttributes() out, err := json.Marshal(data["attribute"]) if err != nil { @@ -44,3 +34,17 @@ func (u Unit) Generate(node map[string]interface{}, tmpl *utils.Templating, acis u.Log.WithError(err).WithField("path", u.path+"/"+u.Filename).Error("Cannot writer unit") } } + +func (u Unit) GenerateAttributes() map[string]interface{} { + data := make(map[string]interface{}) + data["node"] = u.Service.NodeAttributes(u.Name) + data["node"].(map[string]interface{})["acis"] = u.Service.PrepareAciList(nil) + data["attribute"] = utils.CopyMap(u.Service.GetAttributes()) + data["attribute"].(map[string]interface{})["hostname"] = data["node"].(map[string]interface{})["hostname"] + if data["node"].(map[string]interface{})["attributes"] != nil { + source := utils.CopyMapInterface(data["node"].(map[string]interface{})["attributes"].(map[interface{}]interface{})) + data["attribute"] = mergemap.Merge(data["attribute"].(map[string]interface{}), source.(map[string]interface{})) + } + + return data +} diff --git a/work/env/service/unit-mutable.go b/work/env/service/unit-mutable.go deleted file mode 100644 index 1972044..0000000 --- a/work/env/service/unit-mutable.go +++ /dev/null @@ -1,109 +0,0 @@ -package service - -import ( - "github.com/Sirupsen/logrus" - "github.com/blablacar/ggn/builder" - "time" -) - -func (u *Unit) Start() error { - u.Service.Generate(nil) - return u.runAction("start") -} - -func (u *Unit) Unload() error { - return u.runAction("unload") -} - -func (u *Unit) Load() error { - return u.runAction("load") -} - -func (u *Unit) Stop() error { - return u.runAction("stop") -} - -func (u *Unit) Destroy() error { - return u.runAction("destroy") -} - -func (u *Unit) Update(lock bool) error { - u.Service.Generate(nil) - u.Log.Debug("Update") - - u.Service.Lock(1*time.Hour, "Update "+u.Name) - defer u.Service.Unlock() - - same, err := u.IsLocalContentSameAsRemote() - if err != nil { - u.Log.WithError(err).Warn("Cannot compare local and remote service") - } - if same && !builder.BuildFlags.Force { - u.Log.Info("Remote service is already up to date, not updating") - return nil - } - - u.Service.GetEnv().RunEarlyHookUnit(u, "update") - defer u.Service.GetEnv().RunLateHookUnit(u, "update") - - u.UpdateInside() - - return nil -} - -func (u *Unit) UpdateInside() error { - // destroy - _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput("destroy", u.Filename) - if err != nil { - logrus.WithError(err).Warn("Cannot destroy unit") - } - - // start - time.Sleep(time.Second * 2) - _, _, err = u.Service.GetEnv().RunFleetCmdGetOutput("start", u.unitPath) - if err != nil { - logrus.WithError(err).Error("Cannot start unit") - return err - } - - // status, err2 := u.Status() - // u.Log.WithField("status", status).Debug("Log status") - // if err2 != nil { - // log.WithError(err2).WithField("status", status).Panic("Unit failed just after start") - // return err2 - // } - // if status == "inactive" { - // log.WithField("status", status).Panic("Unit failed just after start") - // return errors.New("unit is inactive just after start") - // } - // - // s.checkServiceRunning() - - // TODO ask deploy pod version () - // TODO YES/NO - // TODO check running tmux - // TODO running as root ?? - // TODO notify slack - // TODO store old version - // TODO !!!!! check that service is running well before going to next server !!! - return nil -} - -///////////////////////////// - -func (u *Unit) runAction(action string) error { - u.Service.Lock(1*time.Hour, action+" "+u.Name) - defer u.Service.Unlock() - - u.Log.Debug(action) - - u.Service.GetEnv().RunEarlyHookUnit(u, action) - defer u.Service.GetEnv().RunLateHookUnit(u, action) - - _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput(action, u.unitPath) - if err != nil { - logrus.WithError(err).Error("Cannot " + action + " unit") - return err - } - return nil -} diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 9ddb57e..bd1f4ad 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -2,6 +2,7 @@ package service import ( "bufio" + "encoding/json" "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" "github.com/blablacar/ggn/spec" @@ -9,8 +10,8 @@ import ( "github.com/juju/errors" "io/ioutil" "os" - "strconv" "strings" + "time" ) type Unit struct { @@ -49,11 +50,17 @@ func (u *Unit) GetService() spec.Service { return u.Service } -func (u *Unit) Check() { +func (u *Unit) Check(command string) { u.Log.Debug("Check") - u.Service.GetEnv().RunEarlyHookUnit(u, "check") - defer u.Service.GetEnv().RunLateHookUnit(u, "check") + info := spec.HookInfo{ + Service: u.Service, + Unit: u, + Action: "check", + Command: command, + } + u.Service.GetEnv().RunEarlyHook(info) + defer u.Service.GetEnv().RunLateHook(info) statuses := u.Service.GetEnv().ListUnits() var status spec.UnitStatus @@ -84,43 +91,6 @@ func (u *Unit) Check() { } } -func (u *Unit) Journal(follow bool, lines int) { - u.Log.Debug("journal") - - args := []string{"journal", "-lines", strconv.Itoa(lines)} - if follow { - args = append(args, "-f") - } - args = append(args, u.Filename) - - err := u.Service.GetEnv().RunFleetCmd(args...) - if err != nil { - logrus.WithError(err).Fatal("Failed to run journal") - } -} - -func (u *Unit) Ssh() { - u.Log.Debug("ssh") - - err := u.Service.GetEnv().RunFleetCmd("ssh", u.Filename) - if err != nil { - logrus.WithError(err).Fatal("Failed to run status") - } -} - -func (u *Unit) Diff() { - u.Log.Debug("diff") - u.Service.Generate(nil) - - same, err := u.IsLocalContentSameAsRemote() - if err != nil { - u.Log.Warn("Cannot read unit") - } - if !same { - u.DisplayDiff() - } -} - func (u *Unit) GetUnitContentAsFleeted() (string, error) { unitFileContent, err := ioutil.ReadFile(u.unitPath) if err != nil { @@ -134,35 +104,13 @@ func (u *Unit) GetUnitContentAsFleeted() (string, error) { return convertMultilineUnitToString([]byte(fleetunit.String())), nil } -func (u *Unit) Status() error { - u.Log.Debug("status") - - content, stderr, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) - if err != nil { - logrus.WithError(err).WithField("stderr", stderr).Fatal("Failed to run status") - } - os.Stdout.WriteString(content) - return nil - // if err != nil { - // return "", err - // } - // - // reg, err := regexp.Compile(`Active: (active|inactive|deactivating|activating)`) - // if err != nil { - // u.Log.Panic("Cannot compile regex") - // } - // matched := reg.FindStringSubmatch(content) - // - // // if !strings.Contains(content, "Active: %s ") { // Active: failed - // // return content, errors.New("unit is not in running state") - // // } - // - // return matched[1], err +func (u *Unit) UpdateInside(command string) { + u.Destroy(command) + time.Sleep(time.Second * 2) + u.Start(command) } func (u *Unit) DisplayDiff() error { - u.Log.Debug("Diff") - local, remote, err := u.serviceLocalAndRemoteContent() if err != nil { return err @@ -191,6 +139,30 @@ func (u *Unit) IsLocalContentSameAsRemote() (bool, error) { /////////////////////////////////////////// +const EARLY = true +const LATE = false + +func (u *Unit) runHook(isEarly bool, command string, action string) { + out, err := json.Marshal(u.GenerateAttributes()["attribute"]) + if err != nil { + u.Log.WithError(err).Panic("Cannot marshall attributes") + } + + info := spec.HookInfo{ + Service: u.Service, + Unit: u, + Action: "unit/" + action, + Command: command, + Attributes: string(out), + } + if isEarly { + u.Service.GetEnv().RunEarlyHook(info) + } else { + u.Service.GetEnv().RunLateHook(info) + } + +} + func (u *Unit) serviceLocalAndRemoteContent() (string, string, error) { localContent, err := u.GetUnitContentAsFleeted() if err != nil { From 242c577341aa106ff667d41fa64e3208b5c58176 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Dec 2015 15:11:08 +0100 Subject: [PATCH 068/163] update lock command doc --- commands/prepare-service.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 89fe08c..68145c1 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -46,6 +46,8 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { lockCmd := &cobra.Command{ Use: "lock [message...]", Short: "lock " + service.Name + " on env " + service.GetEnv().GetName(), + Long: `Add a lock to the service in etcd to prevent somebody else to do modification actions on this service/units.` + + `lock is ignored if set by the current user`, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { logrus.Fatal("Please add a message to describe lock") From 76f06b35192ddd229f17447ed2d5d85b3609e36f Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Dec 2015 15:52:49 +0100 Subject: [PATCH 069/163] add hook on service lock --- commands/prepare-service.go | 4 ++-- spec/service.go | 4 ++-- work/env/service-update.go | 6 +++--- work/env/service.go | 8 ++++++-- work/env/service/unit-command.go | 8 ++++---- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 68145c1..d215c28 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -59,7 +59,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { logrus.WithError(err).Fatal("Wrong value for ttl") } - service.Lock(ttl, message) + service.Lock("service/lock", ttl, message) }, } @@ -67,7 +67,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { Use: "unlock", Short: "unlock " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { - service.Unlock() + service.Unlock("service/unlock") }, } diff --git a/spec/service.go b/spec/service.go index a54b51e..04b0e9e 100644 --- a/spec/service.go +++ b/spec/service.go @@ -28,8 +28,8 @@ type Service interface { NodeAttributes(hostname string) map[string]interface{} GetAttributes() map[string]interface{} Generate(sources []string) - Unlock() - Lock(ttl time.Duration, message string) + Unlock(command string) + Lock(command string, ttl time.Duration, message string) GetName() string GetEnv() Env GetLog() logrus.Entry diff --git a/work/env/service-update.go b/work/env/service-update.go index 463ad05..e7978ca 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -10,7 +10,7 @@ func (s *Service) Update() error { s.log.Info("Updating service") s.Generate(nil) - s.Lock(1*time.Hour, "Updating") + s.Lock("service/update", 1*time.Hour, "Updating") lock := true defer func() { if lock { @@ -48,7 +48,7 @@ units: case ACTION_QUIT: u.Log.Debug("User want to quit") if i == 0 { - s.Unlock() + s.Unlock("service/update") lock = false } return errors.New("User want to quit") @@ -71,7 +71,7 @@ units: time.Sleep(time.Second * 2) } - s.Unlock() + s.Unlock("service/update") lock = false return nil } diff --git a/work/env/service.go b/work/env/service.go index 1769bcf..069ca05 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -109,8 +109,10 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this return stdout, err } -func (s *Service) Unlock() { +func (s *Service) Unlock(command string) { s.log.Info("Unlocking") + s.runHook(EARLY, command, "unlock") + defer s.runHook(LATE, command, "unlock") kapi := s.env.EtcdClient() _, err := kapi.Delete(context.Background(), s.lockPath, nil) @@ -119,11 +121,13 @@ func (s *Service) Unlock() { } } -func (s *Service) Lock(ttl time.Duration, message string) { +func (s *Service) Lock(command string, ttl time.Duration, message string) { userAndHost := "[" + ggn.GetUserAndHost() + "] " message = userAndHost + message s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") + s.runHook(EARLY, command, "lock") + defer s.runHook(LATE, command, "lock") kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index a7eef84..7c7a797 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -35,8 +35,8 @@ func (u *Unit) Update(command string) error { u.runHook(EARLY, command, "update") defer u.runHook(LATE, command, "update") - u.Service.Lock(1*time.Hour, "Update "+u.Name) - defer u.Service.Unlock() + u.Service.Lock(command, 1*time.Hour, "Update "+u.Name) + defer u.Service.Unlock(command) same, err := u.IsLocalContentSameAsRemote() if err != nil { @@ -111,8 +111,8 @@ func (u *Unit) Status(command string) { func (u *Unit) runAction(command string, action string) error { if command == action { - u.Service.Lock(1*time.Hour, action+" "+u.Name) - defer u.Service.Unlock() + u.Service.Lock(command, 1*time.Hour, action+" "+u.Name) + defer u.Service.Unlock(command) } u.Log.Debug(action) From ce646c0370112c4288f92f0c9568ad20a8c36c26 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Dec 2015 17:31:00 +0100 Subject: [PATCH 070/163] add missing generate on unit start --- work/env/service/unit-command.go | 1 + 1 file changed, 1 insertion(+) diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index 7c7a797..003d98e 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -9,6 +9,7 @@ import ( ) func (u *Unit) Start(command string) error { + u.Service.Generate(nil) return u.runAction(command, "start") } From a685ff82be4eb9658f141ff015ea76adc42cc346 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Dec 2015 17:32:09 +0100 Subject: [PATCH 071/163] do not capture status result and exit 1 if status failed, just like fleetctl do --- work/env/service/unit-command.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index 003d98e..dc5a74a 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -101,11 +101,10 @@ func (u *Unit) Status(command string) { u.runHook(EARLY, command, "status") defer u.runHook(LATE, command, "status") - content, stderr, err := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) + err := u.Service.GetEnv().RunFleetCmd("status", u.Filename) if err != nil { - logrus.WithError(err).WithField("stderr", stderr).Fatal("Failed to run status") + os.Exit(1) } - os.Stdout.WriteString(content) } //////////////////////////////////////////// From 66d83f743be3c98f01261febeeab3e49aa2a3cd4 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Dec 2015 17:32:53 +0100 Subject: [PATCH 072/163] support split of attributes in multiple envs --- work/env/service/unit-generate.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index d67b746..eb4b34f 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -7,6 +7,7 @@ import ( "github.com/peterbourgon/mergemap" "io/ioutil" "os" + "strconv" "strings" ) @@ -20,6 +21,8 @@ func (u Unit) Generate(tmpl *utils.Templating) { } data["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + u.prepareEnvironmentAttributes(data) + var b bytes.Buffer err = tmpl.Execute(&b, data) if err != nil { @@ -48,3 +51,28 @@ func (u Unit) GenerateAttributes() map[string]interface{} { return data } + +func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { + var envAttr bytes.Buffer + var envAttrVars bytes.Buffer + num := 0 + for i, c := range data["attributes"].(string) { + if i%1950 == 0 { + if num != 0 { + envAttr.WriteString("'\n") + } + envAttr.WriteString("Environment='ATTR_") + envAttr.WriteString(strconv.Itoa(num)) + envAttr.WriteString("=") + envAttrVars.WriteString("${ATTR_") + envAttrVars.WriteString(strconv.Itoa(num)) + envAttrVars.WriteString("}") + num++ + } + envAttr.WriteRune(c) + } + envAttr.WriteString("'\n") + + data["environmentAttributes"] = envAttr.String() + data["environmentAttributesVars"] = envAttrVars.String() +} From e354d3bb7c472761f100f468c51181cef79f174c Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Dec 2015 15:07:54 +0100 Subject: [PATCH 073/163] [#36] ignore attribute files that does not ends with .yaml or .yml --- utils/attribute-files.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/attribute-files.go b/utils/attribute-files.go index 8a20654..a478f25 100644 --- a/utils/attribute-files.go +++ b/utils/attribute-files.go @@ -3,6 +3,7 @@ package utils import ( "github.com/blablacar/attributes-merger/attributes" "github.com/google/cadvisor/utils" + "strings" ) func AttributeFiles(path string) ([]string, error) { @@ -19,7 +20,9 @@ func AttributeFiles(path string) ([]string, error) { } for _, file := range in.Files { - res = append(res, in.Directory+file) + if strings.HasSuffix(file, ".yml") || strings.HasSuffix(file, ".yaml") { + res = append(res, in.Directory+file) + } } return res, nil } From 7e5b5964b9dae11424998be0c9d3e446473c8a34 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Dec 2015 15:15:59 +0100 Subject: [PATCH 074/163] [#35] ignore error code on journal -f --- work/env/service/unit-command.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index dc5a74a..48f3ebd 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -65,7 +65,8 @@ func (u *Unit) Journal(command string, follow bool, lines int) { args = append(args, u.Filename) err := u.Service.GetEnv().RunFleetCmd(args...) - if err != nil { + + if err != nil && !follow { logrus.WithError(err).Fatal("Failed to run journal") } } From bb7afe85b4b00fbeac2275d955a1aa7d7ac237b8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Dec 2015 16:48:37 +0100 Subject: [PATCH 075/163] [#37] rework attributes management to merge nodes in it and support arrays --- spec/service.go | 8 ++-- utils/copymap.go | 62 +++++++++++++++++++++++++++---- work/env/service-generate.go | 37 +++--------------- work/env/service.go | 51 +++++++++++++++++++------ work/env/service/unit-generate.go | 17 +++------ 5 files changed, 110 insertions(+), 65 deletions(-) diff --git a/spec/service.go b/spec/service.go index 04b0e9e..7f35a9e 100644 --- a/spec/service.go +++ b/spec/service.go @@ -17,10 +17,10 @@ const PATH_SERVICE_MANIFEST = "/service-manifest.yml" const NODE_HOSTNAME = "hostname" type ServiceManifest struct { - Containers []cntspec.ACFullname `yaml:"containers"` - ExecStartPre []string `yaml:"execStartPre"` - ExecStart []string `yaml:"execStart"` - Nodes []map[string]interface{} `yaml:"nodes"` + Containers []cntspec.ACFullname `yaml:"containers"` + ExecStartPre []string `yaml:"execStartPre"` + ExecStart []string `yaml:"execStart"` + Nodes interface{} `yaml:"nodes"` } type Service interface { diff --git a/utils/copymap.go b/utils/copymap.go index 4defcff..e28b03c 100644 --- a/utils/copymap.go +++ b/utils/copymap.go @@ -1,5 +1,11 @@ package utils +import ( + "errors" + "fmt" + "strconv" +) + func CopyMap(from map[string]interface{}) map[string]interface{} { node := make(map[string]interface{}) for k, v := range from { @@ -8,16 +14,56 @@ func CopyMap(from map[string]interface{}) map[string]interface{} { return node } -func CopyMapInterface(from interface{}) interface{} { - switch x := from.(type) { +//func CopyMapInterface(from interface{}) interface{} { +// switch x := from.(type) { +// case map[interface{}]interface{}: +// node := make(map[string]interface{}) +// for k, v := range from.(map[interface{}]interface{}) { +// node[k.(string)] = CopyMapInterface(v) +// } +// return node +// default: +// _ = x +// return from +// } +//} + +// transform YAML to JSON +func TransformYamlToJson(in interface{}) (_ interface{}, err error) { + switch in.(type) { case map[interface{}]interface{}: - node := make(map[string]interface{}) - for k, v := range from.(map[interface{}]interface{}) { - node[k.(string)] = CopyMapInterface(v) + o := make(map[string]interface{}) + for k, v := range in.(map[interface{}]interface{}) { + sk := "" + switch k.(type) { + case string: + sk = k.(string) + case int: + sk = strconv.Itoa(k.(int)) + default: + return nil, errors.New( + fmt.Sprintf("type not match: expect map key string or int get: %T", k)) + } + v, err = TransformYamlToJson(v) + if err != nil { + return nil, err + } + o[sk] = v + } + return o, nil + case []interface{}: + in1 := in.([]interface{}) + len1 := len(in1) + o := make([]interface{}, len1) + for i := 0; i < len1; i++ { + o[i], err = TransformYamlToJson(in1[i]) + if err != nil { + return nil, err + } } - return node + return o, nil default: - _ = x - return from + return in, nil } + return in, nil } diff --git a/work/env/service-generate.go b/work/env/service-generate.go index f749362..655d6bd 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -6,7 +6,6 @@ import ( "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" "github.com/blablacar/ggn/spec" - "github.com/blablacar/ggn/utils" "io/ioutil" "net/http" "strings" @@ -21,13 +20,13 @@ func (s Service) Generate(sources []string) { return } - if len(s.manifest.Nodes) == 0 { + if len(s.nodesAsJsonMap) == 0 { s.log.Error("No node to process in manifest") return } - for i, node := range s.nodes() { - hostname := node[spec.NODE_HOSTNAME].(string) + for i, node := range s.nodesAsJsonMap { + hostname := node.(map[string]interface{})[spec.NODE_HOSTNAME].(string) if hostname == "" { s.log.WithField("index", i).Error("hostname is mandatory in node informations") } @@ -37,40 +36,16 @@ func (s Service) Generate(sources []string) { } func (s Service) NodeAttributes(hostname string) map[string]interface{} { - for _, node := range s.nodes() { - host := node[spec.NODE_HOSTNAME].(string) + for _, node := range s.nodesAsJsonMap { + host := node.(map[string]interface{})[spec.NODE_HOSTNAME].(string) if host == hostname { - return node + return node.(map[string]interface{}) } } logrus.WithField("hostname", hostname).Panic("Cannot find host in service list") return nil } -func (s Service) nodes() []map[string]interface{} { - nodes := s.manifest.Nodes - if s.manifest.Nodes[0][spec.NODE_HOSTNAME].(string) == "*" { - if len(s.manifest.Nodes) > 1 { - s.log.Error("You cannot mix all nodes with single node. Yet ?") - return nil - } - - newNodes := *new([]map[string]interface{}) - machines, err := s.env.ListMachineNames() - if err != nil { - s.log.WithError(err).Fatal("Cannot list machines to generate units") - } - for _, machine := range machines { - node := utils.CopyMap(s.manifest.Nodes[0]) - node[spec.NODE_HOSTNAME] = machine - newNodes = append(newNodes, node) - } - - nodes = newNodes - } - return nodes -} - func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, contents []byte) error { pod := schema.BlankPodManifest() err := pod.UnmarshalJSON(contents) diff --git a/work/env/service.go b/work/env/service.go index 069ca05..9b8f993 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -23,13 +23,14 @@ import ( ) type Service struct { - env spec.Env - path string - Name string - manifest spec.ServiceManifest - log log.Entry - lockPath string - attributes map[string]interface{} + env spec.Env + path string + Name string + manifest spec.ServiceManifest + nodesAsJsonMap []interface{} + log log.Entry + lockPath string + attributes map[string]interface{} } func NewService(path string, name string, env spec.Env) *Service { @@ -43,9 +44,37 @@ func NewService(path string, name string, env spec.Env) *Service { } service.loadManifest() service.loadAttributes() + service.prepareNodesAsJsonMap() return service } +func (s *Service) prepareNodesAsJsonMap() { + tmpRes, err := utils.TransformYamlToJson(s.manifest.Nodes) + var res []interface{} = tmpRes.([]interface{}) + if err != nil { + s.log.WithError(err).Fatal("Cannot transform yaml to json") + } + + if res[0].(map[string]interface{})[spec.NODE_HOSTNAME].(string) == "*" { + if len(res) > 1 { + s.log.Fatal("You cannot mix all nodes with single node. Yet ?") + } + + newNodes := *new([]interface{}) + machines, err := s.env.ListMachineNames() + if err != nil { + s.log.WithError(err).Fatal("Cannot list machines to generate units") + } + for _, machine := range machines { + node := utils.CopyMap(res[0].(map[string]interface{})) + node[spec.NODE_HOSTNAME] = machine + newNodes = append(newNodes, node) + } + res = newNodes + } + s.nodesAsJsonMap = res +} + func (s *Service) GetAttributes() map[string]interface{} { return s.attributes } @@ -81,11 +110,11 @@ func (s *Service) Diff() { func (s *Service) ListUnits() ([]string, error) { res := []string{} - if len(s.manifest.Nodes) == 0 { + if len(s.nodesAsJsonMap) == 0 { return res, nil } - if s.manifest.Nodes[0][spec.NODE_HOSTNAME].(string) == "*" { + if s.nodesAsJsonMap[0].(map[string]interface{})[spec.NODE_HOSTNAME].(string) == "*" { machines, err := s.env.ListMachineNames() if err != nil { return nil, errors.Annotate(err, "Cannot generate unit list from list of machines") @@ -94,8 +123,8 @@ func (s *Service) ListUnits() ([]string, error) { res = append(res, node) } } else { - for _, node := range s.manifest.Nodes { - res = append(res, node[spec.NODE_HOSTNAME].(string)) + for _, node := range s.nodesAsJsonMap { + res = append(res, node.(map[string]interface{})[spec.NODE_HOSTNAME].(string)) } } return res, nil diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index eb4b34f..f3e3ca9 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -14,8 +14,7 @@ import ( func (u Unit) Generate(tmpl *utils.Templating) { u.Log.Debug("Generate") data := u.GenerateAttributes() - - out, err := json.Marshal(data["attribute"]) + out, err := json.Marshal(data) if err != nil { u.Log.WithError(err).Panic("Cannot marshall attributes") } @@ -39,16 +38,12 @@ func (u Unit) Generate(tmpl *utils.Templating) { } func (u Unit) GenerateAttributes() map[string]interface{} { - data := make(map[string]interface{}) - data["node"] = u.Service.NodeAttributes(u.Name) - data["node"].(map[string]interface{})["acis"] = u.Service.PrepareAciList(nil) - data["attribute"] = utils.CopyMap(u.Service.GetAttributes()) - data["attribute"].(map[string]interface{})["hostname"] = data["node"].(map[string]interface{})["hostname"] - if data["node"].(map[string]interface{})["attributes"] != nil { - source := utils.CopyMapInterface(data["node"].(map[string]interface{})["attributes"].(map[interface{}]interface{})) - data["attribute"] = mergemap.Merge(data["attribute"].(map[string]interface{}), source.(map[string]interface{})) + data := utils.CopyMap(u.Service.GetAttributes()) + data["acis"] = u.Service.PrepareAciList(nil) + data = mergemap.Merge(data, u.Service.NodeAttributes(u.Name)) + if data["attributes"] != nil { + data = mergemap.Merge(data, data["attributes"].(map[string]interface{})) // TODO this should be remove in the future } - return data } From a1a596476d908950c3fb6a915f6f9c2b211e6c7c Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 9 Dec 2015 11:22:42 +0100 Subject: [PATCH 076/163] fix attributes passed to hooks --- work/env/service/unit-generate.go | 3 --- work/env/service/unit.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index f3e3ca9..5c87ef6 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -41,9 +41,6 @@ func (u Unit) GenerateAttributes() map[string]interface{} { data := utils.CopyMap(u.Service.GetAttributes()) data["acis"] = u.Service.PrepareAciList(nil) data = mergemap.Merge(data, u.Service.NodeAttributes(u.Name)) - if data["attributes"] != nil { - data = mergemap.Merge(data, data["attributes"].(map[string]interface{})) // TODO this should be remove in the future - } return data } diff --git a/work/env/service/unit.go b/work/env/service/unit.go index bd1f4ad..5d35ab5 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -143,7 +143,7 @@ const EARLY = true const LATE = false func (u *Unit) runHook(isEarly bool, command string, action string) { - out, err := json.Marshal(u.GenerateAttributes()["attribute"]) + out, err := json.Marshal(u.GenerateAttributes()) if err != nil { u.Log.WithError(err).Panic("Cannot marshall attributes") } From 04337d6fb4a913a095d60e8b6e21dfcfd2cea319 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 10 Dec 2015 13:54:23 +0100 Subject: [PATCH 077/163] add $ENV to hook and add info on hook debug log --- work/env.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/work/env.go b/work/env.go index 7d98c27..13947a1 100644 --- a/work/env.go +++ b/work/env.go @@ -163,13 +163,14 @@ func (e Env) RunLateHook(info spec.HookInfo) { } func (e Env) runHook(path string, info spec.HookInfo) { - e.log.WithField("path", path).Debug("Running hook") + e.log.WithField("path", path).WithField("info", info).Debug("Running hook") files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) if err != nil { log.WithError(err).Debug("Cannot read hood directory") return } + os.Setenv("ENV", e.name) os.Setenv("COMMAND", info.Command) if info.Unit != nil { os.Setenv("UNIT", info.Unit.GetName()) From 763dea0970d220fbeeee393b3300930e7067199f Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 10 Dec 2015 15:20:32 +0100 Subject: [PATCH 078/163] add restart command and start only if not already running --- commands/prepare-unit.go | 10 +++++++++- work/env/service/unit-command.go | 27 ++++++++++++++++++++++++++- work/env/service/unit.go | 16 ++++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index e3f9307..bd9be92 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -39,6 +39,14 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { }, } + restartCmd := &cobra.Command{ + Use: "restart", + Short: getShortDescription(unit, "Restart"), + Run: func(cmd *cobra.Command, args []string) { + unit.Restart("unit/restart") + }, + } + destroyCmd := &cobra.Command{ Use: "destroy", Short: getShortDescription(unit, "Destroy"), @@ -107,7 +115,7 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, - diffCmd, checkCmd, journalCmd, loadCmd, sshCmd) + diffCmd, checkCmd, journalCmd, loadCmd, sshCmd, restartCmd) return unitCmd } diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index 48f3ebd..eb70daf 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -9,7 +9,17 @@ import ( ) func (u *Unit) Start(command string) error { - u.Service.Generate(nil) + if u.isRunning() { + u.Log.Info("Service is already running") + return nil + } + if !u.isLoaded() { + u.Log.Debug("unit is not loaded yet") + u.Service.Generate(nil) + u.Load(command) + } else { + u.Log.Debug("unit is already loaded") + } return u.runAction(command, "start") } @@ -30,6 +40,21 @@ func (u *Unit) Destroy(command string) error { return u.runAction(command, "destroy") } +func (u *Unit) Restart(command string) error { + u.Log.Debug("restart") + u.runHook(EARLY, command, "restart") + defer u.runHook(LATE, command, "restart") + + u.Service.Lock(command, 1*time.Hour, "Restart "+u.Name) + defer u.Service.Unlock(command) + + u.Stop(command) + time.Sleep(time.Second * 2) + u.Start(command) + + return nil +} + func (u *Unit) Update(command string) error { u.Service.Generate(nil) u.Log.Debug("Update") diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 5d35ab5..e21839a 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -196,3 +196,19 @@ func convertMultilineUnitToString(content []byte) string { } return strings.Join(lines, "\n") } + +func (u *Unit) isRunning() bool { + content, _, _ := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) + if strings.Contains(content, "Active: active (running)") { + return true + } + return false +} + +func (u *Unit) isLoaded() bool { + content, _, _ := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) + if strings.Contains(content, "Loaded: loaded") { + return true + } + return false +} From 9b66251d82642b2b2565778ce7cabd303be6a3bc Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 10 Dec 2015 17:15:34 +0100 Subject: [PATCH 079/163] [#26] add -M global option to list manifest used to generate --- builder/build.go | 7 ++++--- commands/ggn.go | 2 ++ commands/prepare-service.go | 4 ++-- spec/service.go | 4 ++-- work/env-generate.go | 2 +- work/env/service-check.go | 2 +- work/env/service-generate.go | 7 ++++--- work/env/service-update.go | 2 +- work/env/service.go | 2 +- work/env/service/unit-command.go | 8 ++++---- work/env/service/unit-generate.go | 3 ++- 11 files changed, 24 insertions(+), 19 deletions(-) diff --git a/builder/build.go b/builder/build.go index 31bda34..cfd6a43 100644 --- a/builder/build.go +++ b/builder/build.go @@ -1,9 +1,10 @@ package builder type Flags struct { - All bool - Yes bool - Force bool + All bool + Yes bool + Force bool + GenerateManifests []string } var BuildFlags = Flags{} diff --git a/commands/ggn.go b/commands/ggn.go index b210926..c9e194a 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -5,6 +5,7 @@ import ( "fmt" log "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" + "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/ggn" "github.com/coreos/go-semver/semver" "github.com/spf13/cobra" @@ -43,6 +44,7 @@ func Execute() { rootCmd.PersistentFlags().StringVarP(&logLevel, "loglevel", "L", "info", "Set log level") rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot(), "Set home folder") + rootCmd.PersistentFlags().StringSliceVarP(&builder.BuildFlags.GenerateManifests, "generate-manifest", "M", []string{}, "Manifests used to generate. comma separated") rootCmd.AddCommand(versionCmd, generateCmd, genautocompleteCmd) rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { diff --git a/commands/prepare-service.go b/commands/prepare-service.go index d215c28..4312c9f 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -19,11 +19,11 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { } generateCmd := &cobra.Command{ - Use: "generate [manifest...]", + Use: "generate", Short: "generate units for " + service.Name + " on env " + service.GetEnv().GetName(), Long: `generate units using remote resolved or local pod/aci manifests`, Run: func(cmd *cobra.Command, args []string) { - service.Generate(args) + service.Generate() }, } diff --git a/spec/service.go b/spec/service.go index 7f35a9e..835fd87 100644 --- a/spec/service.go +++ b/spec/service.go @@ -24,10 +24,10 @@ type ServiceManifest struct { } type Service interface { - PrepareAciList(sources []string) string + PrepareAciList() string NodeAttributes(hostname string) map[string]interface{} GetAttributes() map[string]interface{} - Generate(sources []string) + Generate() Unlock(command string) Lock(command string, ttl time.Duration, message string) GetName() string diff --git a/work/env-generate.go b/work/env-generate.go index 06256a4..7aff07f 100644 --- a/work/env-generate.go +++ b/work/env-generate.go @@ -6,6 +6,6 @@ func (e Env) Generate() { for _, service := range services { service := e.LoadService(service) - service.Generate(nil) + service.Generate() } } diff --git a/work/env/service-check.go b/work/env/service-check.go index 608f010..57cb2fa 100644 --- a/work/env/service-check.go +++ b/work/env/service-check.go @@ -9,7 +9,7 @@ func (s *Service) Check() { s.runHook(EARLY, "service/check", "check") defer s.runHook(LATE, "service/check", "check") - s.Generate(nil) + s.Generate() units, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") if err != nil { diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 655d6bd..141d44b 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -5,13 +5,14 @@ import ( "github.com/appc/spec/discovery" "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" + "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/spec" "io/ioutil" "net/http" "strings" ) -func (s Service) Generate(sources []string) { +func (s Service) Generate() { s.log.Debug("Generating units") tmpl, err := s.loadUnitTemplate() @@ -153,12 +154,12 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { } } -func (s Service) PrepareAciList(sources []string) string { +func (s Service) PrepareAciList() string { if len(s.manifest.Containers) == 0 { return "" } - override := s.sources(sources) + override := s.sources(builder.BuildFlags.GenerateManifests) s.log.WithField("data", override).Debug("Local resolved sources") var acis string diff --git a/work/env/service-update.go b/work/env/service-update.go index e7978ca..77b43d4 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -8,7 +8,7 @@ import ( func (s *Service) Update() error { s.log.Info("Updating service") - s.Generate(nil) + s.Generate() s.Lock("service/update", 1*time.Hour, "Updating") lock := true diff --git a/work/env/service.go b/work/env/service.go index 9b8f993..32fa9d0 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -97,7 +97,7 @@ func (s *Service) LoadUnit(hostname string) *service.Unit { } func (s *Service) Diff() { - s.Generate(nil) + s.Generate() units, err := s.ListUnits() if err != nil { s.log.WithError(err).Fatal("Cannot list units to run diff") diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index eb70daf..072fce7 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -15,7 +15,7 @@ func (u *Unit) Start(command string) error { } if !u.isLoaded() { u.Log.Debug("unit is not loaded yet") - u.Service.Generate(nil) + u.Service.Generate() u.Load(command) } else { u.Log.Debug("unit is already loaded") @@ -28,7 +28,7 @@ func (u *Unit) Unload(command string) error { } func (u *Unit) Load(command string) error { - u.Service.Generate(nil) + u.Service.Generate() return u.runAction(command, "load") } @@ -56,7 +56,7 @@ func (u *Unit) Restart(command string) error { } func (u *Unit) Update(command string) error { - u.Service.Generate(nil) + u.Service.Generate() u.Log.Debug("Update") u.runHook(EARLY, command, "update") defer u.runHook(LATE, command, "update") @@ -109,7 +109,7 @@ func (u *Unit) Ssh(command string) { func (u *Unit) Diff(command string) { u.Log.Debug("diff") - u.Service.Generate(nil) + u.Service.Generate() u.runHook(EARLY, command, "diff") defer u.runHook(LATE, command, "diff") diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index 5c87ef6..fe8e05d 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -14,6 +14,8 @@ import ( func (u Unit) Generate(tmpl *utils.Templating) { u.Log.Debug("Generate") data := u.GenerateAttributes() + data["acis"] = u.Service.PrepareAciList() + out, err := json.Marshal(data) if err != nil { u.Log.WithError(err).Panic("Cannot marshall attributes") @@ -39,7 +41,6 @@ func (u Unit) Generate(tmpl *utils.Templating) { func (u Unit) GenerateAttributes() map[string]interface{} { data := utils.CopyMap(u.Service.GetAttributes()) - data["acis"] = u.Service.PrepareAciList(nil) data = mergemap.Merge(data, u.Service.NodeAttributes(u.Name)) return data } From 09c1944e7290049bceb659a675f61a0eca628b4e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 10 Dec 2015 18:46:11 +0100 Subject: [PATCH 080/163] add concurrent updater --- commands/ggn.go | 45 +++++++---- spec/service.go | 9 ++- work/env/service-update.go | 154 +++++++++++++++++++++++++------------ work/env/service.go | 33 ++------ 4 files changed, 146 insertions(+), 95 deletions(-) diff --git a/commands/ggn.go b/commands/ggn.go index c9e194a..c115309 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -35,32 +35,34 @@ func Execute() { } ggn.Home = ggn.NewHome(homefolder) + // logs + lvl := logLevelFromArgs() + if lvl == "" { + lvl = "info" + } + + level, err := log.ParseLevel(lvl) + if err != nil { + fmt.Printf("Unknown log level : %s", lvl) + os.Exit(1) + } + log.SetLevel(level) + rootCmd := &cobra.Command{ Use: "ggn", } var useless string - var logLevel string + var useless2 string - rootCmd.PersistentFlags().StringVarP(&logLevel, "loglevel", "L", "info", "Set log level") + rootCmd.PersistentFlags().StringVarP(&useless2, "log-level", "L", "info", "Set log level") rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot(), "Set home folder") rootCmd.PersistentFlags().StringSliceVarP(&builder.BuildFlags.GenerateManifests, "generate-manifest", "M", []string{}, "Manifests used to generate. comma separated") rootCmd.AddCommand(versionCmd, generateCmd, genautocompleteCmd) - rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) { - - // logs - level, err := log.ParseLevel(logLevel) - if err != nil { - fmt.Printf("Unknown log level : %s", logLevel) - os.Exit(1) - } - log.SetLevel(level) - - } loadEnvCommands(rootCmd) - err := rootCmd.Execute() + err = rootCmd.Execute() if err != nil { os.Exit(1) } @@ -82,6 +84,21 @@ func homeFolderFromArgs() string { return "" } +func logLevelFromArgs() string { + for i, arg := range os.Args { + if arg == "--" { + return "" + } + if arg == "-L" { + return os.Args[i+1] + } + if strings.HasPrefix(arg, "--log-level=") { + return arg[12:] + } + } + return "" +} + func checkFleetVersion() { output, err := utils.ExecCmdGetOutput("fleetctl") if err != nil { diff --git a/spec/service.go b/spec/service.go index 835fd87..7520e92 100644 --- a/spec/service.go +++ b/spec/service.go @@ -17,10 +17,11 @@ const PATH_SERVICE_MANIFEST = "/service-manifest.yml" const NODE_HOSTNAME = "hostname" type ServiceManifest struct { - Containers []cntspec.ACFullname `yaml:"containers"` - ExecStartPre []string `yaml:"execStartPre"` - ExecStart []string `yaml:"execStart"` - Nodes interface{} `yaml:"nodes"` + ConcurrentUpdater int `yaml:"concurrentUpdater"` + Containers []cntspec.ACFullname `yaml:"containers"` + ExecStartPre []string `yaml:"execStartPre"` + ExecStart []string `yaml:"execStart"` + Nodes interface{} `yaml:"nodes"` } type Service interface { diff --git a/work/env/service-update.go b/work/env/service-update.go index 77b43d4..5d2ac5a 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -1,8 +1,16 @@ package env import ( + "bufio" + "fmt" "github.com/blablacar/ggn/builder" + "github.com/blablacar/ggn/work/env/service" "github.com/juju/errors" + "github.com/mgutz/ansi" + "os" + "strings" + "sync" + "sync/atomic" "time" ) @@ -11,67 +19,113 @@ func (s *Service) Update() error { s.Generate() s.Lock("service/update", 1*time.Hour, "Updating") - lock := true - defer func() { - if lock { - s.log.WithField("service", s.Name).Warn("!! Leaving but Service is still lock !!") - } - }() + defer s.Unlock("service/update") units, err := s.ListUnits() if err != nil { return errors.Annotate(err, "Cannot list units to update") } -units: - for i, unit := range units { - u := s.LoadUnit(unit) - ask: - for { - same, err := u.IsLocalContentSameAsRemote() - if err != nil { - u.Log.WithError(err).Warn("Cannot compare local and remote service") - } - if same { - u.Log.Info("Remote service is already up to date") - if !builder.BuildFlags.All { - continue units - } - } - if builder.BuildFlags.Yes { - break ask + if s.manifest.ConcurrentUpdater > 1 && !builder.BuildFlags.Yes { + s.log.Fatal("Update concurrently require -y") + } + + s.concurrentUpdater(units) + return nil +} + +func (s *Service) updateUnit(u service.Unit) { +ask: + for { + same, err := u.IsLocalContentSameAsRemote() + if err != nil { + u.Log.WithError(err).Warn("Cannot compare local and remote service") + } + if same { + u.Log.Info("Remote service is already up to date") + if !builder.BuildFlags.All { + return } - action := s.askToProcessService(i, u) - switch action { - case ACTION_DIFF: - u.DisplayDiff() - case ACTION_QUIT: - u.Log.Debug("User want to quit") - if i == 0 { - s.Unlock("service/update") - lock = false - } - return errors.New("User want to quit") - case ACTION_SKIP: - u.Log.Debug("User skip this service") - continue units - case ACTION_YES: - break ask - default: - u.Log.Fatal("Should not be here") + } + if builder.BuildFlags.Yes { + break ask + } + action := askToProcessService(u) + switch action { + case ACTION_DIFF: + u.DisplayDiff() + case ACTION_QUIT: + u.Log.Debug("User want to quit") + if globalUpdater == 0 { + s.Unlock("service/update") } + os.Exit(1) + case ACTION_SKIP: + u.Log.Debug("User skip this service") + return + case ACTION_YES: + break ask + default: + u.Log.Fatal("Should not be here") } + } - if i == 0 { - s.runHook(EARLY, "service/update", "update") - defer s.runHook(LATE, "service/update", "update") - } + if atomic.LoadUint32(&globalUpdater) == 0 { + atomic.AddUint32(&globalUpdater, 1) + s.runHook(EARLY, "service/update", "update") + defer s.runHook(LATE, "service/update", "update") + } else { + atomic.AddUint32(&globalUpdater, 1) + } - u.UpdateInside("service/update") - time.Sleep(time.Second * 2) + u.UpdateInside("service/update") + time.Sleep(time.Second * 2) +} + +var globalUpdater uint32 = 0 + +func (s *Service) concurrentUpdater(units []string) { + wg := &sync.WaitGroup{} + updateChan := make(chan service.Unit) + for i := 0; i < s.manifest.ConcurrentUpdater; i++ { + wg.Add(1) + go func() { + for unit := range updateChan { + s.updateUnit(unit) + } + wg.Done() + }() } - s.Unlock("service/update") - lock = false - return nil + + for _, unit := range units { + u := s.LoadUnit(unit) + updateChan <- *u + } + close(updateChan) + wg.Wait() +} + +////////////////////////////////////////////////////////// +func askToProcessService(unit service.Unit) Action { + reader := bufio.NewReader(os.Stdin) + for { + fmt.Print("Update unit " + ansi.LightGreen + unit.Name + ansi.Reset + " ? : (yes,skip,diff,quit) ") + text, _ := reader.ReadString('\n') + t := strings.ToLower(strings.Trim(text, " \n")) + if t == "o" || t == "y" || t == "ok" || t == "yes" { + return ACTION_YES + } + if t == "s" || t == "skip" { + return ACTION_SKIP + } + if t == "d" || t == "diff" { + return ACTION_DIFF + } + if t == "q" || t == "quit" { + return ACTION_QUIT + } + continue + } + return ACTION_QUIT } diff --git a/work/env/service.go b/work/env/service.go index 32fa9d0..da1723c 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -1,9 +1,7 @@ package env import ( - "bufio" "encoding/json" - "fmt" "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" @@ -13,11 +11,9 @@ import ( "github.com/blablacar/ggn/work/env/service" "github.com/coreos/etcd/client" "github.com/juju/errors" - "github.com/mgutz/ansi" "golang.org/x/net/context" "gopkg.in/yaml.v2" "io/ioutil" - "os" "strings" "time" ) @@ -190,29 +186,6 @@ const ( ACTION_QUIT ) -func (s *Service) askToProcessService(index int, unit *service.Unit) Action { - reader := bufio.NewReader(os.Stdin) - for { - fmt.Print("Update unit " + ansi.LightGreen + unit.Name + ansi.Reset + " ? : (yes,skip,diff,quit) ") - text, _ := reader.ReadString('\n') - t := strings.ToLower(strings.Trim(text, " \n")) - if t == "o" || t == "y" || t == "ok" || t == "yes" { - return ACTION_YES - } - if t == "s" || t == "skip" { - return ACTION_SKIP - } - if t == "d" || t == "diff" { - return ACTION_DIFF - } - if t == "q" || t == "quit" { - return ACTION_QUIT - } - continue - } - return ACTION_QUIT -} - const EARLY = true const LATE = false @@ -273,5 +246,11 @@ func (s *Service) loadManifest() { if err != nil { s.log.WithError(err).Fatal("Cannot Read service manifest") } + + if manifest.ConcurrentUpdater == 0 { + manifest.ConcurrentUpdater = 1 + } + + s.log.WithField("manifest", manifest).Debug("Manifest loaded") s.manifest = manifest } From 03fb6b96d130c472ce7322fe57763ad4012d9cc8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 11 Dec 2015 15:48:54 +0100 Subject: [PATCH 081/163] [#20] add timer unit support --- commands/prepare-service.go | 6 +--- spec/unit.go | 21 +++++++++++- work/env/service-generate.go | 30 +++++++++++------ work/env/service-update.go | 8 +---- work/env/service.go | 54 ++++++++++++++----------------- work/env/service/unit-generate.go | 2 +- work/env/service/unit.go | 21 ++++++++---- 7 files changed, 83 insertions(+), 59 deletions(-) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 4312c9f..651ac1c 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -98,11 +98,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { // return nil // }) - units, err := service.ListUnits() - if err != nil { - logrus.WithError(err).Fatal("Cannot list units to generate arguments") - } - for _, unitName := range units { + for _, unitName := range service.ListUnits() { unit := service.LoadUnit(unitName) serviceCmd.AddCommand(prepareUnitCommands(unit)) } diff --git a/spec/unit.go b/spec/unit.go index 6812ab7..7ff1bf0 100644 --- a/spec/unit.go +++ b/spec/unit.go @@ -1,8 +1,27 @@ package spec -const PATH_UNIT_TEMPLATE = "/unit.tmpl" +const PATH_UNIT_SERVICE_TEMPLATE = "/unit.tmpl" +const PATH_UNIT_TIMER_TEMPLATE = "/unit.timer.tmpl" + +type UnitType int + +const ( + TYPE_SERVICE UnitType = iota + TYPE_TIMER +) + +func (u UnitType) String() string { + switch u { + case TYPE_SERVICE: + return ".service" + case TYPE_TIMER: + return ".timer" + } + return "" +} type Unit interface { + GetType() UnitType GetName() string GetService() Service } diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 141d44b..c86a61a 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -7,6 +7,7 @@ import ( cntspec "github.com/blablacar/cnt/spec" "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/spec" + "github.com/blablacar/ggn/utils" "io/ioutil" "net/http" "strings" @@ -15,24 +16,33 @@ import ( func (s Service) Generate() { s.log.Debug("Generating units") - tmpl, err := s.loadUnitTemplate() + serviceTmpl, err := s.loadUnitTemplate(spec.PATH_UNIT_SERVICE_TEMPLATE) if err != nil { - s.log.WithError(err).Error("Cannot load units template") - return + s.log.WithError(err).Fatal("Cannot load service template") + } + + var timerTmpl *utils.Templating + if s.hasTimer { + timerTmpl, err = s.loadUnitTemplate(spec.PATH_UNIT_TIMER_TEMPLATE) + if err != nil { + s.log.WithError(err).Fatal("Cannot load timer template") + } } if len(s.nodesAsJsonMap) == 0 { - s.log.Error("No node to process in manifest") + s.log.Fatal("No node to process in manifest") return } - for i, node := range s.nodesAsJsonMap { - hostname := node.(map[string]interface{})[spec.NODE_HOSTNAME].(string) - if hostname == "" { - s.log.WithField("index", i).Error("hostname is mandatory in node informations") + for _, unitName := range s.ListUnits() { + unit := s.LoadUnit(unitName) + if unit.GetType() == spec.TYPE_SERVICE { + unit.Generate(serviceTmpl) + } else if unit.GetType() == spec.TYPE_TIMER { + unit.Generate(timerTmpl) + } else { + unit.Log.WithField("type", unit.GetType()).Fatal("Unknown unit type") } - unit := s.LoadUnit(hostname) - unit.Generate(tmpl) } } diff --git a/work/env/service-update.go b/work/env/service-update.go index 5d2ac5a..03f0813 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -5,7 +5,6 @@ import ( "fmt" "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/work/env/service" - "github.com/juju/errors" "github.com/mgutz/ansi" "os" "strings" @@ -21,16 +20,11 @@ func (s *Service) Update() error { s.Lock("service/update", 1*time.Hour, "Updating") defer s.Unlock("service/update") - units, err := s.ListUnits() - if err != nil { - return errors.Annotate(err, "Cannot list units to update") - } - if s.manifest.ConcurrentUpdater > 1 && !builder.BuildFlags.Yes { s.log.Fatal("Update concurrently require -y") } - s.concurrentUpdater(units) + s.concurrentUpdater(s.ListUnits()) return nil } diff --git a/work/env/service.go b/work/env/service.go index da1723c..c133f58 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -14,6 +14,7 @@ import ( "golang.org/x/net/context" "gopkg.in/yaml.v2" "io/ioutil" + "os" "strings" "time" ) @@ -22,6 +23,7 @@ type Service struct { env spec.Env path string Name string + hasTimer bool manifest spec.ServiceManifest nodesAsJsonMap []interface{} log log.Entry @@ -31,13 +33,21 @@ type Service struct { func NewService(path string, name string, env spec.Env) *Service { l := env.GetLog() + + hasTimer := false + if _, err := os.Stat(path + "/" + name + spec.PATH_UNIT_TIMER_TEMPLATE); err == nil { + hasTimer = true + } + service := &Service{ + hasTimer: hasTimer, log: *l.WithField("service", name), path: path + "/" + name, Name: name, env: env, lockPath: "/ggn-lock/" + name + "/lock", } + service.loadManifest() service.loadAttributes() service.prepareNodesAsJsonMap() @@ -87,43 +97,30 @@ func (s *Service) GetLog() logrus.Entry { return s.log } -func (s *Service) LoadUnit(hostname string) *service.Unit { - unit := service.NewUnit(s.path+"/units", hostname, s) - return unit +func (s *Service) LoadUnit(name string) *service.Unit { + if strings.HasSuffix(name, spec.TYPE_TIMER.String()) { + return service.NewUnit(s.path+"/units", name[:len(name)-len(spec.TYPE_TIMER.String())], spec.TYPE_TIMER, s) + } + return service.NewUnit(s.path+"/units", name, spec.TYPE_SERVICE, s) } func (s *Service) Diff() { s.Generate() - units, err := s.ListUnits() - if err != nil { - s.log.WithError(err).Fatal("Cannot list units to run diff") - } - for _, unitName := range units { + for _, unitName := range s.ListUnits() { unit := s.LoadUnit(unitName) unit.Diff("service/diff") } } -func (s *Service) ListUnits() ([]string, error) { +func (s *Service) ListUnits() []string { res := []string{} - if len(s.nodesAsJsonMap) == 0 { - return res, nil - } - - if s.nodesAsJsonMap[0].(map[string]interface{})[spec.NODE_HOSTNAME].(string) == "*" { - machines, err := s.env.ListMachineNames() - if err != nil { - return nil, errors.Annotate(err, "Cannot generate unit list from list of machines") - } - for _, node := range machines { - res = append(res, node) - } - } else { - for _, node := range s.nodesAsJsonMap { - res = append(res, node.(map[string]interface{})[spec.NODE_HOSTNAME].(string)) + for _, node := range s.nodesAsJsonMap { + res = append(res, node.(map[string]interface{})[spec.NODE_HOSTNAME].(string)) + if s.hasTimer { + res = append(res, node.(map[string]interface{})[spec.NODE_HOSTNAME].(string)+".timer") } } - return res, nil + return res } func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this method should be in unit @@ -220,15 +217,14 @@ func (s *Service) loadAttributes() { s.log.WithField("attributes", s.attributes).Debug("Attributes loaded") } -func (s *Service) loadUnitTemplate() (*utils.Templating, error) { - path := s.path + spec.PATH_UNIT_TEMPLATE +func (s *Service) loadUnitTemplate(filename string) (*utils.Templating, error) { + path := s.path + filename source, err := ioutil.ReadFile(path) if err != nil { return nil, errors.Annotate(err, "Cannot read unit template file") } template := utils.NewTemplating(s.Name, string(source)) - template.Parse() - return template, nil + return template, template.Parse() } func (s *Service) manifestPath() string { diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index fe8e05d..ba3e5e4 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -41,7 +41,7 @@ func (u Unit) Generate(tmpl *utils.Templating) { func (u Unit) GenerateAttributes() map[string]interface{} { data := utils.CopyMap(u.Service.GetAttributes()) - data = mergemap.Merge(data, u.Service.NodeAttributes(u.Name)) + data = mergemap.Merge(data, u.Service.NodeAttributes(u.hostname)) return data } diff --git a/work/env/service/unit.go b/work/env/service/unit.go index e21839a..2cd612c 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -16,32 +16,41 @@ import ( type Unit struct { Log logrus.Entry + Type spec.UnitType path string Name string + hostname string Filename string unitPath string Service spec.Service } -func NewUnit(path string, hostname string, service spec.Service) *Unit { +func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Service) *Unit { l := service.GetLog() - unitInfo := strings.Split(hostname, "_") - if len(unitInfo) != 3 { - } + filename := service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + utype.String() - filename := service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + ".service" + name := hostname + if utype != spec.TYPE_SERVICE { + name += utype.String() + } unit := &Unit{ + Type: utype, Log: *l.WithField("unit", hostname), Service: service, path: path, - Name: hostname, + hostname: hostname, + Name: name, Filename: filename, unitPath: path + "/" + filename, } return unit } +func (u *Unit) GetType() spec.UnitType { + return u.Type +} + func (u *Unit) GetName() string { return u.Name } From 750700e8e1cb5ff8601c003c183df2995ae09f4e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 11 Dec 2015 16:15:39 +0100 Subject: [PATCH 082/163] only load service associated to a timer when update --- spec/service.go | 1 + work/env/service.go | 4 ++++ work/env/service/unit-command.go | 5 +++++ work/env/service/unit.go | 6 +++++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/spec/service.go b/spec/service.go index 7520e92..6b25ed1 100644 --- a/spec/service.go +++ b/spec/service.go @@ -25,6 +25,7 @@ type ServiceManifest struct { } type Service interface { + HasTimer() bool PrepareAciList() string NodeAttributes(hostname string) map[string]interface{} GetAttributes() map[string]interface{} diff --git a/work/env/service.go b/work/env/service.go index c133f58..74c90dc 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -81,6 +81,10 @@ func (s *Service) prepareNodesAsJsonMap() { s.nodesAsJsonMap = res } +func (s *Service) HasTimer() bool { + return s.hasTimer +} + func (s *Service) GetAttributes() map[string]interface{} { return s.attributes } diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index 072fce7..0137ea3 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -3,6 +3,7 @@ package service import ( "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/builder" + "github.com/blablacar/ggn/spec" "os" "strconv" "time" @@ -42,6 +43,10 @@ func (u *Unit) Destroy(command string) error { func (u *Unit) Restart(command string) error { u.Log.Debug("restart") + if u.Type == spec.TYPE_SERVICE && u.Service.HasTimer() { + u.Log.Fatal("You cannot restart a service associated to a time") + } + u.runHook(EARLY, command, "restart") defer u.runHook(LATE, command, "restart") diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 2cd612c..1704fd3 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -116,7 +116,11 @@ func (u *Unit) GetUnitContentAsFleeted() (string, error) { func (u *Unit) UpdateInside(command string) { u.Destroy(command) time.Sleep(time.Second * 2) - u.Start(command) + if u.Type == spec.TYPE_SERVICE && u.Service.HasTimer() { + u.Load(command) + } else { + u.Start(command) + } } func (u *Unit) DisplayDiff() error { From 5394a4ed814ccf06d8025df0ced5b66d818c4b05 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 11 Dec 2015 17:01:17 +0100 Subject: [PATCH 083/163] [#32] run check concurrently --- work/env-check.go | 48 ++++++++++++++++++++++++++++----------- work/env.go | 4 +++- work/env/service-check.go | 38 ++++++++++++++++++------------- 3 files changed, 60 insertions(+), 30 deletions(-) diff --git a/work/env-check.go b/work/env-check.go index 672ce7c..b40198e 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -2,7 +2,7 @@ package work import ( "github.com/blablacar/ggn/spec" - "strings" + "sync" ) func (e Env) Check() { @@ -12,22 +12,44 @@ func (e Env) Check() { e.RunEarlyHook(info) defer e.RunLateHook(info) - e.Generate() + e.concurrentChecker(e.ListServices()) - units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") - if err != nil { - e.log.WithError(err).Fatal("Cannot list unit files") + // e.Generate() + + // units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + // if err != nil { + // e.log.WithError(err).Fatal("Cannot list unit files") + // } + // + // for _, unitName := range strings.Split(units, "\n") { + // unitInfo := strings.Split(unitName, "_") + // if len(unitInfo) != 3 { + // e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") + // continue + // } + // split := strings.Split(unitInfo[2], ".") + // e.LoadService(unitInfo[1]).LoadUnit(split[0]).Check("env/check") + // } +} + +func (e Env) concurrentChecker(services []string) { + wg := &sync.WaitGroup{} + aChan := make(chan string) + for i := 0; i < 3; i++ { + wg.Add(1) + go func() { + for service := range aChan { + e.LoadService(service).Check() + } + wg.Done() + }() } - for _, unitName := range strings.Split(units, "\n") { - unitInfo := strings.Split(unitName, "_") - if len(unitInfo) != 3 { - e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") - continue - } - split := strings.Split(unitInfo[2], ".") - e.LoadService(unitInfo[1]).LoadUnit(split[0]).Check("env/check") + for _, service := range services { + aChan <- service } + close(aChan) + wg.Wait() } //import ( diff --git a/work/env.go b/work/env.go index 13947a1..769d247 100644 --- a/work/env.go +++ b/work/env.go @@ -175,7 +175,9 @@ func (e Env) runHook(path string, info spec.HookInfo) { if info.Unit != nil { os.Setenv("UNIT", info.Unit.GetName()) } - os.Setenv("SERVICE", info.Service.GetName()) + if info.Service != nil { + os.Setenv("SERVICE", info.Service.GetName()) + } os.Setenv("WHO", ggn.GetUserAndHost()) os.Setenv("ACTION", info.Action) os.Setenv("ATTRIBUTES", info.Attributes) diff --git a/work/env/service-check.go b/work/env/service-check.go index 57cb2fa..0ec47dd 100644 --- a/work/env/service-check.go +++ b/work/env/service-check.go @@ -1,7 +1,7 @@ package env import ( - "strings" + "sync" ) func (s *Service) Check() { @@ -9,23 +9,29 @@ func (s *Service) Check() { s.runHook(EARLY, "service/check", "check") defer s.runHook(LATE, "service/check", "check") - s.Generate() + s.concurrentChecker(s.ListUnits()) - units, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") - if err != nil { - s.log.WithError(err).Fatal("Cannot list unit files") - } + // for _, unitName := range s.ListUnits() { + // s.LoadUnit(unitName).Check("service/check") + // } +} - for _, unitName := range strings.Split(units, "\n") { - unitInfo := strings.Split(unitName, "_") - if len(unitInfo) != 3 { - continue - } - if unitInfo[1] != s.Name { - continue - } - split := strings.Split(unitInfo[2], ".") +func (s *Service) concurrentChecker(units []string) { + wg := &sync.WaitGroup{} + aChan := make(chan string) + for i := 0; i < 5; i++ { + wg.Add(1) + go func() { + for unit := range aChan { + s.LoadUnit(unit).Check("service/check") + } + wg.Done() + }() + } - s.LoadUnit(split[0]).Check("service/check") + for _, unit := range units { + aChan <- unit } + close(aChan) + wg.Wait() } From fc76b254ce703bd660093606046227dc7be91270 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 11 Dec 2015 18:08:30 +0100 Subject: [PATCH 084/163] ensure we will use the same objects and generate only once during run --- work/env.go | 23 ++++++++++++++++++----- work/env/service-generate.go | 24 ++++++++++++++++++++++-- work/env/service.go | 21 +++++++++++++++++++-- work/env/service/unit-generate.go | 13 ++++++++++++- work/env/service/unit.go | 19 +++++++++++-------- 5 files changed, 82 insertions(+), 18 deletions(-) diff --git a/work/env.go b/work/env.go index 769d247..885147e 100644 --- a/work/env.go +++ b/work/env.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "os" "strings" + "sync" "time" ) @@ -37,6 +38,7 @@ type Env struct { log logrus.Entry attributes map[string]interface{} config Config + services map[string]*env.Service } func NewEnvironment(root string, name string) *Env { @@ -48,10 +50,11 @@ func NewEnvironment(root string, name string) *Env { } env := &Env{ - path: path, - name: name, - log: log, - config: Config{}, + services: map[string]*env.Service{}, + path: path, + name: name, + log: log, + config: Config{}, } env.loadAttributes() env.loadConfig() @@ -71,7 +74,17 @@ func (e Env) GetAttributes() map[string]interface{} { } func (e Env) LoadService(name string) *env.Service { - return env.NewService(e.path+"/services", name, e) + var mutex = &sync.Mutex{} + mutex.Lock() + defer mutex.Unlock() + + if val, ok := e.services[name]; ok { + return val + } + + service := env.NewService(e.path+"/services", name, e) + e.services[name] = service + return service } func (e Env) attributesDir() string { diff --git a/work/env/service-generate.go b/work/env/service-generate.go index c86a61a..10ab7df 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -11,9 +11,18 @@ import ( "io/ioutil" "net/http" "strings" + "sync" ) -func (s Service) Generate() { +func (s *Service) Generate() { + var mutex = &sync.Mutex{} + mutex.Lock() + defer mutex.Unlock() + + if s.generated { + return + } + s.log.Debug("Generating units") serviceTmpl, err := s.loadUnitTemplate(spec.PATH_UNIT_SERVICE_TEMPLATE) @@ -44,6 +53,7 @@ func (s Service) Generate() { unit.Log.WithField("type", unit.GetType()).Fatal("Unknown unit type") } } + s.generated = true } func (s Service) NodeAttributes(hostname string) map[string]interface{} { @@ -164,11 +174,20 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { } } -func (s Service) PrepareAciList() string { +func (s *Service) PrepareAciList() string { + if len(s.manifest.Containers) == 0 { return "" } + var mutex = &sync.Mutex{} + mutex.Lock() + defer mutex.Unlock() + + if s.aciList != "" { + return s.aciList + } + override := s.sources(builder.BuildFlags.GenerateManifests) s.log.WithField("data", override).Debug("Local resolved sources") @@ -208,5 +227,6 @@ func (s Service) PrepareAciList() string { if acis == "" { s.log.Error("Aci list is empty after discovery") } + s.aciList = acis return acis } diff --git a/work/env/service.go b/work/env/service.go index 74c90dc..92728c9 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "os" "strings" + "sync" "time" ) @@ -29,6 +30,9 @@ type Service struct { log log.Entry lockPath string attributes map[string]interface{} + generated bool + units map[string]*service.Unit + aciList string } func NewService(path string, name string, env spec.Env) *Service { @@ -40,6 +44,7 @@ func NewService(path string, name string, env spec.Env) *Service { } service := &Service{ + units: map[string]*service.Unit{}, hasTimer: hasTimer, log: *l.WithField("service", name), path: path + "/" + name, @@ -48,6 +53,8 @@ func NewService(path string, name string, env spec.Env) *Service { lockPath: "/ggn-lock/" + name + "/lock", } + service.log.Debug("New Service") + service.loadManifest() service.loadAttributes() service.prepareNodesAsJsonMap() @@ -102,10 +109,20 @@ func (s *Service) GetLog() logrus.Entry { } func (s *Service) LoadUnit(name string) *service.Unit { + var mutex = &sync.Mutex{} + mutex.Lock() + defer mutex.Unlock() + + if val, ok := s.units[name]; ok { + return val + } + var unit *service.Unit if strings.HasSuffix(name, spec.TYPE_TIMER.String()) { - return service.NewUnit(s.path+"/units", name[:len(name)-len(spec.TYPE_TIMER.String())], spec.TYPE_TIMER, s) + unit = service.NewUnit(s.path+"/units", name[:len(name)-len(spec.TYPE_TIMER.String())], spec.TYPE_TIMER, s) } - return service.NewUnit(s.path+"/units", name, spec.TYPE_SERVICE, s) + unit = service.NewUnit(s.path+"/units", name, spec.TYPE_SERVICE, s) + s.units[name] = unit + return unit } func (s *Service) Diff() { diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index ba3e5e4..12f6a38 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -9,9 +9,18 @@ import ( "os" "strconv" "strings" + "sync" ) -func (u Unit) Generate(tmpl *utils.Templating) { +func (u *Unit) Generate(tmpl *utils.Templating) { + var mutex = &sync.Mutex{} + mutex.Lock() + defer mutex.Unlock() + + if u.generated { + return + } + u.Log.Debug("Generate") data := u.GenerateAttributes() data["acis"] = u.Service.PrepareAciList() @@ -37,6 +46,8 @@ func (u Unit) Generate(tmpl *utils.Templating) { if err != nil { u.Log.WithError(err).WithField("path", u.path+"/"+u.Filename).Error("Cannot writer unit") } + + u.generated = true } func (u Unit) GenerateAttributes() map[string]interface{} { diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 1704fd3..07d35d3 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -15,14 +15,15 @@ import ( ) type Unit struct { - Log logrus.Entry - Type spec.UnitType - path string - Name string - hostname string - Filename string - unitPath string - Service spec.Service + Log logrus.Entry + Type spec.UnitType + path string + Name string + hostname string + Filename string + unitPath string + Service spec.Service + generated bool } func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Service) *Unit { @@ -44,6 +45,8 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser Filename: filename, unitPath: path + "/" + filename, } + unit.Log.Debug("New unit") + return unit } From 386dd4cc3506bd2b470e12afee913e6b2eed7d44 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 11 Dec 2015 18:39:27 +0100 Subject: [PATCH 085/163] fix mutex usage --- work/env-list-units.go | 5 +++++ work/env.go | 29 ++++++++++++------------ work/env/service-generate.go | 11 ++++----- work/env/service.go | 25 ++++++++++++--------- work/env/service/unit-generate.go | 6 ++--- work/env/service/unit.go | 37 +++++++++++++++++-------------- 6 files changed, 61 insertions(+), 52 deletions(-) diff --git a/work/env-list-units.go b/work/env-list-units.go index 675fe05..9c7d738 100644 --- a/work/env-list-units.go +++ b/work/env-list-units.go @@ -4,11 +4,16 @@ import ( "bufio" "github.com/blablacar/ggn/spec" "strings" + "sync" ) var statusCache map[string]spec.UnitStatus +var mutex = &sync.Mutex{} func (e Env) ListUnits() map[string]spec.UnitStatus { + mutex.Lock() + defer mutex.Unlock() + if statusCache != nil { return statusCache } diff --git a/work/env.go b/work/env.go index 885147e..83de333 100644 --- a/work/env.go +++ b/work/env.go @@ -33,12 +33,13 @@ type Config struct { } type Env struct { - path string - name string - log logrus.Entry - attributes map[string]interface{} - config Config - services map[string]*env.Service + path string + name string + log logrus.Entry + attributes map[string]interface{} + config Config + services map[string]*env.Service + servicesMutex *sync.Mutex } func NewEnvironment(root string, name string) *Env { @@ -50,11 +51,12 @@ func NewEnvironment(root string, name string) *Env { } env := &Env{ - services: map[string]*env.Service{}, - path: path, - name: name, - log: log, - config: Config{}, + services: map[string]*env.Service{}, + servicesMutex: &sync.Mutex{}, + path: path, + name: name, + log: log, + config: Config{}, } env.loadAttributes() env.loadConfig() @@ -74,9 +76,8 @@ func (e Env) GetAttributes() map[string]interface{} { } func (e Env) LoadService(name string) *env.Service { - var mutex = &sync.Mutex{} - mutex.Lock() - defer mutex.Unlock() + e.servicesMutex.Lock() + defer e.servicesMutex.Unlock() if val, ok := e.services[name]; ok { return val diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 10ab7df..62b6b77 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -11,13 +11,11 @@ import ( "io/ioutil" "net/http" "strings" - "sync" ) func (s *Service) Generate() { - var mutex = &sync.Mutex{} - mutex.Lock() - defer mutex.Unlock() + s.generatedMutex.Lock() + defer s.generatedMutex.Unlock() if s.generated { return @@ -180,9 +178,8 @@ func (s *Service) PrepareAciList() string { return "" } - var mutex = &sync.Mutex{} - mutex.Lock() - defer mutex.Unlock() + s.aciListMutex.Lock() + defer s.aciListMutex.Unlock() if s.aciList != "" { return s.aciList diff --git a/work/env/service.go b/work/env/service.go index 92728c9..6154c25 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -31,8 +31,11 @@ type Service struct { lockPath string attributes map[string]interface{} generated bool + generatedMutex *sync.Mutex units map[string]*service.Unit + unitsMutex *sync.Mutex aciList string + aciListMutex *sync.Mutex } func NewService(path string, name string, env spec.Env) *Service { @@ -44,13 +47,16 @@ func NewService(path string, name string, env spec.Env) *Service { } service := &Service{ - units: map[string]*service.Unit{}, - hasTimer: hasTimer, - log: *l.WithField("service", name), - path: path + "/" + name, - Name: name, - env: env, - lockPath: "/ggn-lock/" + name + "/lock", + units: map[string]*service.Unit{}, + unitsMutex: &sync.Mutex{}, + aciListMutex: &sync.Mutex{}, + generatedMutex: &sync.Mutex{}, + hasTimer: hasTimer, + log: *l.WithField("service", name), + path: path + "/" + name, + Name: name, + env: env, + lockPath: "/ggn-lock/" + name + "/lock", } service.log.Debug("New Service") @@ -109,9 +115,8 @@ func (s *Service) GetLog() logrus.Entry { } func (s *Service) LoadUnit(name string) *service.Unit { - var mutex = &sync.Mutex{} - mutex.Lock() - defer mutex.Unlock() + s.unitsMutex.Lock() + defer s.unitsMutex.Unlock() if val, ok := s.units[name]; ok { return val diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index 12f6a38..e312528 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -9,13 +9,11 @@ import ( "os" "strconv" "strings" - "sync" ) func (u *Unit) Generate(tmpl *utils.Templating) { - var mutex = &sync.Mutex{} - mutex.Lock() - defer mutex.Unlock() + u.generatedMutex.Lock() + defer u.generatedMutex.Unlock() if u.generated { return diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 07d35d3..4e789b0 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -11,19 +11,21 @@ import ( "io/ioutil" "os" "strings" + "sync" "time" ) type Unit struct { - Log logrus.Entry - Type spec.UnitType - path string - Name string - hostname string - Filename string - unitPath string - Service spec.Service - generated bool + Log logrus.Entry + Type spec.UnitType + path string + Name string + hostname string + Filename string + unitPath string + Service spec.Service + generated bool + generatedMutex *sync.Mutex } func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Service) *Unit { @@ -36,14 +38,15 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser name += utype.String() } unit := &Unit{ - Type: utype, - Log: *l.WithField("unit", hostname), - Service: service, - path: path, - hostname: hostname, - Name: name, - Filename: filename, - unitPath: path + "/" + filename, + generatedMutex: &sync.Mutex{}, + Type: utype, + Log: *l.WithField("unit", hostname), + Service: service, + path: path, + hostname: hostname, + Name: name, + Filename: filename, + unitPath: path + "/" + filename, } unit.Log.Debug("New unit") From 0c98df94c3778f58fad580dee15028d70d12c893 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 10:57:14 +0100 Subject: [PATCH 086/163] add list-units on env/service --- commands/prepare-env.go | 10 +++++++++- commands/prepare-service.go | 10 +++++++++- work/env.go | 12 ++++++++++++ work/env/service.go | 16 ++++++++++++++++ 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/commands/prepare-env.go b/commands/prepare-env.go index 2791271..b892368 100644 --- a/commands/prepare-env.go +++ b/commands/prepare-env.go @@ -27,6 +27,14 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { }, } + listUnitsCmd := &cobra.Command{ + Use: "list-units", + Short: "Run list-units command on " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + env.FleetctlListUnits() + }, + } + generateCmd := &cobra.Command{ Use: "generate", Short: "Generate units for " + env.GetName(), @@ -34,7 +42,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { env.Generate() }, } - envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd) + envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, listUnitsCmd) for _, serviceName := range env.ListServices() { service := env.LoadService(serviceName) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 651ac1c..c3aa661 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -71,6 +71,14 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { }, } + listCmd := &cobra.Command{ + Use: "list-units", + Short: "list-units on " + service.Name + " on env " + service.GetEnv().GetName(), + Run: func(cmd *cobra.Command, args []string) { + service.FleetListUnits("service/unlock") + }, + } + updateCmd := &cobra.Command{ Use: "update", Short: "update " + service.Name + " on env " + service.GetEnv().GetName(), @@ -86,7 +94,7 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") - serviceCmd.AddCommand(generateCmd, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd) + serviceCmd.AddCommand(generateCmd, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd, listCmd) // var units []string // hystrix.Go("list_units", func() error { diff --git a/work/env.go b/work/env.go index 83de333..63a4219 100644 --- a/work/env.go +++ b/work/env.go @@ -75,6 +75,18 @@ func (e Env) GetAttributes() map[string]interface{} { return e.attributes } +func (e Env) FleetctlListUnits() { + stdout, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-units", "--full", "--no-legend") + if err != nil { + e.log.WithError(err).Fatal("Failed to list-units") + } + + unitStatuses := strings.Split(stdout, "\n") + for _, unitStatus := range unitStatuses { + fmt.Println(unitStatus) + } +} + func (e Env) LoadService(name string) *env.Service { e.servicesMutex.Lock() defer e.servicesMutex.Unlock() diff --git a/work/env/service.go b/work/env/service.go index 6154c25..6a693d2 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -2,6 +2,7 @@ package env import ( "encoding/json" + "fmt" "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" @@ -157,6 +158,21 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this return stdout, err } +func (s *Service) FleetListUnits(command string) { + stdout, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-units", "--full", "--no-legend") + if err != nil { + s.log.WithError(err).Fatal("Failed to list-units") + } + + unitStatuses := strings.Split(stdout, "\n") + prefix := s.env.GetName() + "_" + s.Name + "_" + for _, unitStatus := range unitStatuses { + if strings.HasPrefix(unitStatus, prefix) { + fmt.Println(unitStatus) + } + } +} + func (s *Service) Unlock(command string) { s.log.Info("Unlocking") s.runHook(EARLY, command, "unlock") From 35ddfcf884632b809bbc410a82d53bb35f32631b Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 11:24:27 +0100 Subject: [PATCH 087/163] add service update log to see where we are globally on units update --- work/env/service-update.go | 1 + 1 file changed, 1 insertion(+) diff --git a/work/env/service-update.go b/work/env/service-update.go index 03f0813..44ff2ea 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -72,6 +72,7 @@ ask: atomic.AddUint32(&globalUpdater, 1) } + u.Log.Info("Updating unit") u.UpdateInside("service/update") time.Sleep(time.Second * 2) From bad8878002442156e76beb320d19f4d3b927fdac Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 13:57:35 +0100 Subject: [PATCH 088/163] Update README.md --- README.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cacae21..ee4a7f9 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,81 @@ [![GoDoc](https://godoc.org/blablacar/ggn?status.png)](https://godoc.org/github.com/blablacar/ggn) [![Build Status](https://travis-ci.org/blablacar/ggn.svg?branch=master)](https://travis-ci.org/blablacar/ggn) +GGN uses a tree structure to describe envs and services in envs. It will generate systemd units based on information taken in the directories and send them to the environment using fleet. + +# directory structure + +dev +|-- attributes +| `-- dns.yml # Attributes of this env (dns suffix, dns servers IPs, zookeeper IPs, ...) +|-- services # list of services in this env +| |-- loadbalancer +| | |-- attributes # loadbalancer attributes in this env +| | | `-- nginx.yml # any structure configuration +| | |-- unit.tmpl # template to generate the systemd's unit +| | `-- service-manifest.yml # manifest for this service +| |-- cassandra +| | |-- attributes +| | | |-- cassandra.yml # cassandra configuration for this env (DC name, seeds nodes, cluster name) +| | | `-- datastax-agent.yml # another configuration file that will be merged with the other one +| | `-- service-manifest.yml +| ... +|-- config.yml # configuration of this env (fleet) +prod-DC1 +... +prod-DC2 +... +preprod +... # commands + +Some command example : + ```bash -ggn generate generate all units for all envs -ggn prod-XXX compare local units with what is running in this env -ggn prod-XXX run list-units run fleetctl command on this env -ggn prod-XXX generate generate units for this env +ggn dev redis srv1 start start redis server1 +ggn preprod check check that all units of all services in prepod are running and are up to date +ggn prod cassandra cass1 journal see journal of cass1 systemd unit +ggn prod lb lb1 stop stop lb1 unit in prod +ggn prod cassandra update rolling update of cassandra servers in prod +``` + +Envs commands : +``` +- check check that all units are up to date and running in this env +- fleetctl run custom fleetctl command +- list-units list all units in this env +- generate generate all units in this env +``` + +Services commands: +``` +- generate generate units of this service +- check check that all units of this service are up to date and running +- diff display diff of units between when is generated and what is running in this env +- lock lock this service. nobody will be able to run mutable actions +- unlock unlock the service +- list-units list-units of this service in fleet +- update run a update of all units for this service +``` + +Units commands: +``` +- start start the service +- stop stop the service +- update update the service +- restart restart the service +- destroy destroy the service +- status display fleet status of the unit +- journal display unit's journal +- diff display the diff between genetated and what is running +- check check that the service is running and is up to date +- unload unload the unit +- load load the unit +- ssh ssh on the server's running this unit ``` + # configuration file The configuration file is located at ~/.config/green-garden/config.yml From 15312d969ac774eaa40f68c77c9c8db07d6af5c8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 14:00:12 +0100 Subject: [PATCH 089/163] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ee4a7f9..1408187 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ GGN uses a tree structure to describe envs and services in envs. It will generat # directory structure +``` dev |-- attributes | `-- dns.yml # Attributes of this env (dns suffix, dns servers IPs, zookeeper IPs, ...) @@ -14,7 +15,7 @@ dev | |-- loadbalancer | | |-- attributes # loadbalancer attributes in this env | | | `-- nginx.yml # any structure configuration -| | |-- unit.tmpl # template to generate the systemd's unit +| | |-- unit.tmpl # template uses to generate the systemd's units for loadbalancer | | `-- service-manifest.yml # manifest for this service | |-- cassandra | | |-- attributes @@ -29,6 +30,7 @@ prod-DC2 ... preprod ... +``` # commands From 2be57c8331c1726665506f5f8ad3da3260d86352 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 16:05:18 +0100 Subject: [PATCH 090/163] Update README.md --- README.md | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 1408187..6ba1194 100644 --- a/README.md +++ b/README.md @@ -8,28 +8,29 @@ GGN uses a tree structure to describe envs and services in envs. It will generat # directory structure ``` -dev -|-- attributes -| `-- dns.yml # Attributes of this env (dns suffix, dns servers IPs, zookeeper IPs, ...) -|-- services # list of services in this env -| |-- loadbalancer -| | |-- attributes # loadbalancer attributes in this env -| | | `-- nginx.yml # any structure configuration -| | |-- unit.tmpl # template uses to generate the systemd's units for loadbalancer -| | `-- service-manifest.yml # manifest for this service -| |-- cassandra -| | |-- attributes -| | | |-- cassandra.yml # cassandra configuration for this env (DC name, seeds nodes, cluster name) -| | | `-- datastax-agent.yml # another configuration file that will be merged with the other one -| | `-- service-manifest.yml +env +|-- development +| |-- attributes +| | `-- dns.yml # Attributes of this env (dns suffix, dns servers IPs, zookeeper IPs, ...) +| |-- services # list of services in this env +| | |-- loadbalancer +| | | |-- attributes # loadbalancer attributes in this env +| | | | `-- nginx.yml # any structure configuration +| | | |-- unit.tmpl # template uses to generate the systemd's units for loadbalancer +| | | `-- service-manifest.yml # manifest for this service +| | |-- cassandra +| | | |-- attributes +| | | | |-- cassandra.yml # cassandra configuration for this env (DC name, seeds nodes, cluster name) +| | | | `-- datastax-agent.yml # another configuration file that will be merged with the other one +| | | `-- service-manifest.yml +| | ... +| `-- config.yml # configuration of this env (fleet) +|-- prod-DC1 +| ... +|-- prod-DC2 +| ... +|-- preprod | ... -|-- config.yml # configuration of this env (fleet) -prod-DC1 -... -prod-DC2 -... -preprod -... ``` # commands @@ -37,7 +38,7 @@ preprod Some command example : ```bash -ggn dev redis srv1 start start redis server1 +ggn dev redis srv1 start start redis server1 unit ggn preprod check check that all units of all services in prepod are running and are up to date ggn prod cassandra cass1 journal see journal of cass1 systemd unit ggn prod lb lb1 stop stop lb1 unit in prod @@ -80,12 +81,12 @@ Units commands: ``` -# configuration file +# global configuration file The configuration file is located at ~/.config/green-garden/config.yml ``` -workPath: /home/myuser/build-tools +workPath: /home/myuser/build-tools # root directory of environments. all envs have to be in an env/ directory in it ``` # env directory structure From 796f819ae82372eb67662a5cd8f3cf5d6a9852cd Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 16:08:37 +0100 Subject: [PATCH 091/163] Update README.md --- README.md | 60 +++++++++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 6ba1194..4234975 100644 --- a/README.md +++ b/README.md @@ -89,27 +89,8 @@ The configuration file is located at ~/.config/green-garden/config.yml workPath: /home/myuser/build-tools # root directory of environments. all envs have to be in an env/ directory in it ``` -# env directory structure -```bash -env -└── XXX -    ├── attributes # Attributes file for this env -    │ └── fleet.yml # a list of files defining default attributes for this env -    └── services # services running in this env -    ├── cassandra - │ ├── attributes # attributes directory for this service - │ ├── unit.tml # systemd unit template for this service - │ ├── service-manifest.yml # manifest that give information for this service - │ ├── units # generated units - └── elasticsearch # a list of files defining default attributes for this env - ├── attributes # attributes directory for this service - ├── unit.tml # systemd unit template for this service - ├── service-manifest.yml # manifest that give information for this service - └── units # generated units -``` - -# manifest structure +# service manifest structure ```yaml containers: @@ -118,15 +99,13 @@ containers: nodes: # list of nodes for this service - hostname: cass1 # hostname of the service ip: 10.2.135.136 # any other property used in the template - attributes: # per node attributes configuration - node-id: 1 + node-id: 1 # node special attribute fleet: - MachineMetadata="rack=113" "pos=4" - hostname: cass2 ip: 10.2.143.136 - attributes: - node-id: 2 + node-id: 2 fleet: - MachineMetadata="rack=213" "pos=4" ``` @@ -135,30 +114,31 @@ nodes: # list of nodes for this service ``` [Unit] -Description=pod-cassandra {{.node.hostname}} -After=mnt-sda9-{{.node.hostname}}-mount-sdb1.mount \ - mnt-sda9-{{.node.hostname}}-mount-sdc1.mount \ - mnt-sda9-{{.node.hostname}}-mount-sdd1.mount \ - mnt-sda9-{{.node.hostname}}-mount-sde1.mount \ +Description=pod-cassandra {{.hostname}} +After=mnt-sda9-{{.hostname}}-mount-sdb1.mount \ + mnt-sda9-{{.hostname}}-mount-sdc1.mount \ + mnt-sda9-{{.hostname}}-mount-sdd1.mount \ + mnt-sda9-{{.hostname}}-mount-sde1.mount \ [Service] +{{.environmentAttributes}} ExecStartPre=/opt/bin/rkt gc --grace-period=0s --expire-prepared=0s ExecStartPre=-/opt/bin/rkt image gc ExecStart=/opt/bin/rkt --insecure-skip-verify run \ - --private-net='bond0:IP={{.node.ip}}' \ - --volume=cassandra-mount-1,kind=host,source=/mnt/sda9/{{.node.hostname}}/mount/sdb1 \ - --volume=cassandra-mount-2,kind=host,source=/mnt/sda9/{{.node.hostname}}/mount/sdc1 \ - --volume=cassandra-mount-3,kind=host,source=/mnt/sda9/{{.node.hostname}}/mount/sdd1 \ - --volume=cassandra-mount-4,kind=host,source=/mnt/sda9/{{.node.hostname}}/mount/sde1 \ - --volume=cassandra-commitlog,kind=host,source=/mnt/sda9/{{.node.hostname}}/commitlog \ - --volume=cassandra-savedcaches,kind=host,source=/mnt/sda9/{{.node.hostname}}/saved_caches \ - --set-env=CONFD_OVERRIDE='{{.attributes}}' \ - --set-env=HOSTNAME={{.node.hostname}} \ + --private-net='bond0:IP={{.ip}}' \ + --volume=cassandra-mount-1,kind=host,source=/mnt/sda9/{{.hostname}}/mount/sdb1 \ + --volume=cassandra-mount-2,kind=host,source=/mnt/sda9/{{.hostname}}/mount/sdc1 \ + --volume=cassandra-mount-3,kind=host,source=/mnt/sda9/{{.hostname}}/mount/sdd1 \ + --volume=cassandra-mount-4,kind=host,source=/mnt/sda9/{{.hostname}}/mount/sde1 \ + --volume=cassandra-commitlog,kind=host,source=/mnt/sda9/{{.hostname}}/commitlog \ + --volume=cassandra-savedcaches,kind=host,source=/mnt/sda9/{{.hostname}}/saved_caches \ + --set-env=CONFD_OVERRIDE='{{.environmentAttributesVars}}' \ + --set-env=HOSTNAME={{.hostname}} \ --set-env=DOMAINNAME="{{.domainname}}" \ - {{.node.acis}} + {{.acis}} [X-Fleet] -{{range .node.fleet -}} +{{range .fleet -}} {{- . }} {{end -}} ``` From d6fe3973024d219a9eec9b19808483d115948b49 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 16:11:43 +0100 Subject: [PATCH 092/163] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4234975..2662226 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,7 @@ workPath: /home/myuser/build-tools # root directory of environments. a # service manifest structure ```yaml +concurrentUpdater: 2 # concurrent run when updating the service containers: - aci.example.com/pod-cassandra # list of aci or pod From 9a391a6cfa706f785697388930e919bcccb19d43 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 16:16:19 +0100 Subject: [PATCH 093/163] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 2662226..064b422 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,10 @@ env | ... ``` +Attributes from envs will be merged with attributes from each service and be available in unit template as object tree and also as a json string to embbed it in the start command line. + +configuration of where the unit will be started can be done in the attribute+template system to generate a `[X-Fleet]` unit part (example below). + # commands Some command example : From e718c692d70c69a109cc54a7c2d7358883e36c57 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 14 Dec 2015 18:02:51 +0100 Subject: [PATCH 094/163] rework external program run to support concurrency on env vars --- work/env.go | 54 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/work/env.go b/work/env.go index 63a4219..bdec73c 100644 --- a/work/env.go +++ b/work/env.go @@ -196,23 +196,30 @@ func (e Env) runHook(path string, info spec.HookInfo) { return } - os.Setenv("ENV", e.name) - os.Setenv("COMMAND", info.Command) + envs := map[string]string{} + envs["ENV"] = e.name + envs["COMMAND"] = info.Command if info.Unit != nil { - os.Setenv("UNIT", info.Unit.GetName()) + envs["UNIT"] = info.Unit.GetName() } if info.Service != nil { - os.Setenv("SERVICE", info.Service.GetName()) + envs["SERVICE"] = info.Service.GetName() } - os.Setenv("WHO", ggn.GetUserAndHost()) - os.Setenv("ACTION", info.Action) - os.Setenv("ATTRIBUTES", info.Attributes) + envs["WHO"] = ggn.GetUserAndHost() + envs["ACTION"] = info.Action + envs["ATTRIBUTES"] = info.Attributes for _, f := range files { if !f.IsDir() { hookLog := log.WithField("name", f.Name()) + + args := []string{e.path + PATH_HOOKS + path + "/" + f.Name()} + for key, val := range envs { + args = append([]string{key + "=" + val}, args...) + } + hookLog.Debug("Running Hook") - if err := cntUtils.ExecCmd(e.path + PATH_HOOKS + path + "/" + f.Name()); err != nil { + if err := cntUtils.ExecCmd("bash", "-c", strings.Join(args, " ")); err != nil { hookLog.Fatal("Hook status is failed") } } @@ -225,12 +232,12 @@ const FLEETCTL_STRICT_HOST_KEY_CHECKING = "FLEETCTL_STRICT_HOST_KEY_CHECKING" const FLEETCTL_SUDO = "FLEETCTL_SUDO" func (e Env) RunFleetCmd(args ...string) error { - _, _, err := e.runFleetCmdInternal(false, args...) + _, _, err := e.runFleetCmdInternal(false, args) return err } func (e Env) RunFleetCmdGetOutput(args ...string) (string, string, error) { - return e.runFleetCmdInternal(true, args...) + return e.runFleetCmdInternal(true, args) } func (e Env) EtcdClient() client.KeysAPI { @@ -249,31 +256,32 @@ func (e Env) EtcdClient() client.KeysAPI { return kapi } -func (e Env) runFleetCmdInternal(getOutput bool, args ...string) (string, string, error) { +func (e Env) runFleetCmdInternal(getOutput bool, args []string) (string, string, error) { e.log.WithField("command", strings.Join(args, " ")).Debug("Running command on fleet") if e.config.Fleet.Endpoint == "" { return "", "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") } - endpoint := e.config.Fleet.Endpoint - os.Setenv(FLEETCTL_ENDPOINT, endpoint) + + envs := map[string]string{} + envs[FLEETCTL_ENDPOINT] = e.config.Fleet.Endpoint if e.config.Fleet.Username != "" { - os.Setenv(FLEETCTL_SSH_USERNAME, e.config.Fleet.Username) + envs[FLEETCTL_SSH_USERNAME] = e.config.Fleet.Username + } + envs[FLEETCTL_STRICT_HOST_KEY_CHECKING] = fmt.Sprintf("%t", e.config.Fleet.Strict_host_key_checking) + envs[FLEETCTL_SUDO] = fmt.Sprintf("%t", e.config.Fleet.Sudo) + + args = append([]string{"fleetctl"}, args...) + for key, val := range envs { + args = append([]string{key + "=" + val}, args...) } - os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, fmt.Sprintf("%t", e.config.Fleet.Strict_host_key_checking)) - os.Setenv(FLEETCTL_SUDO, fmt.Sprintf("%t", e.config.Fleet.Sudo)) var stdout string var stderr string var err error if getOutput { - stdout, stderr, err = cntUtils.ExecCmdGetStdoutAndStderr("fleetctl", args...) + stdout, stderr, err = cntUtils.ExecCmdGetStdoutAndStderr("bash", "-c", strings.Join(args, " ")) } else { - err = cntUtils.ExecCmd("fleetctl", args...) + err = cntUtils.ExecCmd("bash", "-c", strings.Join(args, " ")) } - - os.Setenv(FLEETCTL_ENDPOINT, "") - os.Setenv(FLEETCTL_SSH_USERNAME, "") - os.Setenv(FLEETCTL_STRICT_HOST_KEY_CHECKING, "") - os.Setenv(FLEETCTL_SUDO, "") return stdout, stderr, err } From 829179ff12e9277b455a5f86fd93a1f86170ac4e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 15 Dec 2015 14:35:53 +0100 Subject: [PATCH 095/163] fix helper of home-path --- commands/ggn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/ggn.go b/commands/ggn.go index c115309..43dfc65 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -56,7 +56,7 @@ func Execute() { var useless2 string rootCmd.PersistentFlags().StringVarP(&useless2, "log-level", "L", "info", "Set log level") - rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot(), "Set home folder") + rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot()+"/ggn", "Set home folder") rootCmd.PersistentFlags().StringSliceVarP(&builder.BuildFlags.GenerateManifests, "generate-manifest", "M", []string{}, "Manifests used to generate. comma separated") rootCmd.AddCommand(versionCmd, generateCmd, genautocompleteCmd) From 7d7c521cc3f865ceb067b055067f30f670880024 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 15 Dec 2015 14:36:34 +0100 Subject: [PATCH 096/163] fix environment var escape on hook exec --- work/env.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/work/env.go b/work/env.go index bdec73c..d3aa29c 100644 --- a/work/env.go +++ b/work/env.go @@ -215,7 +215,7 @@ func (e Env) runHook(path string, info spec.HookInfo) { args := []string{e.path + PATH_HOOKS + path + "/" + f.Name()} for key, val := range envs { - args = append([]string{key + "=" + val}, args...) + args = append([]string{key + "='" + val + "'"}, args...) } hookLog.Debug("Running Hook") @@ -272,7 +272,7 @@ func (e Env) runFleetCmdInternal(getOutput bool, args []string) (string, string, args = append([]string{"fleetctl"}, args...) for key, val := range envs { - args = append([]string{key + "=" + val}, args...) + args = append([]string{key + "='" + val + "'"}, args...) } var stdout string From 517754a14b4d69bdba110fa6c5cd50687fc932bc Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 15 Dec 2015 14:57:41 +0100 Subject: [PATCH 097/163] update service if already up to date but not running --- work/env/service-update.go | 5 ++++- work/env/service/unit-command.go | 14 +++++++++----- work/env/service/unit.go | 6 +++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/work/env/service-update.go b/work/env/service-update.go index 44ff2ea..2ed08c3 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -37,10 +37,13 @@ ask: } if same { u.Log.Info("Remote service is already up to date") - if !builder.BuildFlags.All { + if !u.IsRunning() { + u.Log.Info("But service is not running") + } else if !builder.BuildFlags.All { return } } + if builder.BuildFlags.Yes { break ask } diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index 0137ea3..aef4ae4 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -10,11 +10,11 @@ import ( ) func (u *Unit) Start(command string) error { - if u.isRunning() { + if u.IsRunning() { u.Log.Info("Service is already running") return nil } - if !u.isLoaded() { + if !u.IsLoaded() { u.Log.Debug("unit is not loaded yet") u.Service.Generate() u.Load(command) @@ -73,9 +73,13 @@ func (u *Unit) Update(command string) error { if err != nil { u.Log.WithError(err).Warn("Cannot compare local and remote service") } - if same && !builder.BuildFlags.Force { - u.Log.Info("Remote service is already up to date, not updating") - return nil + if same { + u.Log.Info("Remote service is already up to date") + if !u.IsRunning() { + u.Log.Info("But service is not running") + } else if !builder.BuildFlags.Force { + return nil + } } u.UpdateInside(command) diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 4e789b0..92d4d31 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -216,15 +216,15 @@ func convertMultilineUnitToString(content []byte) string { return strings.Join(lines, "\n") } -func (u *Unit) isRunning() bool { +func (u *Unit) IsRunning() bool { content, _, _ := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) - if strings.Contains(content, "Active: active (running)") { + if strings.Contains(content, "Active: active (") { return true } return false } -func (u *Unit) isLoaded() bool { +func (u *Unit) IsLoaded() bool { content, _, _ := u.Service.GetEnv().RunFleetCmdGetOutput("status", u.Filename) if strings.Contains(content, "Loaded: loaded") { return true From 8c150d80997ed93fd2ccfd59883594b45cd3ac50 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 16 Dec 2015 17:48:47 +0100 Subject: [PATCH 098/163] backquote envs when running hook --- work/env.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/env.go b/work/env.go index d3aa29c..891bb40 100644 --- a/work/env.go +++ b/work/env.go @@ -215,7 +215,7 @@ func (e Env) runHook(path string, info spec.HookInfo) { args := []string{e.path + PATH_HOOKS + path + "/" + f.Name()} for key, val := range envs { - args = append([]string{key + "='" + val + "'"}, args...) + args = append([]string{key + "=\"" + strings.Replace(val, "\"", "\\\"", -1) + "\""}, args...) } hookLog.Debug("Running Hook") From b82a018c7692b6cf2beddc93d9290a22305a0037 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 17 Dec 2015 11:34:54 +0100 Subject: [PATCH 099/163] support single quote in attributes --- work/env.go | 2 +- work/env/service/unit-generate.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/work/env.go b/work/env.go index 891bb40..96e7006 100644 --- a/work/env.go +++ b/work/env.go @@ -215,7 +215,7 @@ func (e Env) runHook(path string, info spec.HookInfo) { args := []string{e.path + PATH_HOOKS + path + "/" + f.Name()} for key, val := range envs { - args = append([]string{key + "=\"" + strings.Replace(val, "\"", "\\\"", -1) + "\""}, args...) + args = append([]string{key + "='" + strings.Replace(val, "'", "'\"'\"'", -1) + "'"}, args...) } hookLog.Debug("Running Hook") diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index e312528..276ed05 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -27,7 +27,9 @@ func (u *Unit) Generate(tmpl *utils.Templating) { if err != nil { u.Log.WithError(err).Panic("Cannot marshall attributes") } - data["attributes"] = strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + res := strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + res = strings.Replace(res, "'", "\\'", -1) + data["attributes"] = res u.prepareEnvironmentAttributes(data) From 6765262543fc23a8479d7ccfabbdc86e24fb7f04 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 18 Dec 2015 16:39:12 +0100 Subject: [PATCH 100/163] add GG_HOME_PATH env var when running hooks --- work/env.go | 1 + 1 file changed, 1 insertion(+) diff --git a/work/env.go b/work/env.go index 96e7006..f5f2041 100644 --- a/work/env.go +++ b/work/env.go @@ -208,6 +208,7 @@ func (e Env) runHook(path string, info spec.HookInfo) { envs["WHO"] = ggn.GetUserAndHost() envs["ACTION"] = info.Action envs["ATTRIBUTES"] = info.Attributes + envs["GGN_HOME_PATH"] = ggn.Home.Path for _, f := range files { if !f.IsDir() { From b692da9f8e6c13e7fad52414e4d38235f5498de2 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jan 2016 13:22:20 +0100 Subject: [PATCH 101/163] fix timer unit hostname and improve logs --- Godeps/Godeps.json | 21 +- .../src/github.com/appc/spec/aci/build.go | 110 ++++ .../src/github.com/appc/spec/aci/doc.go | 16 + .../src/github.com/appc/spec/aci/file.go | 246 +++++++++ .../src/github.com/appc/spec/aci/layout.go | 187 +++++++ .../src/github.com/appc/spec/aci/writer.go | 98 ++++ .../appc/spec/pkg/device/device_posix.go | 57 ++ .../github.com/appc/spec/pkg/tarheader/doc.go | 17 + .../appc/spec/pkg/tarheader/pop_darwin.go | 39 ++ .../appc/spec/pkg/tarheader/pop_linux.go | 39 ++ .../appc/spec/pkg/tarheader/pop_posix.go | 50 ++ .../appc/spec/pkg/tarheader/tarheader.go | 28 + .../src/github.com/ghodss/yaml/.gitignore | 20 + .../src/github.com/ghodss/yaml/LICENSE | 50 ++ .../src/github.com/ghodss/yaml/README.md | 114 ++++ .../src/github.com/ghodss/yaml/fields.go | 497 ++++++++++++++++++ .../src/github.com/ghodss/yaml/yaml.go | 266 ++++++++++ work/env/service.go | 3 +- work/env/service/unit.go | 4 +- 19 files changed, 1858 insertions(+), 4 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/appc/spec/aci/build.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/aci/doc.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/aci/file.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/aci/layout.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/aci/writer.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/pkg/device/device_posix.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/doc.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_darwin.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_linux.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_posix.go create mode 100644 Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/tarheader.go create mode 100644 Godeps/_workspace/src/github.com/ghodss/yaml/.gitignore create mode 100644 Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE create mode 100644 Godeps/_workspace/src/github.com/ghodss/yaml/README.md create mode 100644 Godeps/_workspace/src/github.com/ghodss/yaml/fields.go create mode 100644 Godeps/_workspace/src/github.com/ghodss/yaml/yaml.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 853fbc9..0984b44 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/blablacar/ggn", - "GoVersion": "go1.5.1", + "GoVersion": "go1.5.2", "Packages": [ "./..." ], @@ -10,11 +10,26 @@ "Comment": "v0.8.7", "Rev": "418b41d23a1bf978c06faea5313ba194650ac088" }, + { + "ImportPath": "github.com/appc/spec/aci", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, { "ImportPath": "github.com/appc/spec/discovery", "Comment": "v0.7.1-30-g1e5ab3d", "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" }, + { + "ImportPath": "github.com/appc/spec/pkg/device", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/pkg/tarheader", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, { "ImportPath": "github.com/appc/spec/schema", "Comment": "v0.7.1-30-g1e5ab3d", @@ -83,6 +98,10 @@ "Comment": "v4", "Rev": "b4a58d95188dd092ae20072bac14cece0e67c388" }, + { + "ImportPath": "github.com/ghodss/yaml", + "Rev": "c3eb24aeea63668ebdac08d2e252f20df8b6b1ae" + }, { "ImportPath": "github.com/google/cadvisor/utils", "Comment": "v0.19.3-16-g587c022", diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/build.go b/Godeps/_workspace/src/github.com/appc/spec/aci/build.go new file mode 100644 index 0000000..0d259a2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/aci/build.go @@ -0,0 +1,110 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package aci + +import ( + "archive/tar" + "io" + "os" + "path/filepath" + + "github.com/appc/spec/pkg/tarheader" +) + +// TarHeaderWalkFunc is the type of the function which allows setting tar +// headers or filtering out tar entries when building an ACI. It will be +// applied to every entry in the tar file. +// +// If true is returned, the entry will be included in the final ACI; if false, +// the entry will not be included. +type TarHeaderWalkFunc func(hdr *tar.Header) bool + +// BuildWalker creates a filepath.WalkFunc that walks over the given root +// (which should represent an ACI layout on disk) and adds the files in the +// rootfs/ subdirectory to the given ArchiveWriter +func BuildWalker(root string, aw ArchiveWriter, cb TarHeaderWalkFunc) filepath.WalkFunc { + // cache of inode -> filepath, used to leverage hard links in the archive + inos := map[uint64]string{} + return func(path string, info os.FileInfo, err error) error { + if err != nil { + return err + } + relpath, err := filepath.Rel(root, path) + if err != nil { + return err + } + if relpath == "." { + return nil + } + if relpath == ManifestFile { + // ignore; this will be written by the archive writer + // TODO(jonboulle): does this make sense? maybe just remove from archivewriter? + return nil + } + + link := "" + var r io.Reader + switch info.Mode() & os.ModeType { + case os.ModeSocket: + return nil + case os.ModeNamedPipe: + case os.ModeCharDevice: + case os.ModeDevice: + case os.ModeDir: + case os.ModeSymlink: + target, err := os.Readlink(path) + if err != nil { + return err + } + link = target + default: + file, err := os.Open(path) + if err != nil { + return err + } + defer file.Close() + r = file + } + + hdr, err := tar.FileInfoHeader(info, link) + if err != nil { + panic(err) + } + // Because os.FileInfo's Name method returns only the base + // name of the file it describes, it may be necessary to + // modify the Name field of the returned header to provide the + // full path name of the file. + hdr.Name = relpath + tarheader.Populate(hdr, info, inos) + // If the file is a hard link to a file we've already seen, we + // don't need the contents + if hdr.Typeflag == tar.TypeLink { + hdr.Size = 0 + r = nil + } + + if cb != nil { + if !cb(hdr) { + return nil + } + } + + if err := aw.AddFile(hdr, r); err != nil { + return err + } + + return nil + } +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/doc.go b/Godeps/_workspace/src/github.com/appc/spec/aci/doc.go new file mode 100644 index 0000000..624d431 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/aci/doc.go @@ -0,0 +1,16 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package aci contains various functions for working with App Container Images. +package aci diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/file.go b/Godeps/_workspace/src/github.com/appc/spec/aci/file.go new file mode 100644 index 0000000..fe4e1b5 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/aci/file.go @@ -0,0 +1,246 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package aci + +import ( + "archive/tar" + "bytes" + "compress/bzip2" + "compress/gzip" + "encoding/hex" + "errors" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "os/exec" + "path/filepath" + + "github.com/appc/spec/schema" +) + +type FileType string + +const ( + TypeGzip = FileType("gz") + TypeBzip2 = FileType("bz2") + TypeXz = FileType("xz") + TypeTar = FileType("tar") + TypeText = FileType("text") + TypeUnknown = FileType("unknown") + + readLen = 512 // max bytes to sniff + + hexHdrGzip = "1f8b" + hexHdrBzip2 = "425a68" + hexHdrXz = "fd377a585a00" + hexSigTar = "7573746172" + + tarOffset = 257 + + textMime = "text/plain; charset=utf-8" +) + +var ( + hdrGzip []byte + hdrBzip2 []byte + hdrXz []byte + sigTar []byte + tarEnd int +) + +func mustDecodeHex(s string) []byte { + b, err := hex.DecodeString(s) + if err != nil { + panic(err) + } + return b +} + +func init() { + hdrGzip = mustDecodeHex(hexHdrGzip) + hdrBzip2 = mustDecodeHex(hexHdrBzip2) + hdrXz = mustDecodeHex(hexHdrXz) + sigTar = mustDecodeHex(hexSigTar) + tarEnd = tarOffset + len(sigTar) +} + +// DetectFileType attempts to detect the type of file that the given reader +// represents by comparing it against known file signatures (magic numbers) +func DetectFileType(r io.Reader) (FileType, error) { + var b bytes.Buffer + n, err := io.CopyN(&b, r, readLen) + if err != nil && err != io.EOF { + return TypeUnknown, err + } + bs := b.Bytes() + switch { + case bytes.HasPrefix(bs, hdrGzip): + return TypeGzip, nil + case bytes.HasPrefix(bs, hdrBzip2): + return TypeBzip2, nil + case bytes.HasPrefix(bs, hdrXz): + return TypeXz, nil + case n > int64(tarEnd) && bytes.Equal(bs[tarOffset:tarEnd], sigTar): + return TypeTar, nil + case http.DetectContentType(bs) == textMime: + return TypeText, nil + default: + return TypeUnknown, nil + } +} + +// XzReader is an io.ReadCloser which decompresses xz compressed data. +type XzReader struct { + io.ReadCloser + cmd *exec.Cmd + closech chan error +} + +// NewXzReader shells out to a command line xz executable (if +// available) to decompress the given io.Reader using the xz +// compression format and returns an *XzReader. +// It is the caller's responsibility to call Close on the XzReader when done. +func NewXzReader(r io.Reader) (*XzReader, error) { + rpipe, wpipe := io.Pipe() + ex, err := exec.LookPath("xz") + if err != nil { + log.Fatalf("couldn't find xz executable: %v", err) + } + cmd := exec.Command(ex, "--decompress", "--stdout") + + closech := make(chan error) + + cmd.Stdin = r + cmd.Stdout = wpipe + + go func() { + err := cmd.Run() + wpipe.CloseWithError(err) + closech <- err + }() + + return &XzReader{rpipe, cmd, closech}, nil +} + +func (r *XzReader) Close() error { + r.ReadCloser.Close() + r.cmd.Process.Kill() + return <-r.closech +} + +// ManifestFromImage extracts a new schema.ImageManifest from the given ACI image. +func ManifestFromImage(rs io.ReadSeeker) (*schema.ImageManifest, error) { + var im schema.ImageManifest + + tr, err := NewCompressedTarReader(rs) + if err != nil { + return nil, err + } + defer tr.Close() + + for { + hdr, err := tr.Next() + switch err { + case io.EOF: + return nil, errors.New("missing manifest") + case nil: + if filepath.Clean(hdr.Name) == ManifestFile { + data, err := ioutil.ReadAll(tr) + if err != nil { + return nil, err + } + if err := im.UnmarshalJSON(data); err != nil { + return nil, err + } + return &im, nil + } + default: + return nil, fmt.Errorf("error extracting tarball: %v", err) + } + } +} + +// TarReadCloser embeds a *tar.Reader and the related io.Closer +// It is the caller's responsibility to call Close on TarReadCloser when +// done. +type TarReadCloser struct { + *tar.Reader + io.Closer +} + +func (r *TarReadCloser) Close() error { + return r.Closer.Close() +} + +// NewCompressedTarReader creates a new TarReadCloser reading from the +// given ACI image. +// It is the caller's responsibility to call Close on the TarReadCloser +// when done. +func NewCompressedTarReader(rs io.ReadSeeker) (*TarReadCloser, error) { + cr, err := NewCompressedReader(rs) + if err != nil { + return nil, err + } + return &TarReadCloser{tar.NewReader(cr), cr}, nil +} + +// NewCompressedReader creates a new io.ReaderCloser from the given ACI image. +// It is the caller's responsibility to call Close on the Reader when done. +func NewCompressedReader(rs io.ReadSeeker) (io.ReadCloser, error) { + + var ( + dr io.ReadCloser + err error + ) + + _, err = rs.Seek(0, 0) + if err != nil { + return nil, err + } + + ftype, err := DetectFileType(rs) + if err != nil { + return nil, err + } + + _, err = rs.Seek(0, 0) + if err != nil { + return nil, err + } + + switch ftype { + case TypeGzip: + dr, err = gzip.NewReader(rs) + if err != nil { + return nil, err + } + case TypeBzip2: + dr = ioutil.NopCloser(bzip2.NewReader(rs)) + case TypeXz: + dr, err = NewXzReader(rs) + if err != nil { + return nil, err + } + case TypeTar: + dr = ioutil.NopCloser(rs) + case TypeUnknown: + return nil, errors.New("error: unknown image filetype") + default: + return nil, errors.New("no type returned from DetectFileType?") + } + return dr, nil +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/layout.go b/Godeps/_workspace/src/github.com/appc/spec/aci/layout.go new file mode 100644 index 0000000..c2cce56 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/aci/layout.go @@ -0,0 +1,187 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package aci + +/* + +Image Layout + +The on-disk layout of an app container is straightforward. +It includes a rootfs with all of the files that will exist in the root of the app and a manifest describing the image. +The layout MUST contain an image manifest. + +/manifest +/rootfs/ +/rootfs/usr/bin/mysql + +*/ + +import ( + "archive/tar" + "bytes" + "errors" + "fmt" + "io" + "io/ioutil" + "os" + "path/filepath" + "strings" + + "github.com/appc/spec/schema" + "github.com/appc/spec/schema/types" +) + +const ( + // Path to manifest file inside the layout + ManifestFile = "manifest" + // Path to rootfs directory inside the layout + RootfsDir = "rootfs" +) + +type ErrOldVersion struct { + version types.SemVer +} + +func (e ErrOldVersion) Error() string { + return fmt.Sprintf("ACVersion too old. Found major version %v, expected %v", e.version.Major, schema.AppContainerVersion.Major) +} + +var ( + ErrNoRootFS = errors.New("no rootfs found in layout") + ErrNoManifest = errors.New("no image manifest found in layout") +) + +// ValidateLayout takes a directory and validates that the layout of the directory +// matches that expected by the Application Container Image format. +// If any errors are encountered during the validation, it will abort and +// return the first one. +func ValidateLayout(dir string) error { + fi, err := os.Stat(dir) + if err != nil { + return fmt.Errorf("error accessing layout: %v", err) + } + if !fi.IsDir() { + return fmt.Errorf("given path %q is not a directory", dir) + } + var flist []string + var imOK, rfsOK bool + var im io.Reader + walkLayout := func(fpath string, fi os.FileInfo, err error) error { + rpath, err := filepath.Rel(dir, fpath) + if err != nil { + return err + } + switch rpath { + case ".": + case ManifestFile: + im, err = os.Open(fpath) + if err != nil { + return err + } + imOK = true + case RootfsDir: + if !fi.IsDir() { + return errors.New("rootfs is not a directory") + } + rfsOK = true + default: + flist = append(flist, rpath) + } + return nil + } + if err := filepath.Walk(dir, walkLayout); err != nil { + return err + } + return validate(imOK, im, rfsOK, flist) +} + +// ValidateArchive takes a *tar.Reader and validates that the layout of the +// filesystem the reader encapsulates matches that expected by the +// Application Container Image format. If any errors are encountered during +// the validation, it will abort and return the first one. +func ValidateArchive(tr *tar.Reader) error { + var fseen map[string]bool = make(map[string]bool) + var imOK, rfsOK bool + var im bytes.Buffer +Tar: + for { + hdr, err := tr.Next() + switch { + case err == nil: + case err == io.EOF: + break Tar + default: + return err + } + name := filepath.Clean(hdr.Name) + switch name { + case ".": + case ManifestFile: + _, err := io.Copy(&im, tr) + if err != nil { + return err + } + imOK = true + case RootfsDir: + if !hdr.FileInfo().IsDir() { + return fmt.Errorf("rootfs is not a directory") + } + rfsOK = true + default: + if _, seen := fseen[name]; seen { + return fmt.Errorf("duplicate file entry in archive: %s", name) + } + fseen[name] = true + } + } + var flist []string + for key := range fseen { + flist = append(flist, key) + } + return validate(imOK, &im, rfsOK, flist) +} + +func validate(imOK bool, im io.Reader, rfsOK bool, files []string) error { + defer func() { + if rc, ok := im.(io.Closer); ok { + rc.Close() + } + }() + if !imOK { + return ErrNoManifest + } + if !rfsOK { + return ErrNoRootFS + } + b, err := ioutil.ReadAll(im) + if err != nil { + return fmt.Errorf("error reading image manifest: %v", err) + } + var a schema.ImageManifest + if err := a.UnmarshalJSON(b); err != nil { + return fmt.Errorf("image manifest validation failed: %v", err) + } + if a.ACVersion.LessThanMajor(schema.AppContainerVersion) { + return ErrOldVersion{ + version: a.ACVersion, + } + } + for _, f := range files { + if !strings.HasPrefix(f, "rootfs") { + return fmt.Errorf("unrecognized file path in layout: %q", f) + } + } + return nil +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/writer.go b/Godeps/_workspace/src/github.com/appc/spec/aci/writer.go new file mode 100644 index 0000000..070b09b --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/aci/writer.go @@ -0,0 +1,98 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package aci + +import ( + "archive/tar" + "bytes" + "encoding/json" + "io" + "time" + + "github.com/appc/spec/schema" +) + +// ArchiveWriter writes App Container Images. Users wanting to create an ACI or +// should create an ArchiveWriter and add files to it; the ACI will be written +// to the underlying tar.Writer +type ArchiveWriter interface { + AddFile(hdr *tar.Header, r io.Reader) error + Close() error +} + +type imageArchiveWriter struct { + *tar.Writer + am *schema.ImageManifest +} + +// NewImageWriter creates a new ArchiveWriter which will generate an App +// Container Image based on the given manifest and write it to the given +// tar.Writer +func NewImageWriter(am schema.ImageManifest, w *tar.Writer) ArchiveWriter { + aw := &imageArchiveWriter{ + w, + &am, + } + return aw +} + +func (aw *imageArchiveWriter) AddFile(hdr *tar.Header, r io.Reader) error { + err := aw.Writer.WriteHeader(hdr) + if err != nil { + return err + } + + if r != nil { + _, err := io.Copy(aw.Writer, r) + if err != nil { + return err + } + } + + return nil +} + +func (aw *imageArchiveWriter) addFileNow(path string, contents []byte) error { + buf := bytes.NewBuffer(contents) + now := time.Now() + hdr := tar.Header{ + Name: path, + Mode: 0644, + Uid: 0, + Gid: 0, + Size: int64(buf.Len()), + ModTime: now, + Typeflag: tar.TypeReg, + Uname: "root", + Gname: "root", + ChangeTime: now, + } + return aw.AddFile(&hdr, buf) +} + +func (aw *imageArchiveWriter) addManifest(name string, m json.Marshaler) error { + out, err := m.MarshalJSON() + if err != nil { + return err + } + return aw.addFileNow(name, out) +} + +func (aw *imageArchiveWriter) Close() error { + if err := aw.addManifest(ManifestFile, aw.am); err != nil { + return err + } + return aw.Writer.Close() +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/device/device_posix.go b/Godeps/_workspace/src/github.com/appc/spec/pkg/device/device_posix.go new file mode 100644 index 0000000..a0bdd77 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/pkg/device/device_posix.go @@ -0,0 +1,57 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build linux freebsd netbsd openbsd darwin + +package device + +/* +#define _BSD_SOURCE +#define _DEFAULT_SOURCE +#include <sys/types.h> + +unsigned int +my_major(dev_t dev) +{ + return major(dev); +} + +unsigned int +my_minor(dev_t dev) +{ + return minor(dev); +} + +dev_t +my_makedev(unsigned int maj, unsigned int min) +{ + return makedev(maj, min); +} +*/ +import "C" + +func Major(rdev uint64) uint { + major := C.my_major(C.dev_t(rdev)) + return uint(major) +} + +func Minor(rdev uint64) uint { + minor := C.my_minor(C.dev_t(rdev)) + return uint(minor) +} + +func Makedev(maj uint, min uint) uint64 { + dev := C.my_makedev(C.uint(maj), C.uint(min)) + return uint64(dev) +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/doc.go b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/doc.go new file mode 100644 index 0000000..047a0c0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/doc.go @@ -0,0 +1,17 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package tarheader contains a simple abstraction to accurately create +// tar.Headers on different operating systems. +package tarheader diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_darwin.go b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_darwin.go new file mode 100644 index 0000000..8f68ee7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_darwin.go @@ -0,0 +1,39 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//+build darwin + +package tarheader + +import ( + "archive/tar" + "os" + "syscall" + "time" +) + +func init() { + populateHeaderStat = append(populateHeaderStat, populateHeaderCtime) +} + +func populateHeaderCtime(h *tar.Header, fi os.FileInfo, _ map[uint64]string) { + st, ok := fi.Sys().(*syscall.Stat_t) + if !ok { + return + } + + sec, nsec := st.Ctimespec.Unix() + ctime := time.Unix(sec, nsec) + h.ChangeTime = ctime +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_linux.go b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_linux.go new file mode 100644 index 0000000..2055024 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_linux.go @@ -0,0 +1,39 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build linux + +package tarheader + +import ( + "archive/tar" + "os" + "syscall" + "time" +) + +func init() { + populateHeaderStat = append(populateHeaderStat, populateHeaderCtime) +} + +func populateHeaderCtime(h *tar.Header, fi os.FileInfo, _ map[uint64]string) { + st, ok := fi.Sys().(*syscall.Stat_t) + if !ok { + return + } + + sec, nsec := st.Ctim.Unix() + ctime := time.Unix(sec, nsec) + h.ChangeTime = ctime +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_posix.go b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_posix.go new file mode 100644 index 0000000..0cc083f --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_posix.go @@ -0,0 +1,50 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build linux freebsd netbsd openbsd + +package tarheader + +import ( + "archive/tar" + "os" + "syscall" + + "github.com/appc/spec/pkg/device" +) + +func init() { + populateHeaderStat = append(populateHeaderStat, populateHeaderUnix) +} + +func populateHeaderUnix(h *tar.Header, fi os.FileInfo, seen map[uint64]string) { + st, ok := fi.Sys().(*syscall.Stat_t) + if !ok { + return + } + h.Uid = int(st.Uid) + h.Gid = int(st.Gid) + if st.Mode&syscall.S_IFMT == syscall.S_IFBLK || st.Mode&syscall.S_IFMT == syscall.S_IFCHR { + h.Devminor = int64(device.Minor(uint64(st.Rdev))) + h.Devmajor = int64(device.Major(uint64(st.Rdev))) + } + // If we have already seen this inode, generate a hardlink + p, ok := seen[uint64(st.Ino)] + if ok { + h.Linkname = p + h.Typeflag = tar.TypeLink + } else { + seen[uint64(st.Ino)] = h.Name + } +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/tarheader.go b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/tarheader.go new file mode 100644 index 0000000..dc16c33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/tarheader.go @@ -0,0 +1,28 @@ +// Copyright 2015 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package tarheader + +import ( + "archive/tar" + "os" +) + +var populateHeaderStat []func(h *tar.Header, fi os.FileInfo, seen map[uint64]string) + +func Populate(h *tar.Header, fi os.FileInfo, seen map[uint64]string) { + for _, pop := range populateHeaderStat { + pop(h, fi, seen) + } +} diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/.gitignore b/Godeps/_workspace/src/github.com/ghodss/yaml/.gitignore new file mode 100644 index 0000000..e256a31 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ghodss/yaml/.gitignore @@ -0,0 +1,20 @@ +# OSX leaves these everywhere on SMB shares +._* + +# Eclipse files +.classpath +.project +.settings/** + +# Emacs save files +*~ + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# Go test binaries +*.test diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/README.md b/Godeps/_workspace/src/github.com/ghodss/yaml/README.md new file mode 100644 index 0000000..2d60309 --- /dev/null +++ b/Godeps/_workspace/src/github.com/ghodss/yaml/README.md @@ -0,0 +1,114 @@ +# YAML marshaling and unmarshaling support for Go + +## Introduction + +A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs. + +In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/). + +## Compatibility + +This package uses [go-yaml v2](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility). + +## Caveats + +**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example: + +``` +BAD: + exampleKey: !!binary gIGC + +GOOD: + exampleKey: gIGC +... and decode the base64 data in your code. +``` + +**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys. + +## Installation and usage + +To install, run: + +``` +$ go get github.com/ghodss/yaml +``` + +And import using: + +``` +import "github.com/ghodss/yaml" +``` + +Usage is very similar to the JSON library: + +```go +import ( + "fmt" + + "github.com/ghodss/yaml" +) + +type Person struct { + Name string `json:"name"` // Affects YAML field names too. + Age int `json:"name"` +} + +func main() { + // Marshal a Person struct to YAML. + p := Person{"John", 30} + y, err := yaml.Marshal(p) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(y)) + /* Output: + name: John + age: 30 + */ + + // Unmarshal the YAML back into a Person struct. + var p2 Person + err := yaml.Unmarshal(y, &p2) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(p2) + /* Output: + {John 30} + */ +} +``` + +`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available: + +```go +import ( + "fmt" + + "github.com/ghodss/yaml" +) +func main() { + j := []byte(`{"name": "John", "age": 30}`) + y, err := yaml.JSONToYAML(j) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(y)) + /* Output: + name: John + age: 30 + */ + j2, err := yaml.YAMLToJSON(y) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(j2)) + /* Output: + {"age":30,"name":"John"} + */ +} +``` diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/fields.go b/Godeps/_workspace/src/github.com/ghodss/yaml/fields.go new file mode 100644 index 0000000..0bd3c2b --- /dev/null +++ b/Godeps/_workspace/src/github.com/ghodss/yaml/fields.go @@ -0,0 +1,497 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package yaml + +import ( + "bytes" + "encoding" + "encoding/json" + "reflect" + "sort" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +// indirect walks down v allocating pointers as needed, +// until it gets to a non-pointer. +// if it encounters an Unmarshaler, indirect stops and returns that. +// if decodingNull is true, indirect stops at the last pointer so it can be set to nil. +func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { + // If v is a named type and is addressable, + // start with its address, so that if the type has pointer methods, + // we find them. + if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { + v = v.Addr() + } + for { + // Load value from interface, but only if the result will be + // usefully addressable. + if v.Kind() == reflect.Interface && !v.IsNil() { + e := v.Elem() + if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) { + v = e + continue + } + } + + if v.Kind() != reflect.Ptr { + break + } + + if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() { + break + } + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + if v.Type().NumMethod() > 0 { + if u, ok := v.Interface().(json.Unmarshaler); ok { + return u, nil, reflect.Value{} + } + if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { + return nil, u, reflect.Value{} + } + } + v = v.Elem() + } + return nil, nil, v +} + +// A field represents a single field found in a struct. +type field struct { + name string + nameBytes []byte // []byte(name) + equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent + + tag bool + index []int + typ reflect.Type + omitEmpty bool + quoted bool +} + +func fillField(f field) field { + f.nameBytes = []byte(f.name) + f.equalFold = foldFunc(f.nameBytes) + return f +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from json tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that JSON should recognize for the given type. +// The algorithm is breadth-first search over the set of structs to include - the top struct +// and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + count := map[reflect.Type]int{} + nextCount := map[reflect.Type]int{} + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" { // unexported + continue + } + tag := sf.Tag.Get("json") + if tag == "-" { + continue + } + name, opts := parseTag(tag) + if !isValidTag(name) { + name = "" + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := name != "" + if name == "" { + name = sf.Name + } + fields = append(fields, fillField(field{ + name: name, + tag: tagged, + index: index, + typ: ft, + omitEmpty: opts.Contains("omitempty"), + quoted: opts.Contains("string"), + })) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft})) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with JSON tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// JSON tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// foldFunc returns one of four different case folding equivalence +// functions, from most general (and slow) to fastest: +// +// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8 +// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S') +// 3) asciiEqualFold, no special, but includes non-letters (including _) +// 4) simpleLetterEqualFold, no specials, no non-letters. +// +// The letters S and K are special because they map to 3 runes, not just 2: +// * S maps to s and to U+017F 'ſ' Latin small letter long s +// * k maps to K and to U+212A 'K' Kelvin sign +// See http://play.golang.org/p/tTxjOc0OGo +// +// The returned function is specialized for matching against s and +// should only be given s. It's not curried for performance reasons. +func foldFunc(s []byte) func(s, t []byte) bool { + nonLetter := false + special := false // special letter + for _, b := range s { + if b >= utf8.RuneSelf { + return bytes.EqualFold + } + upper := b & caseMask + if upper < 'A' || upper > 'Z' { + nonLetter = true + } else if upper == 'K' || upper == 'S' { + // See above for why these letters are special. + special = true + } + } + if special { + return equalFoldRight + } + if nonLetter { + return asciiEqualFold + } + return simpleLetterEqualFold +} + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func equalFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func asciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func simpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} + +// tagOptions is the string following a comma in a struct field's "json" +// tag, or the empty string. It does not include the leading comma. +type tagOptions string + +// parseTag splits a struct field's json tag into its name and +// comma-separated options. +func parseTag(tag string) (string, tagOptions) { + if idx := strings.Index(tag, ","); idx != -1 { + return tag[:idx], tagOptions(tag[idx+1:]) + } + return tag, tagOptions("") +} + +// Contains reports whether a comma-separated list of options +// contains a particular substr flag. substr must be surrounded by a +// string boundary or commas. +func (o tagOptions) Contains(optionName string) bool { + if len(o) == 0 { + return false + } + s := string(o) + for s != "" { + var next string + i := strings.Index(s, ",") + if i >= 0 { + s, next = s[:i], s[i+1:] + } + if s == optionName { + return true + } + s = next + } + return false +} diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/yaml.go b/Godeps/_workspace/src/github.com/ghodss/yaml/yaml.go new file mode 100644 index 0000000..fa0de8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/ghodss/yaml/yaml.go @@ -0,0 +1,266 @@ +package yaml + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "strconv" + + "gopkg.in/yaml.v2" +) + +// Marshals the object into JSON then converts JSON to YAML and returns the +// YAML. +func Marshal(o interface{}) ([]byte, error) { + j, err := json.Marshal(o) + if err != nil { + return nil, fmt.Errorf("error marshaling into JSON: ", err) + } + + y, err := JSONToYAML(j) + if err != nil { + return nil, fmt.Errorf("error converting JSON to YAML: ", err) + } + + return y, nil +} + +// Converts YAML to JSON then uses JSON to unmarshal into an object. +func Unmarshal(y []byte, o interface{}) error { + vo := reflect.ValueOf(o) + j, err := yamlToJSON(y, &vo) + if err != nil { + return fmt.Errorf("error converting YAML to JSON: %v", err) + } + + err = json.Unmarshal(j, o) + if err != nil { + return fmt.Errorf("error unmarshaling JSON: %v", err) + } + + return nil +} + +// Convert JSON to YAML. +func JSONToYAML(j []byte) ([]byte, error) { + // Convert the JSON to an object. + var jsonObj interface{} + // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the + // Go JSON library doesn't try to pick the right number type (int, float, + // etc.) when unmarshling to interface{}, it just picks float64 + // universally. go-yaml does go through the effort of picking the right + // number type, so we can preserve number type throughout this process. + err := yaml.Unmarshal(j, &jsonObj) + if err != nil { + return nil, err + } + + // Marshal this object into YAML. + return yaml.Marshal(jsonObj) +} + +// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through +// this method should be a no-op. +// +// Things YAML can do that are not supported by JSON: +// * In YAML you can have binary and null keys in your maps. These are invalid +// in JSON. (int and float keys are converted to strings.) +// * Binary data in YAML with the !!binary tag is not supported. If you want to +// use binary data with this library, encode the data as base64 as usual but do +// not use the !!binary tag in your YAML. This will ensure the original base64 +// encoded data makes it all the way through to the JSON. +func YAMLToJSON(y []byte) ([]byte, error) { + return yamlToJSON(y, nil) +} + +func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { + // Convert the YAML to an object. + var yamlObj interface{} + err := yaml.Unmarshal(y, &yamlObj) + if err != nil { + return nil, err + } + + // YAML objects are not completely compatible with JSON objects (e.g. you + // can have non-string keys in YAML). So, convert the YAML-compatible object + // to a JSON-compatible object, failing with an error if irrecoverable + // incompatibilties happen along the way. + jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget) + if err != nil { + return nil, err + } + + // Convert this object to JSON and return the data. + return json.Marshal(jsonObj) +} + +func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) { + var err error + + // Resolve jsonTarget to a concrete value (i.e. not a pointer or an + // interface). We pass decodingNull as false because we're not actually + // decoding into the value, we're just checking if the ultimate target is a + // string. + if jsonTarget != nil { + ju, tu, pv := indirect(*jsonTarget, false) + // We have a JSON or Text Umarshaler at this level, so we can't be trying + // to decode into a string. + if ju != nil || tu != nil { + jsonTarget = nil + } else { + jsonTarget = &pv + } + } + + // If yamlObj is a number or a boolean, check if jsonTarget is a string - + // if so, coerce. Else return normal. + // If yamlObj is a map or array, find the field that each key is + // unmarshaling to, and when you recurse pass the reflect.Value for that + // field back into this function. + switch typedYAMLObj := yamlObj.(type) { + case map[interface{}]interface{}: + // JSON does not support arbitrary keys in a map, so we must convert + // these keys to strings. + // + // From my reading of go-yaml v2 (specifically the resolve function), + // keys can only have the types string, int, int64, float64, binary + // (unsupported), or null (unsupported). + strMap := make(map[string]interface{}) + for k, v := range typedYAMLObj { + // Resolve the key to a string first. + var keyString string + switch typedKey := k.(type) { + case string: + keyString = typedKey + case int: + keyString = strconv.Itoa(typedKey) + case int64: + // go-yaml will only return an int64 as a key if the system + // architecture is 32-bit and the key's value is between 32-bit + // and 64-bit. Otherwise the key type will simply be int. + keyString = strconv.FormatInt(typedKey, 10) + case float64: + // Stolen from go-yaml to use the same conversion to string as + // the go-yaml library uses to convert float to string when + // Marshaling. + s := strconv.FormatFloat(typedKey, 'g', -1, 32) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + keyString = s + case bool: + if typedKey { + keyString = "true" + } else { + keyString = "false" + } + default: + return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v", + reflect.TypeOf(k), k, v) + } + + // If jsonTarget is a struct (which it really should be), find the + // field it's going to map to. If it's not a struct, just pass nil + // - JSON conversion will error for us if it's a real issue. + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Struct { + keyBytes := []byte(keyString) + // Find the field that the JSON library would use. + var f *field + fields := cachedTypeFields(t.Type()) + for i := range fields { + ff := &fields[i] + if bytes.Equal(ff.nameBytes, keyBytes) { + f = ff + break + } + // Do case-insensitive comparison. + if f == nil && ff.equalFold(ff.nameBytes, keyBytes) { + f = ff + } + } + if f != nil { + // Find the reflect.Value of the most preferential + // struct field. + jtf := t.Field(f.index[0]) + strMap[keyString], err = convertToJSONableObject(v, &jtf) + if err != nil { + return nil, err + } + continue + } + } + } + strMap[keyString], err = convertToJSONableObject(v, nil) + if err != nil { + return nil, err + } + } + return strMap, nil + case []interface{}: + // We need to recurse into arrays in case there are any + // map[interface{}]interface{}'s inside and to convert any + // numbers to strings. + + // If jsonTarget is a slice (which it really should be), find the + // thing it's going to map to. If it's not a slice, just pass nil + // - JSON conversion will error for us if it's a real issue. + var jsonSliceElemValue *reflect.Value + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Slice { + // By default slices point to nil, but we need a reflect.Value + // pointing to a value of the slice type, so we create one here. + ev := reflect.Indirect(reflect.New(t.Type().Elem())) + jsonSliceElemValue = &ev + } + } + + // Make and use a new array. + arr := make([]interface{}, len(typedYAMLObj)) + for i, v := range typedYAMLObj { + arr[i], err = convertToJSONableObject(v, jsonSliceElemValue) + if err != nil { + return nil, err + } + } + return arr, nil + default: + // If the target type is a string and the YAML type is a number, + // convert the YAML type to a string. + if jsonTarget != nil && (*jsonTarget).Kind() == reflect.String { + // Based on my reading of go-yaml, it may return int, int64, + // float64, or uint64. + var s string + switch typedVal := typedYAMLObj.(type) { + case int: + s = strconv.FormatInt(int64(typedVal), 10) + case int64: + s = strconv.FormatInt(typedVal, 10) + case float64: + s = strconv.FormatFloat(typedVal, 'g', -1, 32) + case uint64: + s = strconv.FormatUint(typedVal, 10) + case bool: + if typedVal { + s = "true" + } else { + s = "false" + } + } + if len(s) > 0 { + yamlObj = interface{}(s) + } + } + return yamlObj, nil + } + + return nil, nil +} diff --git a/work/env/service.go b/work/env/service.go index 6a693d2..3cd4776 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -125,8 +125,9 @@ func (s *Service) LoadUnit(name string) *service.Unit { var unit *service.Unit if strings.HasSuffix(name, spec.TYPE_TIMER.String()) { unit = service.NewUnit(s.path+"/units", name[:len(name)-len(spec.TYPE_TIMER.String())], spec.TYPE_TIMER, s) + } else { + unit = service.NewUnit(s.path+"/units", name, spec.TYPE_SERVICE, s) } - unit = service.NewUnit(s.path+"/units", name, spec.TYPE_SERVICE, s) s.units[name] = unit return unit } diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 92d4d31..210949d 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -40,7 +40,7 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser unit := &Unit{ generatedMutex: &sync.Mutex{}, Type: utype, - Log: *l.WithField("unit", hostname), + Log: *l.WithField("unit", name), Service: service, path: path, hostname: hostname, @@ -48,7 +48,7 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser Filename: filename, unitPath: path + "/" + filename, } - unit.Log.Debug("New unit") + unit.Log.WithField("hostname", hostname).Debug("New unit") return unit } From c6d9559065dc4a67e408cda670e1b49d862fd78d Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 5 Jan 2016 14:09:28 +0100 Subject: [PATCH 102/163] remove global generate --- commands/ggn.go | 2 +- commands/prepare.go | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/commands/ggn.go b/commands/ggn.go index 43dfc65..7315f05 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -58,7 +58,7 @@ func Execute() { rootCmd.PersistentFlags().StringVarP(&useless2, "log-level", "L", "info", "Set log level") rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot()+"/ggn", "Set home folder") rootCmd.PersistentFlags().StringSliceVarP(&builder.BuildFlags.GenerateManifests, "generate-manifest", "M", []string{}, "Manifests used to generate. comma separated") - rootCmd.AddCommand(versionCmd, generateCmd, genautocompleteCmd) + rootCmd.AddCommand(versionCmd, genautocompleteCmd) loadEnvCommands(rootCmd) diff --git a/commands/prepare.go b/commands/prepare.go index cc15696..d7f2ff6 100644 --- a/commands/prepare.go +++ b/commands/prepare.go @@ -7,18 +7,6 @@ import ( "github.com/spf13/cobra" ) -var generateCmd = &cobra.Command{ - Use: "generate", - Short: "generate units for all envs", - Run: func(cmd *cobra.Command, args []string) { - work := work.NewWork(ggn.Home.Config.WorkPath) - for _, envName := range work.ListEnvs() { - env := work.LoadEnv(envName) - env.Generate() - } - }, -} - func loadEnvCommands(rootCmd *cobra.Command) { logrus.WithField("path", ggn.Home.Config.WorkPath).Debug("Loading envs") work := work.NewWork(ggn.Home.Config.WorkPath) From 58d45460b60f2889ac387b4e202664b9ba2f38eb Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 5 Jan 2016 14:13:05 +0100 Subject: [PATCH 103/163] add generate command on unit --- commands/prepare-unit.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index bd9be92..9029466 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -110,12 +110,20 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { }, } + generateCmd := &cobra.Command{ + Use: "generate", + Short: getShortDescription(unit, "generate"), + Run: func(cmd *cobra.Command, args []string) { + unit.Service.Generate() + }, + } + journalCmd.Flags().BoolVarP(&follow, "follow", "f", false, "follow") journalCmd.Flags().IntVarP(&lines, "lines", "l", 10, "lines") updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, - diffCmd, checkCmd, journalCmd, loadCmd, sshCmd, restartCmd) + diffCmd, checkCmd, journalCmd, loadCmd, sshCmd, restartCmd, generateCmd) return unitCmd } From 8fcfffe609286c0484c496887188d5a1e6735a30 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 5 Jan 2016 14:16:55 +0100 Subject: [PATCH 104/163] fix aci discovery on containers node --- work/env/service-generate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 62b6b77..26e0fb4 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -192,7 +192,7 @@ func (s *Service) PrepareAciList() string { for _, aci := range s.manifest.Containers { containerLog := s.log.WithField("container", aci.String()) containerLog.Debug("Processing container") - if strings.HasPrefix(aci.ShortName(), "pod-") { + if strings.HasPrefix(aci.ShortName(), "pod-") && !strings.Contains(aci.ShortName(), "_") { // TODO this is CNT specific var podAcis []cntspec.ACFullname if override[aci.Name()] != nil { containerLog.Debug("Using local source to resolve") From db6b2527b3cc507c68868f508e2ee7e134063faf Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 5 Jan 2016 15:49:47 +0100 Subject: [PATCH 105/163] split args processing to ignore other envs --- commands/genautocomplete.go | 8 +++ commands/ggn.go | 109 ++++++++++++++++++++++++++---------- commands/prepare.go | 21 ++++++- 3 files changed, 105 insertions(+), 33 deletions(-) diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index 582c7dd..89d108e 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -3,6 +3,7 @@ package commands import ( "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/ggn" + "github.com/blablacar/ggn/work" "github.com/spf13/cobra" "os" ) @@ -32,6 +33,13 @@ or just source them in directly: logrus.WithField("type", autocompleteType).Fatalln("Only Bash is supported for now") } + work := work.NewWork(ggn.Home.Config.WorkPath) + + for _, command := range cmd.Root().Commands() { + if command.Use != "genautocomplete" && command.Use != "version" { + command.AddCommand(prepareEnvCommands(work.LoadEnv(command.Use))) + } + } err := cmd.Root().GenBashCompletionFile(autocompleteTarget) if err != nil { logrus.WithError(err).Fatalln("Failed to generate shell completion file") diff --git a/commands/ggn.go b/commands/ggn.go index 7315f05..65c1503 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -9,6 +9,7 @@ import ( "github.com/blablacar/ggn/ggn" "github.com/coreos/go-semver/semver" "github.com/spf13/cobra" + "github.com/spf13/pflag" "os" "strings" ) @@ -18,23 +19,57 @@ const FLEET_SUPPORTED_VERSION = "0.11.5" func Execute() { checkFleetVersion() - homefolder := ggn.DefaultHomeRoot() - if argsHome := homeFolderFromArgs(); argsHome != "" { - homefolder = argsHome - } else { - _, err := os.Stat(homefolder + "/green-garden") - _, err2 := os.Stat(homefolder + "/ggn") - if os.IsNotExist(err2) && err == nil { - log.WithField("oldPath", homefolder+"/green-garden"). - WithField("newPath", homefolder+"/ggn"). - Warn("You are using the old home folder") - homefolder += "/green-garden" - } else { - homefolder += "/ggn" + ggn.Home = discoverHome() + prepareLogs() + builder.BuildFlags.GenerateManifests = GenerateManifestPathFromArgs() + + rootCmd := &cobra.Command{ + Use: "ggn", + } + + var useless string + var useless2 []string + rootCmd.PersistentFlags().StringVarP(&useless, "log-level", "L", "info", "Set log level") + rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot()+"/ggn", "Set home folder") + rootCmd.PersistentFlags().StringSliceVarP(&useless2, "generate-manifest", "M", []string{}, "Manifests used to generate. comma separated") + rootCmd.AddCommand(versionCmd, genautocompleteCmd) + + newRoot := loadEnvCommandsReturnNewRoot(os.Args, rootCmd) + rootCmd.PersistentFlags().VisitAll(func(flag *pflag.Flag) { + newRoot.PersistentFlags().AddFlag(flag) + }) + rootCmd.SetArgs([]string{findEnv()}) + err := rootCmd.Execute() + if err != nil { + os.Exit(1) + } + + log.Debug("Victory !") +} + +func findEnv() string { //TODO this is fucking dirty + for i := 1; i < len(os.Args); i++ { + if os.Args[i] == "--" { + return os.Args[i+1] } + if os.Args[i] == "-h" || os.Args[i] == "--help" { + return os.Args[i] + } + if os.Args[i] == "-M" || strings.HasPrefix(os.Args[i], "--generate-manifest=") || + os.Args[i] == "-L" || strings.HasPrefix(os.Args[i], "--log-level=") || + os.Args[i] == "-H" || strings.HasPrefix(os.Args[i], "--home-path=") { + i++ + continue + } + if strings.HasPrefix(os.Args[i], "-") { + continue + } + return os.Args[i] } - ggn.Home = ggn.NewHome(homefolder) + return "" +} +func prepareLogs() { // logs lvl := logLevelFromArgs() if lvl == "" { @@ -47,26 +82,40 @@ func Execute() { os.Exit(1) } log.SetLevel(level) +} - rootCmd := &cobra.Command{ - Use: "ggn", +func discoverHome() ggn.HomeStruct { + homefolder := ggn.DefaultHomeRoot() + if argsHome := homeFolderFromArgs(); argsHome != "" { + homefolder = argsHome + } else { + _, err := os.Stat(homefolder + "/green-garden") + _, err2 := os.Stat(homefolder + "/ggn") + if os.IsNotExist(err2) && err == nil { + log.WithField("oldPath", homefolder+"/green-garden"). + WithField("newPath", homefolder+"/ggn"). + Warn("You are using the old home folder") + homefolder += "/green-garden" + } else { + homefolder += "/ggn" + } } + return ggn.NewHome(homefolder) +} - var useless string - var useless2 string - - rootCmd.PersistentFlags().StringVarP(&useless2, "log-level", "L", "info", "Set log level") - rootCmd.PersistentFlags().StringVarP(&useless, "home-path", "H", ggn.DefaultHomeRoot()+"/ggn", "Set home folder") - rootCmd.PersistentFlags().StringSliceVarP(&builder.BuildFlags.GenerateManifests, "generate-manifest", "M", []string{}, "Manifests used to generate. comma separated") - rootCmd.AddCommand(versionCmd, genautocompleteCmd) - - loadEnvCommands(rootCmd) - - err = rootCmd.Execute() - if err != nil { - os.Exit(1) +func GenerateManifestPathFromArgs() []string { + for i, arg := range os.Args { + if arg == "--" { + return []string{} + } + if arg == "-M" { + return strings.Split(os.Args[i+1], ",") + } + if strings.HasPrefix(arg, "--generate-manifest=") { + return strings.Split(arg[20:], ",") + } } - log.Debug("Victory !") + return []string{} } func homeFolderFromArgs() string { diff --git a/commands/prepare.go b/commands/prepare.go index d7f2ff6..e2cfb60 100644 --- a/commands/prepare.go +++ b/commands/prepare.go @@ -7,13 +7,28 @@ import ( "github.com/spf13/cobra" ) -func loadEnvCommands(rootCmd *cobra.Command) { +func loadEnvCommandsReturnNewRoot(osArgs []string, rootCmd *cobra.Command) *cobra.Command { logrus.WithField("path", ggn.Home.Config.WorkPath).Debug("Loading envs") work := work.NewWork(ggn.Home.Config.WorkPath) + newRootCmd := &cobra.Command{ + Use: "ggn", + } + for _, envNames := range work.ListEnvs() { env := work.LoadEnv(envNames) - rootCmd.AddCommand(prepareEnvCommands(env)) - } + envCmd := &cobra.Command{ + Use: env.GetName(), + Short: "Run command for " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + + newRootCmd.AddCommand(prepareEnvCommands(env)) + newRootCmd.SetArgs(osArgs[1:]) + newRootCmd.Execute() + }, + } + rootCmd.AddCommand(envCmd) + } + return newRootCmd } From 0d51703a268238599a6711c707fb54369e1fb9e4 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 5 Jan 2016 16:32:05 +0100 Subject: [PATCH 106/163] ignore help command on genautocomplete --- commands/genautocomplete.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index 89d108e..f6d6a1d 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -36,7 +36,7 @@ or just source them in directly: work := work.NewWork(ggn.Home.Config.WorkPath) for _, command := range cmd.Root().Commands() { - if command.Use != "genautocomplete" && command.Use != "version" { + if command.Use != "genautocomplete" && command.Use != "version" && command.Use != "help [command]" { // TODO sux command.AddCommand(prepareEnvCommands(work.LoadEnv(command.Use))) } } From 110d19752c7c1ba85259476b31cf9c0daaf1c883 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 14 Jan 2016 14:52:34 +0100 Subject: [PATCH 107/163] fix long version of global argument parsing --- commands/ggn.go | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/commands/ggn.go b/commands/ggn.go index 65c1503..7dfe03c 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -38,7 +38,10 @@ func Execute() { rootCmd.PersistentFlags().VisitAll(func(flag *pflag.Flag) { newRoot.PersistentFlags().AddFlag(flag) }) - rootCmd.SetArgs([]string{findEnv()}) + + args := []string{findEnv()} + log.WithField("args", args).Debug("Processing env with args") + rootCmd.SetArgs(args) err := rootCmd.Execute() if err != nil { os.Exit(1) @@ -55,13 +58,16 @@ func findEnv() string { //TODO this is fucking dirty if os.Args[i] == "-h" || os.Args[i] == "--help" { return os.Args[i] } - if os.Args[i] == "-M" || strings.HasPrefix(os.Args[i], "--generate-manifest=") || - os.Args[i] == "-L" || strings.HasPrefix(os.Args[i], "--log-level=") || - os.Args[i] == "-H" || strings.HasPrefix(os.Args[i], "--home-path=") { + if os.Args[i] == "-M" || + os.Args[i] == "-L" || + os.Args[i] == "-H" { i++ continue } - if strings.HasPrefix(os.Args[i], "-") { + if strings.HasPrefix(os.Args[i], "-") || + strings.HasPrefix(os.Args[i], "--generate-manifest=") || + strings.HasPrefix(os.Args[i], "--log-level=") || + strings.HasPrefix(os.Args[i], "--home-path=") { continue } return os.Args[i] From 5594b982f7062a72cb030437b2f46d1bfe1b8e80 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 14 Jan 2016 16:42:13 +0100 Subject: [PATCH 108/163] change logger --- Godeps/Godeps.json | 16 +- .../src/github.com/Sirupsen/logrus/.gitignore | 1 - .../github.com/Sirupsen/logrus/.travis.yml | 8 - .../github.com/Sirupsen/logrus/CHANGELOG.md | 47 --- .../src/github.com/Sirupsen/logrus/LICENSE | 21 -- .../src/github.com/Sirupsen/logrus/README.md | 357 ------------------ .../src/github.com/Sirupsen/logrus/doc.go | 26 -- .../src/github.com/Sirupsen/logrus/entry.go | 264 ------------- .../Sirupsen/logrus/examples/basic/basic.go | 50 --- .../Sirupsen/logrus/examples/hook/hook.go | 30 -- .../github.com/Sirupsen/logrus/exported.go | 193 ---------- .../github.com/Sirupsen/logrus/formatter.go | 48 --- .../logrus/formatters/logstash/logstash.go | 56 --- .../src/github.com/Sirupsen/logrus/hooks.go | 34 -- .../logrus/hooks/airbrake/airbrake.go | 54 --- .../Sirupsen/logrus/hooks/bugsnag/bugsnag.go | 68 ---- .../logrus/hooks/papertrail/README.md | 28 -- .../logrus/hooks/papertrail/papertrail.go | 55 --- .../Sirupsen/logrus/hooks/sentry/README.md | 111 ------ .../Sirupsen/logrus/hooks/sentry/sentry.go | 137 ------- .../Sirupsen/logrus/hooks/syslog/README.md | 20 - .../Sirupsen/logrus/hooks/syslog/syslog.go | 59 --- .../Sirupsen/logrus/json_formatter.go | 41 -- .../src/github.com/Sirupsen/logrus/logger.go | 206 ---------- .../src/github.com/Sirupsen/logrus/logrus.go | 98 ----- .../Sirupsen/logrus/terminal_bsd.go | 9 - .../Sirupsen/logrus/terminal_linux.go | 12 - .../Sirupsen/logrus/terminal_notwindows.go | 21 -- .../Sirupsen/logrus/terminal_windows.go | 27 -- .../Sirupsen/logrus/text_formatter.go | 159 -------- .../src/github.com/Sirupsen/logrus/writer.go | 31 -- .../src/github.com/n0rad/go-erlog/Makefile | 10 + .../src/github.com/n0rad/go-erlog/appender.go | 11 + .../github.com/n0rad/go-erlog/data/data.go | 38 ++ .../github.com/n0rad/go-erlog/docs/basic.png | Bin 0 -> 27719 bytes .../github.com/n0rad/go-erlog/errs/entry.go | 140 +++++++ .../n0rad/go-erlog/errs/stackframe.go | 102 +++++ .../src/github.com/n0rad/go-erlog/event.go | 41 ++ .../n0rad/go-erlog/examples/advanced/main.go | 30 ++ .../n0rad/go-erlog/examples/basic/main.go | 23 ++ .../examples/dedicated_logger/main.go | 8 + .../n0rad/go-erlog/examples/erlog/main.go | 21 ++ .../n0rad/go-erlog/examples/fields/fields.go | 16 + .../cnt/log => n0rad/go-erlog}/formatter.go | 128 +++---- .../src/github.com/n0rad/go-erlog/logger.go | 177 +++++++++ .../github.com/n0rad/go-erlog/logs/default.go | 34 ++ .../github.com/n0rad/go-erlog/logs/dummy.go | 58 +++ .../github.com/n0rad/go-erlog/logs/entry.go | 113 ++++++ .../github.com/n0rad/go-erlog/logs/levels.go | 71 ++++ .../github.com/n0rad/go-erlog/logs/logger.go | 62 +++ .../src/github.com/n0rad/go-erlog/readme.md | 54 +++ .../n0rad/go-erlog/register/register.go | 10 + commands/genautocomplete.go | 8 +- commands/ggn.go | 18 +- commands/prepare-service.go | 6 +- commands/prepare.go | 4 +- ggn/home.go | 19 +- main.go | 4 +- spec/env.go | 4 +- spec/service.go | 4 +- work/env-check.go | 3 +- work/env-fleetctl.go | 6 +- work/env-generate.go | 4 +- work/env-list-units.go | 3 +- work/env.go | 40 +- work/env/service-check.go | 3 +- work/env/service-generate.go | 57 +-- work/env/service-update.go | 19 +- work/env/service.go | 50 +-- work/env/service/unit-command.go | 38 +- work/env/service/unit-generate.go | 9 +- work/env/service/unit.go | 29 +- work/work.go | 17 +- 73 files changed, 1261 insertions(+), 2518 deletions(-) delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/doc.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/entry.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/basic/basic.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/hook/hook.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/README.md delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/README.md delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/logger.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_bsd.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_windows.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter.go delete mode 100644 Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/Makefile create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/appender.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/data/data.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/docs/basic.png create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/stackframe.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/event.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go rename Godeps/_workspace/src/github.com/{blablacar/cnt/log => n0rad/go-erlog}/formatter.go (58%) create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/default.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/dummy.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/entry.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/levels.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/logger.go create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/readme.md create mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/register/register.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 0984b44..3b5eab6 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,15 +1,10 @@ { "ImportPath": "github.com/blablacar/ggn", - "GoVersion": "go1.5.2", + "GoVersion": "go1.5.3", "Packages": [ "./..." ], "Deps": [ - { - "ImportPath": "github.com/Sirupsen/logrus", - "Comment": "v0.8.7", - "Rev": "418b41d23a1bf978c06faea5313ba194650ac088" - }, { "ImportPath": "github.com/appc/spec/aci", "Comment": "v0.7.1-30-g1e5ab3d", @@ -40,11 +35,6 @@ "Comment": "0.1-6-g431a372", "Rev": "431a37282b0ef85175c8c30eb79f3918c378c7d1" }, - { - "ImportPath": "github.com/blablacar/cnt/log", - "Comment": "45-5-g226d271", - "Rev": "226d271434d899ba1ff5502a36783f7ffcf48dc9" - }, { "ImportPath": "github.com/blablacar/cnt/spec", "Comment": "45-5-g226d271", @@ -131,6 +121,10 @@ "ImportPath": "github.com/mitchellh/go-homedir", "Rev": "1f6da4a72e57d4e7edd4a7295a585e0a3999a2d4" }, + { + "ImportPath": "github.com/n0rad/go-erlog", + "Rev": "d91d1cac32e6fa5843dcef5818e10e83a4a7c1bf" + }, { "ImportPath": "github.com/peterbourgon/mergemap", "Rev": "e21c03b7a721e413718d2703181ead350d3c9d6f" diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore b/Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore deleted file mode 100644 index 66be63a..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore +++ /dev/null @@ -1 +0,0 @@ -logrus diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml b/Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml deleted file mode 100644 index 2d8c086..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go -go: - - 1.2 - - 1.3 - - 1.4 - - tip -install: - - go get -t ./... diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md b/Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md deleted file mode 100644 index 78f9895..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/CHANGELOG.md +++ /dev/null @@ -1,47 +0,0 @@ -# 0.8.7 - -* logrus/core: fix possible race (#216) -* logrus/doc: small typo fixes and doc improvements - - -# 0.8.6 - -* hooks/raven: allow passing an initialized client - -# 0.8.5 - -* logrus/core: revert #208 - -# 0.8.4 - -* formatter/text: fix data race (#218) - -# 0.8.3 - -* logrus/core: fix entry log level (#208) -* logrus/core: improve performance of text formatter by 40% -* logrus/core: expose `LevelHooks` type -* logrus/core: add support for DragonflyBSD and NetBSD -* formatter/text: print structs more verbosely - -# 0.8.2 - -* logrus: fix more Fatal family functions - -# 0.8.1 - -* logrus: fix not exiting on `Fatalf` and `Fatalln` - -# 0.8.0 - -* logrus: defaults to stderr instead of stdout -* hooks/sentry: add special field for `*http.Request` -* formatter/text: ignore Windows for colors - -# 0.7.3 - -* formatter/\*: allow configuration of timestamp layout - -# 0.7.2 - -* formatter/text: Add configuration option for time format (#158) diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md b/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md deleted file mode 100644 index 6fa6e20..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md +++ /dev/null @@ -1,357 +0,0 @@ -# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/>&nbsp;[![Build Status](https://travis-ci.org/Sirupsen/logrus.svg?branch=master)](https://travis-ci.org/Sirupsen/logrus)&nbsp;[![godoc reference](https://godoc.org/github.com/Sirupsen/logrus?status.png)][godoc] - -Logrus is a structured logger for Go (golang), completely API compatible with -the standard library logger. [Godoc][godoc]. **Please note the Logrus API is not -yet stable (pre 1.0). Logrus itself is completely stable and has been used in -many large deployments. The core API is unlikely to change much but please -version control your Logrus to make sure you aren't fetching latest `master` on -every build.** - -Nicely color-coded in development (when a TTY is attached, otherwise just -plain text): - -![Colored](http://i.imgur.com/PY7qMwd.png) - -With `log.Formatter = new(logrus.JSONFormatter)`, for easy parsing by logstash -or Splunk: - -```json -{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the -ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"} - -{"level":"warning","msg":"The group's number increased tremendously!", -"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"} - -{"animal":"walrus","level":"info","msg":"A giant walrus appears!", -"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"} - -{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.", -"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"} - -{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true, -"time":"2014-03-10 19:57:38.562543128 -0400 EDT"} -``` - -With the default `log.Formatter = new(&log.TextFormatter{})` when a TTY is not -attached, the output is compatible with the -[logfmt](http://godoc.org/github.com/kr/logfmt) format: - -```text -time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8 -time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10 -time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true -time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4 -time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009 -time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true -exit status 1 -``` - -#### Example - -The simplest way to use Logrus is simply the package-level exported logger: - -```go -package main - -import ( - log "github.com/Sirupsen/logrus" -) - -func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - }).Info("A walrus appears") -} -``` - -Note that it's completely api-compatible with the stdlib logger, so you can -replace your `log` imports everywhere with `log "github.com/Sirupsen/logrus"` -and you'll now have the flexibility of Logrus. You can customize it all you -want: - -```go -package main - -import ( - "os" - log "github.com/Sirupsen/logrus" - "github.com/Sirupsen/logrus/hooks/airbrake" -) - -func init() { - // Log as JSON instead of the default ASCII formatter. - log.SetFormatter(&log.JSONFormatter{}) - - // Use the Airbrake hook to report errors that have Error severity or above to - // an exception tracker. You can create custom hooks, see the Hooks section. - log.AddHook(airbrake.NewHook("https://example.com", "xyz", "development")) - - // Output to stderr instead of stdout, could also be a file. - log.SetOutput(os.Stderr) - - // Only log the warning severity or above. - log.SetLevel(log.WarnLevel) -} - -func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(log.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(log.Fields{ - "omg": true, - "number": 100, - }).Fatal("The ice breaks!") - - // A common pattern is to re-use fields between logging statements by re-using - // the logrus.Entry returned from WithFields() - contextLogger := log.WithFields(log.Fields{ - "common": "this is a common field", - "other": "I also should be logged always", - }) - - contextLogger.Info("I'll be logged with common and other field") - contextLogger.Info("Me too") -} -``` - -For more advanced usage such as logging to multiple locations from the same -application, you can also create an instance of the `logrus` Logger: - -```go -package main - -import ( - "github.com/Sirupsen/logrus" -) - -// Create a new instance of the logger. You can have any number of instances. -var log = logrus.New() - -func main() { - // The API for setting attributes is a little different than the package level - // exported logger. See Godoc. - log.Out = os.Stderr - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") -} -``` - -#### Fields - -Logrus encourages careful, structured logging though logging fields instead of -long, unparseable error messages. For example, instead of: `log.Fatalf("Failed -to send event %s to topic %s with key %d")`, you should log the much more -discoverable: - -```go -log.WithFields(log.Fields{ - "event": event, - "topic": topic, - "key": key, -}).Fatal("Failed to send event") -``` - -We've found this API forces you to think about logging in a way that produces -much more useful logging messages. We've been in countless situations where just -a single added field to a log statement that was already there would've saved us -hours. The `WithFields` call is optional. - -In general, with Logrus using any of the `printf`-family functions should be -seen as a hint you should add a field, however, you can still use the -`printf`-family functions with Logrus. - -#### Hooks - -You can add hooks for logging levels. For example to send errors to an exception -tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to -multiple places simultaneously, e.g. syslog. - -Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in -`init`: - -```go -import ( - log "github.com/Sirupsen/logrus" - "github.com/Sirupsen/logrus/hooks/airbrake" - logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" - "log/syslog" -) - -func init() { - log.AddHook(airbrake.NewHook("https://example.com", "xyz", "development")) - - hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - if err != nil { - log.Error("Unable to connect to local syslog daemon") - } else { - log.AddHook(hook) - } -} -``` - - -| Hook | Description | -| ----- | ----------- | -| [Airbrake](https://github.com/Sirupsen/logrus/blob/master/hooks/airbrake/airbrake.go) | Send errors to an exception tracking service compatible with the Airbrake API. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. | -| [Papertrail](https://github.com/Sirupsen/logrus/blob/master/hooks/papertrail/papertrail.go) | Send errors to the Papertrail hosted logging service via UDP. | -| [Syslog](https://github.com/Sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. | -| [BugSnag](https://github.com/Sirupsen/logrus/blob/master/hooks/bugsnag/bugsnag.go) | Send errors to the Bugsnag exception tracking service. | -| [Sentry](https://github.com/Sirupsen/logrus/blob/master/hooks/sentry/sentry.go) | Send errors to the Sentry error logging and aggregation service. | -| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. | -| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) | -| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. | -| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` | -| [Graylog](https://github.com/gemnasium/logrus-hooks/tree/master/graylog) | Hook for logging to [Graylog](http://graylog2.org/) | -| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) | -| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem | -| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger | -| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail | -| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar | -| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd | -| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb | - -#### Level logging - -Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic. - -```go -log.Debug("Useful debugging information.") -log.Info("Something noteworthy happened!") -log.Warn("You should probably take a look at this.") -log.Error("Something failed but I'm not quitting.") -// Calls os.Exit(1) after logging -log.Fatal("Bye.") -// Calls panic() after logging -log.Panic("I'm bailing.") -``` - -You can set the logging level on a `Logger`, then it will only log entries with -that severity or anything above it: - -```go -// Will log anything that is info or above (warn, error, fatal, panic). Default. -log.SetLevel(log.InfoLevel) -``` - -It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose -environment if your application has that. - -#### Entries - -Besides the fields added with `WithField` or `WithFields` some fields are -automatically added to all logging events: - -1. `time`. The timestamp when the entry was created. -2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after - the `AddFields` call. E.g. `Failed to send event.` -3. `level`. The logging level. E.g. `info`. - -#### Environments - -Logrus has no notion of environment. - -If you wish for hooks and formatters to only be used in specific environments, -you should handle that yourself. For example, if your application has a global -variable `Environment`, which is a string representation of the environment you -could do: - -```go -import ( - log "github.com/Sirupsen/logrus" -) - -init() { - // do something here to set environment depending on an environment variable - // or command-line flag - if Environment == "production" { - log.SetFormatter(&log.JSONFormatter{}) - } else { - // The TextFormatter is default, you don't actually have to do this. - log.SetFormatter(&log.TextFormatter{}) - } -} -``` - -This configuration is how `logrus` was intended to be used, but JSON in -production is mostly only useful if you do log aggregation with tools like -Splunk or Logstash. - -#### Formatters - -The built-in logging formatters are: - -* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise - without colors. - * *Note:* to force colored output when there is no TTY, set the `ForceColors` - field to `true`. To force no colored output even if there is a TTY set the - `DisableColors` field to `true` -* `logrus.JSONFormatter`. Logs fields as JSON. -* `logrus_logstash.LogstashFormatter`. Logs fields as Logstash Events (http://logstash.net). - - ```go - logrus.SetFormatter(&logrus_logstash.LogstashFormatter{Type: “application_name"}) - ``` - -Third party logging formatters: - -* [`zalgo`](https://github.com/aybabtme/logzalgo): invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦. - -You can define your formatter by implementing the `Formatter` interface, -requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a -`Fields` type (`map[string]interface{}`) with all your fields as well as the -default ones (see Entries section above): - -```go -type MyJSONFormatter struct { -} - -log.SetFormatter(new(MyJSONFormatter)) - -func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) { - // Note this doesn't include Time, Level and Message which are available on - // the Entry. Consult `godoc` on information about those fields or read the - // source of the official loggers. - serialized, err := json.Marshal(entry.Data) - if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) - } - return append(serialized, '\n'), nil -} -``` - -#### Logger as an `io.Writer` - -Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it. - -```go -w := logger.Writer() -defer w.Close() - -srv := http.Server{ - // create a stdlib log.Logger that writes to - // logrus.Logger. - ErrorLog: log.New(w, "", 0), -} -``` - -Each line written to that writer will be printed the usual way, using formatters -and hooks. The level for those entries is `info`. - -#### Rotation - -Log rotation is not provided with Logrus. Log rotation should be done by an -external program (like `logrotate(8)`) that can compress and delete old log -entries. It should not be a feature of the application-level logger. - - -[godoc]: https://godoc.org/github.com/Sirupsen/logrus diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/doc.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/doc.go deleted file mode 100644 index dddd5f8..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Package logrus is a structured logger for Go, completely API compatible with the standard library logger. - - -The simplest way to use Logrus is simply the package-level exported logger: - - package main - - import ( - log "github.com/Sirupsen/logrus" - ) - - func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "number": 1, - "size": 10, - }).Info("A walrus appears") - } - -Output: - time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 - -For a full guide visit https://github.com/Sirupsen/logrus -*/ -package logrus diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/entry.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/entry.go deleted file mode 100644 index 9ae900b..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/entry.go +++ /dev/null @@ -1,264 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "io" - "os" - "time" -) - -// Defines the key when adding errors using WithError. -var ErrorKey = "error" - -// An entry is the final or intermediate Logrus logging entry. It contains all -// the fields passed with WithField{,s}. It's finally logged when Debug, Info, -// Warn, Error, Fatal or Panic is called on it. These objects can be reused and -// passed around as much as you wish to avoid field duplication. -type Entry struct { - Logger *Logger - - // Contains all the fields set by the user. - Data Fields - - // Time at which the log entry was created - Time time.Time - - // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic - Level Level - - // Message passed to Debug, Info, Warn, Error, Fatal or Panic - Message string -} - -func NewEntry(logger *Logger) *Entry { - return &Entry{ - Logger: logger, - // Default is three fields, give a little extra room - Data: make(Fields, 5), - } -} - -// Returns a reader for the entry, which is a proxy to the formatter. -func (entry *Entry) Reader() (*bytes.Buffer, error) { - serialized, err := entry.Logger.Formatter.Format(entry) - return bytes.NewBuffer(serialized), err -} - -// Returns the string representation from the reader and ultimately the -// formatter. -func (entry *Entry) String() (string, error) { - reader, err := entry.Reader() - if err != nil { - return "", err - } - - return reader.String(), err -} - -// Add an error as single field (using the key defined in ErrorKey) to the Entry. -func (entry *Entry) WithError(err error) *Entry { - return entry.WithField(ErrorKey, err) -} - -// Add a single field to the Entry. -func (entry *Entry) WithField(key string, value interface{}) *Entry { - return entry.WithFields(Fields{key: value}) -} - -// Add a map of fields to the Entry. -func (entry *Entry) WithFields(fields Fields) *Entry { - data := Fields{} - for k, v := range entry.Data { - data[k] = v - } - for k, v := range fields { - data[k] = v - } - return &Entry{Logger: entry.Logger, Data: data} -} - -// This function is not declared with a pointer value because otherwise -// race conditions will occur when using multiple goroutines -func (entry Entry) log(level Level, msg string) { - entry.Time = time.Now() - entry.Level = level - entry.Message = msg - - if err := entry.Logger.Hooks.Fire(level, &entry); err != nil { - entry.Logger.mu.Lock() - fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) - entry.Logger.mu.Unlock() - } - - reader, err := entry.Reader() - if err != nil { - entry.Logger.mu.Lock() - fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) - entry.Logger.mu.Unlock() - } - - entry.Logger.mu.Lock() - defer entry.Logger.mu.Unlock() - - _, err = io.Copy(entry.Logger.Out, reader) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) - } - - // To avoid Entry#log() returning a value that only would make sense for - // panic() to use in Entry#Panic(), we avoid the allocation by checking - // directly here. - if level <= PanicLevel { - panic(&entry) - } -} - -func (entry *Entry) Debug(args ...interface{}) { - if entry.Logger.Level >= DebugLevel { - entry.log(DebugLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Print(args ...interface{}) { - entry.Info(args...) -} - -func (entry *Entry) Info(args ...interface{}) { - if entry.Logger.Level >= InfoLevel { - entry.log(InfoLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Warn(args ...interface{}) { - if entry.Logger.Level >= WarnLevel { - entry.log(WarnLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Warning(args ...interface{}) { - entry.Warn(args...) -} - -func (entry *Entry) Error(args ...interface{}) { - if entry.Logger.Level >= ErrorLevel { - entry.log(ErrorLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Fatal(args ...interface{}) { - if entry.Logger.Level >= FatalLevel { - entry.log(FatalLevel, fmt.Sprint(args...)) - } - os.Exit(1) -} - -func (entry *Entry) Panic(args ...interface{}) { - if entry.Logger.Level >= PanicLevel { - entry.log(PanicLevel, fmt.Sprint(args...)) - } - panic(fmt.Sprint(args...)) -} - -// Entry Printf family functions - -func (entry *Entry) Debugf(format string, args ...interface{}) { - if entry.Logger.Level >= DebugLevel { - entry.Debug(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Infof(format string, args ...interface{}) { - if entry.Logger.Level >= InfoLevel { - entry.Info(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Printf(format string, args ...interface{}) { - entry.Infof(format, args...) -} - -func (entry *Entry) Warnf(format string, args ...interface{}) { - if entry.Logger.Level >= WarnLevel { - entry.Warn(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Warningf(format string, args ...interface{}) { - entry.Warnf(format, args...) -} - -func (entry *Entry) Errorf(format string, args ...interface{}) { - if entry.Logger.Level >= ErrorLevel { - entry.Error(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Fatalf(format string, args ...interface{}) { - if entry.Logger.Level >= FatalLevel { - entry.Fatal(fmt.Sprintf(format, args...)) - } - os.Exit(1) -} - -func (entry *Entry) Panicf(format string, args ...interface{}) { - if entry.Logger.Level >= PanicLevel { - entry.Panic(fmt.Sprintf(format, args...)) - } -} - -// Entry Println family functions - -func (entry *Entry) Debugln(args ...interface{}) { - if entry.Logger.Level >= DebugLevel { - entry.Debug(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Infoln(args ...interface{}) { - if entry.Logger.Level >= InfoLevel { - entry.Info(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Println(args ...interface{}) { - entry.Infoln(args...) -} - -func (entry *Entry) Warnln(args ...interface{}) { - if entry.Logger.Level >= WarnLevel { - entry.Warn(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Warningln(args ...interface{}) { - entry.Warnln(args...) -} - -func (entry *Entry) Errorln(args ...interface{}) { - if entry.Logger.Level >= ErrorLevel { - entry.Error(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Fatalln(args ...interface{}) { - if entry.Logger.Level >= FatalLevel { - entry.Fatal(entry.sprintlnn(args...)) - } - os.Exit(1) -} - -func (entry *Entry) Panicln(args ...interface{}) { - if entry.Logger.Level >= PanicLevel { - entry.Panic(entry.sprintlnn(args...)) - } -} - -// Sprintlnn => Sprint no newline. This is to get the behavior of how -// fmt.Sprintln where spaces are always added between operands, regardless of -// their type. Instead of vendoring the Sprintln implementation to spare a -// string allocation, we do the simplest thing. -func (entry *Entry) sprintlnn(args ...interface{}) string { - msg := fmt.Sprintln(args...) - return msg[:len(msg)-1] -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/basic/basic.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/basic/basic.go deleted file mode 100644 index a1623ec..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/basic/basic.go +++ /dev/null @@ -1,50 +0,0 @@ -package main - -import ( - "github.com/Sirupsen/logrus" -) - -var log = logrus.New() - -func init() { - log.Formatter = new(logrus.JSONFormatter) - log.Formatter = new(logrus.TextFormatter) // default - log.Level = logrus.DebugLevel -} - -func main() { - defer func() { - err := recover() - if err != nil { - log.WithFields(logrus.Fields{ - "omg": true, - "err": err, - "number": 100, - }).Fatal("The ice breaks!") - } - }() - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "number": 8, - }).Debug("Started observing beach") - - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(logrus.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(logrus.Fields{ - "temperature": -4, - }).Debug("Temperature changes") - - log.WithFields(logrus.Fields{ - "animal": "orca", - "size": 9009, - }).Panic("It's over 9000!") -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/hook/hook.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/hook/hook.go deleted file mode 100644 index cb5759a..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/examples/hook/hook.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "github.com/Sirupsen/logrus" - "github.com/Sirupsen/logrus/hooks/airbrake" -) - -var log = logrus.New() - -func init() { - log.Formatter = new(logrus.TextFormatter) // default - log.Hooks.Add(airbrake.NewHook("https://example.com", "xyz", "development")) -} - -func main() { - log.WithFields(logrus.Fields{ - "animal": "walrus", - "size": 10, - }).Info("A group of walrus emerges from the ocean") - - log.WithFields(logrus.Fields{ - "omg": true, - "number": 122, - }).Warn("The group's number increased tremendously!") - - log.WithFields(logrus.Fields{ - "omg": true, - "number": 100, - }).Fatal("The ice breaks!") -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go deleted file mode 100644 index 9a0120a..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go +++ /dev/null @@ -1,193 +0,0 @@ -package logrus - -import ( - "io" -) - -var ( - // std is the name of the standard logger in stdlib `log` - std = New() -) - -func StandardLogger() *Logger { - return std -} - -// SetOutput sets the standard logger output. -func SetOutput(out io.Writer) { - std.mu.Lock() - defer std.mu.Unlock() - std.Out = out -} - -// SetFormatter sets the standard logger formatter. -func SetFormatter(formatter Formatter) { - std.mu.Lock() - defer std.mu.Unlock() - std.Formatter = formatter -} - -// SetLevel sets the standard logger level. -func SetLevel(level Level) { - std.mu.Lock() - defer std.mu.Unlock() - std.Level = level -} - -// GetLevel returns the standard logger level. -func GetLevel() Level { - std.mu.Lock() - defer std.mu.Unlock() - return std.Level -} - -// AddHook adds a hook to the standard logger hooks. -func AddHook(hook Hook) { - std.mu.Lock() - defer std.mu.Unlock() - std.Hooks.Add(hook) -} - -// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key. -func WithError(err error) *Entry { - return std.WithField(ErrorKey, err) -} - -// WithField creates an entry from the standard logger and adds a field to -// it. If you want multiple fields, use `WithFields`. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithField(key string, value interface{}) *Entry { - return std.WithField(key, value) -} - -// WithFields creates an entry from the standard logger and adds multiple -// fields to it. This is simply a helper for `WithField`, invoking it -// once for each field. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithFields(fields Fields) *Entry { - return std.WithFields(fields) -} - -// Debug logs a message at level Debug on the standard logger. -func Debug(args ...interface{}) { - std.Debug(args...) -} - -// Print logs a message at level Info on the standard logger. -func Print(args ...interface{}) { - std.Print(args...) -} - -// Info logs a message at level Info on the standard logger. -func Info(args ...interface{}) { - std.Info(args...) -} - -// Warn logs a message at level Warn on the standard logger. -func Warn(args ...interface{}) { - std.Warn(args...) -} - -// Warning logs a message at level Warn on the standard logger. -func Warning(args ...interface{}) { - std.Warning(args...) -} - -// Error logs a message at level Error on the standard logger. -func Error(args ...interface{}) { - std.Error(args...) -} - -// Panic logs a message at level Panic on the standard logger. -func Panic(args ...interface{}) { - std.Panic(args...) -} - -// Fatal logs a message at level Fatal on the standard logger. -func Fatal(args ...interface{}) { - std.Fatal(args...) -} - -// Debugf logs a message at level Debug on the standard logger. -func Debugf(format string, args ...interface{}) { - std.Debugf(format, args...) -} - -// Printf logs a message at level Info on the standard logger. -func Printf(format string, args ...interface{}) { - std.Printf(format, args...) -} - -// Infof logs a message at level Info on the standard logger. -func Infof(format string, args ...interface{}) { - std.Infof(format, args...) -} - -// Warnf logs a message at level Warn on the standard logger. -func Warnf(format string, args ...interface{}) { - std.Warnf(format, args...) -} - -// Warningf logs a message at level Warn on the standard logger. -func Warningf(format string, args ...interface{}) { - std.Warningf(format, args...) -} - -// Errorf logs a message at level Error on the standard logger. -func Errorf(format string, args ...interface{}) { - std.Errorf(format, args...) -} - -// Panicf logs a message at level Panic on the standard logger. -func Panicf(format string, args ...interface{}) { - std.Panicf(format, args...) -} - -// Fatalf logs a message at level Fatal on the standard logger. -func Fatalf(format string, args ...interface{}) { - std.Fatalf(format, args...) -} - -// Debugln logs a message at level Debug on the standard logger. -func Debugln(args ...interface{}) { - std.Debugln(args...) -} - -// Println logs a message at level Info on the standard logger. -func Println(args ...interface{}) { - std.Println(args...) -} - -// Infoln logs a message at level Info on the standard logger. -func Infoln(args ...interface{}) { - std.Infoln(args...) -} - -// Warnln logs a message at level Warn on the standard logger. -func Warnln(args ...interface{}) { - std.Warnln(args...) -} - -// Warningln logs a message at level Warn on the standard logger. -func Warningln(args ...interface{}) { - std.Warningln(args...) -} - -// Errorln logs a message at level Error on the standard logger. -func Errorln(args ...interface{}) { - std.Errorln(args...) -} - -// Panicln logs a message at level Panic on the standard logger. -func Panicln(args ...interface{}) { - std.Panicln(args...) -} - -// Fatalln logs a message at level Fatal on the standard logger. -func Fatalln(args ...interface{}) { - std.Fatalln(args...) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter.go deleted file mode 100644 index 104d689..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatter.go +++ /dev/null @@ -1,48 +0,0 @@ -package logrus - -import "time" - -const DefaultTimestampFormat = time.RFC3339 - -// The Formatter interface is used to implement a custom Formatter. It takes an -// `Entry`. It exposes all the fields, including the default ones: -// -// * `entry.Data["msg"]`. The message passed from Info, Warn, Error .. -// * `entry.Data["time"]`. The timestamp. -// * `entry.Data["level"]. The level the entry was logged at. -// -// Any additional fields added with `WithField` or `WithFields` are also in -// `entry.Data`. Format is expected to return an array of bytes which are then -// logged to `logger.Out`. -type Formatter interface { - Format(*Entry) ([]byte, error) -} - -// This is to not silently overwrite `time`, `msg` and `level` fields when -// dumping it. If this code wasn't there doing: -// -// logrus.WithField("level", 1).Info("hello") -// -// Would just silently drop the user provided level. Instead with this code -// it'll logged as: -// -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} -// -// It's not exported because it's still using Data in an opinionated way. It's to -// avoid code duplication between the two default formatters. -func prefixFieldClashes(data Fields) { - _, ok := data["time"] - if ok { - data["fields.time"] = data["time"] - } - - _, ok = data["msg"] - if ok { - data["fields.msg"] = data["msg"] - } - - _, ok = data["level"] - if ok { - data["fields.level"] = data["level"] - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash.go deleted file mode 100644 index 8ea93dd..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/formatters/logstash/logstash.go +++ /dev/null @@ -1,56 +0,0 @@ -package logstash - -import ( - "encoding/json" - "fmt" - - "github.com/Sirupsen/logrus" -) - -// Formatter generates json in logstash format. -// Logstash site: http://logstash.net/ -type LogstashFormatter struct { - Type string // if not empty use for logstash type field. - - // TimestampFormat sets the format used for timestamps. - TimestampFormat string -} - -func (f *LogstashFormatter) Format(entry *logrus.Entry) ([]byte, error) { - entry.Data["@version"] = 1 - - if f.TimestampFormat == "" { - f.TimestampFormat = logrus.DefaultTimestampFormat - } - - entry.Data["@timestamp"] = entry.Time.Format(f.TimestampFormat) - - // set message field - v, ok := entry.Data["message"] - if ok { - entry.Data["fields.message"] = v - } - entry.Data["message"] = entry.Message - - // set level field - v, ok = entry.Data["level"] - if ok { - entry.Data["fields.level"] = v - } - entry.Data["level"] = entry.Level.String() - - // set type field - if f.Type != "" { - v, ok = entry.Data["type"] - if ok { - entry.Data["fields.type"] = v - } - entry.Data["type"] = f.Type - } - - serialized, err := json.Marshal(entry.Data) - if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) - } - return append(serialized, '\n'), nil -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks.go deleted file mode 100644 index 3f151cd..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks.go +++ /dev/null @@ -1,34 +0,0 @@ -package logrus - -// A hook to be fired when logging on the logging levels returned from -// `Levels()` on your implementation of the interface. Note that this is not -// fired in a goroutine or a channel with workers, you should handle such -// functionality yourself if your call is non-blocking and you don't wish for -// the logging calls for levels returned from `Levels()` to block. -type Hook interface { - Levels() []Level - Fire(*Entry) error -} - -// Internal type for storing the hooks on a logger instance. -type LevelHooks map[Level][]Hook - -// Add a hook to an instance of logger. This is called with -// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. -func (hooks LevelHooks) Add(hook Hook) { - for _, level := range hook.Levels() { - hooks[level] = append(hooks[level], hook) - } -} - -// Fire all the hooks for the passed level. Used by `entry.log` to fire -// appropriate hooks for a log entry. -func (hooks LevelHooks) Fire(level Level, entry *Entry) error { - for _, hook := range hooks[level] { - if err := hook.Fire(entry); err != nil { - return err - } - } - - return nil -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go deleted file mode 100644 index b0502c3..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/airbrake/airbrake.go +++ /dev/null @@ -1,54 +0,0 @@ -package airbrake - -import ( - "errors" - "fmt" - - "github.com/Sirupsen/logrus" - "github.com/tobi/airbrake-go" -) - -// AirbrakeHook to send exceptions to an exception-tracking service compatible -// with the Airbrake API. -type airbrakeHook struct { - APIKey string - Endpoint string - Environment string -} - -func NewHook(endpoint, apiKey, env string) *airbrakeHook { - return &airbrakeHook{ - APIKey: apiKey, - Endpoint: endpoint, - Environment: env, - } -} - -func (hook *airbrakeHook) Fire(entry *logrus.Entry) error { - airbrake.ApiKey = hook.APIKey - airbrake.Endpoint = hook.Endpoint - airbrake.Environment = hook.Environment - - var notifyErr error - err, ok := entry.Data["error"].(error) - if ok { - notifyErr = err - } else { - notifyErr = errors.New(entry.Message) - } - - airErr := airbrake.Notify(notifyErr) - if airErr != nil { - return fmt.Errorf("Failed to send error to Airbrake: %s", airErr) - } - - return nil -} - -func (hook *airbrakeHook) Levels() []logrus.Level { - return []logrus.Level{ - logrus.ErrorLevel, - logrus.FatalLevel, - logrus.PanicLevel, - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go deleted file mode 100644 index d20a0f5..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/bugsnag/bugsnag.go +++ /dev/null @@ -1,68 +0,0 @@ -package logrus_bugsnag - -import ( - "errors" - - "github.com/Sirupsen/logrus" - "github.com/bugsnag/bugsnag-go" -) - -type bugsnagHook struct{} - -// ErrBugsnagUnconfigured is returned if NewBugsnagHook is called before -// bugsnag.Configure. Bugsnag must be configured before the hook. -var ErrBugsnagUnconfigured = errors.New("bugsnag must be configured before installing this logrus hook") - -// ErrBugsnagSendFailed indicates that the hook failed to submit an error to -// bugsnag. The error was successfully generated, but `bugsnag.Notify()` -// failed. -type ErrBugsnagSendFailed struct { - err error -} - -func (e ErrBugsnagSendFailed) Error() string { - return "failed to send error to Bugsnag: " + e.err.Error() -} - -// NewBugsnagHook initializes a logrus hook which sends exceptions to an -// exception-tracking service compatible with the Bugsnag API. Before using -// this hook, you must call bugsnag.Configure(). The returned object should be -// registered with a log via `AddHook()` -// -// Entries that trigger an Error, Fatal or Panic should now include an "error" -// field to send to Bugsnag. -func NewBugsnagHook() (*bugsnagHook, error) { - if bugsnag.Config.APIKey == "" { - return nil, ErrBugsnagUnconfigured - } - return &bugsnagHook{}, nil -} - -// Fire forwards an error to Bugsnag. Given a logrus.Entry, it extracts the -// "error" field (or the Message if the error isn't present) and sends it off. -func (hook *bugsnagHook) Fire(entry *logrus.Entry) error { - var notifyErr error - err, ok := entry.Data["error"].(error) - if ok { - notifyErr = err - } else { - notifyErr = errors.New(entry.Message) - } - - bugsnagErr := bugsnag.Notify(notifyErr) - if bugsnagErr != nil { - return ErrBugsnagSendFailed{bugsnagErr} - } - - return nil -} - -// Levels enumerates the log levels on which the error should be forwarded to -// bugsnag: everything at or above the "Error" level. -func (hook *bugsnagHook) Levels() []logrus.Level { - return []logrus.Level{ - logrus.ErrorLevel, - logrus.FatalLevel, - logrus.PanicLevel, - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/README.md b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/README.md deleted file mode 100644 index ae61e92..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Papertrail Hook for Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:" /> - -[Papertrail](https://papertrailapp.com) provides hosted log management. Once stored in Papertrail, you can [group](http://help.papertrailapp.com/kb/how-it-works/groups/) your logs on various dimensions, [search](http://help.papertrailapp.com/kb/how-it-works/search-syntax) them, and trigger [alerts](http://help.papertrailapp.com/kb/how-it-works/alerts). - -In most deployments, you'll want to send logs to Papertrail via their [remote_syslog](http://help.papertrailapp.com/kb/configuration/configuring-centralized-logging-from-text-log-files-in-unix/) daemon, which requires no application-specific configuration. This hook is intended for relatively low-volume logging, likely in managed cloud hosting deployments where installing `remote_syslog` is not possible. - -## Usage - -You can find your Papertrail UDP port on your [Papertrail account page](https://papertrailapp.com/account/destinations). Substitute it below for `YOUR_PAPERTRAIL_UDP_PORT`. - -For `YOUR_APP_NAME`, substitute a short string that will readily identify your application or service in the logs. - -```go -import ( - "log/syslog" - "github.com/Sirupsen/logrus" - "github.com/Sirupsen/logrus/hooks/papertrail" -) - -func main() { - log := logrus.New() - hook, err := logrus_papertrail.NewPapertrailHook("logs.papertrailapp.com", YOUR_PAPERTRAIL_UDP_PORT, YOUR_APP_NAME) - - if err == nil { - log.Hooks.Add(hook) - } -} -``` diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go deleted file mode 100644 index c0f10c1..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail.go +++ /dev/null @@ -1,55 +0,0 @@ -package logrus_papertrail - -import ( - "fmt" - "net" - "os" - "time" - - "github.com/Sirupsen/logrus" -) - -const ( - format = "Jan 2 15:04:05" -) - -// PapertrailHook to send logs to a logging service compatible with the Papertrail API. -type PapertrailHook struct { - Host string - Port int - AppName string - UDPConn net.Conn -} - -// NewPapertrailHook creates a hook to be added to an instance of logger. -func NewPapertrailHook(host string, port int, appName string) (*PapertrailHook, error) { - conn, err := net.Dial("udp", fmt.Sprintf("%s:%d", host, port)) - return &PapertrailHook{host, port, appName, conn}, err -} - -// Fire is called when a log event is fired. -func (hook *PapertrailHook) Fire(entry *logrus.Entry) error { - date := time.Now().Format(format) - msg, _ := entry.String() - payload := fmt.Sprintf("<22> %s %s: %s", date, hook.AppName, msg) - - bytesWritten, err := hook.UDPConn.Write([]byte(payload)) - if err != nil { - fmt.Fprintf(os.Stderr, "Unable to send log line to Papertrail via UDP. Wrote %d bytes before error: %v", bytesWritten, err) - return err - } - - return nil -} - -// Levels returns the available logging levels. -func (hook *PapertrailHook) Levels() []logrus.Level { - return []logrus.Level{ - logrus.PanicLevel, - logrus.FatalLevel, - logrus.ErrorLevel, - logrus.WarnLevel, - logrus.InfoLevel, - logrus.DebugLevel, - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/README.md b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/README.md deleted file mode 100644 index 31de654..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# Sentry Hook for Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:" /> - -[Sentry](https://getsentry.com) provides both self-hosted and hosted -solutions for exception tracking. -Both client and server are -[open source](https://github.com/getsentry/sentry). - -## Usage - -Every sentry application defined on the server gets a different -[DSN](https://www.getsentry.com/docs/). In the example below replace -`YOUR_DSN` with the one created for your application. - -```go -import ( - "github.com/Sirupsen/logrus" - "github.com/Sirupsen/logrus/hooks/sentry" -) - -func main() { - log := logrus.New() - hook, err := logrus_sentry.NewSentryHook(YOUR_DSN, []logrus.Level{ - logrus.PanicLevel, - logrus.FatalLevel, - logrus.ErrorLevel, - }) - - if err == nil { - log.Hooks.Add(hook) - } -} -``` - -If you wish to initialize a SentryHook with tags, you can use the `NewWithTagsSentryHook` constructor to provide default tags: - -```go -tags := map[string]string{ - "site": "example.com", -} -levels := []logrus.Level{ - logrus.PanicLevel, - logrus.FatalLevel, - logrus.ErrorLevel, -} -hook, err := logrus_sentry.NewWithTagsSentryHook(YOUR_DSN, tags, levels) - -``` - -If you wish to initialize a SentryHook with an already initialized raven client, you can use -the `NewWithClientSentryHook` constructor: - -```go -import ( - "github.com/Sirupsen/logrus" - "github.com/Sirupsen/logrus/hooks/sentry" - "github.com/getsentry/raven-go" -) - -func main() { - log := logrus.New() - - client, err := raven.New(YOUR_DSN) - if err != nil { - log.Fatal(err) - } - - hook, err := logrus_sentry.NewWithClientSentryHook(client, []logrus.Level{ - logrus.PanicLevel, - logrus.FatalLevel, - logrus.ErrorLevel, - }) - - if err == nil { - log.Hooks.Add(hook) - } -} - -hook, err := NewWithClientSentryHook(client, []logrus.Level{ - logrus.ErrorLevel, -}) -``` - -## Special fields - -Some logrus fields have a special meaning in this hook, -these are `server_name`, `logger` and `http_request`. -When logs are sent to sentry these fields are treated differently. -- `server_name` (also known as hostname) is the name of the server which -is logging the event (hostname.example.com) -- `logger` is the part of the application which is logging the event. -In go this usually means setting it to the name of the package. -- `http_request` is the in-coming request(*http.Request). The detailed request data are sent to Sentry. - -## Timeout - -`Timeout` is the time the sentry hook will wait for a response -from the sentry server. - -If this time elapses with no response from -the server an error will be returned. - -If `Timeout` is set to 0 the SentryHook will not wait for a reply -and will assume a correct delivery. - -The SentryHook has a default timeout of `100 milliseconds` when created -with a call to `NewSentryHook`. This can be changed by assigning a value to the `Timeout` field: - -```go -hook, _ := logrus_sentry.NewSentryHook(...) -hook.Timeout = 20*time.Second -``` diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry.go deleted file mode 100644 index cf88098..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/sentry/sentry.go +++ /dev/null @@ -1,137 +0,0 @@ -package logrus_sentry - -import ( - "fmt" - "net/http" - "time" - - "github.com/Sirupsen/logrus" - "github.com/getsentry/raven-go" -) - -var ( - severityMap = map[logrus.Level]raven.Severity{ - logrus.DebugLevel: raven.DEBUG, - logrus.InfoLevel: raven.INFO, - logrus.WarnLevel: raven.WARNING, - logrus.ErrorLevel: raven.ERROR, - logrus.FatalLevel: raven.FATAL, - logrus.PanicLevel: raven.FATAL, - } -) - -func getAndDel(d logrus.Fields, key string) (string, bool) { - var ( - ok bool - v interface{} - val string - ) - if v, ok = d[key]; !ok { - return "", false - } - - if val, ok = v.(string); !ok { - return "", false - } - delete(d, key) - return val, true -} - -func getAndDelRequest(d logrus.Fields, key string) (*http.Request, bool) { - var ( - ok bool - v interface{} - req *http.Request - ) - if v, ok = d[key]; !ok { - return nil, false - } - if req, ok = v.(*http.Request); !ok || req == nil { - return nil, false - } - delete(d, key) - return req, true -} - -// SentryHook delivers logs to a sentry server. -type SentryHook struct { - // Timeout sets the time to wait for a delivery error from the sentry server. - // If this is set to zero the server will not wait for any response and will - // consider the message correctly sent - Timeout time.Duration - - client *raven.Client - levels []logrus.Level -} - -// NewSentryHook creates a hook to be added to an instance of logger -// and initializes the raven client. -// This method sets the timeout to 100 milliseconds. -func NewSentryHook(DSN string, levels []logrus.Level) (*SentryHook, error) { - client, err := raven.New(DSN) - if err != nil { - return nil, err - } - return &SentryHook{100 * time.Millisecond, client, levels}, nil -} - -// NewWithTagsSentryHook creates a hook with tags to be added to an instance -// of logger and initializes the raven client. This method sets the timeout to -// 100 milliseconds. -func NewWithTagsSentryHook(DSN string, tags map[string]string, levels []logrus.Level) (*SentryHook, error) { - client, err := raven.NewWithTags(DSN, tags) - if err != nil { - return nil, err - } - return &SentryHook{100 * time.Millisecond, client, levels}, nil -} - -// NewWithClientSentryHook creates a hook using an initialized raven client. -// This method sets the timeout to 100 milliseconds. -func NewWithClientSentryHook(client *raven.Client, levels []logrus.Level) (*SentryHook, error) { - return &SentryHook{100 * time.Millisecond, client, levels}, nil -} - -// Called when an event should be sent to sentry -// Special fields that sentry uses to give more information to the server -// are extracted from entry.Data (if they are found) -// These fields are: logger, server_name and http_request -func (hook *SentryHook) Fire(entry *logrus.Entry) error { - packet := &raven.Packet{ - Message: entry.Message, - Timestamp: raven.Timestamp(entry.Time), - Level: severityMap[entry.Level], - Platform: "go", - } - - d := entry.Data - - if logger, ok := getAndDel(d, "logger"); ok { - packet.Logger = logger - } - if serverName, ok := getAndDel(d, "server_name"); ok { - packet.ServerName = serverName - } - if req, ok := getAndDelRequest(d, "http_request"); ok { - packet.Interfaces = append(packet.Interfaces, raven.NewHttp(req)) - } - packet.Extra = map[string]interface{}(d) - - _, errCh := hook.client.Capture(packet, nil) - timeout := hook.Timeout - if timeout != 0 { - timeoutCh := time.After(timeout) - select { - case err := <-errCh: - return err - case <-timeoutCh: - return fmt.Errorf("no response from sentry server in %s", timeout) - } - } - return nil -} - -// Levels returns the available logging levels. -func (hook *SentryHook) Levels() []logrus.Level { - return hook.levels -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md deleted file mode 100644 index 4dbb8e7..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Syslog Hooks for Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> - -## Usage - -```go -import ( - "log/syslog" - "github.com/Sirupsen/logrus" - logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" -) - -func main() { - log := logrus.New() - hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") - - if err == nil { - log.Hooks.Add(hook) - } -} -``` diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go deleted file mode 100644 index b6fa374..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go +++ /dev/null @@ -1,59 +0,0 @@ -package logrus_syslog - -import ( - "fmt" - "github.com/Sirupsen/logrus" - "log/syslog" - "os" -) - -// SyslogHook to send logs via syslog. -type SyslogHook struct { - Writer *syslog.Writer - SyslogNetwork string - SyslogRaddr string -} - -// Creates a hook to be added to an instance of logger. This is called with -// `hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_DEBUG, "")` -// `if err == nil { log.Hooks.Add(hook) }` -func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error) { - w, err := syslog.Dial(network, raddr, priority, tag) - return &SyslogHook{w, network, raddr}, err -} - -func (hook *SyslogHook) Fire(entry *logrus.Entry) error { - line, err := entry.String() - if err != nil { - fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err) - return err - } - - switch entry.Level { - case logrus.PanicLevel: - return hook.Writer.Crit(line) - case logrus.FatalLevel: - return hook.Writer.Crit(line) - case logrus.ErrorLevel: - return hook.Writer.Err(line) - case logrus.WarnLevel: - return hook.Writer.Warning(line) - case logrus.InfoLevel: - return hook.Writer.Info(line) - case logrus.DebugLevel: - return hook.Writer.Debug(line) - default: - return nil - } -} - -func (hook *SyslogHook) Levels() []logrus.Level { - return []logrus.Level{ - logrus.PanicLevel, - logrus.FatalLevel, - logrus.ErrorLevel, - logrus.WarnLevel, - logrus.InfoLevel, - logrus.DebugLevel, - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go deleted file mode 100644 index 2ad6dc5..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/json_formatter.go +++ /dev/null @@ -1,41 +0,0 @@ -package logrus - -import ( - "encoding/json" - "fmt" -) - -type JSONFormatter struct { - // TimestampFormat sets the format used for marshaling timestamps. - TimestampFormat string -} - -func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields, len(entry.Data)+3) - for k, v := range entry.Data { - switch v := v.(type) { - case error: - // Otherwise errors are ignored by `encoding/json` - // https://github.com/Sirupsen/logrus/issues/137 - data[k] = v.Error() - default: - data[k] = v - } - } - prefixFieldClashes(data) - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = DefaultTimestampFormat - } - - data["time"] = entry.Time.Format(timestampFormat) - data["msg"] = entry.Message - data["level"] = entry.Level.String() - - serialized, err := json.Marshal(data) - if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) - } - return append(serialized, '\n'), nil -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/logger.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/logger.go deleted file mode 100644 index fd9804c..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/logger.go +++ /dev/null @@ -1,206 +0,0 @@ -package logrus - -import ( - "io" - "os" - "sync" -) - -type Logger struct { - // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a - // file, or leave it default which is `os.Stderr`. You can also set this to - // something more adventorous, such as logging to Kafka. - Out io.Writer - // Hooks for the logger instance. These allow firing events based on logging - // levels and log entries. For example, to send errors to an error tracking - // service, log to StatsD or dump the core on fatal errors. - Hooks LevelHooks - // All log entries pass through the formatter before logged to Out. The - // included formatters are `TextFormatter` and `JSONFormatter` for which - // TextFormatter is the default. In development (when a TTY is attached) it - // logs with colors, but to a file it wouldn't. You can easily implement your - // own that implements the `Formatter` interface, see the `README` or included - // formatters for examples. - Formatter Formatter - // The logging level the logger should log at. This is typically (and defaults - // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be - // logged. `logrus.Debug` is useful in - Level Level - // Used to sync writing to the log. - mu sync.Mutex -} - -// Creates a new logger. Configuration should be set by changing `Formatter`, -// `Out` and `Hooks` directly on the default logger instance. You can also just -// instantiate your own: -// -// var log = &Logger{ -// Out: os.Stderr, -// Formatter: new(JSONFormatter), -// Hooks: make(LevelHooks), -// Level: logrus.DebugLevel, -// } -// -// It's recommended to make this a global instance called `log`. -func New() *Logger { - return &Logger{ - Out: os.Stderr, - Formatter: new(TextFormatter), - Hooks: make(LevelHooks), - Level: InfoLevel, - } -} - -// Adds a field to the log entry, note that you it doesn't log until you call -// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry. -// If you want multiple fields, use `WithFields`. -func (logger *Logger) WithField(key string, value interface{}) *Entry { - return NewEntry(logger).WithField(key, value) -} - -// Adds a struct of fields to the log entry. All it does is call `WithField` for -// each `Field`. -func (logger *Logger) WithFields(fields Fields) *Entry { - return NewEntry(logger).WithFields(fields) -} - -func (logger *Logger) Debugf(format string, args ...interface{}) { - if logger.Level >= DebugLevel { - NewEntry(logger).Debugf(format, args...) - } -} - -func (logger *Logger) Infof(format string, args ...interface{}) { - if logger.Level >= InfoLevel { - NewEntry(logger).Infof(format, args...) - } -} - -func (logger *Logger) Printf(format string, args ...interface{}) { - NewEntry(logger).Printf(format, args...) -} - -func (logger *Logger) Warnf(format string, args ...interface{}) { - if logger.Level >= WarnLevel { - NewEntry(logger).Warnf(format, args...) - } -} - -func (logger *Logger) Warningf(format string, args ...interface{}) { - if logger.Level >= WarnLevel { - NewEntry(logger).Warnf(format, args...) - } -} - -func (logger *Logger) Errorf(format string, args ...interface{}) { - if logger.Level >= ErrorLevel { - NewEntry(logger).Errorf(format, args...) - } -} - -func (logger *Logger) Fatalf(format string, args ...interface{}) { - if logger.Level >= FatalLevel { - NewEntry(logger).Fatalf(format, args...) - } - os.Exit(1) -} - -func (logger *Logger) Panicf(format string, args ...interface{}) { - if logger.Level >= PanicLevel { - NewEntry(logger).Panicf(format, args...) - } -} - -func (logger *Logger) Debug(args ...interface{}) { - if logger.Level >= DebugLevel { - NewEntry(logger).Debug(args...) - } -} - -func (logger *Logger) Info(args ...interface{}) { - if logger.Level >= InfoLevel { - NewEntry(logger).Info(args...) - } -} - -func (logger *Logger) Print(args ...interface{}) { - NewEntry(logger).Info(args...) -} - -func (logger *Logger) Warn(args ...interface{}) { - if logger.Level >= WarnLevel { - NewEntry(logger).Warn(args...) - } -} - -func (logger *Logger) Warning(args ...interface{}) { - if logger.Level >= WarnLevel { - NewEntry(logger).Warn(args...) - } -} - -func (logger *Logger) Error(args ...interface{}) { - if logger.Level >= ErrorLevel { - NewEntry(logger).Error(args...) - } -} - -func (logger *Logger) Fatal(args ...interface{}) { - if logger.Level >= FatalLevel { - NewEntry(logger).Fatal(args...) - } - os.Exit(1) -} - -func (logger *Logger) Panic(args ...interface{}) { - if logger.Level >= PanicLevel { - NewEntry(logger).Panic(args...) - } -} - -func (logger *Logger) Debugln(args ...interface{}) { - if logger.Level >= DebugLevel { - NewEntry(logger).Debugln(args...) - } -} - -func (logger *Logger) Infoln(args ...interface{}) { - if logger.Level >= InfoLevel { - NewEntry(logger).Infoln(args...) - } -} - -func (logger *Logger) Println(args ...interface{}) { - NewEntry(logger).Println(args...) -} - -func (logger *Logger) Warnln(args ...interface{}) { - if logger.Level >= WarnLevel { - NewEntry(logger).Warnln(args...) - } -} - -func (logger *Logger) Warningln(args ...interface{}) { - if logger.Level >= WarnLevel { - NewEntry(logger).Warnln(args...) - } -} - -func (logger *Logger) Errorln(args ...interface{}) { - if logger.Level >= ErrorLevel { - NewEntry(logger).Errorln(args...) - } -} - -func (logger *Logger) Fatalln(args ...interface{}) { - if logger.Level >= FatalLevel { - NewEntry(logger).Fatalln(args...) - } - os.Exit(1) -} - -func (logger *Logger) Panicln(args ...interface{}) { - if logger.Level >= PanicLevel { - NewEntry(logger).Panicln(args...) - } -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus.go deleted file mode 100644 index 0c09fbc..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/logrus.go +++ /dev/null @@ -1,98 +0,0 @@ -package logrus - -import ( - "fmt" - "log" -) - -// Fields type, used to pass to `WithFields`. -type Fields map[string]interface{} - -// Level type -type Level uint8 - -// Convert the Level to a string. E.g. PanicLevel becomes "panic". -func (level Level) String() string { - switch level { - case DebugLevel: - return "debug" - case InfoLevel: - return "info" - case WarnLevel: - return "warning" - case ErrorLevel: - return "error" - case FatalLevel: - return "fatal" - case PanicLevel: - return "panic" - } - - return "unknown" -} - -// ParseLevel takes a string level and returns the Logrus log level constant. -func ParseLevel(lvl string) (Level, error) { - switch lvl { - case "panic": - return PanicLevel, nil - case "fatal": - return FatalLevel, nil - case "error": - return ErrorLevel, nil - case "warn", "warning": - return WarnLevel, nil - case "info": - return InfoLevel, nil - case "debug": - return DebugLevel, nil - } - - var l Level - return l, fmt.Errorf("not a valid logrus Level: %q", lvl) -} - -// These are the different logging levels. You can set the logging level to log -// on your instance of logger, obtained with `logrus.New()`. -const ( - // PanicLevel level, highest level of severity. Logs and then calls panic with the - // message passed to Debug, Info, ... - PanicLevel Level = iota - // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the - // logging level is set to Panic. - FatalLevel - // ErrorLevel level. Logs. Used for errors that should definitely be noted. - // Commonly used for hooks to send errors to an error tracking service. - ErrorLevel - // WarnLevel level. Non-critical entries that deserve eyes. - WarnLevel - // InfoLevel level. General operational entries about what's going on inside the - // application. - InfoLevel - // DebugLevel level. Usually only enabled when debugging. Very verbose logging. - DebugLevel -) - -// Won't compile if StdLogger can't be realized by a log.Logger -var ( - _ StdLogger = &log.Logger{} - _ StdLogger = &Entry{} - _ StdLogger = &Logger{} -) - -// StdLogger is what your logrus-enabled library should take, that way -// it'll accept a stdlib logger and a logrus logger. There's no standard -// interface, this is the closest we get, unfortunately. -type StdLogger interface { - Print(...interface{}) - Printf(string, ...interface{}) - Println(...interface{}) - - Fatal(...interface{}) - Fatalf(string, ...interface{}) - Fatalln(...interface{}) - - Panic(...interface{}) - Panicf(string, ...interface{}) - Panicln(...interface{}) -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_bsd.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_bsd.go deleted file mode 100644 index 71f8d67..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_bsd.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build darwin freebsd openbsd netbsd dragonfly - -package logrus - -import "syscall" - -const ioctlReadTermios = syscall.TIOCGETA - -type Termios syscall.Termios diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go deleted file mode 100644 index a2c0b40..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go +++ /dev/null @@ -1,12 +0,0 @@ -// Based on ssh/terminal: -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package logrus - -import "syscall" - -const ioctlReadTermios = syscall.TCGETS - -type Termios syscall.Termios diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go deleted file mode 100644 index 4bb5376..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go +++ /dev/null @@ -1,21 +0,0 @@ -// Based on ssh/terminal: -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build linux darwin freebsd openbsd netbsd dragonfly - -package logrus - -import ( - "syscall" - "unsafe" -) - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal() bool { - fd := syscall.Stdout - var termios Termios - _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) - return err == 0 -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_windows.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_windows.go deleted file mode 100644 index 2e09f6f..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_windows.go +++ /dev/null @@ -1,27 +0,0 @@ -// Based on ssh/terminal: -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build windows - -package logrus - -import ( - "syscall" - "unsafe" -) - -var kernel32 = syscall.NewLazyDLL("kernel32.dll") - -var ( - procGetConsoleMode = kernel32.NewProc("GetConsoleMode") -) - -// IsTerminal returns true if the given file descriptor is a terminal. -func IsTerminal() bool { - fd := syscall.Stdout - var st uint32 - r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) - return r != 0 && e == 0 -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter.go deleted file mode 100644 index 17cc298..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/text_formatter.go +++ /dev/null @@ -1,159 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "runtime" - "sort" - "strings" - "time" -) - -const ( - nocolor = 0 - red = 31 - green = 32 - yellow = 33 - blue = 34 - gray = 37 -) - -var ( - baseTimestamp time.Time - isTerminal bool -) - -func init() { - baseTimestamp = time.Now() - isTerminal = IsTerminal() -} - -func miniTS() int { - return int(time.Since(baseTimestamp) / time.Second) -} - -type TextFormatter struct { - // Set to true to bypass checking for a TTY before outputting colors. - ForceColors bool - - // Force disabling colors. - DisableColors bool - - // Disable timestamp logging. useful when output is redirected to logging - // system that already adds timestamps. - DisableTimestamp bool - - // Enable logging the full timestamp when a TTY is attached instead of just - // the time passed since beginning of execution. - FullTimestamp bool - - // TimestampFormat to use for display when a full timestamp is printed - TimestampFormat string - - // The fields are sorted by default for a consistent output. For applications - // that log extremely frequently and don't use the JSON formatter this may not - // be desired. - DisableSorting bool -} - -func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { - var keys []string = make([]string, 0, len(entry.Data)) - for k := range entry.Data { - keys = append(keys, k) - } - - if !f.DisableSorting { - sort.Strings(keys) - } - - b := &bytes.Buffer{} - - prefixFieldClashes(entry.Data) - - isColorTerminal := isTerminal && (runtime.GOOS != "windows") - isColored := (f.ForceColors || isColorTerminal) && !f.DisableColors - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = DefaultTimestampFormat - } - if isColored { - f.printColored(b, entry, keys, timestampFormat) - } else { - if !f.DisableTimestamp { - f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat)) - } - f.appendKeyValue(b, "level", entry.Level.String()) - f.appendKeyValue(b, "msg", entry.Message) - for _, key := range keys { - f.appendKeyValue(b, key, entry.Data[key]) - } - } - - b.WriteByte('\n') - return b.Bytes(), nil -} - -func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) { - var levelColor int - switch entry.Level { - case DebugLevel: - levelColor = gray - case WarnLevel: - levelColor = yellow - case ErrorLevel, FatalLevel, PanicLevel: - levelColor = red - default: - levelColor = blue - } - - levelText := strings.ToUpper(entry.Level.String())[0:4] - - if !f.FullTimestamp { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, miniTS(), entry.Message) - } else { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message) - } - for _, k := range keys { - v := entry.Data[k] - fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=%+v", levelColor, k, v) - } -} - -func needsQuoting(text string) bool { - for _, ch := range text { - if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.') { - return false - } - } - return true -} - -func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { - - b.WriteString(key) - b.WriteByte('=') - - switch value := value.(type) { - case string: - if needsQuoting(value) { - b.WriteString(value) - } else { - fmt.Fprintf(b, "%q", value) - } - case error: - errmsg := value.Error() - if needsQuoting(errmsg) { - b.WriteString(errmsg) - } else { - fmt.Fprintf(b, "%q", value) - } - default: - fmt.Fprint(b, value) - } - - b.WriteByte(' ') -} diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go deleted file mode 100644 index 1e30b1c..0000000 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go +++ /dev/null @@ -1,31 +0,0 @@ -package logrus - -import ( - "bufio" - "io" - "runtime" -) - -func (logger *Logger) Writer() *io.PipeWriter { - reader, writer := io.Pipe() - - go logger.writerScanner(reader) - runtime.SetFinalizer(writer, writerFinalizer) - - return writer -} - -func (logger *Logger) writerScanner(reader *io.PipeReader) { - scanner := bufio.NewScanner(reader) - for scanner.Scan() { - logger.Print(scanner.Text()) - } - if err := scanner.Err(); err != nil { - logger.Errorf("Error while reading from Writer: %s", err) - } - reader.Close() -} - -func writerFinalizer(writer *io.PipeWriter) { - writer.Close() -} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/Makefile b/Godeps/_workspace/src/github.com/n0rad/go-erlog/Makefile new file mode 100644 index 0000000..9eaa682 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/Makefile @@ -0,0 +1,10 @@ +# this just wrap go commands + + +all: format test + +format: + gofmt -w -s . + +test: + go test -cover ./... diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/appender.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/appender.go new file mode 100644 index 0000000..2241750 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/appender.go @@ -0,0 +1,11 @@ +package erlog + +import ( + "github.com/n0rad/go-erlog/logs" +) + +type Appender interface { + Fire(event *LogEvent) + GetLevel() logs.Level + SetLevel(level logs.Level) +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/data/data.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/data/data.go new file mode 100644 index 0000000..eece691 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/data/data.go @@ -0,0 +1,38 @@ +package data + +type Fields map[string]interface{} + +type FieldsConverter interface { + ToFields() Fields +} + +func WithField(key string, value interface{}) Fields { + i := make(Fields, 3) + return i.WithField(key, value) +} + +func WithFields(fields FieldsConverter) Fields { + return fields.ToFields() +} + +func (f Fields) WithField(key string, value interface{}) Fields { + n := f.copy() + n[key] = value + return n +} + +func (f Fields) WithFields(data Fields) Fields { + n := f.copy() + for k, v := range data { + n[k] = v + } + return n +} + +func (f Fields) copy() Fields { + data := Fields{} + for k, v := range f { + data[k] = v + } + return data +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/docs/basic.png b/Godeps/_workspace/src/github.com/n0rad/go-erlog/docs/basic.png new file mode 100644 index 0000000000000000000000000000000000000000..0baf970959fc70505a04e6ae8ea285bd25fe689a GIT binary patch literal 27719 zcmd43byQr>)-Bq&OMn2u3GN!)A-KD{1_|!&PJrO<!QB$v9fG^NyUX4D&N=UmH{SQ% z`|OWb3}AP4kEW|??W#G~oQp7dSurGd9C#22gd`y@q6h+k3j){qu+YHIA83#Dz%OV+ zDKQby+xu5`Yf(JV17|C);Q#_5puc~Efl|}4fle4l37M}j>tL`bYzzo9T2??8zJ;>7 zqwsfYYZDts;2{VkY;R)VXktv{V&P~`BqkvvZ%l6j0|F6&Bt!(2T^Ema+_Y6@Zr@gi zq3Ex8Lc`Z-e_`Vg$x`}<n<pj;-{R?xA0}9Q3$iFQ|JIt6YLbeLoF8n#`*BL|8)d4W zXyT4<Eys2!`sb_1m+G@1k5kvN9dPg`5B?{Iu~oB`*11KGEQeVQkCRpt5G>xm8xo?u zF4VuTwc$2@#fQpB3tJiDRKg;^x9D#w{?HH{$l2mfc-jHWXeHmz$H49FO!8AFK6OY& zxjNHb#Ez!<2LuG<ZBPpmgV-Pjz}BJG>!=A7BhV0G&S`wXL3>~$(Ahtd`{OCG#K?5P z&dDmF|9R_0W&c%>KGHf12t`@UQpMd`AIJAQC?9kVRrRq022?0DvL_KQ_1Qc9V+^5L zubSMhcRj7P+02DRRhQ!~3gY{xdkmCJ3v*Al_~eTP;sCox=x7JSQ_wl8;L4ofa-JJf z$(XYTL4a7H^q~X_1zF%bJV2TdO(^;(z7imtl8VxVI0b#x%*y&9a|nGt-xUy_N`V)m zKC^E%Xje5r`}5zzw_$S(G^pk-=((7a{z1Yv$b<w{?eEh}@P52{z5yYGk`eH>d&_4W zH{FsL{J;A}8XZI;R`b?p$PpW4PbnGbI#-s_2S%5Jxy@o!xAS<f3*|o8TTJ4NdPMn_ z`k<Cs{Tyib2E#(O>Wf0>k3csi@$~|!f;DL)@J|2uXwK-H1a=Q<g4aj#wbo?iRq-N* z?H~ccfM^w|euLJb*Hu6|V6NblQ0ElBNFdfy3a!A;7zLX}P`=!tIAuvr7@+l|Bkfw` zz0!eq!Ua~B+*iZP;R&@-kKzPI5Y7MEe86E%bt?!!{WbJG8grB!RY;%;${;eFPi5;- zS!K~3l}GSiltk~>Jt^udl#mwcSb(i^f@)z1mehdB=N|Gx1t3hEJU4V|8e9sa$J>Rg z!z`w0?L&R(ja|VxAE4v34P?ACa%o=k+E(30c*13*Nh)XM;+G`_;R_(#8cu~W-eS$` zv`-x8Oa(EnI^TXhZIjyHpnPub3dZvS-!E1;i%2>mf?XiOQ>ZskvT#x?nD`W!;67O^ zcrQESb1bl*9quxhs|6;MToTjl&xjNlgfpjB{Fn&?t4h@5Hz9Vzk4>qj=Prlp?28KK z&kGAi)S?$~(*uFRbKViqEGVU6tJZ6+a-oQ{$*htpT|hf<O^KiC1{G%9CHd7yi{u1F zMH5D)B|Z@?U)6Qdze>aD^*3fz!46t6BrrHMko~2#?E8psZpM*b#mJMCfZ4c_omY>= z<aJ=_B`=Kind>A~n-8T|<9<1~K%in{isI37VQLTfm5_a`DIcs_f<f#xB(7Fo2a6gf zv%Lor3Kr#o2;4=xXUc~xhb9i^mv&wEgCRK7oNyu@Q^Jo>7Nd!>i~-~L1^pKsG;f}N z)NKKAFbeX_$Ei4<rR>%TAeVRIu_UU*EZL%qGANY+@v+MnlI<}2`E$=H_m_e|+-hgx zmd+Kc<{!C{ZASeKw$|ZOv~`&v3;W8a#MYPEU>1>+eP_M;H*HSsmO1QT)oOhp6OzJq zyPNH3Kpm~i@rkv#Lts4+p%CZ7Uy$QdE}<TkXkL><v%o-RGxC}!jAkyl<r@mV4{_x% zX-LTs>*3UE?fKC@;P+8!KRG!#I1X|0IYsqm6;+q(C+iiy5%EG<sm>XK2tdcm2h4CS z^QF;utoKcprgY*7rSRtbj?|t@cO3<K4WGR>#E&IBWyw4W&V6hiASoIdx=&aZC>dz{ z#3G7NS@)gle4H=iXB-wG%(Y}5(pX5Ol{!=M6s;)0_6rnC+|6&QNkQEpPn2B>3~08G zZ*;Hv>+enS2ODxp^hsSbzZC5kWv6Gn5h~5Kh-?4Dc||9ya;KM^VCMXW%cc|!gv2<h z(YTPT!+C7b`Tc2>B*a$|)2^Y>#puZ{G23&i+$VYln%*4}?hCCU7;!xgwEngiY|#1) zn-CfyN<}6ZsEMt<s?h#JhcswBfU{5w$Ivv;X*wJRf}`le8TdN73O}`K0dF})Rw>B& z7e+;62i`@9<Tkrlo}7a%(598h_8mZE`bzy7%KeJi1pdr{MkQNBRT`XE*Arz*_~^>4 zaPGQ1pb2eZ4Y$=1&8nZ;)R4EHV6(Slu*Xb@AlsAuOv#m#zONu(mo!`TCGI?vwIs(^ z!rM!qb@XYZ*;`p(X<#JaAc3~Sc0)VUGcI`zs>QxmaJ4t*A2e3$>oXW9A+p84FKf{S z+&;SNHhdrxi~MMgGtVXKObxYfUG>TETRQl8ZV7J&NCYCeBtfjE1m)2mDaPF&=_(_U za`>Cd!w2eumQVQ%QyrZ^Q`q_;$QvqvL-mmyj@Kdpj27~0kh9W#{!MP_XU?8asyW0u z0%$|O8#S#Xn2z<$2!gHLi*){a7fF9=ZHBeBa~3kS#GUvIlqN}7mJkEPIM~h48>x1y zuX)j}`X=Q)Yd)v_gLOL}mA3JD(z11)Ep06(p$oo3HC@aJ-n*C#E0q>C{ef{7n5y!# zMKDLPEFcL-ARs#HVoG0Vg$}y=jxfXw>7+|9vzYBR4cqhp(>b(=`Os)@x6xs${l+4k zE)N5?47z%GXs4#;Ta^4!I3qR%e+};oNB;Wc7cR>C)%%O@2@WeC_19tqkXC|X9Y%*5 zj)^lgZlV{CFWN{ut?*X|wZJcu@pr4g(m!Xxu$A5Nzxr+f5%~*OQeG#Z@~}4%W;ac- z1GiQa6^UrYe<+5k46+vdf{q%vi#Rx%(2OAiIvX125%hBprT9LK$OV1h=zX8q&Q1eJ zCl9O#YklEwP$1^cU~A|A?qd7*AhNYh7FlV4wENe!Z898ZCHVU>477^>t=E<;6gbM? zTi&Zsl}oZ#tv>777d!&G6timg@=r1xkC55*-_A;FHigoq^kRm^oF%EJCveyociifc z#7dKys$A}b1y{cS^N86fYm!1|CD3U0_xBn<(hzxKAL?@wwsYlB2JKW%POj(AU7e1+ zZp#ZsBdT9zBIkr5MSA}I5l6NZCaeS|m2-nirbn<z-nIH`2X5-k_c_<MoILk-1Oz7E zQAbfiKJ71ma^3l;-xc_K(8sx<f~Q_5WMQGcJEUN^JgiMY%SlBC76oS26#^EXnKlU< z2f<JLu9+%+5OEUccb@`GLU!U`h7Ik<M|d)ETuC!I9$s%^NdkTm)k#*2y|u3qe0ihv z%gJ#Y+qj{!-9=lo2P7OV_Bf0D>`)oOa$>tl-#0dH5aNbw9IluKOR;f`CX{KPlYR(( z70#fqtqyU@L$>wU<*&Mg?O7T94!duqC7QF{Co$h}Se^$tSXQ?2vS@>`d)yaA7Mq>x z$>HeriGZP^T;9K_Mo9)3)cP>P5&c^#L+r7YZisfpVlV$29IXa;nYP9k90bAgX&wo9 zWVMD86#tDXl0mqEKj%e)o2IeC`qq1)wH``8e6~J^6Rz|Ro(z`+F}<C;4wPX45F~ms z7kt~)I%Gr=4Ct%9M8LU*9+C<#kv94pt)uO`DW%cWdis?kFnUsjOG|X)^=&k$#^mSN zm;M1YdHWZR)3fxT8W^9vmVIJ^Q>{quwdaVt!&G^qnul-EH@V1k)=(vI&4=+HVf9s6 zl$^+eg9GwPB!5sfHSR-#nmi7gBo^m;SmU+0u>&kw8s5IXmTQAL^3t099jQznoWg^} zhKp>!nJFfim&oB#Lu_{yR@qy_H&1?o5>p~>bnr{CRO)nkDhl3GP_2<wjX|#5Xw`(@ z-1I$bgJ5RyE7$S^gNWp}Lh?GeJBBOMLwUYLs4{|Kv`RjI97*YTIzyN;9R)WXnHZ(u zOu49aVPN!NTR*0)Tc*{9%`aln<$FudK*1r+4~sFoG&W^^*c^RwWu!_<!)5g1s<Otl z-ADZq3r4F2?RZ4qiVTBd`e1CrlnH|}J04U0_+ePi+1Z3K@E7I!QDw@pg+&L;xOgLY zm<0oqeb@#kH!ds^lxjJ+_iM^dtu68TsV?tb@BZI}lX`1h#&172o~37;cp*LzfBEv! z&CM;D*MrUZWHG3vg(ni9Th*TLaD(%vxov~%#)*M}!D_kbgUi`!Z@E?@qub?n_)!2f zQr9^DTV!tT=jGo{2&HP3!D(r>a~H(I!RvE+K3@$Ci0O4(LNB)ZkAAY4PY@ZKndMbg zp(fGmbd^@NY2GbKasLa&rOLWzeOgll08CJHri|CBRKY47E~V>0nz2b9Mn=eP{eDUs zmHVzKeAYP}aGzsMh>R~w1K5YOR#85NYLK*1QTbU+QiBbdewy2W#OYNmS5T9QRWaZV zjX8zBRyD3(Pwdj$grb?hU0Y!9{F;Bj0S`E=pE2!SAIUmz$PrHCv=0n1QFwj{i9i}0 zsS24>c8*0)wDB5TnF={Kct4J1z|p837K(|Y-JX#2^q}J5!3qinp0yc0lv<RP!&%Ov zKHi#KBx7SXHel}78$uD&M(SHi**cL)r-`aJRb9F}v(Yf{q-VGs_1!Pld=<Z1aS8l^ zO0E`yOiS>oc=!*oM(<Glw~q!R*#05FULU@`E4n`wGDuv2jC8Tw`ls$Ob|{AU!Q+<n zc)ruPzL5eF5_Q#Q%~t1A{IIe|SgaJ{_`*Wq%@NI0Z6mwEsdm@%Lt;C_=BE0S<MDvG zkPz&ekKF#;IOF%e$JF9B%Ah_WztEEFwbz#?C248I4<CAadli(GF*11EY8G9IKTAqU z<;9YS#iga;K0H27)|d=aSDdZ<Ny^R38yp*p=HcbF7>pzPnVPC;=QWWn=y)(m79JHv zCMG8KZK;8-T(e$MUi9tt<=}MX&vh39!;jip7N>*BAbWdzN;b9z`gVjK8bKz9hIhPL zkI(3bAqn#h>kS7$tO{vhZ*lp_fsw8;=`Wf9d>0;z(o)zy%6fn41MiGl5$%BSw2>sU zAbB2eH;1Rx>L_a9XZeKWn%R(Zs}Tm&8Jg1;Lq0GNU+O7q+MP0e`yyC@I^h;6O<qLs z9TjAM$QipV=1n$Yra&cVV-g1=>_;O=L`qhj6nBfzF%jUrBY6uxB`YUO9*IpXeYBc! zzF^kH`u+RuB?6L(7z4u;4;Ke2GjkvV7%na*>o^KN+N9%235}X!TwPK)b~7_G>}Xm< zrGv1OdFbA@vBeEZ0-^9_rLIh9cuk~s;i6QewqZi{y1qf`A8vzjg5fo+qgke2SuG3Q z#<Az8>P#v@$%43_k_GE6+1c5e3E6gAePLr$3kxZyYwda;_#O9Ad9OxTMBg0F*9B8K z>~e{$*E{^`9QMYzo(SZ{nLZ^XVRi#J0n6tVxgaRU7QhOuNVu?B+2Y&gNF<*e++VlS z9zN~?aIo{DT<Qa#!H3j4Pq4Y@Qv;I(jLsoZxRhmh7|f`UWl4qD3M3<w2j~5;be+=k z`_(Awzv^foqyNHd%{yU(-)+zs#8+eVszs|#04GWm%o8RU2!1@jyLe8ktAWxTwmAx7 z2!Sw^IzkvlvjH+1AHDG9Cdtt!roq}T5Yk|=+UU2i4*PfTt6iqOF*tNzt;WE)jEsdJ z5-|k6Nm%+uc?}K-2jLM;<JQ(etUj;BG-?r;lZRrF+Ei3lO~?0kL=-Sh_CX2dl>{;m zBl}yNjPjZ<;v4<gi*;b$PcnGrRL#=$N%PKF0qJ-KJPa{NA2c7^&hN~e%2vEzU!R+E zg$xXG#+oxSbm|kEE$8T44{U5~-Z#F@t*wo{J(vPT4W__C(IVN5AF;6ptZx$&@`!|d z+CQB4Cx|^YLMR}_75&2rb~{&FKZFyk7~MI%>VSNsTBQ<_U0t_6g9Hu^brviLmV*P# z(AAeXb2;7!%1+X$Ckt|A-jd$=ynh`Kx_+0W!F`)sKMKB5a-_lsX(=@!CI@IqjKBzO z?4ksDfN)xAJgF#`pB3Db9z+wg`H_!APZS(CP<<AsA*Dwj7mCeNLND!C>elrO5uu>K z#A4tpM^hk{+fk%bA+=kFbdzsyJNzILV>{Cq$O^Y5CBeP#!S<)&%qJmX5g^EAA=_Rs z)mzjx@ef@bf2i^+-WM0Q8Ner6-Azs|ItDVy*=<!}zrH?wZ#}S_tLV+(c0na1j6uMn z&jxny=;&zI`}3S_<_hiR+`U-&RmPv$Pf2p`^I?Urt#H52W`(B%CQu3W_2d_=XqfG} z`3MGHl;^1q7c$H^x$X70@Rnx}+jGO{&O3WKacU`U8Nzbx)We?c$nkZ&3=j<#|Id|n z=q1%wh4ZJzrq<mcc${&&G=n8(_yVz6Akd-<yNIpIqS3Zd*`R@gct;L`iNgbPe?FEo zw&ZV4z%|1QI)$&xs)620-$VtzLnuCHTx(fvt)Eg6b*0Ne7oOr5LTNdE>r5+rZsvY{ znVlp5%mT9T@Z=rADNSOPic&QVc@iRDP7F(Gd_z;&gRO^U&Vw70U_vI$gb8{5wYCxs zzn+e`6J4dduQv3SS!J}uqdUXT&5B5rbaX*NIReEgk~Y9*`uy@@cedIZUdQM42y5>B z_TqAVynwFNX!9j`yt4f@+@L#nV|O&|rqG6L6#0**D@-UX*h*%A(1EY-sa4^?j$Q#> zA~rJ**jSXNKt)w>UL*fv?;9@2)?4q}4sT)tG&RlFsdHCKtCI;<9s*_E;N_7z_qopE zI#?(lZ<LTRD`x;beaFa@z?#6we1IELZKc_K;P-(`>m#;3;Kx;!<@>S3)mglkW=oja zlZ9<q?f%7MFeDh<+4(r9f+<btI>}oR?R+ET_)U^*eY?jLvs_(4!sz>WaM$iA1Obo! zHKF&w<P3)syz9l+TOSGvA}*X{t{I+%LKz4lA?h9XCu{vt9G%}&MGLgF&C5K^aq%gJ zdq)WB8eo~3$3fnYb&i%{RGGcgG3wqu*HMjY(4Rl6<9@O1GtJOggf~8LP68KZY3NzT zDlU#J^zsm$%7G}YM8eHa=p}~7qSx-2$PqR$F)^8aiy`0*Z(MapsHmv0b#m$j`m5EC z^7K3Xq11mnQW+W<ZS3!d&X#K#JzVa9r}p%SSj|^~85kH;H8zHnmeK?xe)4bixSK_h z`f<zZU>z~g3gAGiDWST3UU&rqJIWRx1T*K#-W^(t@WGipkBQ%Fu1&1g5tnhFd0On? z7A)8LGaM4SAy6vyI?jp_Cb&##bJ5r~FIJB3Nu0n4bouodxF7OJsB8%zKM_1%>&-Vr zb_KK|1Q8yaO>Qjjok;c;mtnKFhx$pqp{%p)FqWm`0yINo+ZvnZJ}XBhuelO6d4`xO zOh)JK3Zg>KY^r!~EaA2wE1@?ylw8JemY^B$ehWpvJou~4qoe-Yt7LnUQUCn)NgyPf z3W5IAevypPRFt*#!m!;e?Rsft{&0gSQhawmOp|leMeg^Ox2+hz9+AEfX>#oV(Mav# zM6m7<2&F>CuLrYqs?obr+GX{moXv52rD_Yq>Qgwxh2A~qd7~kw+M|}D&`P=Fvc_%7 zZf?I3ZZy8>5WU0AX7aNLd~Og53LDhgQX0~Q_Z5<U2Ssl_bD>uST|739l-JL1hzG^v zmL54>7E^@=0F0QgGJx2&Z#MQ8jUk94lS*8Fez=mSPPjj5Tw^pH!N!}wwqI%U;>Li7 z!lYIAy**jl>WjinW-*H<%Hs97&2DMIBlNod@Z0eKyjeS1I0SiPD~7*fDHxW(bzSfy z4!fz6kId+!TbwY`Shk>wsqD;+yxtC)gWh?EFfSbQ3>=JDch6+ONR8bk>H6W2^rO#n zj?ezDitM%%y57z+1R(wF@2>_X7SOjlYDM{(2z3ASosBd$uInf$U=8cJZQUHSo=EgB z5*rQuzh<=S*yUC$SQP=79fcNH0Y?J^3G~42h~SK$6_5}?DEU33w-uk|{C@l`j9&S8 z@r!fkg)M#^D*SjNWvdhPT|;X?KZQ#wU0FgNyC?c<U_xG_;6u*@wh-I=<HsP%o{!p{ za`$jYRmd?H>LH?pTzR#~GECtY?5};Y$32>5Uzx&b%%`sxdCUvByFOH|e-t6XIkoNo zsx87CcR}L4-MXgjcshbPn8ui6b6MHCD{VbOI#toVnEKcBz}_<V`*h=i&&Eav?)R#4 z<LkkX1jv!tU_3V%T7Lil*g&qJc|)5n<=*hhSVxcYVP*(NNO8EFj_(MbdUyD#r8?#( zT^`~o^E(<pTM`?zp5MzqH<x9m!L7MH64!lOG>yfd{Sp8W*J;;PB*lhPDP~JDs-+(J zEjRXoMfQQ?8xT)_e%uku+ZW9?Y#d=?Tq`e3t$9V7y4=PKwgRFcEB!oS5^_S2F_PtF z2>)omr#tTVv=OnV_M@t3-M-;%WEXp1h^P+OAt6jXLjOt>r9YPN7IOyH7Y6@~jmP3h zK%-;~aWElc)I8HY9Dwhzh@_quP#Zf*mR?v7CC99KD=oZmp0lw;x)OG$ya_zIkH3e4 z!W9^o_3q=+J>)(n622e<3}d;B`D77=yj=rJ!gNc&%9DxJFagUcIr`ulO_x~<P7wyH zX~O0>F&`56FsXi@xL7Yj_wd)2Cz@G2h~}`|zHJ4SR3aaBN3^!xL{Stl$Yx6a7!0)F z;|pB*(~Q=WkWCFE!6)cUEF9}&+njH}AS|p`sK1m8Ly(0*-}!pqBRk))Pt{D@JPCC= z&d|RyS{V>dm?C3@++cwFm@SuZRUJh4Q(p2>j@Gamf5~ZbO8)Iuj|JDxuES*wEG4C5 zw!Fg^tglg!u})2SJhS8Rrh}oqiVi9m30*gfGu~P_J4~b2_Y;fbm4vM6^YIG8NG1{o zH$sRICOzcj)F*~4pRq9*B(%w%eik=omK4tmQyXY2NqTnn2C{($YpXv&k%$ewLX9?) zN4DqsiE^r#TW;t2FVEPegw@Z#?rNB4XB8Bzwr2Fa4TKrSd5l^rt_R5qTYCn`g7=QC z8rJ4YRIL8Qwt8qRoSx1&=tUCfEa)yZfaQsPBJ5&u@rWgpa&#$Tpa#c~J7sne37no* z-rm_UxIJE&ueZdyyu4&|K2{%ei^Au|<mBX}q^9m_cGzRIS?0h`6%2qT=H|u?3JPj+ zJV4X+x>3PT1@QOAa<c;^J-w)`Y_u%jV=&lF0dU~p0N7ASLE*z#CT|3mp6B0npQB~l zWGX3{_@KLiwyoOf{S~9>YyOzxzaB*cREKo_(l!&Dc?=A1WFk@Ml?qdG;RD}ip)T<n zQ>;=0;muRM)8&|PJ=mn#56mvzu0VrUc)t$BP{<OXe3!*YWA~Dk^De`3nEL&<Kro9T zUMe`q2qHvueTJzq4{@}DPt{p?>mBu8!o;8btDI<vS%2!AiJ7luR=L$~FenP^J;ufc zdOg81F+sw>2+5-^84`WYjq6)XtujT*`L2f<6J}s%X=$KKql((qmAtSvlfY<=W3VB# zF=uZ~O8nnZR;p1nQqc;PQdpxtR308!RaHoKcA+djX=JK*>T|kMFcYKfjX1bgOJUHD zOkUc`OHAZ@{`xdoE@1c%3vwMBBQMj_TgYl{g>%?L+Z}Iw_WFR;zgT1>CW?+GbpPrh z)b1VZ#$s|3Z;0f1qaq~Kg>GW~_w_qKE2+rIgF{0%H#dRx3zyC0p`yyVzjx(wI>h)Y zBJv|30K(~LHVWXHkS#Z7YgwnOtx^mv=ir>&+)6;+fs%qE1ONq4&)eJE@{Kkt1D&0I zpFe-zpDtEnwOtp8zx-C%-`6*}P-|9fHlDe?zAmt_vEjJc6ZYH20<98Ymh>cRjm(2= zME=HXx5g{KAReUoL}XjZrLIOlz2OfF8%U`}uNo6_#o>&%Nju|be)w6STH(1iM4BZ5 z1INrMl_Z~7qw@V*%{sjX=M&CPImD=D$sc(3T>d2BIKrLSqij|rE=^L3{?Y5OgT!-b z3~K%Y;*y38WG7g@IU&`=J~7+IU7;Vk>P}bSvb@NpuWn5l+9%|luP>QL^8z4<Nrdln ztEvqIubwA}iDl+0e%q6gNqAg@#?p`kOtiSoc$p$zq^HxCd*@#oiNDU2!YL>u#{MgX zP=<zqM=R~%LUFuc^zdZ3!c{nLK{I+ZtMWEsrHo;)#O5C{j9v~&l_04|o#21v?+-5V zfXCzd!_d$W(&FXm4(r_c-?Y@%^k1}87L5O;4r6+LUY*PJJe!ov99TS7{SHuu=V1*R z>0qWfS<t`|^M~GMF%XE%=Pj&7rn1Z7n4D+1UBr>EF+Qu5gJHNm%zuq7m*)+0Ir9l4 z=54uz`iRMRR#M&$tb!q0pWu-VIeQaa!j%4QL!v2(4c`Q%LM^OMd%hDH3iYz=yJ`~K zH0x}Ys1j>0sdU$oE4~Ahn&U#u1-2w5&CneCQ<-3%iBv<{AM)47VSxbb1*R5jtp<cY z<k9$3_=msU(39C?PDJ?(z?U|((Z|ND2J*#FI))Ldsuh;<f*gB$fA2Lk2;tn=+@#vq zn-iCN_Y5S&bp;Pc6T;Zr`_ibXFFYRpovt`~bVWw|`A)K!g4wKn*SyiiEG6lcPRJTo zdWk5+u*ZjugaZ@X7@l7=@GTp&+I?<TYg^r`U+*4|I$oaSuD1%Rs^s^U$Hrt834ruE zhv$725giMQ5-JK3Qt$ajH<U#PGJaQ*rf}`z+wjnkki7g4Qt!pa?=gDb4__&=ej`dq z$}haoP&U&a-xoBF32dm|MC&<Hp~F`uCOoW;26geu%V&0xpcc3|m|bl)|HlhZ0JpyY z4jdsNPgg>E<ZookOi;Q&w8DxI(QoE1yfFyEjcxJp^@NCj{T76#?2m@8`N{aB(mvSw zXZl>u)GdZ*sA%f0AA}J&+&8o<^12mg#eF|>vWeFB6*lTQ9p(ePCIP^ua@$qc2!o7Q z6^Xbj9s7k$4d5KzC;~;Y0`cSm>e!5SpU+PkJ2rbK59Qm1{ed)Cmz>NEl2VoNpQOau zLXt?g@HF+FKJc@);l-=#1L%u+s<|t~zk5CoJ3}88-V!8@tgUs<j@0AOlpQy))SsZ$ z)crvM8#C}Gcl2s0A8^~FDTn_kYs@|b$Tyr&$on7rZ^}E;3oEug{=~N45e0^e9VmDY z$FIUkD6<0%I$cLjUk?m%Rgc|;q}V2|{G1u>h}a`g0r{zGp;n+jdL&Fa3K>7&=OBv% ztmO*%>5whh`6OBRcp&!JBqIYUolC{7RSIkO$75BE%*FN8?%-@Si38%SavQz&go6?m z)3C5z^@F`m>ySSV7}!XTy3zroN=UFPpNp*fOX!AJ<X19QjQPgOZ>mI0zzobyd&Q;= zF9O2PL=J@QgZ<6<^>J;-PpXdgx6wxvh)y8u`T-L&c;%0aTE5fCqKd%PQDwU!0Jodm zt_uIQ{B}MG*ZD(D@qXlOGzEV-8_VE6zrDrWp3<;fDQtgzM9}%;+$$RulNTBq%B44+ z>*a6toJGE7v0%JKD9UX42R@5vZ{LNClg6XHCjO`OQ>^xZw7nL^J9P7Au^(XaY{_); z&y^^wA~QK^6P<%&-o>U<<tt`oT#qq=!2K4Mc+Iw2c%v@YQ1xYrNfQj}iy-<VD&eH| zNV#~HKNTy=6(tDF7y|b)fY2)x#R9%id1Aghv#tM*m0)WS|I`>kD_n&14sP<=V8RiE zgiM}ac=$-3tocO7lV0V?`P8l`VQX*bjgUIlbbC93@=F*7^K3r0_v9p~4ZE^!==E${ zBsAKz4JGwCly}aN85!9$x}4YJ@UqPm$zYz*U)v^AdvGvNFaWl#ZREqkRQ&mw&(Y&$ za*41okL6=wXfc3S#GN8-W+NHBeqTHJ_0%O{H}^b3O32K)$c%U~*%BSKpDZEZFFf5f zwisO}GX-{s!122C{GFOWdYPMOPDaJT5~Gk!2NEibfH;;tFd&ZKzu)HdG?~fkK}ky+ zd3<s*I5U#~@KYg=yVDuF$mqyOQov6EkARSeP9Y2X?7?QeC_+U=wY|3|c6)m}ohOF! zcr&NxlwS1(Kd-y1Yk$7l=%$}S+#$UAQF{tUG2H|5?(I80kEnMqt-xL7ro!wu9`QGk zxY>lPhmYEi<H0gpsPYoTk`;vgD`!RP7h(7b-2(5sa@1Skl7m#vxgm|{UO8bz+>zX^ zngCmkLf~iZ&X4&d_-|e9@`0c6aasuzaN2~vrK0^@C$}*qyfuJQRn~q(%rZdi(}zp! zfZ=QM!xb0CnKiVAk^zHf1Vd+pi?4#x%Jv1vvIS#d4AAlenK}W7ozmRPv+vQ|g5zPc zLxI<UnMpNqu0(uty%;^r>pg_J)&gcSAO3uM`{dcqJQJH2H?f~g0?a(?qs7#`qmh=D zDOu_lg!@C9gPL-U?(OpnunHZc7UTWuT<>S5AISsv0GOt^4Ue^4VAj94y-lc4X67%7 zMASc2KA4T$-j>X))P+*5#MC6|nU2Bsu6vk>EOi?l&@V-oOCRtozPwCkNGbqO%nn+& zgUl)xw=;-<zzV*tksWvQWfxa}j-G`eb>a73Ds$@tIXC^^Ef*Yoq~$+m8w$LWoR#G> zi9YumF!%TOL}X-8etv#Uo)64u=;+m^qp9$z|1F!v-2US8>Y1OPpAAsvCff~gfCv*+ z?YBJaroHDlqVc(*Jv=;~Z<oF&Gn>HQo~`K#)&hCWkqmCEQq^)H0RfP`g9DRMA0qG; z(+pCmC_Jq56HQD{x#h#9!u%EpD6>T$8*u%#4NnmWT;+p0Is}FW2aENTw%yiqIs*%& z79vJgGuQXT)LW7nooV%;QenLHrW>F9VIl(Yxt-;KTo)%7mm=_Itd|<1&`R7!$txf) zI)t5qGI`-}+0ncog1io*@rOMnn$UV6+8GY#ygCEEc4Z3&?BA{V6!pgtD#^+slaZ4C z5X$*gdpR(jiu!IG0-Bhxf4Umjzpi1_{Qps&{}G>i-gRc6{T2901Z*zn8SWxgx<AGU zf709HUcx<_>IeWBdxCO<<CqIER{7T(+9YnB0Ty12D4b8ufe*sp{S|(LIU9k5z<T>@ zQGj4Z4p9X6QP$i*o*Z2vJ&&ssJYF6m>9hDs&oG6%?BfXTjs3Rln<g_hL+Fl|52^3{ zm&O~bGk*JufMVv+_9?DZiDJDQ#jn+4;Za7<XH-?UvasGGRGb1kubfJ~q|6TjW)sM3 zP%<!7D!gVHE4xbkhY?pK(*Adhn0yddYvkKV0*&Y$SxSA}Piw=-3T!%Z*Juf{IkQ*G zI)GW`3N^%D6AGAH1@dW$yjrU~1p4Yj2vMlCe93B+Kgr=MM^VyZ8LT_1YPhd*Z2t0> z{c!1+-zno$+)-&IECe)aODo*$Y~b!F+;HLtU61lvwaALWgg82t*%THtN&shXKdOd( zPZn&6+g$dbc5AtIN<jFSr{C0mPR4ncNlnZDh;Q%X-K=4<SWhVJT}vM~($}f~0BA6| zkgbqi*VNR4gudtLs*8-Mt9u#0HHG)aj&pSMwu_^%O4_)}P#A6>XW28i+xAan?hlHf z3m`S9e<mizNt18A$b2MyfLsVd{QBCt6Bp7t;%6N};OeQ^1o^au&TX)iTeMxXEs52{ z-;U?P-i}P|ZOj(cTLmS+06J9}Ac5?t)U*%-Ic^rpNQ6c}v^^mYj6gQnKtUri@-6F| z_n&9-`rRD)0VGok9ub$kh0lR}DOdo#))b7zbbmKKedK=O4^}cSuB|gBa?pP#(Qb{F z5-Qm@H&@dMHdq@i(HR?8(P92}iq{PZfT{JYslgr(fH~UhSAPlJ5gW19SH{3~f7rny zqC;}s{j}v&AV<%1LMBSj#A9YwE2F1YZnzY6yfQrG>{6NeWO%(lbi3Gqg#Bgc8nuip zN1mrT=Hq9fZ{MijDXhn>)$w9I0-)Anb30ol1n(j0oGsK+Ff%is@Bbxv*I|o`i-D7T zHZ3M0L8Vtd**R0GP`dNsYEMC1JMwC8+~{(95Xq8b<Yz(QV3&vS+J(lqYd|V{%<7-s zZ&ljHxWN=8PpT^}enZRc3!D3OK=E~({RrGGdP$m1MhJ>khJTDA1!+lp(rj{k`)U^~ zZh=F7DuzIERba+T1kEj4;tO>aHco_wKd7seNV?3QY~Kvks($h(5#Dxc>ptoS;$_Mj zFOLR`qMZMNo@(jS|BIelt1dP&MD+JmHPzQMR(_;`H86nG((*5*F<4~n>I&+r+!+vW zXtr=>Thgy{Fl$ID$Qc!%Nz)P)m3(@{Bzeyh1W2KvG$d!H;pWH@ZjhH69!{W+ul$iJ zB`kgpT@m>5e<Y;rB0BADHT)hP=(}TNBU#@co<7q@*UR-sN0O5Up1<4$dcV-N`<0l= zQ^J;OR!4c=SerjVT4yh|`}l;1g%N+wZEE5O4-e0cr;yW3C;Xgye0&@(BZJFsBMltU zb#_~#5)Y9Cys5GoTweiLRX$&KbA2$yYS;tIho>6b))e_p5tn>n;}+)Cjz6DGTh_3y zrC+R7^I$X>@9fLm=8zO$91k1MZF~~c__i~2S1x^-;`oCozSa@Wgi7nC@Lj=9sI7cY z2C8er*@GESz#>EcBoY>sae#zOQC+oH;Zn2h3Cbtkpx-(C->IbkZ9uMvOP5*JLF##< zl>tK%offRFZlRl_Es?P?tR4m%8?AXJAs1=>!J>*<MLwwo0|Ar0i7_K#RLSEA_U6LG z=~?ih7&U+Jwq9#0>PM4L@5&p1gQx{NJG)q2T)HxO0Udg_+$cPwVY0<W=LRXH_+#<0 zRaY>Q^n<&90#SjYgk*uDt**ShJe{Pxx_UCvXn%i*&1wrk>bpZw0ChT&sNCo6^(PR? zm1_`j$6?Bfp)GXi3ILk%{Z@4Mf0r?WKm%5I0=-aiBig6k@wN=sTtfufm1t4Dc7z=^ zfI%-RYK_L=o6)`@h|O0&!2N_H#IDY2(Ai<GN6+V==u3l<>r#Uima_~VcOmz*(-k@6 zcY-ut*8hqiR@X1KsoyQns*2~Wmg_22VAAE!#9%ioD$d(3Tx<!*BHQl3(`f1OrY<_^ z5RUu#0RksHf8RtQ()rT&O>>z+lakh+hCkTb+pt@1ZdRcalXpSw{G~=Gw^w(SZBO+M zW*v(-=Bs$gY)GzKNbCG>Zia*m0Fvk0b9Q!~QJnpoCkAx^gkQ(-u#_SJAjx-abcaA$ zq@<*nul#mu^+p0j%%M{~!9gd3eg+`54BuGd@|-J`BJWyXHgab}k8$efe~CfhN7<T2 zBO@@5Y3t+7xtxXd$P8%f+p>vag~gbjNJO7HL|I-vAbe3kqlf1T1rF*2!O!Z`^UX@^ z<t^ImbR5Z4!h(XnvjGSWyP&%>h<I`^waOZ-!d70}bzdNi%p|L+n&aYp3BC2FlG9kh zy1IPB(EYx*Lt!!`s)jt`697|&;r*@Td$K>-QfpluCO*voPp=HTq-1g~y94?8D7#!8 znsPiP6;*K|d4W5Bl<xmiq9;?oPVP$!+PyC$fIuxNfaFD5cX<^+jjA>Ci^fkuFUG;= z5`UZIw*z<G!@r%eMm$+$3Ym{3Ss3Qx#^rD-xpYsWA0fWk5RPK=TI5;aayE|cOdXmF zLU6Y^{A}trQKu@NaCE4GISmV|kKCIo8B)x}+H=+HFnJ_~$ZtqXos-ki=A}{#9_9y( zv+y)xS$mdGLqjNaILR_tEaf=NIkF;x!(kV(tE;ODU<2WGp`ozpoDPM$!*mwT^W6c% z>#tq#^Y<Zwrq(b=qWJHRw#~?o3fNhVhMy8L0CEchSeXEFMyYid)c<S7waU!EMB`Id zXY<(~`G)9VX#)fRM%f<nendg>Brh(bAg~0BWZUvd13e>HB_`J&a_A<E5hItX)h2nG zQ|g=b6C6I83MW5K%1IhVG(*8a{QpZMB!eDKs`cJG9>KT;EC)RzY+AA1hWE#{<5i9a zih&^^-JP9aA3l7zzn+r2I4H_u!;|_^h?c`QR~L-2N6`85mWB`$tH*>e@lxvgvmOU! zl0R12+<RB;T{mTm5*8o}qHOlYb7{}=@28;Vb{bss`TTv0f8%ypk+MZI_j>lz_CGX< zBJ&t$bk@OUq@4n*!vZu)n&<%DVF)4wnIo>l`@Vq&HrQ*;@wj?)ug}_1?jOMBDr*m> z9rh%jCdY>ig+=1YnJi<pk)JPMs#LodEdL96kNoxDl;_qy{lBF=9yz3>Rh36$83lv& zR-YI>IT%ggm44c+819(2_4H~=#l_ROwYev>Mt&*(V0Z|G<D#c|-%N|CF(cWxO_5!x zgruTBXmw;|{}ak{^^@tuK_*4D0`m0&h0V&`r1!C}!Md#FoA2&<%%e7W{LB!Eqz9!W zi;YF5qN3vZ(NP4Dm}j+F##XD;?KR8t3PuXXSaOHtlM00)n9i{?V!LUiuS9;yr{hu2 zQk}PfwGV4%a9z*IgiJXM49GJuJWw=U;BZ5;buuA;;eVarcT`sUkzwt21cCwB#iLhe zXAaDAZDgK-(UmD1#s^f;^9wsmZBhQY`^NemR67F)4yfrrF4H_gp|MimfBdEa0W^aD zsYwCqP~N?;d%wa|qB+O$@Z@MAqyGYq^}j81wyt%EP@rcHDHkduu`EzsG(JqDX(uHO zeNXfCO_Qf_QNEB7`qXuyWzyaZ8(z6#U&rbS3Y6QNt?8ZSGFO60Llq$Ne?9VkW2H<} z$MJGK_buN)-N<>v>6m>~G&)jk5M6nDh2eQBJ7tlL+B9t7IO>bC%HX}}YWtQ7h2VR) zie5M~8Hb4kqo5$*&ZQ;O<Z|}=>2gj)#s%kutBfI|k?%Sx70^<x_<wu9NZ<JtEBU>> zHZDGf6R%9lD?F!Y-4Rzo)<=57VIg~3{!l+S4lC+s2y6`@tcfe!n5dcC*k4*c?(#|h z$N-yadx<1cv@xY%`$T<9hZp3(G&f;!@5u20ovM<Uk%ppq{Yl3JM;I{UoG6)_kV!W- zm_~Hy{vnq}K{4yE&_UXxim!Isnw(nrZIWu4P|W1Xan|!CdZ9L`|2J$(nRC|iO%5_{ zoc2suv%^AeL?J5n0OoC3=TdINcl2l+RsU#G3cwMa1s#_571^&ogJkSfM({N%g3{ZO z5b)oZV)i|EZxPoj60tjQ1643T((3V<X`q0<(IE!&30z7BsuJcXV(qpO8%!4$gWrqH z`Nfb>(9Ao~`u)D3?uXSsYQ@iyc*P#AZVnAMsA5Ro2X}|PZP#~adp8PmM-y@1n^WUT z+gelda;4AyLRXz=!o%OcbSrrMpG>6z-MWVBi?rCFA3hN$sE_-m6+}9c8bIO6#@|b- z^u-iqG8`jdj_`ST7y98pF#7OCSkef7JCgHmW3+)~SLW`1dOT!E(h4X!XVz#!ZSqL6 zt~{SnD}13t^g4*a?Ppt|r8Vxim<lxQ98J?`<A3SdJUF0zEl=EWnx<T@Y@cu1E7!8Z zn_l{J`8&0p*CRQ&#g1gE<Lc5E4n2_d?S)~<aD79#p*^9#{+f%K3~-g69~4>TP4&lU z=oA)!Raft7NMX_$;=jIn-A+#JE-1e<79Fv^MQ&Qe`L>K1YlRQC+pvs|zgV09mE}4w zlYM)3Xo%|F>W?%lPOA=YW$24C@~HWURlAkU^mtVph%%MTRED(XUMkC@*~9jSNxL0c zyXDuLrVYJT+hF?XRWFtm!_K6lL9Kep)AZMUS`z%UWKqD*$#vjm>L~?WU~sv!-MBF% zxKmhVuM>ZdONdf*BuJeDY<`9BPEgM-itQOTZ2|Ou7rKl{3i1|`0);&a7lc$M3mi@I zXMs`E4}@XR7QGY6@D97ap#r?_zTWqK8D|R+hcgiwKF@Y!CzA!VClkcZ&(}%@x+1i{ zwq9Rpy&r1mM{~bsM_}E&#lWB&EOV$DrLlczX_;>T9coUC5q|8gC@4ahf<ZPukV-;J z&w#5ntG%zYNMHp7+NDN~N6X6Utqg8j9hOR&G+1I{fU|TZGey#WsefOb0r8b9hrK}7 zHBaI5Yf`J_fz5b|qakByT_*dJ)zL|4WYYP0RBatNJG(%gKlw8`#F<6Xv4C>$z(neE zcN(~92;`XqZB}3<$#R5Yx@OCF2TjWU5l79O9&^7!Qc!fwSJQeQC-0mgIIXF->(1-G zJV_lH8SVq0zctTBxcWhbSouby<kiPG|Ma2RVe|67{S6`^Dd6}d=pZ_p)@!a}s7@wL zfS8y_OKSpH!}Mw87oLKm0B{IFS=r;(g0qaxZAcvM#NHVE(z`S83rYEr^b-tV@vLE_ ziGn8m7JJ*@*Kyjkqn(tBoS0;l#H>9Ls6qPSu%(Le@VNK>Qg6AN87c(kPdCYNfU->q zR3#biS|ur~_V2Cb0E;^~Hq%d3j*X)P2=5vpZnqi}QMlQ;pC?*9vU7wr9`hv<>OxRz z>loVf`^#v%*|Q@M%y%R)v$)lg$a&K7Nj^8Bk#ZWFRO5IYQemD=_TED{ukksTt1%e3 zi$Y7?-I&;^sbP)}ewd6R7@Zs*n!hMWio7y2>D{+koApxoRcVol^%2fONJza!i2@Ta zZCNl-GTHNb4om`en{fYPE_P)gBmcUE@^5oz=|f}$`dpIqzZc>woV|;got73R16}>I zm)$xj!eyVxs`BNDt`gFES$tp|aPCfXk_`+=-nIM^*CrtJ8QB*W7GyE2xw>0}2@0yd z3PQMflhYYHS$cGXhi4wE{lguxv{>V6L8azTUCwg$JqIukDsp+CffRqczL&q<r2qac zDc!_sA@e@(UXzloi9{e#I>A06;K?r$c!tVsOss`MZ?9$DzvzVC9#FWwFX6cP-gxqq zs0Dj_X-^W==Bt~M3oKnkN2{Fa#OddJ;&q!qnk~sRf^pp|f6DrfPc)W0JI^6zCzAL& zXt^FW%kxE&oagABt?z7BEJstBqz39Ok9!NoidwYaBD$uVHR(M(Fx!3f77-*PwTp`r z4xpd{34KUgF5v}peyD~Rx?(E5i(%w%d1ACHGc%6-Xe3G14ovnE3jQMs0{N?0Zf>+T zW)xPH+%6;Sgi(Vxvsx<g#fd+OjP?q<eknxW_F@SxHTX$N&MR2weBzAz`^6IaaTj-@ z-cs5?AxS~EB8wtOsAU9cBjfWR#jkw>0&c$FFd)jYb_7sWwM+4&>vA`))w<GwCTFMy z;8p~6ERHESIilrD38uX=9Ni;XJfVi=eAq&tZs*5M%3zO)f<nP2x`sPkZk`-9=!JK# zYk(FKzTvPM^lReCE{lu;e6rc?$1-WY2Hi~&F~*dnRvBg^F}<sq_!${A8LB4CIzE_M zTG=L2&a1gl*~;*hMfr>{mAw%uVyziE1u>%50+HHzVi1+B(8r6t&!&ck>ixQ{nwt3G ze#wB~6{EfvU2=^iHFyKe%$K0A5sqFFhYy+(KF^)e01atR4}^3^gf~2Bf3wlOqoUi1 z@vimq=R(XVF@d|x2ZH60&8|70nEGUW8~0ZYq?bl4=JSZidnx3dfT@iW%CR^QHyAwI zqtppx!LtAojzE}72JVYw8qi`>wPHLnqOpZiQO$j40BvSM@1{~A_H3J4rRl}V(#=$0 zFns$=bAp&Lhr2RhfT(8h^0mFUEvO8szBC;*bY!=w+B#n7I(m5Ms<ga84It-Nq!ly_ zP9)$#O|*#CPVMF(5v_XTaV088?nT@PdzVx~@sX$YwhW`S`^E}}OyHz`R6qAFV=Z<Y z5EIX^<C)Uy;5R~QX!sHEL%%%I>~BjXIv-*HS!6*dsADeB(72h~;zG4+k?gL9Qxlmu zBt79O*k>Vu#=UHLE~0F17Jltll|{oa;%@Zy<zG<S@Rl6zPkB1e?O>q2y8>1BcC!M% zA<4ghof2M)n-wVrCLxKKo#iBKn)GbVEZ%n8UjNP}vB6qv$Elu7oEQDL1I$@@JpT)u z@NqXv$`?vLg3!>3*4L%)9Vsl@X-SbPrSo==jvd1hUf)u#3f}&T9p4X9j7)BAb`?rm zI{S7AsLE=5I$w4WaN|5b{bLmc@g*AHs9!K(zOKvds)T&)`hYgeWzFQG-qOipIxC)` zCHv`sQnVt=$CRazhev&{-6yNy?V-qR7R@?yt_(OP3?G<+Qdkxai=>jkV`E3Y%~jx6 z*<_fM3(WjI{bHy0YwpHv4_|fe@K&?RmtT!Gu!ed4-j2;Zo6WdF7b!5XDn;MKM9%cC zcq);o9!iAUeDWUBC2xQ|QDF_`RcwWVLP0-fPl7y2s;1BtsGZg6^A`UL>_<SM#;@Tf zsO`U-RQOz#4I9(eoA!rKKr!u78qL5T9gze&_8Aj6Z~+Qg#&S;D$X*?tl=krq?gUn~ z3dYnX4opIhiSrSL(U!R~0}GG4!=e=S7%hKN7#f<c&EAo-?J@kW!<pZ0*oAG^GY0$e zyYi3sOji^VauhxNYPxG}89TK)JM-;MrHsg^i*>|63Y8XOuHr)?ZE-4@`QOi7qiG}X zHHJ`~i<(JiKTw5C$+xuDuo|eEb93iub8*?{tx8JO;PiZC%omk4@k@qvTatGYvgFj8 z6$fgQA3t=*=vH!1j?(a?|48ifG!BnQ2{P`1z1n7WrY~5Dy0D^>`jPwuP83Nf$Ken> zGkP#(#g@vMh^urWACO2S{6!lV*o*7FeZ0E5xG}j9jZ){KDvm3Z!M)WT7&r44luERf z`q9&&7tC`G@?GEPw0Rg#k{SQUtB8mt4)0Wrj9c?BQD$8d5N)Od0Lu<BW$608crt$$ z?{R$GVS}_>>OYzaP^U{H$a8)U8NAUA2b6+z39&iWIn#BHM!k1G<+iP0@tkK<{9n~p z6vhq0rY-EY|KkO~AA2W3PMH2Te^*kW^4uyn&dmpJZSU<=TgC{1QfZ*n9d8+UqO1vZ zZ*p$y@`FVL8O~y~&>tQkAk06qK;NEvQx5zIX8AL>Ia^Fy8-%ofORIVJR3y02Gl}iV z_NkeCN>~Yz2&+RBbfs)p%?d(A(I@sz1dV}Qu{uzo@0k)&LPSKqf*l+Hi4uXcRj0ch zhW+fC#d6^<{Pp!JkY~8{Aq2dDFU{Bc<@ydx7+&wo^+)E5XEqUrt#Wm<|Bo3D(~kqV zM{`e5K7=b_hjth%KFAY>2*wx7cM8-7gKBK5frq9ars8jjd+62Sif`Zi4cB2$wL*Zd za9q`BZN^)7xXFL2>Sy*prE~hOZV&%2O6Me&r{u*&CG*`Ne82dPgLoj%IYGD}^ip}u zkO77l-PZY}HurJ#=-*l)iJm#LKeg-2J5<Gd<{M+yu<+_DAyfQ4B4k0nf0Clp@@H0K zb*Qz|pddh(-*>=41S=yS^QEYUE0tJzH2H#*xZ_Jil<=E!xE>|*4|2FNr@3y+3^kD8 znLj;&w|ZbTIlYUnQ?Ho8ZP)!#5P$)uOUOB$4XLW8q@~S`W%#ZrOPz-|qqlvgrX?Du zmkpYl-jv6B8P?T9O;_!z(G11*jNp&=1M`n080lo9{D(6iKfrZd=&a{m{HL@PJ2`H6 z6zTq2X?>Y<{lZ8!$-+Xws?2RR?rVfEa2IFl(WvfUT9tVBT;^4f7@go_LR+nk9X9-e z<**Mtks|;4AF-u$ivJC-$t`}+XB&3Oy@l&E!fwlVs_4^rksO3k-~M<d*dt>xR?b4+ zBWMM7o!OTMgr2|ZuaEgAG-HPYqJh})0$T_7Roq8D3CsBe!&V|+#ud%<Ij!3B@S8`< zGI!~C<oEY7dm*v$LcX&C#j`*p;AoYpsZo$z^pWzS11i|UGn-SoC_II9t-GOE|FW>Z zS2hinVZ0YL4VGhke2Y~~j0!*i%J{|K|2e@ARm7;|Y;PWkoC~#H2C4i(wE~S&6Zu|3 z$&n(#5WB7UT>pRA3GAAenP-lmu*X*<yn)FidNK~~+Letk*r`I5$@_a$n>Eve%GSPU zm(wc8(H1sq!zZ_eMYO(11IOax-w4E_qKBDT+!Xl_ySV;E6b4(Om{~j;i(TP{+l#Gf z1xR?}Rn^2zztJ`~VgEQwlmZS2xs=cUwve5!EM%&ijidc`BB4yM>c1}68jT-Te=kWJ z^45>Q{E(hLud6E(Xw*;Zqxb8n@A0PV_Hb?O@=tf^6d|86F-tt7tL@F{XNFA;`rWr! z_pxz_0kiBwekm|}X!8bYzEJ_U0}vGWHsl0e80%rpEW|e4gs4hO`zMo}ib`y2ak$Ww z+6+VVsb43)aQX6F@_+8<-U-Db;(ZcnFR5{l$M*4D+%`O}z0Gp?XT7&{;H3j+#cf<B zKmi$nQXCxfr}wHefWyQM9o|24V*q?|q4^Oz|D!NT!ImYAFnbb$0FBB;Gn&PavPI4R zsO_tR;_ALF8+Qoq9^8UkaJS&@!5u=7Mw^7-8r<F8U4sP=?k>Sy8=2;N?>F_P=1tAK zntJz-u2ZMGy6!#ao^#jQYwvZ3HQ7Qn4%9AfCMlW1g$%OP9M+Z#!Y>dSb2@T4ICNU8 z*uvXdYdt?j#W-GDCmLxDM6q?4dwtiYD*R~E^=@XKYa%=>kc*O%d94IH{Pm@+9zUL- zg-qDo1`_L&>REYiM7?+#B!?&gZ;Fcc6(PQMgKytIoI9T$<@A)<(Qag`pa7z%pp%$f zppyokH28PzCS*fIn+(Ca+vBMp3~rJ^y!O7|;whMf_NA~cf2%wXYU6rn_Pe6S<G=q# zC&7iFF)vuWm7#I*Y#FcVl#u=Ru1N)Q2Qp*`ApsZ++usJy>yx1&4Xr_Hec>B=6t*ca zQg{c*OQc9%!0goBd6!oknp0CxBg<J1C(9Zu9Y!;xBa9}n(lJ6-czeryx?yrJW^X@u zF6eQ6CS<6VtI%eL-`42eblPA!mQ1s=#C^M^wx8GH-4t)QGy7$6x$gcMJY}Tvc}HHU zLXnN0;_04xGeH{>`A59~&M(L_7y^LVAIOD1A5>Nrf@29<A~M2bM^-X6#}>t<Mtx(G z2DjYZdv9A^iyoW2kx<OO7AcEd$j3nF#AZ~$zGrB_B@UG*hh$t)t7B2va@m&0D18|# z93+8S3gc?w;*StO)a760TLar<Yt4uNl~%2&0DR$QG(dHus|INX?19=Oq-smRPhv?} z5+ZG%MBpN1qju9*FB+*?f0^~u(;GD49I=g2q3@d}x-zS2vXZf~+C0W}_}@T308(5L zjt@gd2Kvuoe=^&|;VdN64Hc4lg5xL2kD@aB7*w$1rFIs+)SXrOTW~CO7AzBgh#trp zSQm)~yh{ihs+$pSPngT|!gD}6{P49jk!C3FZ8<FW?fwiZuKynAls$}fZ6T$1&WZiD zF|EL)w9E=sQ@`Ey=P|rx8i@o;sn<w)6=6<EvUy}nVQT%FOcj$~LLa#PI$swzZ+<W{ zegtfuZ^|2EnC*_GLTK`e$si<xH-B~Y!+8FX5?;wKU*}sNDvOXO1@kmX3s<m<bcD$( z@LUwaUkH1#)gh=9Q;?)^Vz8eCGIt6IBUp(PW)I;lZ1usv#KlXU_!I?;N2bUeD}xiW ze-XV%Ci>kaLlT_X*-3(etdUy(*Se@*I*(OTcnYY5nSgz177A^hUw@X#Pqtps0DN6+ z4O3IG|5;fS*9@IcaqT3;H6%v#iV%cVU2^%U)U1ZFgVBPUzFe<AYPtx<$VgQD8_@WX z+_x_(%cqxFh?Uj8^t#a@fh!=OJRJg*TlPVhUp7`f0``cGAcbQCQQzSqg-qS;K+QO( z$FGSKZD+OjOAW1DU9aO&5TtGgd`CS$AyP-E4w-F(aZ5KFzY2whMC+?|%gB02$#yiu zXgX4SJmCM1)VnXA?3Z8zgE$myoj;uS<1=?O9+kjnx58W?E#x+{0=%FWw9qU{v~9f* zKnM$4ZGdXP4Y>f`yOV6WZS0jus&yS{Uy*xqx2$x@0HI8}6a&`ZsauP!C~kycN~x}{ zA8!#h)@{5Ph>gkDzwJvw>P?{|C1(h)d5%t%6ld<3nvE+nfiy$OuJyt!UXhFrRj@<= z9E?eqguGQ3(3Yh2@#CdUHKby>+LQfCu*EgF+N+_GEvSUe*Ns3Ro<CmLZ}drSY8vU{ zB4NJC$?CygoB!5nl`#S)kjDYh`;KFzyTLAyMxoRaNv}S{`HHsgTe*%{b>rNtW=6{I z`?)(BNBPQPdY<sV186*HhliTI^TybzJPBIChqd@@mcZS8Y^_S1OXhzHlO`tQIExQ@ ze<9h}jLH-?C+o^eM|@CbHQQHPS|ylBtc8Wh2!P)Ei$G2*oz-+<hXvKe_#cBBf_?op zkHG5?=Oetbv*cvk1^{8&idq~5x^v-VGlR%ru4TEIm^z7=#Q@eHMXdmg@PD~P&B}V@ zZ(-qIICcUM0I(Psx91%`i`V5@bo|NNsQMW>taGLki3+2>Juny$Eg>M->)l*AB`h2! z2`SRmeqFGyn%ZjOft>m`PlzIc@eyKrfk2ko4N+$(1=Cb?hJvEzDruTqTp->5o@zyQ z4NG|V5;p%Yf#PS*hNcOj`Mg-B;Faa}o0W`pcgz*zTjTAJe@mf~kq|dr*=&b89UfQx zWr&J4s4V?~WN(g{V9XmWSY|{8&>da3<@U1i7aKHJv%LZN!lM5NUs5MoQnai-^Pfp~ zoc~8t4X)s%V*nS_2h?tr>Vk3Z8klZoz!d;>GEP|paCMV!MNF@Zc4FEB4Uhxe0-6i9 z4lDrA55A7Vxw)Y0uO{ol+5eI-oc?4R2HX1C+La-$@!Dbtc>y>r0nd*IXE0h?_Ur=? ztX8NLz-a}-5C(LDEA@<C9w|7*{yPx9`jFO-RX`#10)S!`U`PQnM%%d(1eH;ZObKh} z;XpjT763YE8+3q)(s;Hg#%`=K*m<5AFz7;H=gTb5-gt#UfF3!mGQ99p%n8E&(MbF# zMAW8Y?mF#IRLF^Sfh#g)5R>_d9plk+et9`Y6%2_$VOrf4QoIgGK}@`&<Cc>&QOsU8 zFJg2VV$xbjA-*v~V@v2M3DA%}%Uyh~zi9DEIGQQa^;2*gHV{Q|p?v?biZMKblE(Ty z$W3#{6a|C_FoM}YY9w5LZSvUL)WkX1@~it<{hrb^@)$~72X!=CRTQcANm7iEkdlhg zxx<rGMds_f_6Vatgf6D4d0WWHVN`2bsi=I8*&+Cj<~owPxTsi&`r@*PNOFfS7dM;7 z{Hy!vqKRHvMOgxdhDD91hcAz1RgZ1B_hp@@Fy7PTA9dEQyI%C}WDL)KnIM11FEzy1 z2UUa~nXU?)4W6~D_ZDRZ^@>B1p<F^a98$>?xZOgzDK;m5DyjIW83U00p8r_sX-6Mx zg&r-SfVRxG@H=*_E7jW*YO%oRG&y!6?iE0mY_69{QoduXB#d|fHR!Y1dO}V2eD`m_ z@C#~lkHnL;(7*{s9PlbT8xTeMop<fr!D;hE$^X)Pp@VolGvT}kK`PS8Y?kr&U0Id6 z|B2q>Yq!*ufGPCx0@UuVS`jW&wk8wUMgO_;UYrb(Nvpf(yYuCH#f-!By+y0dNlHFn zA|qh`YFP)NPeU2d)$^49{=tf#C82Y4JP4EeX*!Wv2k`K)b!B()`Az_QNM3j2;uf(H zI>HuQ&U~<3%Q5sDv&&p-$zsnZ#U?35V0nv^bMvpNjsGWf19#oAi16QW5R-tCt4ty1 zLDI}Cl$oI4dn_+QnA`BSE9}!#wkH++mg-k<Dv0F(bfUYf62F}*W)4ngB2PFEwo7af zX~^r4nKZEC<4znB37mWY$+pz0I&gLo))3vC(1C&Tl5kliF#B)w9N@ZjldKYW?;AAg zm1JagO2f=CT-6&quG>G!UnZL-kd-Ku&i1!B84r-o#IjdP==7!Xx?a6qmnyCAr_V`7 z`obL>x|9Bq2a*3GOubv^h}bbuJYXI82c8>#0B{DYayt=3E4%$eF0OBG<7y(uN*M@x zyejm6zB%7ZJD>0${%+Tg4Ak#<_47`(ncnC_s=;mnJN`b}kxLd{ZHZtv+nCeO(dESC z<KWnU!*FyV2TGEpTAFv?U#NMcVJi@yEQ#5cB0{Mb>G`|zOjjl_ZLWD+gh%4a)Ub8H za$4ROvB)Xn(4~}V|1$LG5xUbkg3QB3ff6AXV&}6~dSMh93s5Nqx@rB?xXmYnjdOps z9KN`n<mb;FfunWfz+{tXl;wulIO=`-D@zx5ZwE9TVloj{(=;BeMn{J(E!&oX9n8K1 z8~6`o)={hMCAdpaC8CX#k}Xj?>>-I=gy-3+nRHf5y9-tbk1$R;_7fBv`V{@1DN%5R zfTsBinE)Gv++XA)YSep{Wn|PvrRT-8j21JiwtXx12_G-lS@<cH#yoZU-@9w(Y{oL~ z{dBbLu2<y#?AR!O%sX1aEG|By$+@Nx7+8$yS~q(>Sj(K?b}+^{3z<2MuLgEiHe>l0 z4G!*zyx$-3W=66FK&hMWx(H{`vMq_aUZD@AleQauI-zHgXL!jj@8Z|oP~Z}_cNZ+5 z3shWCOXG91Hrt#0Uk|$)kH@rUc-Lip(s*jg@#(;A9)d+_e5zYaOf>B$JnQI232G!F zr!U;r%j|>e78c_+YU&nUPR5Jtt+Pw>1!MI`*EXSTXTnk%@vkq9?X$pT9=m6=2H~|O zr?P#wdAL29(a{HvX;!9Bs@vNZU8>ZJRmF%e%@6_W7JTg@Y;5d*@`^v&QQ-Xo4E5iH zld>=OUAJv}`U)Z%dj0kBiS>#)OT(<Is-~+U^>tyG|CBPz)2u7D#@Mvx`6%N4=<ttg z_fOj5(p(Y{4Dm}^SRKu=G20w#g*Uo$R@jBfvAx-{w|^166S*etE)MC^NHn<!hG<gR z;Nl2}y{owRFP$zE<eVJSPZyRWw$uBzx4sSOQ@uV_CmeAD%w4>VrrkagR9*cvV|PI~ zQ8`i9miRa*sDpJ%v4p7vw#t!BEyJf+r)w;m;~8@eq7<nppkKkec&aKCU_%2uG-hK~ zJ&3J93Yl)>sNu=$nl~i=fs0!U)i>BSUsOBw>|vhon%d!w=C(tIB&ctoVNz&VrmfIy z9c$ev3|8dg+uWRMpvgR3DT!-%sZq;1tX87*y~{YOw_MU(eW?AiHs(B)EXl@snh-Ue z)I)^dXlJ%Ayni*@*0g`nAZnldawTH=8|zOL=|}4-V>!8su6_-#d(s0LVQ*4PJW;&a zbaK3IZ&9*Zf`MkQ^RG7xqfGY7s^QuL4+nK;#UeUb--bUa;3p>FgxOZ;IEKYWn!%Lz z9X!Es%;H*Q^?%fV&o~+Kw@`Xvlwl3|_x##{CGU={ggI>_p?z6B4@Ft;K-<?#%<a#l zR)`AQF)eG<Mwe-bJ|@NN6;p5vMN*_^I=~NFR)bT`HG%Bxx5R$3A#FkmdD4>&Wlx{v zztJbz>{yJLmzr;i%gTcOT7xBaK0}5Fn{K#%q$q1x!sFh#W>>eiPmescNAXpsB$`2} z1^IXhQLD}NsJZ!Fx-g4+EQ|hdgEeRT%Pzhz223L1M9L3Q=vsON+qvo%VPA=%pYOgN zZm_l_@rGh=7L^2Ma?xv{=B2$ipn{H)5dIN#;WnLkLKBIJxA$UR!t6A1Zs-q|$7b&2 zt(QzAZOoaq{;mgQGh|S$DNO-yUuk{>4!Y8}|56*s!0^&>@M=<Cd^}zBcuD3Z8<>?R zBgMpNmw0ut{`;<FXcXty2AL4FopF=nxYI2Hx~E?^=()$P!Ek>(G=}}l`+94rCIYVs zVyF5_mJ5yjXK=+$^y1?^6`f2kQx&QK%1*dRmPcK01~1gaX!HFa9TGF_Lx+8bL3BHd zhhN<RSbi_S?=6~cbqog)lP>RxwJ}n<8M0}s$jmgHEhKQip}(AosL21Z*-#3U;m(=P z7Lk9tn-fk<7VyJkcZfqoi_W$wL(h+Rj6=LVIyRp9y&4}`TAuB@MBhs+H7)FbQ(F3S zCDILydHS2GtCfKrBnaB|i|58u&FcJCEH*)5J3ZKNPu>2~8dzsFqF-31^7&TjwWR2M zx`;6ua!t*p$<q$DcPb=fDScSJ`2ezTv2uo7Y;C~qNHWoh2=~~^uydV@bu{E@P^bD% zEk%p1n!PUDE8G~COAV&q%ai40V{AIri_+of%a*X_1=tL2EBr_22Jv0@LPT$#u0EK6 ztWO|WNGDC-%iu~wuly(new?%kb6Uw8FOSd1DbFcpaB${0=%)mEKe?n_>Ni*Stdv?( zXYtn%Y6?b~Zy%c0#}?97W%76PZvagI?|u--br}wV=f}Di+*}o>Tjxc&O&-H-7xKtU z#Qgn~+&T{}aj}SOf9teJ-My5)=699k_&=+lrQB2=iaf|A#LP^v7><zH*lq~1m6=BS z<-@PF=`_f<^qTo;p{9)GqXn7PH&w6{V;F8}1;}5U{{6Tj(ca|6=eQ0^MJz=tc2>y{ zdsZTrUPe>FXVpj-DByDuuQ3lLFwoLmoX#&&SXpYA-RE{MCxB$uGs?@qe=b(N-PYCp zshnuK@Om*g4$hYSq~-HaklU;in^dGzKeVbd<FY<~28V(p6U`VFh7*p@L`Ai7l#yDx z(5!lR^83TAcH7i6E|WIn<rVJkZkR+c&PWo|Qd84haAPe#YkYfHIBr$vp@9|Wvss~V z<E!Vg{lU}}&f;R&H|XDXBY0BMLH;MDr%ef0Mur(e86w8gGcQpnDvBw&3vJqumJ?+C z`EqlpnZ6BU>|^<IVbn5x=e}b^QfF)2w(m|_F+rvcP3u~hx`0FaVk(tzF)6-$Irtlz z;?F9;Y&;<SpnA*N)cxUiE|tY>WYL80OVEsY=pqQ>)_knuwm2tJon$dF6eBMFU?t%R z4305&&uT^QnS^NSIUal*w;BxMFKwd{C}VKbDxeozHzlmfHqq&9-ByiG$+R>SjE@v9 zS$?)6nVFSfdX+;v^0|GxU-QkA*7fi5|IEP5mB-HVcX)}Z#xD4brk8-F@&<p9;itlb zGSN}6yaW{U{#bLRwn`PBLPtu!we=9EthtEZ+Tt;gj~Ul*&y*sDR*{9DHq8lE+s)Wo zQOT6WwIARMir8p*9ack6scEMn-Ham>msd+3e92}fW}&mbtBbLTLQ{Wvp3sQ~>Avil zlX;8yhnuzWJghE!f_W9ad%bfqTDIhg<SnhMacLlYMA$ODM=~)-+pE(x-tM6jBAu&D zpqY{gnpq9*qQ>{)?|@uaqs24Y!%}k$DglImb#u>$MAr#<@4zHP`Q41>Bh6KxW07xB z`zjeX@Iom=Wss09;hW{t$33ehIZwg5k$Mq>=lwUhT{IL?SkpM72arPTy-vhBy<Lcu zmcL%KIXj&)0#X|e6xT26_+6jg9qlP?j9z?vjLK4~<H>ktWNHQ4{j5wOa3(UgzpVwz z&l64<hq*szbv;<yhM4%!+<(R{R##XJMk_Pq?*9e{@u=By&oh%*sF%~q<@YOCQcN{L zLrFsLmSq7>vO%{(`@)pRQB^0XG!%%~Dk2U8UGeDdykFaW2BFMCLL7%X*^*S#{Xv&M z)sIKLYNQ$GC>?MpO*eNOM{{$JQCre#5s^@eBvSof+P$JOPyfJl%yRW?d2ftUAhPug z%b0B{iKrN>wqn>Rlf$bMw5y!7E<oFVXxT#6se%5K4iP~-?@dFy_Q~vQ4*5?a&SiY> zighW6@Gs<iq3G{t?@Fq-L}#&GNWGy{e3<b;Kl55XU1$x<9}C6@Rz5E@>@|R<V8eZ~ zA@-Ph_Q%GfK19rvlv^+*|7Swu_MZ@%Z+tn-Y)JwYI#3mQ{O!YpH{dN4AVs+j6aq#V zTS19>#`H%pGl{_aPin^hRX&6KANY(*sepTVgL?|UvE`CQ;dtZysG`f1z8<4n=W%T+ zA$}a)$czTCCD3DKQ|j5IC#VGIx*e4M*C#_)$u+jd#-I~`9Dv&`))&03A##c2vgmO# zhSZIoO~PjxKVM3O7Sr{><w;2|P{|GGaBL2?BlF9mtXnIXPxeL%kGL#5&vDga|2ob% zRXAQ`5zSR(rpnF&;M3L{h2Y~Ig9Do)&pJt-P@0D&LH?REW0JMTxihYw_XsufNKzjG z{{FF7Hr0x$@1w{e`jFRc{klO#=Yg@mQ2PVz(^b~xhF%SHCJ_F#YdzC)i3=D<$^m=Y zsedT|#41$wU^N>hXui?1o>PR4ia_<;gu83~cp1XSH8upg*e*Ebp-bF1CSU${k|Ix9 z4#6l)+Pxij!+69@QJ;;y<m~yL{v^Jq9Y%Q6stRg5{o=oTH!EU!w5^cFVg1erT*0SA zDx`Or$^qxtwc6$WAYg1c-lmJD0_1;B^V@B%s|%66hYW)3sOe<J7x%_46AtXE(CihL zDl772`WLIaY*=T!ab}e<grNJN3A;VB`Q7P?Uv|j13P#zxD?~Xr#PZtlZ7H%I!~WZ; zNKZbDrXn9t2h@z>_MNfls!rrD%~Jk7CUPG>*Mc0UG@j7B0l%QDwU_5IkK1O)3=-mx z3;Zu>PVYOFh!>;7<DOUBGNzT%=`Ruzu-4quoDizy8KTHNJa}vb_wL)uNBNa(OONkP zn85l?dajN(g@#4S3M;;M47s^JcP)^-Sgn1B<?@^8*+);iu8PcgL#tE0%h}4q@uU=Y zU6(K-ayD=z(QiK~sq?}9$D7*qqUbA#{h{3vx`xAYwdrlmMN-#&7HvqB2F$a6a`3tZ zw*k36|Dc_maD#7MK2m8ZJ;FwJ&}-qAJra1n3Od_u0?N@wh){5O;dX7EVR%_aQ;J_I z`1W#pZ~|s>_t53G7Iis2X7a-vTe7&db+UT<V(rp(ORBFiOHutK*gQ6c%aYxU;8|#L z{oYp>K$LE>J8g2XX4t#hMzhi~-HL}O=?dk1U%f(vjBMT&K9U=-J0ewvMZ`EwU0J3t z;2wCl_PzaMad8Y9h45O3aFkPb<9clDxXtZpg7d_GkxcBx_nSaoG!Xpuj)4D3EH3i{ zEe1NK4&!4}Tuj?|Zcki=jXS)(GmWkadgSH5-K{6p)O>-|Qk@y6>PZ&_ug8k9=24%M z#UN-95Q{!Z4Hp?H2Pb4C_GoIU(d*5BZeft-i9##JD!RfL($G%#y}hvi;{u?{O(Qbp zEb?S}Z|q%^wi;801{s&0jS!dENY29A0jS`J`|w!h?*qf%YXk%nA%3<Ip*8F065=Z- zx<uUHDh*F~um1y2xL6@2b?^@{Kpm~O+mcLif4Ei${zWHeZTzT^sB<L2nS4Obbi-ai zryXEO++(ZlK#Jc(K`U)vwY6=5yHL?2u9<Mdg%)oyps_4Y0Ttq&eA!CyFk?sgcc#bi z3!4)bU9Yk_#7$bIoIsjau2~Y6B-jTTZTqN@Wm$oUntAm3x0>!+;%3{+Z33;14+g61 zA1t&RiE!+4A0jS@mGX``lDgWH_w;Lzj_P8O^3AT$bqu12OmvvmfLrL<*$&vi+%nA6 zIhrh>p-P{3pBD^+@UcB0q+;~}p=#DWLy%5<U?_Gn7jETCc;C8bo|{8xk-*uy)4zdV zets+?pv8tBg)uC+Jq`D?9m&&jpg($Giy%$KNzh5qU5AN@S+U-PfgyMI_fWN6Z+X5= zH^ILVgVwSlM%f1f542q3)OTOc{a*vr!al(`QGF~$%7A}X-Rf$(t?8S&s0*=4leG4P zRnm8(u$ajL+*_=I_osIphov>OCLyd~GcwmEiw9X#Q|@%&SYUONe`qFw`bE(KjwuU% z?5IkC&zq;-{@}Tdx^wM1%S*oZ;c7SM9WfKefU<B+(ZP!Da7lS!n&Z!=g<!HTnR-i| zhP{9CcA;MSumc*LZtZ^$T7tlH`lmLHjtR~yd>&)pQ`{XED3}Vdu*_4pW*DrXhD#g! z8paip^!|we^{4YwsR%(}Ksg(uJXx<(7pVb@ic<O=3OnoGSe)~o;(^`rgV&{;orMs% z9I>29JIsAB&e@Ds2?j!i3DD|Ah0~AFmhC1t09Wj%L=k0lsZ_i$X7gk0N=HU8v!DaE z(tp7G^8@$nLus0(taUMs*)HBHxa=kFr7-B_MuOXXuC4TShfY&mO{D27i+6rWz+HQJ zkkDf+k>}axS;k%D=m%YPbDlV!cfbCQ2{$%o3x5sOhhzMcYg(V;gV-I@CT4GH8ukMP zx9AhYr*su&T`Kq_P0d@bg9EH4cZVB@%MlZNK|w*-Pb@hR+xTZst;C%;3xZq!r<yBa z`k!&Qkjx5tR;`^~20WH8yo_!ucQ@WW(EWe%!g8tlxBA0E5bwN-3K@AE<Gs8&Om1c? zufO&WCxkuuNC8{6CMo+bcf)Q^DsFNrj(?!gRBe6kFRK!mUsQZeE{Q%7S>w@ft>=<* zZ_LdWy@VLv#>Q?Mx0Qk&cH6bJt(5mCk}w;(wxMy<3+W--5roXiu-p9PmT)vaLB`<C zq8)<&Q%MX(z~K#6ib2hb6Z1tXCD0%%mYU5chqI+C{(@msz7vOROI<wWW%8a>+=M)4 zhG0hO4yS9rXe=cVmd}sG4~(`na?Nx!7kW!A)N$%VQq$OyT^#Pa5VLGyX<*HD6X?7O zmkK{NRd9Yi9rOPS?MDUWQ@Z-Z#l^4t^C7^Vhy~W>5J8?ny*G04>puV=_Pfd|+&`^1 zu22%E^YEeI9}Ym||0A0iL>|CF-M$GuH`iF(MT;ojR{tUQ?QfKPalferXm&eh(^L;G zD0hUg5JdaXKA@hXoEz&HUuh997rgx}vJekRY&rmO11@_Aks7ie_IwXnUbYY=-Z0xx zHEHbkvDI&5-a5QuPX0P&Ci%uZZg9YdAC|eM!$TxuEW6P+ltc0uK^Y<14LqWqm}Kzo zP*K9S_P`F*2-qbUQ$9h$6u?K+uQKfozECR&B-~NUfj^N#60P{pK@t^l0puXJZba%% zmMy(!e2U)%tUcCA820L>U4D0%4(iiLXwf@Ew^fj&3S5nX)pez1h3NyI8@|-{@6}Y@ zgRn)MEanfj8Q2)&3uSm|Y=&U<XpKMRSzc&prsq-I(S70d>kakQUm14A2{H(En9pGS z&KYtv8CN|-9~OOV_4=r}^IG4dk%o-6c<Ex2m4%;TL|O>Bz|^G>aGz=mrDz0PBESid zL^Nn`tSA!d`T6J+>r5Wm8O@pG&k`R8eDmx(E)GyZh>>l(%ahRt>xQ8O-|*LmSHqy} z>j28`a-Kj2r^9fQ#u0?b&sYoRy;-s?FCx|+i?Z^cNVewBga!QDHHUGZst*a}qh6)c z*0iU=g<#6}fhSD;rn?2(ma#E2Nh~Ae+kF%Ih>_Nk2EjN2X!qaa-kD>2wJ%ckyB+_w zh<o{TP-12ev|^P4g00hIWSerDQt-a@1}sOa-+Th~zEMMKt_GyLgK9d^bT_hDSJAH; zYwCIi?(vqsHV(7}r=7dvks6n7p1ya$7EIom&HEE+zKM6ado54?A()lChY*|kRlBlp z%dF(bua-3X<2W_`&x`;pFq*4C=gBiLUAQ)@G|ZJ`trHIv$m)C2s{kfb^AXoaL@IzF znZY}siM=NB8jWa22`9Su%n(0d<D3t7bft{L4C5l*i5}!lD}^7n<By@&pj!`X{^7U+ zQEjw;^Dz_oKR(;XLn}r2yFpWtZVA;4D)`83Fl^XnCrA)ppxX!#Zwj*k7Yo~>puR_} zGr7zY%u2TTIPXbjVv=E*(pDxIu7%l2HDSittkvMhDs3Sm;fAtMwH`ch4c_id7T#%I z6YwXT{-RZl0aHJS_zvcbW#yDID$P?vqT~Ray;IaBI5X^^dP~{2lX4@q3;Kg#7?|Lh z<f+Zr-p3|U*ntO)w7|`(H7Z6#Y?>n>g#2_2S9XF7S~DZhRyr%YzwsBgJZaaz|9q+> zy?he+y7}t?!VqJ(y?NC&fl-0^e%B;Ik!$|<t`#lLy`YhR^#k^|)t?Ga3F~VY$iTV@ zA6~GOnVu3ts*HhQb4#4#uvXAEaxsnG8>2Kby)t10iA36K%FA-~DgfwNhD7|C3oDAN zzwlb9x-<sTvMjYc8*6Ggf3QM()w`v)+h6Uy#mI!uwuok8p3VC^Y1A#;fye9)g&klN za;fysxIePNT2S3`Ovh?!O=CJJ7xt?)5pP;&!+oyW9$uE_8<FK4*}Zq9KHj1zUpcm7 zgDo?J&!{4kk=!N_FusuiTsHccCaqp#045pvBSQw*zmmGAEx)pLT@mWtk;qDJTLvjj z5(2^^UsEm4lAQ7wnf|)08uq!#QgVI#Nz1Z4?R^{p`jO=UVifXw3u~wcyBJfQ@zLxu zoWl3X@+0Yn2@~HBX(nuL`bWKoVS@xlJ%CzNOx+}}*rCjJU2ybbTA|O2lw<ys19KPv zJCHwx!hv_o4)&<~!^RWV!|OwGV-h+oGga6x5udT~<D?0;Sf{C6Qii-!+D1bTTnnqA z^$Ql#%J>QOWi9W1k5dWoNL3NAXiZX*yWmL?lkU#R>TF+u-}|sxU3aZ|7k8O8h4p}t z>kP7+gh=C%k61u<6OxBbVs!^bX-l{)QTyR%OrL8k;9G!Z#*wnP^3MPSAHaGML&wnm zjevU*39#{f3;ew8HnOX3*<P@^g)`{)?`lZH;4)#P53q@ug(a1}ZQjNLMXVuOIfkKu zvs-${Zh|*EiTR)IybHP24D{(4!t1ZeZ_C`4db1UU3t#>nBrud}QkOE;iVeMU_hf`3 lMx>;a(;)cv1SyGpBBv&B?lOnr`vQO*a#EipE5%K|{SUmqIivsp literal 0 HcmV?d00001 diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go new file mode 100644 index 0000000..9477b0b --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go @@ -0,0 +1,140 @@ +package errs + +import ( + "bytes" + "fmt" + "github.com/n0rad/go-erlog/data" + "runtime" +) + +var MaxStackDepth = 50 + +type EntryError struct { + Fields data.Fields + Message string + Err error + stack []uintptr + frames []StackFrame +} + +func With(message string) *EntryError { + return fill(&EntryError{ + Message: message, + }) +} + +func WithF(fields data.Fields, msg string) *EntryError { + return fill(&EntryError{ + Fields: fields, + Message: msg, + }) +} + +func WithE(err error, msg string) *EntryError { + return fill(&EntryError{ + Err: err, + Message: msg, + }) +} + +func WithEF(err error, fields data.Fields, msg string) *EntryError { + return fill(&EntryError{ + Err: err, + Fields: fields, + Message: msg, + }) +} + +func fill(entry *EntryError) *EntryError { + stack := make([]uintptr, MaxStackDepth) + length := runtime.Callers(2, stack[:]) + entry.stack = stack[:length] + return entry +} + +/////////////////////////////////////////////// + +func Is(e1 error, e2 error) bool { + if e1 == e2 { + return true + } + + ee1, ok1 := e1.(*EntryError) + ee2, ok2 := e2.(*EntryError) + if ok1 && ok2 && ee1.Message == ee2.Message { + return true + } + + if e1.Error() == e2.Error() { + return true + } + + return false +} + +////////////////////////////////////////////// + +func (e *EntryError) WithFields(data data.Fields) *EntryError { + e.Fields = data + return e +} + +func (e *EntryError) WithErr(err error) *EntryError { + e.Err = err + return e +} + +func (e *EntryError) WithField(name string, value interface{}) *EntryError { + if e.Fields == nil { + e.Fields = data.WithField(name, value) + } else { + e.Fields = e.Fields.WithField(name, value) + } + return e +} + +func (e *EntryError) WithMessage(msg string) *EntryError { + e.Message = msg + return e +} + +func (e *EntryError) Error() string { + var buffer bytes.Buffer + buffer.WriteString(e.Message) + if e.Fields != nil { + for key := range e.Fields { + buffer.WriteString(" ") + buffer.WriteString(key) + buffer.WriteString("=") + buffer.WriteString(fmt.Sprintf("%+v", e.Fields[key])) + } + } + buffer.WriteString("\n") + if e.Err != nil { + buffer.WriteString("Caused by : ") + buffer.WriteString(e.Err.Error()) + buffer.WriteString("\n") + } + return buffer.String() +} + +// +//func (e *EntryError) Stack() []byte { +// buf := bytes.Buffer{} +// +// for _, frame := range e.StackFrames() { +// buf.WriteString(frame.String()) +// } +// +// return buf.Bytes() +//} +// +//func (e *EntryError) StackFrames() []StackFrame { +// if e.frames == nil { +// e.frames = make([]StackFrame, len(e.stack)) +// for i, pc := range e.stack { +// e.frames[i] = NewStackFrame(pc) +// } +// } +// return e.frames +//} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/stackframe.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/stackframe.go new file mode 100644 index 0000000..4a27b19 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/stackframe.go @@ -0,0 +1,102 @@ +package errs + +import ( + "bytes" + "fmt" + "io/ioutil" + "runtime" + "strings" +) + +// A StackFrame contains all necessary information about to generate a line +// in a callstack. +type StackFrame struct { + // The path to the file containing this ProgramCounter + File string + // The LineNumber in that file + LineNumber int + // The Name of the function that contains this ProgramCounter + Name string + // The Package that contains this function + Package string + // The underlying ProgramCounter + ProgramCounter uintptr +} + +// NewStackFrame popoulates a stack frame object from the program counter. +func NewStackFrame(pc uintptr) (frame StackFrame) { + + frame = StackFrame{ProgramCounter: pc} + if frame.Func() == nil { + return + } + frame.Package, frame.Name = packageAndName(frame.Func()) + + // pc -1 because the program counters we use are usually return addresses, + // and we want to show the line that corresponds to the function call + frame.File, frame.LineNumber = frame.Func().FileLine(pc - 1) + return + +} + +// Func returns the function that contained this frame. +func (frame *StackFrame) Func() *runtime.Func { + if frame.ProgramCounter == 0 { + return nil + } + return runtime.FuncForPC(frame.ProgramCounter) +} + +// String returns the stackframe formatted in the same way as go does +// in runtime/debug.Stack() +func (frame *StackFrame) String() string { + str := fmt.Sprintf("%s:%d (0x%x)\n", frame.File, frame.LineNumber, frame.ProgramCounter) + + source, err := frame.SourceLine() + if err != nil { + return str + } + + return str + fmt.Sprintf("\t%s: %s\n", frame.Name, source) +} + +// SourceLine gets the line of code (from File and Line) of the original source if possible. +func (frame *StackFrame) SourceLine() (string, error) { + data, err := ioutil.ReadFile(frame.File) + + if err != nil { + return "", With("Cannot read source line").WithErr(err) + } + + lines := bytes.Split(data, []byte{'\n'}) + if frame.LineNumber <= 0 || frame.LineNumber >= len(lines) { + return "???", nil + } + // -1 because line-numbers are 1 based, but our array is 0 based + return string(bytes.Trim(lines[frame.LineNumber-1], " \t")), nil +} + +func packageAndName(fn *runtime.Func) (string, string) { + name := fn.Name() + pkg := "" + + // The name includes the path name to the package, which is unnecessary + // since the file name is already included. Plus, it has center dots. + // That is, we see + // runtime/debug.*T·ptrmethod + // and want + // *T.ptrmethod + // Since the package path might contains dots (e.g. code.google.com/...), + // we first remove the path prefix if there is one. + if lastslash := strings.LastIndex(name, "/"); lastslash >= 0 { + pkg += name[:lastslash] + "/" + name = name[lastslash+1:] + } + if period := strings.Index(name, "."); period >= 0 { + pkg += name[:period] + name = name[period+1:] + } + + name = strings.Replace(name, "·", ".", -1) + return pkg, name +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/event.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/event.go new file mode 100644 index 0000000..ea3bce4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/event.go @@ -0,0 +1,41 @@ +package erlog + +import ( + "github.com/n0rad/go-erlog/logs" + "runtime" + "strings" + "time" +) + +type LogEvent struct { + logs.Entry + Depth int + Time time.Time + File string + Line int +} + +func NewLogEvent(entry *logs.Entry) *LogEvent { + var file string + var line int + var ok bool + for i := 2; ; i++ { + _, file, line, ok = runtime.Caller(i) + if !ok { + file = "???" + line = 0 + } + if !strings.Contains(file, "n0rad/go-erlog") { + break + } + if strings.Contains(file, "n0rad/go-erlog/examples") { // TODO what to do with that ? + break + } + } + + return &LogEvent{ + Entry: *entry, + File: file, + Line: line, + } +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go new file mode 100644 index 0000000..e6ba1cc --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "github.com/n0rad/go-erlog/log" + _ "github.com/n0rad/go-erlog/register" + "github.com/n0rad/go-erlog/with" + "os" +) + +func main() { + logger := log.GetLog("newlog") // another logger + + // logger.(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout + + path := "/toto/config" + if err := os.Mkdir(path, 0777); err != nil { + log.WithEF(err, with.WithField("dir", path)).Info("Failed to create config directory") + + logger.LogEntry(&log.Entry{ + Fields: with.WithField("dir", path), + Level: log.INFO, + Err: err, + Message: "Salut !1", + }) + } + + logger.Info("Salut !2") + logger.Info("Salut !3") + +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go new file mode 100644 index 0000000..9bd4d15 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go @@ -0,0 +1,23 @@ +package main + +import ( + "github.com/n0rad/go-erlog/log" // the api + _ "github.com/n0rad/go-erlog/register" // use erlog implementation, with default appender (colored to stderr) +) + +func main() { + log.SetLevel(log.TRACE) // default is INFO + + log.Trace("I'm trace") + log.Debug("I'm debug") + log.Info("I'm info") + log.Warn("I'm warn") + log.Error("I'm error") + + func() { + defer func() { recover() }() + func() { log.Panic("I'm panic") }() + }() + + log.Fatal("I'm fatal") +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go new file mode 100644 index 0000000..66b943d --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go @@ -0,0 +1,8 @@ +package dedicated_logger + +func main() { + // log.GetLevel() + // log := erlog.NewLog() + // + // log.SetLevel() +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go new file mode 100644 index 0000000..47fb52e --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go @@ -0,0 +1,21 @@ +package main + +import "github.com/n0rad/go-erlog/log" +import _ "github.com/n0rad/go-erlog" + +func main() { + log.SetLevel(log.TRACE) + + log.Trace("I'm trace") + log.Debug("I'm debug") + log.Info("I'm info") + log.Warn("I'm warn") + log.Error("I'm error") + + func() { + defer func() { recover() }() + func() { log.Panic("I'm panic") }() + }() + + log.Fatal("I'm fatal") +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go new file mode 100644 index 0000000..ab0f81c --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go @@ -0,0 +1,16 @@ +package main + +func main() { + // log.With("dir", "/src/my/path").Info("Cannot open directory") + // + // log.WithAll(log.Fields{ + // "dir": "/src/my/path", + // "count": 42, + // }).Warn("Cannot process") + // + // + // path := "/toto/titi/tata" + // if err := os.Mkdir(path, 0777); err != nil { + // log.WithErr(err).WithField("dir", path).Warn("Cannot create dir") + // } +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go similarity index 58% rename from Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go rename to Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go index ae99572..1edcac9 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/log/formatter.go +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go @@ -1,13 +1,15 @@ -package log +package erlog import ( "bytes" "fmt" - log "github.com/Sirupsen/logrus" "github.com/mgutz/ansi" + "github.com/n0rad/go-erlog/logs" + "io" "runtime" "sort" "strings" + "sync" "time" ) @@ -25,9 +27,13 @@ var lvlColorError = ansi.ColorCode("red+b") var lvlColorWarn = ansi.ColorCode("yellow+b") var lvlColorInfo = ansi.ColorCode("green") var lvlColorDebug = ansi.ColorCode("magenta") +var lvlColorTrace = ansi.ColorCode("blue") var lvlColorPanic = ansi.ColorCode(":red+h") -type BlaFormatter struct { +type ErlogWriterAppender struct { + Out io.Writer + Level logs.Level + mu sync.Mutex } func init() { @@ -41,39 +47,53 @@ func init() { } } -func (f *BlaFormatter) Format(entry *log.Entry) ([]byte, error) { - file, line := f.findFileAndLine() - f.prefixFieldClashes(entry.Data) - keys := f.prepareKeys(entry) +func NewErlogWriterAppender(writer io.Writer) (f *ErlogWriterAppender) { + return &ErlogWriterAppender{ + Out: writer, + } +} + +func (f *ErlogWriterAppender) GetLevel() logs.Level { + return f.Level +} + +func (f *ErlogWriterAppender) SetLevel(level logs.Level) { + f.Level = level +} + +func (f *ErlogWriterAppender) Fire(event *LogEvent) { + keys := f.prepareKeys(event) time := time.Now().Format("15:04:05") - level := f.level(entry.Level) + level := f.textLevel(event.Level) // isColored := isTerminal && (runtime.GOOS != "windows") - - paths := strings.SplitN(file, "/", pathSkip+1) + paths := strings.SplitN(event.File, "/", pathSkip+1) b := &bytes.Buffer{} fmt.Fprintf(b, "%s %s%-5s%s %s%30s:%-3d%s %s%-44s%s", - f.timeColor(entry.Level)(time), - f.levelColor(entry.Level), + f.timeColor(event.Level)(time), + f.levelColor(event.Level), level, reset, - f.fileColor(entry.Level), + f.fileColor(event.Level), f.reduceFilePath(paths[pathSkip], 30), - line, + event.Line, reset, - f.textColor(entry.Level), - entry.Message, + f.textColor(event.Level), + event.Message, reset) for _, k := range keys { - v := entry.Data[k] + v := event.Entry.Fields[k] fmt.Fprintf(b, " %s%s%s=%+v", lvlColorInfo, k, reset, v) } b.WriteByte('\n') - return b.Bytes(), nil + + // f.mu.Lock() //TODO + f.Out.Write(b.Bytes()) + // f.mu.Unlock() } -func (f *BlaFormatter) reduceFilePath(path string, max int) string { +func (f *ErlogWriterAppender) reduceFilePath(path string, max int) string { if len(path) <= max { return path } @@ -96,32 +116,20 @@ func (f *BlaFormatter) reduceFilePath(path string, max int) string { return buffer.String() } -func (f *BlaFormatter) findFileAndLine() (string, int) { - var file string - var line int - for i := 5; ; i++ { - _, file, line, _ = runtime.Caller(i) - if !strings.Contains(file, "Sirupsen/logrus") { - break - } - } - return file, line -} - -func (f *BlaFormatter) prepareKeys(entry *log.Entry) []string { - var keys []string = make([]string, 0, len(entry.Data)) - for k := range entry.Data { +func (f *ErlogWriterAppender) prepareKeys(event *LogEvent) []string { + var keys []string = make([]string, 0, len(event.Entry.Fields)) + for k := range event.Entry.Fields { keys = append(keys, k) } sort.Strings(keys) return keys } -func (f *BlaFormatter) level(level log.Level) string { +func (f *ErlogWriterAppender) textLevel(level logs.Level) string { levelText := strings.ToUpper(level.String()) switch level { - case log.InfoLevel: - case log.WarnLevel: + case logs.INFO: + case logs.WARN: levelText = levelText[0:4] default: levelText = levelText[0:5] @@ -129,44 +137,46 @@ func (f *BlaFormatter) level(level log.Level) string { return levelText } -func (f *BlaFormatter) fileColor(level log.Level) string { +func (f *ErlogWriterAppender) fileColor(level logs.Level) string { switch level { - case log.DebugLevel, log.InfoLevel: + case logs.DEBUG, logs.INFO, logs.TRACE: return fileColorFail default: return fileColorNormal } } -func (f *BlaFormatter) textColor(level log.Level) string { +func (f *ErlogWriterAppender) textColor(level logs.Level) string { switch level { - case log.WarnLevel: + case logs.WARN: return lvlColorWarn - case log.ErrorLevel, log.FatalLevel, log.PanicLevel: + case logs.ERROR, logs.FATAL, logs.PANIC: return lvlColorError default: return "" } } -func (f *BlaFormatter) timeColor(level log.Level) func(string) string { +func (f *ErlogWriterAppender) timeColor(level logs.Level) func(string) string { switch level { - case log.DebugLevel, log.InfoLevel: + case logs.DEBUG, logs.INFO, logs.TRACE: return timeColorFail default: return timeColorNormal } } -func (f *BlaFormatter) levelColor(level log.Level) string { +func (f *ErlogWriterAppender) levelColor(level logs.Level) string { switch level { - case log.DebugLevel: + case logs.TRACE: + return lvlColorTrace + case logs.DEBUG: return lvlColorDebug - case log.WarnLevel: + case logs.WARN: return lvlColorWarn - case log.ErrorLevel: + case logs.ERROR: return lvlColorError - case log.FatalLevel, log.PanicLevel: + case logs.FATAL, logs.PANIC: return lvlColorPanic default: return lvlColorInfo @@ -185,8 +195,7 @@ func needsQuoting(text string) bool { return true } -func (f *BlaFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { - +func (f *ErlogWriterAppender) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { b.WriteString(key) b.WriteByte('=') @@ -210,20 +219,3 @@ func (f *BlaFormatter) appendKeyValue(b *bytes.Buffer, key string, value interfa b.WriteByte(' ') } - -func (f *BlaFormatter) prefixFieldClashes(data log.Fields) { - _, ok := data["time"] - if ok { - data["fields.time"] = data["time"] - } - - _, ok = data["msg"] - if ok { - data["fields.msg"] = data["msg"] - } - - _, ok = data["level"] - if ok { - data["fields.level"] = data["level"] - } -} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go new file mode 100644 index 0000000..f01e900 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go @@ -0,0 +1,177 @@ +package erlog + +import ( + "fmt" + "github.com/n0rad/go-erlog/logs" + "os" + "strings" +) + +//func toLog(err error, level log.Level) { +// if e, ok := err.(*EntryError); ok { +// log.LogEntry(&log.Entry{ +// Message: e.Message, +// Fields: e.Fields, +// Level: level}) +// if e.Err != nil { // TODO this sux +// toLog(e.Err, level) +// } +// } else { +// log.LogEntry(&log.Entry{ +// Message: err.Error(), +// Level: level, +// }) +// } +//} + +type ErlogFactory struct { + defaultLog *ErlogLogger + logs map[string]*ErlogLogger +} + +func NewErlogFactory() *ErlogFactory { + return &ErlogFactory{ + defaultLog: newLog(), + logs: make(map[string]*ErlogLogger, 10), + } +} + +func (l *ErlogFactory) GetLog(name string) logs.Log { + if name == "" { + return l.defaultLog + } + log := l.logs[name] + if log == nil { + log = newLog() + l.logs[name] = log + } + return log +} + +type ErlogLogger struct { + Appenders []Appender + Level logs.Level +} + +func newLog() *ErlogLogger { + return &ErlogLogger{ + Appenders: []Appender{NewErlogWriterAppender(os.Stderr)}, + Level: logs.INFO, + } +} + +func (l *ErlogLogger) log(event *LogEvent) { + for _, appender := range l.Appenders { + appender.Fire(event) + } +} + +func (l *ErlogLogger) Trace(message ...string) { + if logs.TRACE.IsEnableFor(l.Level) { + l.logS(logs.TRACE, message...) + } +} + +func (l *ErlogLogger) Debug(message ...string) { + if logs.DEBUG.IsEnableFor(l.Level) { + l.logS(logs.DEBUG, message...) + } +} +func (l *ErlogLogger) Info(message ...string) { + if logs.INFO.IsEnableFor(l.Level) { + l.logS(logs.INFO, message...) + } +} +func (l *ErlogLogger) Warn(message ...string) { + if logs.WARN.IsEnableFor(l.Level) { + l.logS(logs.WARN, message...) + } +} +func (l *ErlogLogger) Error(message ...string) { + if logs.ERROR.IsEnableFor(l.Level) { + l.logS(logs.ERROR, message...) + } +} +func (l *ErlogLogger) Panic(message ...string) { + if logs.PANIC.IsEnableFor(l.Level) { + l.logS(logs.PANIC, message...) + } + panic(strings.Join(message, " ")) +} +func (l *ErlogLogger) Fatal(message ...string) { + if logs.FATAL.IsEnableFor(l.Level) { + l.logS(logs.FATAL, message...) + } + os.Exit(1) +} + +func (l *ErlogLogger) Tracef(format string, message ...interface{}) { + if logs.TRACE.IsEnableFor(l.Level) { + l.logS(logs.TRACE, fmt.Sprintf(format, message)) + } +} + +func (l *ErlogLogger) Debugf(format string, message ...interface{}) { + if logs.DEBUG.IsEnableFor(l.Level) { + l.logS(logs.DEBUG, fmt.Sprintf(format, message)) + } +} + +func (l *ErlogLogger) Infof(format string, message ...interface{}) { + if logs.INFO.IsEnableFor(l.Level) { + l.logS(logs.INFO, fmt.Sprintf(format, message)) + } +} + +func (l *ErlogLogger) Warnf(format string, message ...interface{}) { + if logs.WARN.IsEnableFor(l.Level) { + l.logS(logs.WARN, fmt.Sprintf(format, message)) + } +} + +func (l *ErlogLogger) Errorf(format string, message ...interface{}) { + if logs.ERROR.IsEnableFor(l.Level) { + l.logS(logs.ERROR, fmt.Sprintf(format, message)) + } +} + +func (l *ErlogLogger) Panicf(format string, message ...interface{}) { + if logs.PANIC.IsEnableFor(l.Level) { + l.logS(logs.PANIC, fmt.Sprintf(format, message)) + } + panic(fmt.Sprintf(format, message)) +} + +func (l *ErlogLogger) Fatalf(format string, message ...interface{}) { + if logs.FATAL.IsEnableFor(l.Level) { + l.logS(logs.FATAL, fmt.Sprintf(format, message)) + } + os.Exit(1) +} + +func (l *ErlogLogger) logS(level logs.Level, msg ...string) { + l.log(NewLogEvent(&logs.Entry{Level: level, Message: strings.Join(msg, " ")})) +} + +func (l *ErlogLogger) LogEntry(entry *logs.Entry) { + if entry.Level.IsEnableFor(l.Level) { + l.log(NewLogEvent(entry)) + } + if entry.Level == logs.PANIC { + panic(entry.Message) + } else if entry.Level == logs.FATAL { + os.Exit(1) + } +} + +func (l *ErlogLogger) GetLevel() logs.Level { return l.Level } +func (l *ErlogLogger) SetLevel(level logs.Level) { l.Level = level } + +func (l *ErlogLogger) IsTraceEnabled() bool { return logs.TRACE.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsDebugEnabled() bool { return logs.DEBUG.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsInfoEnabled() bool { return logs.INFO.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsWarnEnabled() bool { return logs.WARN.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsErrorEnabled() bool { return logs.ERROR.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsPanicEnabled() bool { return logs.PANIC.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsFatalEnabled() bool { return logs.FATAL.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsLevelEnabled(level logs.Level) bool { return level.IsEnableFor(l.Level) } diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/default.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/default.go new file mode 100644 index 0000000..6c7c2f7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/default.go @@ -0,0 +1,34 @@ +package logs + +func GetDefaultLog() Log { return factory.GetLog("") } +func GetLog(name string) Log { return factory.GetLog(name) } + +func SetLevel(lvl Level) { GetDefaultLog().SetLevel(lvl) } +func GetLevel() Level { return GetDefaultLog().GetLevel() } + +func Trace(msg ...string) { GetDefaultLog().Trace(msg...) } +func Debug(msg ...string) { GetDefaultLog().Debug(msg...) } +func Info(msg ...string) { GetDefaultLog().Info(msg...) } +func Warn(msg ...string) { GetDefaultLog().Warn(msg...) } +func Error(msg ...string) { GetDefaultLog().Error(msg...) } +func Panic(msg ...string) { GetDefaultLog().Panic(msg...) } +func Fatal(msg ...string) { GetDefaultLog().Fatal(msg...) } + +func Tracef(format string, msg ...interface{}) { GetDefaultLog().Tracef(format, msg...) } +func Debugf(format string, msg ...interface{}) { GetDefaultLog().Debugf(format, msg...) } +func Infof(format string, msg ...interface{}) { GetDefaultLog().Infof(format, msg...) } +func Warnf(format string, msg ...interface{}) { GetDefaultLog().Warnf(format, msg...) } +func Errorf(format string, msg ...interface{}) { GetDefaultLog().Errorf(format, msg...) } +func Panicf(format string, msg ...interface{}) { GetDefaultLog().Panicf(format, msg...) } +func Fatalf(format string, msg ...interface{}) { GetDefaultLog().Fatalf(format, msg...) } + +func LogEntry(entry *Entry) { GetDefaultLog().LogEntry(entry) } + +func IsLevelEnabled(lvl Level) bool { return GetDefaultLog().IsLevelEnabled(lvl) } +func IsTraceEnabled() bool { return GetDefaultLog().IsTraceEnabled() } +func IsDebugEnabled() bool { return GetDefaultLog().IsDebugEnabled() } +func IsInfoEnabled() bool { return GetDefaultLog().IsInfoEnabled() } +func IsWarnEnabled() bool { return GetDefaultLog().IsWarnEnabled() } +func IsErrorEnabled() bool { return GetDefaultLog().IsErrorEnabled() } +func IsPanicEnabled() bool { return GetDefaultLog().IsPanicEnabled() } +func IsFatalEnabled() bool { return GetDefaultLog().IsFatalEnabled() } diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/dummy.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/dummy.go new file mode 100644 index 0000000..49182c5 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/dummy.go @@ -0,0 +1,58 @@ +package logs + +import ( + "fmt" + "io" + "os" + "strings" +) + +type DummyLog struct { + Out io.Writer +} + +func (d *DummyLog) GetLog(name string) Log { return d } + +func (d *DummyLog) Tracef(format string, msg ...interface{}) { + d.log(TRACE, fmt.Sprintf(format, msg...)) +} +func (d *DummyLog) Debugf(format string, msg ...interface{}) { + d.log(DEBUG, fmt.Sprintf(format, msg...)) +} +func (d *DummyLog) Infof(format string, msg ...interface{}) { + d.log(INFO, fmt.Sprintf(format, msg...)) +} +func (d *DummyLog) Warnf(format string, msg ...interface{}) { + d.log(WARN, fmt.Sprintf(format, msg...)) +} +func (d *DummyLog) Errorf(format string, msg ...interface{}) { + d.log(ERROR, fmt.Sprintf(format, msg...)) +} +func (d *DummyLog) Panicf(format string, msg ...interface{}) { + d.log(PANIC, fmt.Sprintf(format, msg...)) +} +func (d *DummyLog) Fatalf(format string, msg ...interface{}) { + d.log(FATAL, fmt.Sprintf(format, msg...)) +} + +func (d *DummyLog) Trace(msg ...string) { d.log(TRACE, msg...) } +func (d *DummyLog) Debug(msg ...string) { d.log(DEBUG, msg...) } +func (d *DummyLog) Info(msg ...string) { d.log(INFO, msg...) } +func (d *DummyLog) Warn(msg ...string) { d.log(WARN, msg...) } +func (d *DummyLog) Error(msg ...string) { d.log(ERROR, msg...) } +func (d *DummyLog) Panic(msg ...string) { d.log(PANIC, msg...); panic(msg) } +func (d *DummyLog) Fatal(msg ...string) { d.log(FATAL, msg...); os.Exit(1) } +func (d *DummyLog) log(level Level, msg ...string) { + d.LogEntry(&Entry{Level: level, Message: strings.Join(msg, " ")}) +} +func (d *DummyLog) LogEntry(entry *Entry) { fmt.Fprintf(d.Out, "%s: %s\n", entry.Level, entry.Message) } +func (d *DummyLog) GetLevel() Level { return TRACE } +func (d *DummyLog) SetLevel(lvl Level) { d.Error("Dummy log cannot set level") } +func (d *DummyLog) IsLevelEnabled(lvl Level) bool { return true } +func (d *DummyLog) IsTraceEnabled() bool { return true } +func (d *DummyLog) IsDebugEnabled() bool { return true } +func (d *DummyLog) IsInfoEnabled() bool { return true } +func (d *DummyLog) IsWarnEnabled() bool { return true } +func (d *DummyLog) IsErrorEnabled() bool { return true } +func (d *DummyLog) IsPanicEnabled() bool { return true } +func (d *DummyLog) IsFatalEnabled() bool { return true } diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/entry.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/entry.go new file mode 100644 index 0000000..1d7ffa2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/entry.go @@ -0,0 +1,113 @@ +package logs + +import ( + "github.com/n0rad/go-erlog/data" +) + +type Entry struct { + Logger Log + Level Level + Fields data.Fields + Message string + Err error +} + +func WithError(err error) *Entry { + return &Entry{ + Logger: GetDefaultLog(), + Err: err, + } +} + +func WithField(name string, value interface{}) *Entry { + return &Entry{ + Logger: GetDefaultLog(), + Fields: data.WithField(name, value), + } +} + +func WithFields(fields data.Fields) *Entry { + return &Entry{ + Logger: GetDefaultLog(), + Fields: fields, + } +} + +func WithEF(err error, fields data.Fields) *Entry { + return &Entry{ + Logger: GetDefaultLog(), + Err: err, + Fields: fields, + } +} + +func WithF(fields data.Fields) *Entry { + return WithFields(fields) +} + +func WithE(err error) *Entry { + return WithError(err) +} + +/////////////////////////////////// + +func (e *Entry) WithFields(data data.Fields) *Entry { + e.Fields = data + return e +} + +func (e *Entry) WithField(name string, value interface{}) *Entry { + if e.Fields == nil { + e.Fields = data.WithField(name, value) + } else { + e.Fields = e.Fields.WithField(name, value) + } + return e +} + +func (e *Entry) WithLog(logger Log) *Entry { + e.Logger = logger + return e +} + +func (e *Entry) Trace(msg string) { + e.Level = TRACE + e.Message = msg + e.Logger.LogEntry(e) +} + +func (e *Entry) Debug(msg string) { + e.Level = DEBUG + e.Message = msg + e.Logger.LogEntry(e) +} + +func (e *Entry) Info(msg string) { + e.Level = INFO + e.Message = msg + e.Logger.LogEntry(e) +} + +func (e *Entry) Warn(msg string) { + e.Level = WARN + e.Message = msg + e.Logger.LogEntry(e) +} + +func (e *Entry) Error(msg string) { + e.Level = ERROR + e.Message = msg + e.Logger.LogEntry(e) +} + +func (e *Entry) Panic(msg string) { + e.Level = PANIC + e.Message = msg + e.Logger.LogEntry(e) +} + +func (e *Entry) Fatal(msg string) { + e.Level = FATAL + e.Message = msg + e.Logger.LogEntry(e) +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/levels.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/levels.go new file mode 100644 index 0000000..f4cb981 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/levels.go @@ -0,0 +1,71 @@ +package logs + +import ( + "fmt" + "strings" +) + +type Level uint8 + +const ( + // the program cannot continue. will log and exit(1) + FATAL Level = iota + // the routine cannot continue. will log and call go panic function + PANIC + // program continue but caller have received error or data lost or similar + ERROR + // recovered problem or non critical + WARN + // general info + INFO + // tell what is going on step by step + DEBUG + // log data content + TRACE +) + +func (level Level) String() string { + switch level { + case TRACE: + return "TRACE" + case DEBUG: + return "DEBUG" + case INFO: + return "INFO" + case WARN: + return "WARN" + case ERROR: + return "ERROR" + case FATAL: + return "FATAL" + case PANIC: + return "PANIC" + } + return "UNKNOWN" +} + +func ParseLevel(lvl string) (Level, error) { + lvl = strings.ToUpper(lvl) + switch lvl { + case "PANIC": + return PANIC, nil + case "FATAL": + return FATAL, nil + case "ERROR": + return ERROR, nil + case "WARN", "WARNING": + return WARN, nil + case "INFO": + return INFO, nil + case "DEBUG": + return DEBUG, nil + case "TRACE": + return TRACE, nil + } + var l Level + return l, fmt.Errorf("Not a valid level : %s", lvl) // not using errs to prevent cycle dep +} + +func (l Level) IsEnableFor(level Level) bool { + return level >= l +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/logger.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/logger.go new file mode 100644 index 0000000..158332e --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/logger.go @@ -0,0 +1,62 @@ +package logs + +import ( + "fmt" + "os" + "reflect" + "runtime" + "sync" +) + +type LogFactory interface { + GetLog(name string) Log +} + +type Log interface { + Trace(msg ...string) + Debug(msg ...string) + Info(msg ...string) + Warn(msg ...string) + Error(msg ...string) + Panic(msg ...string) + Fatal(msg ...string) + + Tracef(format string, msg ...interface{}) + Debugf(format string, msg ...interface{}) + Infof(format string, msg ...interface{}) + Warnf(format string, msg ...interface{}) + Errorf(format string, msg ...interface{}) + Panicf(format string, msg ...interface{}) + Fatalf(format string, msg ...interface{}) + + LogEntry(entry *Entry) + + GetLevel() Level + SetLevel(lvl Level) + + IsLevelEnabled(lvl Level) bool + IsTraceEnabled() bool + IsDebugEnabled() bool + IsInfoEnabled() bool + IsWarnEnabled() bool + IsErrorEnabled() bool + IsPanicEnabled() bool + IsFatalEnabled() bool +} + +var factory LogFactory = &DummyLog{Out: os.Stderr} +var mu sync.Mutex + +func RegisterLoggerFactory(f LogFactory) { + mu.Lock() + if f == factory { + return + } + + if _, ok := factory.(*DummyLog); !ok { + _, file, line, _ := runtime.Caller(1) + fmt.Fprintf(os.Stderr, "Re-Registering the logger factory : %s:%d. There is already one registered : %s\n", file, line, reflect.TypeOf(factory)) + } + factory = f + mu.Unlock() +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/readme.md b/Godeps/_workspace/src/github.com/n0rad/go-erlog/readme.md new file mode 100644 index 0000000..b33a6d6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/readme.md @@ -0,0 +1,54 @@ +# Go erlog + +*this is experimental* + +In a fusion of logrus and go-errors logic with improvement to provide: +- a logging api supporting fields and stacktrace +- a logging implementation supporting multiple appenders +- log level by appenders +- trace log level +- fields to errors +- stacktrace to errors +- errors to log transformation without losing fields or stackstrace + +# install + +```shell +go get github.com/n0rad/go-erlog +``` + +# usage + +basic : +```go +package main + +import ( + "github.com/n0rad/go-erlog/log" // the api + _ "github.com/n0rad/go-erlog/register" // use erlog implementation, with default appender (colored to stderr) +) + +func main() { + log.SetLevel(log.TRACE) // default is INFO + + log.Trace("I'm trace") + log.Debug("I'm debug") + log.Info("I'm info") + log.Warn("I'm warn") + log.Error("I'm error") + + func() { + defer func() { recover() }() + func() { log.Panic("I'm panic") }() + }() + + log.Fatal("I'm fatal") +} +``` + +will produce + +![basic](https://raw.githubusercontent.com/n0rad/go-erlog/master/docs/basic.png) + +advanced : + diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/register/register.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/register/register.go new file mode 100644 index 0000000..612e6d3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/register/register.go @@ -0,0 +1,10 @@ +package register + +import ( + "github.com/n0rad/go-erlog" + "github.com/n0rad/go-erlog/logs" +) + +func init() { + logs.RegisterLoggerFactory(erlog.NewErlogFactory()) +} diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index f6d6a1d..13f8ec7 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -1,9 +1,9 @@ package commands import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/work" + "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" "os" ) @@ -30,7 +30,7 @@ or just source them in directly: autocompleteTarget = ggn.Home.Path + "/ggn_completion.sh" } if autocompleteType != "bash" { - logrus.WithField("type", autocompleteType).Fatalln("Only Bash is supported for now") + logs.WithField("type", autocompleteType).Fatal("Only Bash is supported for now") } work := work.NewWork(ggn.Home.Config.WorkPath) @@ -42,9 +42,9 @@ or just source them in directly: } err := cmd.Root().GenBashCompletionFile(autocompleteTarget) if err != nil { - logrus.WithError(err).Fatalln("Failed to generate shell completion file") + logs.WithE(err).Fatal("Failed to generate shell completion file") } else { - logrus.WithField("path", autocompleteTarget).Println("Bash completion saved") + logs.WithField("path", autocompleteTarget).Info("Bash completion saved") } os.Exit(0) }, diff --git a/commands/ggn.go b/commands/ggn.go index 7dfe03c..2759f6b 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -3,11 +3,11 @@ package commands import ( "bufio" "fmt" - log "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/ggn" "github.com/coreos/go-semver/semver" + "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" "github.com/spf13/pflag" "os" @@ -40,14 +40,14 @@ func Execute() { }) args := []string{findEnv()} - log.WithField("args", args).Debug("Processing env with args") + logs.WithField("args", args).Debug("Processing env with args") rootCmd.SetArgs(args) err := rootCmd.Execute() if err != nil { os.Exit(1) } - log.Debug("Victory !") + logs.Debug("Victory !") } func findEnv() string { //TODO this is fucking dirty @@ -82,12 +82,12 @@ func prepareLogs() { lvl = "info" } - level, err := log.ParseLevel(lvl) + level, err := logs.ParseLevel(lvl) if err != nil { fmt.Printf("Unknown log level : %s", lvl) os.Exit(1) } - log.SetLevel(level) + logs.SetLevel(level) } func discoverHome() ggn.HomeStruct { @@ -98,7 +98,7 @@ func discoverHome() ggn.HomeStruct { _, err := os.Stat(homefolder + "/green-garden") _, err2 := os.Stat(homefolder + "/ggn") if os.IsNotExist(err2) && err == nil { - log.WithField("oldPath", homefolder+"/green-garden"). + logs.WithField("oldPath", homefolder+"/green-garden"). WithField("newPath", homefolder+"/ggn"). Warn("You are using the old home folder") homefolder += "/green-garden" @@ -157,7 +157,7 @@ func logLevelFromArgs() string { func checkFleetVersion() { output, err := utils.ExecCmdGetOutput("fleetctl") if err != nil { - log.Fatal("fleetctl is required in PATH") + logs.Fatal("fleetctl is required in PATH") } scanner := bufio.NewScanner(strings.NewReader(output)) @@ -168,12 +168,12 @@ func checkFleetVersion() { versionString := strings.TrimSpace(scanner.Text()) version, err := semver.NewVersion(versionString) if err != nil { - log.Error("Cannot parse version of fleetctl", versionString) + logs.Error("Cannot parse version of fleetctl", versionString) os.Exit(1) } supported, _ := semver.NewVersion(FLEET_SUPPORTED_VERSION) if version.LessThan(*supported) { - log.Error("fleetctl version in your path is too old. Require >= " + FLEET_SUPPORTED_VERSION) + logs.Error("fleetctl version in your path is too old. Require >= " + FLEET_SUPPORTED_VERSION) os.Exit(1) } break diff --git a/commands/prepare-service.go b/commands/prepare-service.go index c3aa661..52f01c9 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -1,9 +1,9 @@ package commands import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/work/env" + "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" "os" "strings" @@ -50,13 +50,13 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { `lock is ignored if set by the current user`, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { - logrus.Fatal("Please add a message to describe lock") + logs.Fatal("Please add a message to describe lock") } message := strings.Join(args, " ") ttl, err := time.ParseDuration(ttl) if err != nil { - logrus.WithError(err).Fatal("Wrong value for ttl") + logs.WithError(err).Fatal("Wrong value for ttl") } service.Lock("service/lock", ttl, message) diff --git a/commands/prepare.go b/commands/prepare.go index e2cfb60..e1b5e98 100644 --- a/commands/prepare.go +++ b/commands/prepare.go @@ -1,14 +1,14 @@ package commands import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/work" + "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" ) func loadEnvCommandsReturnNewRoot(osArgs []string, rootCmd *cobra.Command) *cobra.Command { - logrus.WithField("path", ggn.Home.Config.WorkPath).Debug("Loading envs") + logs.WithField("path", ggn.Home.Config.WorkPath).Debug("Loading envs") work := work.NewWork(ggn.Home.Config.WorkPath) newRootCmd := &cobra.Command{ diff --git a/ggn/home.go b/ggn/home.go index aa31fcc..a3cd368 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -1,9 +1,10 @@ package ggn import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" "github.com/ghodss/yaml" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/logs" "io/ioutil" "os" "time" @@ -15,14 +16,14 @@ type Config struct { } type HomeStruct struct { - log logrus.Entry + fields data.Fields Path string Config Config } func NewHome(path string) HomeStruct { - log := logrus.WithField("path", path) - log.Debug("loading home") + fields := data.WithField("path", path) + logs.WithFields(fields).Debug("loading home") var config Config if source, err := ioutil.ReadFile(path + "/config.yml"); err == nil { @@ -31,10 +32,10 @@ func NewHome(path string) HomeStruct { panic(err) } } else { - log.WithField("file", "config.yml").Fatal("Cannot read configuration file") + logs.WithF(fields).WithField("file", "config.yml").Fatal("Cannot read configuration file") } return HomeStruct{ - log: *log, + fields: fields, Path: path, Config: config, } @@ -43,7 +44,7 @@ func NewHome(path string) HomeStruct { const PATH_LIST_MACHINES_CACHE = "/list-machines.cache" func (h *HomeStruct) LoadMachinesCacheWithDate(env string) (string, time.Time) { - h.log.WithField("env", env).Debug("Loading list machines cache") + logs.WithFields(h.fields).WithField("env", env).Debug("Loading list machines cache") info, err := os.Stat(h.Path + PATH_LIST_MACHINES_CACHE + "." + env) if err != nil { return "", time.Now() @@ -56,9 +57,9 @@ func (h *HomeStruct) LoadMachinesCacheWithDate(env string) (string, time.Time) { } func (h *HomeStruct) SaveMachinesCache(env string, data string) { - h.log.WithField("env", env).Debug("save machines cache") + logs.WithF(h.fields).WithField("env", env).Debug("save machines cache") if err := ioutil.WriteFile(h.Path+PATH_LIST_MACHINES_CACHE+"."+env, []byte(data), 0644); err != nil { - logrus.WithError(err).Warn("Cannot persist list-machines cache") + logs.WithError(err).Warn("Cannot persist list-machines cache") } } diff --git a/main.go b/main.go index 5b322ce..0a1aff2 100644 --- a/main.go +++ b/main.go @@ -1,13 +1,11 @@ package main import ( - "github.com/Sirupsen/logrus" - "github.com/blablacar/cnt/log" "github.com/blablacar/ggn/commands" + _ "github.com/n0rad/go-erlog/register" ) //go:generate go run compile/version_generate.go func main() { - logrus.SetFormatter(&log.BlaFormatter{}) commands.Execute() } diff --git a/spec/env.go b/spec/env.go index 119d792..afd453a 100644 --- a/spec/env.go +++ b/spec/env.go @@ -1,8 +1,8 @@ package spec import ( - "github.com/Sirupsen/logrus" "github.com/coreos/etcd/client" + "github.com/n0rad/go-erlog/data" ) const PATH_ATTRIBUTES = "/attributes" @@ -27,7 +27,7 @@ type HookInfo struct { type Env interface { GetName() string - GetLog() logrus.Entry + GetFields() data.Fields GetAttributes() map[string]interface{} ListMachineNames() ([]string, error) RunFleetCmdGetOutput(args ...string) (string, string, error) diff --git a/spec/service.go b/spec/service.go index 6b25ed1..be35d2d 100644 --- a/spec/service.go +++ b/spec/service.go @@ -1,8 +1,8 @@ package spec import ( - "github.com/Sirupsen/logrus" cntspec "github.com/blablacar/cnt/spec" + "github.com/n0rad/go-erlog/data" "time" ) @@ -34,6 +34,6 @@ type Service interface { Lock(command string, ttl time.Duration, message string) GetName() string GetEnv() Env - GetLog() logrus.Entry + GetFields() data.Fields GetFleetUnitContent(unit string) (string, error) } diff --git a/work/env-check.go b/work/env-check.go index b40198e..5a0bef2 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -2,11 +2,12 @@ package work import ( "github.com/blablacar/ggn/spec" + "github.com/n0rad/go-erlog/logs" "sync" ) func (e Env) Check() { - e.log.Debug("Running check") + logs.WithFields(e.fields).Debug("Running check") info := spec.HookInfo{Command: "env/check", Action: "env/check"} e.RunEarlyHook(info) diff --git a/work/env-fleetctl.go b/work/env-fleetctl.go index 895a88d..3b2e1dc 100644 --- a/work/env-fleetctl.go +++ b/work/env-fleetctl.go @@ -1,9 +1,11 @@ package work +import "github.com/n0rad/go-erlog/logs" + func (e Env) Fleetctl(args []string) { - e.log.Debug("Running fleetctl") + logs.WithFields(e.fields).Debug("Running fleetctl") err := e.RunFleetCmd(args...) if err != nil { - e.log.WithError(err).Error("Fleetctl command failed") + logs.WithEF(err, e.fields).Error("Fleetctl command failed") } } diff --git a/work/env-generate.go b/work/env-generate.go index 7aff07f..d1b5a57 100644 --- a/work/env-generate.go +++ b/work/env-generate.go @@ -1,7 +1,9 @@ package work +import "github.com/n0rad/go-erlog/logs" + func (e Env) Generate() { - e.log.Debug("Generating units") + logs.WithFields(e.fields).Debug("Generating units") services := e.ListServices() for _, service := range services { diff --git a/work/env-list-units.go b/work/env-list-units.go index 9c7d738..2e48368 100644 --- a/work/env-list-units.go +++ b/work/env-list-units.go @@ -3,6 +3,7 @@ package work import ( "bufio" "github.com/blablacar/ggn/spec" + "github.com/n0rad/go-erlog/logs" "strings" "sync" ) @@ -20,7 +21,7 @@ func (e Env) ListUnits() map[string]spec.UnitStatus { stdout, _, err := e.RunFleetCmdGetOutput("list-units", "-no-legend") if err != nil { - e.log.WithError(err).Fatal("Cannot list units") + logs.WithEF(err, e.fields).Debug("Cannot list units") } var lines []string diff --git a/work/env.go b/work/env.go index f5f2041..5dd4c10 100644 --- a/work/env.go +++ b/work/env.go @@ -2,8 +2,6 @@ package work import ( "fmt" - "github.com/Sirupsen/logrus" - log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" cntUtils "github.com/blablacar/cnt/utils" "github.com/blablacar/ggn/ggn" @@ -12,6 +10,8 @@ import ( "github.com/blablacar/ggn/work/env" "github.com/coreos/etcd/client" "github.com/juju/errors" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/logs" "gopkg.in/yaml.v2" "io/ioutil" "os" @@ -35,7 +35,7 @@ type Config struct { type Env struct { path string name string - log logrus.Entry + fields data.Fields attributes map[string]interface{} config Config services map[string]*env.Service @@ -43,11 +43,11 @@ type Env struct { } func NewEnvironment(root string, name string) *Env { - log := *log.WithField("env", name) + fields := data.WithField("env", name) path := root + "/" + name _, err := ioutil.ReadDir(path) if err != nil { - log.WithError(err).Error("Cannot read env directory") + logs.WithEF(err, fields).Fatal("Cannot read env directory") } env := &Env{ @@ -55,7 +55,7 @@ func NewEnvironment(root string, name string) *Env { servicesMutex: &sync.Mutex{}, path: path, name: name, - log: log, + fields: fields, config: Config{}, } env.loadAttributes() @@ -67,8 +67,8 @@ func (e Env) GetName() string { return e.name } -func (e Env) GetLog() logrus.Entry { - return e.log +func (e Env) GetFields() data.Fields { + return e.fields } func (e Env) GetAttributes() map[string]interface{} { @@ -78,7 +78,7 @@ func (e Env) GetAttributes() map[string]interface{} { func (e Env) FleetctlListUnits() { stdout, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-units", "--full", "--no-legend") if err != nil { - e.log.WithError(err).Fatal("Failed to list-units") + logs.WithEF(err, e.fields).Fatal("Failed to list-units") } unitStatuses := strings.Split(stdout, "\n") @@ -116,10 +116,10 @@ func (e *Env) loadConfig() { func (e *Env) loadAttributes() { files, err := utils.AttributeFiles(e.path + spec.PATH_ATTRIBUTES) if err != nil { - e.log.WithError(err).WithField("path", e.path+spec.PATH_ATTRIBUTES).Panic("Cannot load Attributes files") + logs.WithEF(err, e.fields).WithField("path", e.path+spec.PATH_ATTRIBUTES).Fatal("Cannot load attribute files") } e.attributes = attributes.MergeAttributesFiles(files) - e.log.WithField("attributes", e.attributes).Debug("Attributes loaded") + logs.WithFields(e.fields).WithField("attributes", e.attributes).Debug("Attributes loaded") } func (e Env) ListServices() []string { @@ -146,14 +146,14 @@ func (e Env) ListServices() []string { var inMemoryNames []string func (e Env) ListMachineNames() ([]string, error) { - e.log.Debug("list machines") + logs.WithFields(e.fields).Debug("list machines") if inMemoryNames != nil { return inMemoryNames, nil } data, modification := ggn.Home.LoadMachinesCacheWithDate(e.name) if data == "" || modification.Add(12*time.Hour).Before(time.Now()) { - e.log.Debug("reloading list machines cache") + logs.WithFields(e.fields).Debug("reloading list machines cache") datatmp, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") if err != nil { return nil, errors.Annotate(err, "Cannot list-machines") @@ -189,10 +189,10 @@ func (e Env) RunLateHook(info spec.HookInfo) { } func (e Env) runHook(path string, info spec.HookInfo) { - e.log.WithField("path", path).WithField("info", info).Debug("Running hook") + logs.WithFields(e.fields).WithField("path", path).WithField("info", info).Debug("Running hook") files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) if err != nil { - log.WithError(err).Debug("Cannot read hood directory") + logs.WithEF(err, e.fields).Debug("Cannot read hood directory") return } @@ -212,16 +212,16 @@ func (e Env) runHook(path string, info spec.HookInfo) { for _, f := range files { if !f.IsDir() { - hookLog := log.WithField("name", f.Name()) + hookFields := data.WithField("name", f.Name()) args := []string{e.path + PATH_HOOKS + path + "/" + f.Name()} for key, val := range envs { args = append([]string{key + "='" + strings.Replace(val, "'", "'\"'\"'", -1) + "'"}, args...) } - hookLog.Debug("Running Hook") + logs.WithFields(hookFields).Debug("Running Hook") if err := cntUtils.ExecCmd("bash", "-c", strings.Join(args, " ")); err != nil { - hookLog.Fatal("Hook status is failed") + logs.WithFields(hookFields).Fatal("Hook status is failed") } } } @@ -251,14 +251,14 @@ func (e Env) EtcdClient() client.KeysAPI { } c, err := client.New(cfg) if err != nil { - e.log.WithError(err).Fatal("Failed to create etcd client") + logs.WithEF(err, e.fields).Fatal("Failed to create etcd client") } kapi := client.NewKeysAPI(c) return kapi } func (e Env) runFleetCmdInternal(getOutput bool, args []string) (string, string, error) { - e.log.WithField("command", strings.Join(args, " ")).Debug("Running command on fleet") + logs.WithF(e.fields).WithField("command", strings.Join(args, " ")).Debug("Running command on fleet") if e.config.Fleet.Endpoint == "" { return "", "", errors.New("Cannot find fleet.endpoint env config to call fleetctl") } diff --git a/work/env/service-check.go b/work/env/service-check.go index 0ec47dd..77ed11b 100644 --- a/work/env/service-check.go +++ b/work/env/service-check.go @@ -1,11 +1,12 @@ package env import ( + "github.com/n0rad/go-erlog/logs" "sync" ) func (s *Service) Check() { - s.log.Debug("Running check") + logs.WithFields(s.fields).Debug("Running check") s.runHook(EARLY, "service/check", "check") defer s.runHook(LATE, "service/check", "check") diff --git a/work/env/service-generate.go b/work/env/service-generate.go index 26e0fb4..c8ab508 100644 --- a/work/env/service-generate.go +++ b/work/env/service-generate.go @@ -1,13 +1,13 @@ package env import ( - "github.com/Sirupsen/logrus" "github.com/appc/spec/discovery" "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" + "github.com/n0rad/go-erlog/logs" "io/ioutil" "net/http" "strings" @@ -21,23 +21,23 @@ func (s *Service) Generate() { return } - s.log.Debug("Generating units") + logs.WithFields(s.fields).Debug("Generating units") serviceTmpl, err := s.loadUnitTemplate(spec.PATH_UNIT_SERVICE_TEMPLATE) if err != nil { - s.log.WithError(err).Fatal("Cannot load service template") + logs.WithEF(err, s.fields).Fatal("Cannot load service template") } var timerTmpl *utils.Templating if s.hasTimer { timerTmpl, err = s.loadUnitTemplate(spec.PATH_UNIT_TIMER_TEMPLATE) if err != nil { - s.log.WithError(err).Fatal("Cannot load timer template") + logs.WithEF(err, s.fields).Fatal("Cannot load timer template") } } if len(s.nodesAsJsonMap) == 0 { - s.log.Fatal("No node to process in manifest") + logs.WithFields(s.fields).Fatal("No node to process in manifest") return } @@ -48,7 +48,7 @@ func (s *Service) Generate() { } else if unit.GetType() == spec.TYPE_TIMER { unit.Generate(timerTmpl) } else { - unit.Log.WithField("type", unit.GetType()).Fatal("Unknown unit type") + logs.WithFields(s.fields).WithField("type", unit.GetType()).Fatal("Unknown unit type") } } s.generated = true @@ -61,7 +61,7 @@ func (s Service) NodeAttributes(hostname string) map[string]interface{} { return node.(map[string]interface{}) } } - logrus.WithField("hostname", hostname).Panic("Cannot find host in service list") + logs.WithFields(s.fields).WithField("hostname", hostname).Fatal("Cannot find host in service list") return nil } @@ -84,7 +84,7 @@ func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, conten // resolved, err := fullname.FullyResolved() // TODO should not be resolved for local test ?? // if err != nil { - // logrus.WithError(err).Fatal("Cannot fully resolve ACI") + // logs.WithEF(err, s.fields).Fatal("Cannot fully resolve ACI") // } acis = append(acis, *fullname) } @@ -111,12 +111,12 @@ func (s Service) sources(sources []string) map[string][]cntspec.ACFullname { for _, source := range sources { content, err := ioutil.ReadFile(source) if err != nil { - s.log.WithError(err).Warn("Cannot read source file") + logs.WithEF(err, s.fields).Warn("Cannot read source file") continue } if err := s.aciManifestToMap(res, content); err != nil { if err2 := s.podManifestToMap(res, content); err2 != nil { - s.log.WithError(err).WithField("error2", err2).Error("Cannot read manifest file as aci nor pod") + logs.WithEF(err, s.fields).WithField("error2", err2).Error("Cannot read manifest file as aci nor pod") } } } @@ -124,7 +124,7 @@ func (s Service) sources(sources []string) map[string][]cntspec.ACFullname { } func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { - logAci := s.log.WithField("pod", name) + podFields := s.fields.WithField("pod", name) app, err := discovery.NewAppFromString(name.String()) if app.Labels["os"] == "" { @@ -136,37 +136,38 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { endpoint, _, err := discovery.DiscoverEndpoints(*app, nil, false) if err != nil { - logAci.WithError(err).Fatal("pod discovery failed") + logs.WithEF(err, podFields).Fatal("pod discovery failed") } if len(endpoint.ACIEndpoints) == 0 { - s.log.Panic("Discovery does not contain a url") + logs.WithF(podFields).Fatal("Discovery does not contain a url") } url := endpoint.ACIEndpoints[0].ACI url = strings.Replace(url, "=aci", "=pod", 1) // TODO this is nexus specific - logUrl := logAci.WithField("url", url) + logUrl := podFields.WithField("url", url) response, err := http.Get(url) if err != nil { - logUrl.WithError(err).Fatal("Cannot get pod manifest content") + logs.WithEF(err, logUrl).Fatal("Cannot get pod manifest content") return nil } else { if response.StatusCode != 200 { - logUrl.WithField("status_code", response.StatusCode).WithField("status_message", response.Status). + logs.WithFields(logUrl).WithField("status_code", response.StatusCode). + WithField("status_message", response.Status). Fatal("Receive response error for discovery") } defer response.Body.Close() content, err := ioutil.ReadAll(response.Body) if err != nil { - logUrl.WithError(err).Fatal("Cannot read pod manifest content") + logs.WithEF(err, logUrl).Fatal("Cannot read pod manifest content") } tmpMap := make(map[string][]cntspec.ACFullname, 1) if err := s.podManifestToMap(tmpMap, content); err != nil { - logUrl.WithError(err).Fatal("Cannot read pod content") + logs.WithEF(err, logUrl).Fatal("Cannot read pod content") } acis := tmpMap[name.Name()] if acis == nil { - logUrl.Fatal("Discovered pod name does not match requested") + logs.WithFields(logUrl).Fatal("Discovered pod name does not match requested") } return acis } @@ -186,19 +187,19 @@ func (s *Service) PrepareAciList() string { } override := s.sources(builder.BuildFlags.GenerateManifests) - s.log.WithField("data", override).Debug("Local resolved sources") + logs.WithFields(s.fields).WithField("data", override).Debug("Local resolved sources") var acis string for _, aci := range s.manifest.Containers { - containerLog := s.log.WithField("container", aci.String()) - containerLog.Debug("Processing container") + containerLog := s.fields.WithField("container", aci.String()) + logs.WithFields(containerLog).Debug("Processing container") if strings.HasPrefix(aci.ShortName(), "pod-") && !strings.Contains(aci.ShortName(), "_") { // TODO this is CNT specific var podAcis []cntspec.ACFullname if override[aci.Name()] != nil { - containerLog.Debug("Using local source to resolve") + logs.WithFields(containerLog).Debug("Using local source to resolve") podAcis = override[aci.Name()] } else { - containerLog.Debug("Using remote source to resolve") + logs.WithFields(containerLog).Debug("Using remote source to resolve") podAcis = s.discoverPod(aci) } for _, aci := range podAcis { @@ -207,14 +208,14 @@ func (s *Service) PrepareAciList() string { } else { var taci cntspec.ACFullname if override[aci.Name()] != nil { - containerLog.Debug("Using local source to resolve") + logs.WithFields(containerLog).Debug("Using local source to resolve") taci = override[aci.Name()][0] } else { - containerLog.Debug("Using remote source to resolve") + logs.WithFields(containerLog).Debug("Using remote source to resolve") aciTmp, err := aci.FullyResolved() taci = *aciTmp if err != nil { - containerLog.Fatal("Cannot resolve aci") + logs.WithEF(err, containerLog).Fatal("Cannot resolve aci") return "" } } @@ -222,7 +223,7 @@ func (s *Service) PrepareAciList() string { } } if acis == "" { - s.log.Error("Aci list is empty after discovery") + logs.WithFields(s.fields).Error("Cannot resolve aci") } s.aciList = acis return acis diff --git a/work/env/service-update.go b/work/env/service-update.go index 2ed08c3..4c4e162 100644 --- a/work/env/service-update.go +++ b/work/env/service-update.go @@ -6,6 +6,7 @@ import ( "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/work/env/service" "github.com/mgutz/ansi" + "github.com/n0rad/go-erlog/logs" "os" "strings" "sync" @@ -14,14 +15,14 @@ import ( ) func (s *Service) Update() error { - s.log.Info("Updating service") + logs.WithFields(s.fields).Info("Updating service") s.Generate() s.Lock("service/update", 1*time.Hour, "Updating") defer s.Unlock("service/update") if s.manifest.ConcurrentUpdater > 1 && !builder.BuildFlags.Yes { - s.log.Fatal("Update concurrently require -y") + logs.WithFields(s.fields).Fatal("Update concurrently require -y") } s.concurrentUpdater(s.ListUnits()) @@ -33,12 +34,12 @@ ask: for { same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.WithError(err).Warn("Cannot compare local and remote service") + logs.WithEF(err, s.fields).Warn("Cannot compare local and remote service") } if same { - u.Log.Info("Remote service is already up to date") + logs.WithFields(s.fields).Info("Remote service is already up to date") if !u.IsRunning() { - u.Log.Info("But service is not running") + logs.WithFields(s.fields).Info("But service is not running") } else if !builder.BuildFlags.All { return } @@ -52,18 +53,18 @@ ask: case ACTION_DIFF: u.DisplayDiff() case ACTION_QUIT: - u.Log.Debug("User want to quit") + logs.WithFields(s.fields).Debug("User want to quit") if globalUpdater == 0 { s.Unlock("service/update") } os.Exit(1) case ACTION_SKIP: - u.Log.Debug("User skip this service") + logs.WithFields(s.fields).Debug("User skip this service") return case ACTION_YES: break ask default: - u.Log.Fatal("Should not be here") + logs.WithFields(s.fields).Fatal("Should not be here") } } @@ -75,7 +76,7 @@ ask: atomic.AddUint32(&globalUpdater, 1) } - u.Log.Info("Updating unit") + logs.WithFields(s.fields).Info("Updating unit") u.UpdateInside("service/update") time.Sleep(time.Second * 2) diff --git a/work/env/service.go b/work/env/service.go index 3cd4776..846648e 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -3,8 +3,6 @@ package env import ( "encoding/json" "fmt" - "github.com/Sirupsen/logrus" - log "github.com/Sirupsen/logrus" "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/spec" @@ -12,6 +10,8 @@ import ( "github.com/blablacar/ggn/work/env/service" "github.com/coreos/etcd/client" "github.com/juju/errors" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/logs" "golang.org/x/net/context" "gopkg.in/yaml.v2" "io/ioutil" @@ -22,13 +22,13 @@ import ( ) type Service struct { + fields data.Fields env spec.Env path string Name string hasTimer bool manifest spec.ServiceManifest nodesAsJsonMap []interface{} - log log.Entry lockPath string attributes map[string]interface{} generated bool @@ -40,7 +40,7 @@ type Service struct { } func NewService(path string, name string, env spec.Env) *Service { - l := env.GetLog() + l := env.GetFields() hasTimer := false if _, err := os.Stat(path + "/" + name + spec.PATH_UNIT_TIMER_TEMPLATE); err == nil { @@ -53,14 +53,14 @@ func NewService(path string, name string, env spec.Env) *Service { aciListMutex: &sync.Mutex{}, generatedMutex: &sync.Mutex{}, hasTimer: hasTimer, - log: *l.WithField("service", name), + fields: l.WithField("service", name), path: path + "/" + name, Name: name, env: env, lockPath: "/ggn-lock/" + name + "/lock", } - service.log.Debug("New Service") + logs.WithFields(service.fields).Debug("New service") service.loadManifest() service.loadAttributes() @@ -72,18 +72,18 @@ func (s *Service) prepareNodesAsJsonMap() { tmpRes, err := utils.TransformYamlToJson(s.manifest.Nodes) var res []interface{} = tmpRes.([]interface{}) if err != nil { - s.log.WithError(err).Fatal("Cannot transform yaml to json") + logs.WithEF(err, s.fields).Fatal("Cannot transform yaml to json") } if res[0].(map[string]interface{})[spec.NODE_HOSTNAME].(string) == "*" { if len(res) > 1 { - s.log.Fatal("You cannot mix all nodes with single node. Yet ?") + logs.WithFields(s.fields).Fatal("You cannot mix all nodes with single node. Yet ?") } newNodes := *new([]interface{}) machines, err := s.env.ListMachineNames() if err != nil { - s.log.WithError(err).Fatal("Cannot list machines to generate units") + logs.WithEF(err, s.fields).Fatal("Cannot list machines to generate units") } for _, machine := range machines { node := utils.CopyMap(res[0].(map[string]interface{})) @@ -111,8 +111,8 @@ func (s *Service) GetEnv() spec.Env { return s.env } -func (s *Service) GetLog() logrus.Entry { - return s.log +func (s *Service) GetFields() data.Fields { + return s.fields } func (s *Service) LoadUnit(name string) *service.Unit { @@ -162,7 +162,7 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this func (s *Service) FleetListUnits(command string) { stdout, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-units", "--full", "--no-legend") if err != nil { - s.log.WithError(err).Fatal("Failed to list-units") + logs.WithEF(err, s.fields).Fatal("Failed to list-units") } unitStatuses := strings.Split(stdout, "\n") @@ -175,14 +175,14 @@ func (s *Service) FleetListUnits(command string) { } func (s *Service) Unlock(command string) { - s.log.Info("Unlocking") + logs.WithFields(s.fields).Info("Unlocking") s.runHook(EARLY, command, "unlock") defer s.runHook(LATE, command, "unlock") kapi := s.env.EtcdClient() _, err := kapi.Delete(context.Background(), s.lockPath, nil) if cerr, ok := err.(*client.ClusterError); ok { - s.log.WithError(cerr).Panic("Cannot unlock service") + logs.WithEF(cerr, s.fields).Fatal("Cannot unlock service") } } @@ -190,26 +190,26 @@ func (s *Service) Lock(command string, ttl time.Duration, message string) { userAndHost := "[" + ggn.GetUserAndHost() + "] " message = userAndHost + message - s.log.WithField("ttl", ttl).WithField("message", message).Info("locking") + logs.WithFields(s.fields).WithField("ttl", ttl).WithField("message", message).Info("Locking") s.runHook(EARLY, command, "lock") defer s.runHook(LATE, command, "lock") kapi := s.env.EtcdClient() resp, err := kapi.Get(context.Background(), s.lockPath, nil) if cerr, ok := err.(*client.ClusterError); ok { - s.log.WithError(cerr).Fatal("Server error reading on fleet") + logs.WithEF(cerr, s.fields).Fatal("Server error reading on fleet") } else if err != nil { _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttl}) if err != nil { - s.log.WithError(err).Fatal("Cannot write lock") + logs.WithEF(cerr, s.fields).Fatal("Cannot write lock") } } else if strings.HasPrefix(resp.Node.Value, userAndHost) { _, err := kapi.Set(context.Background(), s.lockPath, message, &client.SetOptions{TTL: ttl}) if err != nil { - s.log.WithError(err).Fatal("Cannot write lock") + logs.WithEF(cerr, s.fields).Fatal("Cannot write lock") } } else { - s.log.WithField("message", resp.Node.Value). + logs.WithFields(s.fields).WithField("message", resp.Node.Value). WithField("ttl", resp.Node.TTLDuration().String()). Fatal("Service is already locked") } @@ -232,7 +232,7 @@ const LATE = false func (s *Service) runHook(isEarly bool, command string, action string) { out, err := json.Marshal(s.attributes) if err != nil { - s.log.WithError(err).Panic("Cannot marshall attributes") + logs.WithEF(err, s.fields).Fatal("Cannot marshall attributes") } info := spec.HookInfo{ @@ -253,11 +253,11 @@ func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) if err != nil { - s.log.WithError(err).WithField("path", s.path+spec.PATH_ATTRIBUTES).Panic("Cannot load Attributes files") + logs.WithEF(err, s.fields).WithField("path", s.path+spec.PATH_ATTRIBUTES).Fatal("Cannot load Attributes files") } attr = attributes.MergeAttributesFilesForMap(attr, files) s.attributes = attr - s.log.WithField("attributes", s.attributes).Debug("Attributes loaded") + logs.WithFields(s.fields).WithField("attributes", s.attributes).Debug("Attributes loaded") } func (s *Service) loadUnitTemplate(filename string) (*utils.Templating, error) { @@ -279,17 +279,17 @@ func (s *Service) loadManifest() { path := s.manifestPath() source, err := ioutil.ReadFile(path) if err != nil { - s.log.WithError(err).WithField("path", path).Warn("Cannot find manifest for service") + logs.WithEF(err, s.fields).WithField("path", path).Warn("Cannot find manifest for service") } err = yaml.Unmarshal([]byte(source), &manifest) if err != nil { - s.log.WithError(err).Fatal("Cannot Read service manifest") + logs.WithEF(err, s.fields).Fatal("Cannot Read service manifest") } if manifest.ConcurrentUpdater == 0 { manifest.ConcurrentUpdater = 1 } - s.log.WithField("manifest", manifest).Debug("Manifest loaded") + logs.WithFields(s.fields).WithField("manifest", manifest).Debug("Manifest loaded") s.manifest = manifest } diff --git a/work/env/service/unit-command.go b/work/env/service/unit-command.go index aef4ae4..1364cb2 100644 --- a/work/env/service/unit-command.go +++ b/work/env/service/unit-command.go @@ -1,9 +1,9 @@ package service import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/spec" + "github.com/n0rad/go-erlog/logs" "os" "strconv" "time" @@ -11,15 +11,15 @@ import ( func (u *Unit) Start(command string) error { if u.IsRunning() { - u.Log.Info("Service is already running") + logs.WithFields(u.Fields).Info("Service is already running") return nil } if !u.IsLoaded() { - u.Log.Debug("unit is not loaded yet") + logs.WithFields(u.Fields).Debug("unit is not loaded yet") u.Service.Generate() u.Load(command) } else { - u.Log.Debug("unit is already loaded") + logs.WithFields(u.Fields).Debug("unit is already loaded") } return u.runAction(command, "start") } @@ -42,9 +42,9 @@ func (u *Unit) Destroy(command string) error { } func (u *Unit) Restart(command string) error { - u.Log.Debug("restart") + logs.WithFields(u.Fields).Debug("restart") if u.Type == spec.TYPE_SERVICE && u.Service.HasTimer() { - u.Log.Fatal("You cannot restart a service associated to a time") + logs.WithFields(u.Fields).Fatal("You cannot restart a service associated to a time") } u.runHook(EARLY, command, "restart") @@ -62,7 +62,7 @@ func (u *Unit) Restart(command string) error { func (u *Unit) Update(command string) error { u.Service.Generate() - u.Log.Debug("Update") + logs.WithFields(u.Fields).Debug("Update") u.runHook(EARLY, command, "update") defer u.runHook(LATE, command, "update") @@ -71,12 +71,12 @@ func (u *Unit) Update(command string) error { same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.WithError(err).Warn("Cannot compare local and remote service") + logs.WithEF(err, u.Fields).Warn("Cannot compare local and remote service") } if same { - u.Log.Info("Remote service is already up to date") + logs.WithFields(u.Fields).Info("Remote service is already up to date") if !u.IsRunning() { - u.Log.Info("But service is not running") + logs.WithFields(u.Fields).Info("But service is not running") } else if !builder.BuildFlags.Force { return nil } @@ -88,7 +88,7 @@ func (u *Unit) Update(command string) error { } func (u *Unit) Journal(command string, follow bool, lines int) { - u.Log.Debug("journal") + logs.WithFields(u.Fields).Debug("journal") u.runHook(EARLY, command, "journal") defer u.runHook(LATE, command, "journal") @@ -101,30 +101,30 @@ func (u *Unit) Journal(command string, follow bool, lines int) { err := u.Service.GetEnv().RunFleetCmd(args...) if err != nil && !follow { - logrus.WithError(err).Fatal("Failed to run journal") + logs.WithEF(err, u.Fields).Fatal("Failed to run journal") } } func (u *Unit) Ssh(command string) { - u.Log.Debug("ssh") + logs.WithFields(u.Fields).Debug("ssh") u.runHook(EARLY, command, "ssh") defer u.runHook(LATE, command, "ssh") err := u.Service.GetEnv().RunFleetCmd("ssh", u.Filename) if err != nil { - logrus.WithError(err).Fatal("Failed to run status") + logs.WithEF(err, u.Fields).Fatal("Failed to run status") } } func (u *Unit) Diff(command string) { - u.Log.Debug("diff") + logs.WithFields(u.Fields).Debug("diff") u.Service.Generate() u.runHook(EARLY, command, "diff") defer u.runHook(LATE, command, "diff") same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.Warn("Cannot read unit") + logs.WithFields(u.Fields).Warn("Cannot read unit") } if !same { u.DisplayDiff() @@ -132,7 +132,7 @@ func (u *Unit) Diff(command string) { } func (u *Unit) Status(command string) { - u.Log.Debug("status") + logs.WithFields(u.Fields).Debug("status") u.runHook(EARLY, command, "status") defer u.runHook(LATE, command, "status") @@ -150,13 +150,13 @@ func (u *Unit) runAction(command string, action string) error { defer u.Service.Unlock(command) } - u.Log.Debug(action) + logs.WithFields(u.Fields).Debug(action) u.runHook(EARLY, command, action) defer u.runHook(LATE, command, action) _, _, err := u.Service.GetEnv().RunFleetCmdGetOutput(action, u.unitPath) if err != nil { - logrus.WithError(err).Error("Cannot " + action + " unit") + logs.WithEF(err, u.Fields).Error("Cannot " + action + " unit") return err } return nil diff --git a/work/env/service/unit-generate.go b/work/env/service/unit-generate.go index 276ed05..e2ce3d5 100644 --- a/work/env/service/unit-generate.go +++ b/work/env/service/unit-generate.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/json" "github.com/blablacar/ggn/utils" + "github.com/n0rad/go-erlog/logs" "github.com/peterbourgon/mergemap" "io/ioutil" "os" @@ -19,13 +20,13 @@ func (u *Unit) Generate(tmpl *utils.Templating) { return } - u.Log.Debug("Generate") + logs.WithFields(u.Fields).Debug("Generate") data := u.GenerateAttributes() data["acis"] = u.Service.PrepareAciList() out, err := json.Marshal(data) if err != nil { - u.Log.WithError(err).Panic("Cannot marshall attributes") + logs.WithEF(err, u.Fields).Panic("Cannot marshall attributes") } res := strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) res = strings.Replace(res, "'", "\\'", -1) @@ -36,7 +37,7 @@ func (u *Unit) Generate(tmpl *utils.Templating) { var b bytes.Buffer err = tmpl.Execute(&b, data) if err != nil { - u.Log.Error("Failed to run templating", err) + logs.WithEF(err, u.Fields).Error("Failed to run templating") } ok, err := utils.Exists(u.path) if !ok || err != nil { @@ -44,7 +45,7 @@ func (u *Unit) Generate(tmpl *utils.Templating) { } err = ioutil.WriteFile(u.path+"/"+u.Filename, b.Bytes(), 0644) if err != nil { - u.Log.WithError(err).WithField("path", u.path+"/"+u.Filename).Error("Cannot writer unit") + logs.WithEF(err, u.Fields).WithField("path", u.path+"/"+u.Filename).Error("Cannot writer unit") } u.generated = true diff --git a/work/env/service/unit.go b/work/env/service/unit.go index 210949d..e361cec 100644 --- a/work/env/service/unit.go +++ b/work/env/service/unit.go @@ -3,11 +3,12 @@ package service import ( "bufio" "encoding/json" - "github.com/Sirupsen/logrus" "github.com/blablacar/cnt/utils" "github.com/blablacar/ggn/spec" "github.com/coreos/fleet/unit" "github.com/juju/errors" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/logs" "io/ioutil" "os" "strings" @@ -16,7 +17,7 @@ import ( ) type Unit struct { - Log logrus.Entry + Fields data.Fields Type spec.UnitType path string Name string @@ -29,7 +30,7 @@ type Unit struct { } func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Service) *Unit { - l := service.GetLog() + l := service.GetFields() filename := service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + utype.String() @@ -40,7 +41,7 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser unit := &Unit{ generatedMutex: &sync.Mutex{}, Type: utype, - Log: *l.WithField("unit", name), + Fields: l.WithField("unit", name), Service: service, path: path, hostname: hostname, @@ -48,7 +49,7 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser Filename: filename, unitPath: path + "/" + filename, } - unit.Log.WithField("hostname", hostname).Debug("New unit") + logs.WithFields(unit.Fields).WithField("hostname", hostname).Debug("New unit") return unit } @@ -66,7 +67,7 @@ func (u *Unit) GetService() spec.Service { } func (u *Unit) Check(command string) { - u.Log.Debug("Check") + logs.WithFields(u.Fields).Debug("Check") info := spec.HookInfo{ Service: u.Service, @@ -80,28 +81,28 @@ func (u *Unit) Check(command string) { statuses := u.Service.GetEnv().ListUnits() var status spec.UnitStatus if _, ok := statuses[u.Filename]; !ok { - u.Log.Warn("cannot find unit on fleet") + logs.WithFields(u.Fields).Warn("cannot find unit on fleet") return } status = statuses[u.Filename] - logrus.WithField("status", status).Debug("status") + logs.WithField("status", status).Debug("status") if status.Active != spec.ACTIVE_ACTIVE { - u.Log.WithField("active", status.Active).Warn("unit status is not active") + logs.WithFields(u.Fields).WithField("active", status.Active).Warn("unit status is not active") return } if status.Sub != spec.SUB_RUNNING { - u.Log.WithField("sub", status.Sub).Warn("unit sub is not running") + logs.WithFields(u.Fields).WithField("sub", status.Sub).Warn("unit sub is not running") return } same, err := u.IsLocalContentSameAsRemote() if err != nil { - u.Log.Error("Cannot read unit") + logs.WithFields(u.Fields).Error("Cannot read unit") return } if !same { - u.Log.Warn("Unit is not up to date") + logs.WithFields(u.Fields).Warn("Unit is not up to date") return } } @@ -164,7 +165,7 @@ const LATE = false func (u *Unit) runHook(isEarly bool, command string, action string) { out, err := json.Marshal(u.GenerateAttributes()) if err != nil { - u.Log.WithError(err).Panic("Cannot marshall attributes") + logs.WithEF(err, u.Fields).Fatal("Cannot marshall attributes") } info := spec.HookInfo{ @@ -185,7 +186,7 @@ func (u *Unit) runHook(isEarly bool, command string, action string) { func (u *Unit) serviceLocalAndRemoteContent() (string, string, error) { localContent, err := u.GetUnitContentAsFleeted() if err != nil { - u.Log.WithError(err).Debug("Cannot get local unit content") + logs.WithEF(err, u.Fields).Debug("Cannot get local unit content") return "", "", errors.Annotate(err, "Cannot read local unit file") } diff --git a/work/work.go b/work/work.go index a1716c9..692777a 100644 --- a/work/work.go +++ b/work/work.go @@ -1,8 +1,9 @@ package work import ( - "github.com/Sirupsen/logrus" "github.com/blablacar/ggn/ggn" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/logs" "io/ioutil" "os" ) @@ -10,14 +11,14 @@ import ( const PATH_ENV = "/env" type Work struct { - path string - log logrus.Entry + path string + fields data.Fields } func NewWork(path string) *Work { return &Work{ - path: path, - log: *logrus.WithField("path", path), + path: path, + fields: data.WithField("path", path), } } @@ -28,14 +29,12 @@ func (w Work) LoadEnv(name string) *Env { func (w Work) ListEnvs() []string { path := ggn.Home.Config.WorkPath + PATH_ENV if _, err := os.Stat(path); os.IsNotExist(err) { - w.log.Error("env directory not found" + ggn.Home.Config.WorkPath) - os.Exit(1) + logs.WithEF(err, w.fields).WithField("path", path).Fatal("env directory not found") } files, err := ioutil.ReadDir(path) if err != nil { - w.log.Error("Cannot read env directory : "+path, err) - os.Exit(1) + logs.WithEF(err, w.fields).WithField("path", path).Fatal("Cannot read env directory") } var envs []string From d89461f768966ed025519e88440f7fbb719e6622 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 19 Jan 2016 11:17:01 +0100 Subject: [PATCH 109/163] warn if no node is defined in service manifest --- work/env/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/work/env/service.go b/work/env/service.go index 846648e..845ceaf 100644 --- a/work/env/service.go +++ b/work/env/service.go @@ -69,6 +69,10 @@ func NewService(path string, name string, env spec.Env) *Service { } func (s *Service) prepareNodesAsJsonMap() { + if s.manifest.Nodes == nil || len(s.manifest.Nodes.([]interface{})) == 0 { + logs.WithFields(s.fields).Warn("No nodes defined in service") + return + } tmpRes, err := utils.TransformYamlToJson(s.manifest.Nodes) var res []interface{} = tmpRes.([]interface{}) if err != nil { From 3b5083a4d4e9aff6ad13fc50cc06177bc39b6e8f Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 19 Jan 2016 11:39:10 +0100 Subject: [PATCH 110/163] merge works and builder packages --- commands/ggn.go | 4 +- commands/prepare-service.go | 9 ++-- commands/prepare-unit.go | 9 ++-- spec/env.go | 39 --------------- spec/service.go | 39 --------------- spec/unit.go | 27 ----------- {builder => work}/build.go | 2 +- work/env-check.go | 3 +- work/env-list-units.go | 9 ++-- work/env.go | 24 +++++----- work/{env => }/service-check.go | 2 +- work/{env => }/service-generate.go | 16 +++---- work/{env => }/service-update.go | 16 +++---- work/{env => }/service.go | 58 +++++++++-------------- work/spec.go | 63 +++++++++++++++++++++++++ work/{env/service => }/unit-command.go | 8 ++-- work/{env/service => }/unit-generate.go | 2 +- work/{env/service => }/unit.go | 30 +++++------- 18 files changed, 144 insertions(+), 216 deletions(-) delete mode 100644 spec/env.go delete mode 100644 spec/service.go delete mode 100644 spec/unit.go rename {builder => work}/build.go (90%) rename work/{env => }/service-check.go (98%) rename work/{env => }/service-generate.go (93%) rename work/{env => }/service-update.go (87%) rename work/{env => }/service.go (82%) create mode 100644 work/spec.go rename work/{env/service => }/unit-command.go (95%) rename work/{env/service => }/unit-generate.go (99%) rename work/{env/service => }/unit.go (90%) diff --git a/commands/ggn.go b/commands/ggn.go index 2759f6b..f40c684 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -4,8 +4,8 @@ import ( "bufio" "fmt" "github.com/blablacar/cnt/utils" - "github.com/blablacar/ggn/builder" "github.com/blablacar/ggn/ggn" + "github.com/blablacar/ggn/work" "github.com/coreos/go-semver/semver" "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" @@ -21,7 +21,7 @@ func Execute() { ggn.Home = discoverHome() prepareLogs() - builder.BuildFlags.GenerateManifests = GenerateManifestPathFromArgs() + work.BuildFlags.GenerateManifests = GenerateManifestPathFromArgs() rootCmd := &cobra.Command{ Use: "ggn", diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 52f01c9..7182325 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -1,8 +1,7 @@ package commands import ( - "github.com/blablacar/ggn/builder" - "github.com/blablacar/ggn/work/env" + "github.com/blablacar/ggn/work" "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" "os" @@ -10,7 +9,7 @@ import ( "time" ) -func prepareServiceCommands(service *env.Service) *cobra.Command { +func prepareServiceCommands(service *work.Service) *cobra.Command { var ttl string serviceCmd := &cobra.Command{ @@ -91,8 +90,8 @@ func prepareServiceCommands(service *env.Service) *cobra.Command { } lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") - updateCmd.Flags().BoolVarP(&builder.BuildFlags.All, "all", "a", false, "process all units, even up to date") - updateCmd.Flags().BoolVarP(&builder.BuildFlags.Yes, "yes", "y", false, "process units without asking") + updateCmd.Flags().BoolVarP(&work.BuildFlags.All, "all", "a", false, "process all units, even up to date") + updateCmd.Flags().BoolVarP(&work.BuildFlags.Yes, "yes", "y", false, "process units without asking") serviceCmd.AddCommand(generateCmd, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd, listCmd) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 9029466..509890b 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -1,12 +1,11 @@ package commands import ( - "github.com/blablacar/ggn/builder" - "github.com/blablacar/ggn/work/env/service" + "github.com/blablacar/ggn/work" "github.com/spf13/cobra" ) -func prepareUnitCommands(unit *service.Unit) *cobra.Command { +func prepareUnitCommands(unit *work.Unit) *cobra.Command { var follow bool var lines int @@ -120,13 +119,13 @@ func prepareUnitCommands(unit *service.Unit) *cobra.Command { journalCmd.Flags().BoolVarP(&follow, "follow", "f", false, "follow") journalCmd.Flags().IntVarP(&lines, "lines", "l", 10, "lines") - updateCmd.Flags().BoolVarP(&builder.BuildFlags.Force, "force", "f", false, "force update even if up to date") + updateCmd.Flags().BoolVarP(&work.BuildFlags.Force, "force", "f", false, "force update even if up to date") unitCmd.AddCommand(startCmd, stopCmd, updateCmd, destroyCmd, statusCmd, unloadCmd, diffCmd, checkCmd, journalCmd, loadCmd, sshCmd, restartCmd, generateCmd) return unitCmd } -func getShortDescription(unit *service.Unit, action string) string { +func getShortDescription(unit *work.Unit, action string) string { return action + " '" + unit.Name + "' from '" + unit.Service.GetName() + "' on env '" + unit.Service.GetEnv().GetName() + "'" } diff --git a/spec/env.go b/spec/env.go deleted file mode 100644 index afd453a..0000000 --- a/spec/env.go +++ /dev/null @@ -1,39 +0,0 @@ -package spec - -import ( - "github.com/coreos/etcd/client" - "github.com/n0rad/go-erlog/data" -) - -const PATH_ATTRIBUTES = "/attributes" - -const ACTIVE_ACTIVE = "active" -const SUB_RUNNING = "running" - -type UnitStatus struct { - Unit string - Machine string - Active string - Sub string -} - -type HookInfo struct { - Command string - Service Service - Unit Unit - Action string - Attributes string -} - -type Env interface { - GetName() string - GetFields() data.Fields - GetAttributes() map[string]interface{} - ListMachineNames() ([]string, error) - RunFleetCmdGetOutput(args ...string) (string, string, error) - RunFleetCmd(args ...string) error - EtcdClient() client.KeysAPI - RunEarlyHook(info HookInfo) - RunLateHook(info HookInfo) - ListUnits() map[string]UnitStatus -} diff --git a/spec/service.go b/spec/service.go deleted file mode 100644 index be35d2d..0000000 --- a/spec/service.go +++ /dev/null @@ -1,39 +0,0 @@ -package spec - -import ( - cntspec "github.com/blablacar/cnt/spec" - "github.com/n0rad/go-erlog/data" - "time" -) - -const PATH_SERVICE_MANIFEST = "/service-manifest.yml" - -//type NodeManifest struct { -// Hostname string `yaml:"hostname"` -// Ip string `yaml:"ip"` -// Fleet []string `yaml:"fleet"` -//} - -const NODE_HOSTNAME = "hostname" - -type ServiceManifest struct { - ConcurrentUpdater int `yaml:"concurrentUpdater"` - Containers []cntspec.ACFullname `yaml:"containers"` - ExecStartPre []string `yaml:"execStartPre"` - ExecStart []string `yaml:"execStart"` - Nodes interface{} `yaml:"nodes"` -} - -type Service interface { - HasTimer() bool - PrepareAciList() string - NodeAttributes(hostname string) map[string]interface{} - GetAttributes() map[string]interface{} - Generate() - Unlock(command string) - Lock(command string, ttl time.Duration, message string) - GetName() string - GetEnv() Env - GetFields() data.Fields - GetFleetUnitContent(unit string) (string, error) -} diff --git a/spec/unit.go b/spec/unit.go deleted file mode 100644 index 7ff1bf0..0000000 --- a/spec/unit.go +++ /dev/null @@ -1,27 +0,0 @@ -package spec - -const PATH_UNIT_SERVICE_TEMPLATE = "/unit.tmpl" -const PATH_UNIT_TIMER_TEMPLATE = "/unit.timer.tmpl" - -type UnitType int - -const ( - TYPE_SERVICE UnitType = iota - TYPE_TIMER -) - -func (u UnitType) String() string { - switch u { - case TYPE_SERVICE: - return ".service" - case TYPE_TIMER: - return ".timer" - } - return "" -} - -type Unit interface { - GetType() UnitType - GetName() string - GetService() Service -} diff --git a/builder/build.go b/work/build.go similarity index 90% rename from builder/build.go rename to work/build.go index cfd6a43..19c9df8 100644 --- a/builder/build.go +++ b/work/build.go @@ -1,4 +1,4 @@ -package builder +package work type Flags struct { All bool diff --git a/work/env-check.go b/work/env-check.go index 5a0bef2..8cc16fc 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -1,7 +1,6 @@ package work import ( - "github.com/blablacar/ggn/spec" "github.com/n0rad/go-erlog/logs" "sync" ) @@ -9,7 +8,7 @@ import ( func (e Env) Check() { logs.WithFields(e.fields).Debug("Running check") - info := spec.HookInfo{Command: "env/check", Action: "env/check"} + info := HookInfo{Command: "env/check", Action: "env/check"} e.RunEarlyHook(info) defer e.RunLateHook(info) diff --git a/work/env-list-units.go b/work/env-list-units.go index 2e48368..f50103c 100644 --- a/work/env-list-units.go +++ b/work/env-list-units.go @@ -2,16 +2,15 @@ package work import ( "bufio" - "github.com/blablacar/ggn/spec" "github.com/n0rad/go-erlog/logs" "strings" "sync" ) -var statusCache map[string]spec.UnitStatus +var statusCache map[string]UnitStatus var mutex = &sync.Mutex{} -func (e Env) ListUnits() map[string]spec.UnitStatus { +func (e Env) ListUnits() map[string]UnitStatus { mutex.Lock() defer mutex.Unlock() @@ -30,10 +29,10 @@ func (e Env) ListUnits() map[string]spec.UnitStatus { lines = append(lines, scanner.Text()) } - status := make(map[string]spec.UnitStatus) + status := make(map[string]UnitStatus) for _, line := range lines { split := strings.Fields(line) - status[split[0]] = spec.UnitStatus{Unit: split[0], Machine: split[1], Active: split[2], Sub: split[3]} + status[split[0]] = UnitStatus{Unit: split[0], Machine: split[1], Active: split[2], Sub: split[3]} } statusCache = status diff --git a/work/env.go b/work/env.go index 5dd4c10..bb5f866 100644 --- a/work/env.go +++ b/work/env.go @@ -5,9 +5,7 @@ import ( "github.com/blablacar/attributes-merger/attributes" cntUtils "github.com/blablacar/cnt/utils" "github.com/blablacar/ggn/ggn" - "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" - "github.com/blablacar/ggn/work/env" "github.com/coreos/etcd/client" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" @@ -38,7 +36,7 @@ type Env struct { fields data.Fields attributes map[string]interface{} config Config - services map[string]*env.Service + services map[string]*Service servicesMutex *sync.Mutex } @@ -51,7 +49,7 @@ func NewEnvironment(root string, name string) *Env { } env := &Env{ - services: map[string]*env.Service{}, + services: map[string]*Service{}, servicesMutex: &sync.Mutex{}, path: path, name: name, @@ -87,7 +85,7 @@ func (e Env) FleetctlListUnits() { } } -func (e Env) LoadService(name string) *env.Service { +func (e Env) LoadService(name string) *Service { e.servicesMutex.Lock() defer e.servicesMutex.Unlock() @@ -95,13 +93,13 @@ func (e Env) LoadService(name string) *env.Service { return val } - service := env.NewService(e.path+"/services", name, e) + service := NewService(e.path+"/services", name, e) e.services[name] = service return service } func (e Env) attributesDir() string { - return e.path + spec.PATH_ATTRIBUTES + return e.path + PATH_ATTRIBUTES } func (e *Env) loadConfig() { @@ -114,9 +112,9 @@ func (e *Env) loadConfig() { } func (e *Env) loadAttributes() { - files, err := utils.AttributeFiles(e.path + spec.PATH_ATTRIBUTES) + files, err := utils.AttributeFiles(e.path + PATH_ATTRIBUTES) if err != nil { - logs.WithEF(err, e.fields).WithField("path", e.path+spec.PATH_ATTRIBUTES).Fatal("Cannot load attribute files") + logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Cannot load attribute files") } e.attributes = attributes.MergeAttributesFiles(files) logs.WithFields(e.fields).WithField("attributes", e.attributes).Debug("Attributes loaded") @@ -134,7 +132,7 @@ func (e Env) ListServices() []string { if !file.IsDir() { continue } - if _, err := os.Stat(path + "/" + file.Name() + spec.PATH_SERVICE_MANIFEST); os.IsNotExist(err) { + if _, err := os.Stat(path + "/" + file.Name() + PATH_SERVICE_MANIFEST); os.IsNotExist(err) { continue } @@ -180,15 +178,15 @@ func (e Env) ListMachineNames() ([]string, error) { const PATH_HOOKS = "/hooks" -func (e Env) RunEarlyHook(info spec.HookInfo) { +func (e Env) RunEarlyHook(info HookInfo) { e.runHook("/early", info) } -func (e Env) RunLateHook(info spec.HookInfo) { +func (e Env) RunLateHook(info HookInfo) { e.runHook("/late", info) } -func (e Env) runHook(path string, info spec.HookInfo) { +func (e Env) runHook(path string, info HookInfo) { logs.WithFields(e.fields).WithField("path", path).WithField("info", info).Debug("Running hook") files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) if err != nil { diff --git a/work/env/service-check.go b/work/service-check.go similarity index 98% rename from work/env/service-check.go rename to work/service-check.go index 77ed11b..a7fd0fe 100644 --- a/work/env/service-check.go +++ b/work/service-check.go @@ -1,4 +1,4 @@ -package env +package work import ( "github.com/n0rad/go-erlog/logs" diff --git a/work/env/service-generate.go b/work/service-generate.go similarity index 93% rename from work/env/service-generate.go rename to work/service-generate.go index c8ab508..a8925f0 100644 --- a/work/env/service-generate.go +++ b/work/service-generate.go @@ -1,11 +1,9 @@ -package env +package work import ( "github.com/appc/spec/discovery" "github.com/appc/spec/schema" cntspec "github.com/blablacar/cnt/spec" - "github.com/blablacar/ggn/builder" - "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" "github.com/n0rad/go-erlog/logs" "io/ioutil" @@ -23,14 +21,14 @@ func (s *Service) Generate() { logs.WithFields(s.fields).Debug("Generating units") - serviceTmpl, err := s.loadUnitTemplate(spec.PATH_UNIT_SERVICE_TEMPLATE) + serviceTmpl, err := s.loadUnitTemplate(PATH_UNIT_SERVICE_TEMPLATE) if err != nil { logs.WithEF(err, s.fields).Fatal("Cannot load service template") } var timerTmpl *utils.Templating if s.hasTimer { - timerTmpl, err = s.loadUnitTemplate(spec.PATH_UNIT_TIMER_TEMPLATE) + timerTmpl, err = s.loadUnitTemplate(PATH_UNIT_TIMER_TEMPLATE) if err != nil { logs.WithEF(err, s.fields).Fatal("Cannot load timer template") } @@ -43,9 +41,9 @@ func (s *Service) Generate() { for _, unitName := range s.ListUnits() { unit := s.LoadUnit(unitName) - if unit.GetType() == spec.TYPE_SERVICE { + if unit.GetType() == TYPE_SERVICE { unit.Generate(serviceTmpl) - } else if unit.GetType() == spec.TYPE_TIMER { + } else if unit.GetType() == TYPE_TIMER { unit.Generate(timerTmpl) } else { logs.WithFields(s.fields).WithField("type", unit.GetType()).Fatal("Unknown unit type") @@ -56,7 +54,7 @@ func (s *Service) Generate() { func (s Service) NodeAttributes(hostname string) map[string]interface{} { for _, node := range s.nodesAsJsonMap { - host := node.(map[string]interface{})[spec.NODE_HOSTNAME].(string) + host := node.(map[string]interface{})[NODE_HOSTNAME].(string) if host == hostname { return node.(map[string]interface{}) } @@ -186,7 +184,7 @@ func (s *Service) PrepareAciList() string { return s.aciList } - override := s.sources(builder.BuildFlags.GenerateManifests) + override := s.sources(BuildFlags.GenerateManifests) logs.WithFields(s.fields).WithField("data", override).Debug("Local resolved sources") var acis string diff --git a/work/env/service-update.go b/work/service-update.go similarity index 87% rename from work/env/service-update.go rename to work/service-update.go index 4c4e162..57e62ca 100644 --- a/work/env/service-update.go +++ b/work/service-update.go @@ -1,10 +1,8 @@ -package env +package work import ( "bufio" "fmt" - "github.com/blablacar/ggn/builder" - "github.com/blablacar/ggn/work/env/service" "github.com/mgutz/ansi" "github.com/n0rad/go-erlog/logs" "os" @@ -21,7 +19,7 @@ func (s *Service) Update() error { s.Lock("service/update", 1*time.Hour, "Updating") defer s.Unlock("service/update") - if s.manifest.ConcurrentUpdater > 1 && !builder.BuildFlags.Yes { + if s.manifest.ConcurrentUpdater > 1 && !BuildFlags.Yes { logs.WithFields(s.fields).Fatal("Update concurrently require -y") } @@ -29,7 +27,7 @@ func (s *Service) Update() error { return nil } -func (s *Service) updateUnit(u service.Unit) { +func (s *Service) updateUnit(u Unit) { ask: for { same, err := u.IsLocalContentSameAsRemote() @@ -40,12 +38,12 @@ ask: logs.WithFields(s.fields).Info("Remote service is already up to date") if !u.IsRunning() { logs.WithFields(s.fields).Info("But service is not running") - } else if !builder.BuildFlags.All { + } else if !BuildFlags.All { return } } - if builder.BuildFlags.Yes { + if BuildFlags.Yes { break ask } action := askToProcessService(u) @@ -86,7 +84,7 @@ var globalUpdater uint32 = 0 func (s *Service) concurrentUpdater(units []string) { wg := &sync.WaitGroup{} - updateChan := make(chan service.Unit) + updateChan := make(chan Unit) for i := 0; i < s.manifest.ConcurrentUpdater; i++ { wg.Add(1) go func() { @@ -106,7 +104,7 @@ func (s *Service) concurrentUpdater(units []string) { } ////////////////////////////////////////////////////////// -func askToProcessService(unit service.Unit) Action { +func askToProcessService(unit Unit) Action { reader := bufio.NewReader(os.Stdin) for { fmt.Print("Update unit " + ansi.LightGreen + unit.Name + ansi.Reset + " ? : (yes,skip,diff,quit) ") diff --git a/work/env/service.go b/work/service.go similarity index 82% rename from work/env/service.go rename to work/service.go index 845ceaf..479506b 100644 --- a/work/env/service.go +++ b/work/service.go @@ -1,13 +1,11 @@ -package env +package work import ( "encoding/json" "fmt" "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/ggn/ggn" - "github.com/blablacar/ggn/spec" "github.com/blablacar/ggn/utils" - "github.com/blablacar/ggn/work/env/service" "github.com/coreos/etcd/client" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" @@ -23,32 +21,32 @@ import ( type Service struct { fields data.Fields - env spec.Env + env Env path string Name string hasTimer bool - manifest spec.ServiceManifest + manifest ServiceManifest nodesAsJsonMap []interface{} lockPath string attributes map[string]interface{} generated bool generatedMutex *sync.Mutex - units map[string]*service.Unit + units map[string]*Unit unitsMutex *sync.Mutex aciList string aciListMutex *sync.Mutex } -func NewService(path string, name string, env spec.Env) *Service { +func NewService(path string, name string, env Env) *Service { l := env.GetFields() hasTimer := false - if _, err := os.Stat(path + "/" + name + spec.PATH_UNIT_TIMER_TEMPLATE); err == nil { + if _, err := os.Stat(path + "/" + name + PATH_UNIT_TIMER_TEMPLATE); err == nil { hasTimer = true } service := &Service{ - units: map[string]*service.Unit{}, + units: map[string]*Unit{}, unitsMutex: &sync.Mutex{}, aciListMutex: &sync.Mutex{}, generatedMutex: &sync.Mutex{}, @@ -79,7 +77,7 @@ func (s *Service) prepareNodesAsJsonMap() { logs.WithEF(err, s.fields).Fatal("Cannot transform yaml to json") } - if res[0].(map[string]interface{})[spec.NODE_HOSTNAME].(string) == "*" { + if res[0].(map[string]interface{})[NODE_HOSTNAME].(string) == "*" { if len(res) > 1 { logs.WithFields(s.fields).Fatal("You cannot mix all nodes with single node. Yet ?") } @@ -91,7 +89,7 @@ func (s *Service) prepareNodesAsJsonMap() { } for _, machine := range machines { node := utils.CopyMap(res[0].(map[string]interface{})) - node[spec.NODE_HOSTNAME] = machine + node[NODE_HOSTNAME] = machine newNodes = append(newNodes, node) } res = newNodes @@ -111,7 +109,7 @@ func (s *Service) GetName() string { return s.Name } -func (s *Service) GetEnv() spec.Env { +func (s *Service) GetEnv() Env { return s.env } @@ -119,18 +117,18 @@ func (s *Service) GetFields() data.Fields { return s.fields } -func (s *Service) LoadUnit(name string) *service.Unit { +func (s *Service) LoadUnit(name string) *Unit { s.unitsMutex.Lock() defer s.unitsMutex.Unlock() if val, ok := s.units[name]; ok { return val } - var unit *service.Unit - if strings.HasSuffix(name, spec.TYPE_TIMER.String()) { - unit = service.NewUnit(s.path+"/units", name[:len(name)-len(spec.TYPE_TIMER.String())], spec.TYPE_TIMER, s) + var unit *Unit + if strings.HasSuffix(name, TYPE_TIMER.String()) { + unit = NewUnit(s.path+"/units", name[:len(name)-len(TYPE_TIMER.String())], TYPE_TIMER, s) } else { - unit = service.NewUnit(s.path+"/units", name, spec.TYPE_SERVICE, s) + unit = NewUnit(s.path+"/units", name, TYPE_SERVICE, s) } s.units[name] = unit return unit @@ -147,9 +145,9 @@ func (s *Service) Diff() { func (s *Service) ListUnits() []string { res := []string{} for _, node := range s.nodesAsJsonMap { - res = append(res, node.(map[string]interface{})[spec.NODE_HOSTNAME].(string)) + res = append(res, node.(map[string]interface{})[NODE_HOSTNAME].(string)) if s.hasTimer { - res = append(res, node.(map[string]interface{})[spec.NODE_HOSTNAME].(string)+".timer") + res = append(res, node.(map[string]interface{})[NODE_HOSTNAME].(string)+".timer") } } return res @@ -221,25 +219,13 @@ func (s *Service) Lock(command string, ttl time.Duration, message string) { ///////////////////////////////////////////////// -type Action int - -const ( - ACTION_YES Action = iota - ACTION_SKIP - ACTION_DIFF - ACTION_QUIT -) - -const EARLY = true -const LATE = false - func (s *Service) runHook(isEarly bool, command string, action string) { out, err := json.Marshal(s.attributes) if err != nil { logs.WithEF(err, s.fields).Fatal("Cannot marshall attributes") } - info := spec.HookInfo{ + info := HookInfo{ Service: s, Action: "service/" + action, Command: command, @@ -255,9 +241,9 @@ func (s *Service) runHook(isEarly bool, command string, action string) { func (s *Service) loadAttributes() { attr := utils.CopyMap(s.env.GetAttributes()) - files, err := utils.AttributeFiles(s.path + spec.PATH_ATTRIBUTES) + files, err := utils.AttributeFiles(s.path + PATH_ATTRIBUTES) if err != nil { - logs.WithEF(err, s.fields).WithField("path", s.path+spec.PATH_ATTRIBUTES).Fatal("Cannot load Attributes files") + logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Cannot load Attributes files") } attr = attributes.MergeAttributesFilesForMap(attr, files) s.attributes = attr @@ -275,11 +261,11 @@ func (s *Service) loadUnitTemplate(filename string) (*utils.Templating, error) { } func (s *Service) manifestPath() string { - return s.path + spec.PATH_SERVICE_MANIFEST + return s.path + PATH_SERVICE_MANIFEST } func (s *Service) loadManifest() { - manifest := spec.ServiceManifest{} + manifest := ServiceManifest{} path := s.manifestPath() source, err := ioutil.ReadFile(path) if err != nil { diff --git a/work/spec.go b/work/spec.go new file mode 100644 index 0000000..9a3db5a --- /dev/null +++ b/work/spec.go @@ -0,0 +1,63 @@ +package work + +import "github.com/blablacar/cnt/spec" + +const PATH_ATTRIBUTES = "/attributes" + +const ACTIVE_ACTIVE = "active" +const SUB_RUNNING = "running" +const PATH_SERVICE_MANIFEST = "/service-manifest.yml" +const NODE_HOSTNAME = "hostname" +const PATH_UNIT_SERVICE_TEMPLATE = "/unit.tmpl" +const PATH_UNIT_TIMER_TEMPLATE = "/unit.timer.tmpl" +const EARLY = true +const LATE = false + +type Action int + +const ( + ACTION_YES Action = iota + ACTION_SKIP + ACTION_DIFF + ACTION_QUIT +) + +type UnitStatus struct { + Unit string + Machine string + Active string + Sub string +} + +type HookInfo struct { + Command string + Service *Service + Unit *Unit + Action string + Attributes string +} + +type ServiceManifest struct { + ConcurrentUpdater int `yaml:"concurrentUpdater"` + Containers []spec.ACFullname `yaml:"containers"` + ExecStartPre []string `yaml:"execStartPre"` + ExecStart []string `yaml:"execStart"` + Nodes interface{} `yaml:"nodes"` +} + +type UnitType int + +const ( + TYPE_SERVICE UnitType = iota + TYPE_TIMER +) + +func (u UnitType) String() string { + switch u { + case TYPE_SERVICE: + return ".service" + case TYPE_TIMER: + return ".timer" + } + return "" +} diff --git a/work/env/service/unit-command.go b/work/unit-command.go similarity index 95% rename from work/env/service/unit-command.go rename to work/unit-command.go index 1364cb2..fdf54c4 100644 --- a/work/env/service/unit-command.go +++ b/work/unit-command.go @@ -1,8 +1,6 @@ -package service +package work import ( - "github.com/blablacar/ggn/builder" - "github.com/blablacar/ggn/spec" "github.com/n0rad/go-erlog/logs" "os" "strconv" @@ -43,7 +41,7 @@ func (u *Unit) Destroy(command string) error { func (u *Unit) Restart(command string) error { logs.WithFields(u.Fields).Debug("restart") - if u.Type == spec.TYPE_SERVICE && u.Service.HasTimer() { + if u.Type == TYPE_SERVICE && u.Service.HasTimer() { logs.WithFields(u.Fields).Fatal("You cannot restart a service associated to a time") } @@ -77,7 +75,7 @@ func (u *Unit) Update(command string) error { logs.WithFields(u.Fields).Info("Remote service is already up to date") if !u.IsRunning() { logs.WithFields(u.Fields).Info("But service is not running") - } else if !builder.BuildFlags.Force { + } else if !BuildFlags.Force { return nil } } diff --git a/work/env/service/unit-generate.go b/work/unit-generate.go similarity index 99% rename from work/env/service/unit-generate.go rename to work/unit-generate.go index e2ce3d5..31847bb 100644 --- a/work/env/service/unit-generate.go +++ b/work/unit-generate.go @@ -1,4 +1,4 @@ -package service +package work import ( "bytes" diff --git a/work/env/service/unit.go b/work/unit.go similarity index 90% rename from work/env/service/unit.go rename to work/unit.go index e361cec..d845ebf 100644 --- a/work/env/service/unit.go +++ b/work/unit.go @@ -1,10 +1,9 @@ -package service +package work import ( "bufio" "encoding/json" "github.com/blablacar/cnt/utils" - "github.com/blablacar/ggn/spec" "github.com/coreos/fleet/unit" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" @@ -18,24 +17,24 @@ import ( type Unit struct { Fields data.Fields - Type spec.UnitType + Type UnitType path string Name string hostname string Filename string unitPath string - Service spec.Service + Service *Service generated bool generatedMutex *sync.Mutex } -func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Service) *Unit { +func NewUnit(path string, hostname string, utype UnitType, service *Service) *Unit { l := service.GetFields() filename := service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + utype.String() name := hostname - if utype != spec.TYPE_SERVICE { + if utype != TYPE_SERVICE { name += utype.String() } unit := &Unit{ @@ -54,7 +53,7 @@ func NewUnit(path string, hostname string, utype spec.UnitType, service spec.Ser return unit } -func (u *Unit) GetType() spec.UnitType { +func (u *Unit) GetType() UnitType { return u.Type } @@ -62,14 +61,14 @@ func (u *Unit) GetName() string { return u.Name } -func (u *Unit) GetService() spec.Service { +func (u *Unit) GetService() *Service { return u.Service } func (u *Unit) Check(command string) { logs.WithFields(u.Fields).Debug("Check") - info := spec.HookInfo{ + info := HookInfo{ Service: u.Service, Unit: u, Action: "check", @@ -79,7 +78,7 @@ func (u *Unit) Check(command string) { defer u.Service.GetEnv().RunLateHook(info) statuses := u.Service.GetEnv().ListUnits() - var status spec.UnitStatus + var status UnitStatus if _, ok := statuses[u.Filename]; !ok { logs.WithFields(u.Fields).Warn("cannot find unit on fleet") return @@ -87,11 +86,11 @@ func (u *Unit) Check(command string) { status = statuses[u.Filename] logs.WithField("status", status).Debug("status") - if status.Active != spec.ACTIVE_ACTIVE { + if status.Active != ACTIVE_ACTIVE { logs.WithFields(u.Fields).WithField("active", status.Active).Warn("unit status is not active") return } - if status.Sub != spec.SUB_RUNNING { + if status.Sub != SUB_RUNNING { logs.WithFields(u.Fields).WithField("sub", status.Sub).Warn("unit sub is not running") return } @@ -123,7 +122,7 @@ func (u *Unit) GetUnitContentAsFleeted() (string, error) { func (u *Unit) UpdateInside(command string) { u.Destroy(command) time.Sleep(time.Second * 2) - if u.Type == spec.TYPE_SERVICE && u.Service.HasTimer() { + if u.Type == TYPE_SERVICE && u.Service.HasTimer() { u.Load(command) } else { u.Start(command) @@ -159,16 +158,13 @@ func (u *Unit) IsLocalContentSameAsRemote() (bool, error) { /////////////////////////////////////////// -const EARLY = true -const LATE = false - func (u *Unit) runHook(isEarly bool, command string, action string) { out, err := json.Marshal(u.GenerateAttributes()) if err != nil { logs.WithEF(err, u.Fields).Fatal("Cannot marshall attributes") } - info := spec.HookInfo{ + info := HookInfo{ Service: u.Service, Unit: u, Action: "unit/" + action, From 1f237334ade369c069ed6e521da456d7243fa5af Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 4 Feb 2016 18:16:56 +0100 Subject: [PATCH 111/163] fix minor stuff --- build.sh | 3 ++- commands/ggn.go | 2 +- work/env.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 578be4a..30e88fa 100755 --- a/build.sh +++ b/build.sh @@ -29,7 +29,8 @@ else done fi -godep go install +# install +cp $dir/dist/linux-amd64/ggn $GOPATH/bin/ggn end=`date +%s` echo "Duration : $((end-start))s" diff --git a/commands/ggn.go b/commands/ggn.go index f40c684..f5a8def 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -84,7 +84,7 @@ func prepareLogs() { level, err := logs.ParseLevel(lvl) if err != nil { - fmt.Printf("Unknown log level : %s", lvl) + fmt.Printf("Unknown log level : %s\n", lvl) os.Exit(1) } logs.SetLevel(level) diff --git a/work/env.go b/work/env.go index bb5f866..adabf46 100644 --- a/work/env.go +++ b/work/env.go @@ -190,7 +190,7 @@ func (e Env) runHook(path string, info HookInfo) { logs.WithFields(e.fields).WithField("path", path).WithField("info", info).Debug("Running hook") files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) if err != nil { - logs.WithEF(err, e.fields).Debug("Cannot read hood directory") + logs.WithEF(err, e.fields).Debug("Cannot read hook directory") return } From c03a0e550d6db2c9eeb1584b1c2b834dda8a9a6b Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 12 Feb 2016 14:13:28 +0100 Subject: [PATCH 112/163] update cnt dependencies --- Godeps/Godeps.json | 8 +- .../src/github.com/coreos/go-semver/LICENSE | 202 ++++++++++++++++++ .../github.com/SeanDolphin/bqschema/LICENSE | 201 +++++++++++++++++ .../src/github.com/Sirupsen/logrus/LICENSE | 21 ++ .../src/github.com/abbot/go-http-auth/LICENSE | 178 +++++++++++++++ .../docker/docker/pkg/symlink/LICENSE.APACHE | 191 +++++++++++++++++ .../docker/docker/pkg/symlink/LICENSE.BSD | 27 +++ .../github.com/docker/libcontainer/LICENSE | 191 +++++++++++++++++ .../src/github.com/docker/libcontainer/NOTICE | 16 ++ .../src/github.com/Sirupsen/logrus/LICENSE | 21 ++ .../src/github.com/codegangsta/cli/LICENSE | 21 ++ .../src/github.com/coreos/go-systemd/LICENSE | 191 +++++++++++++++++ .../vendor/src/github.com/godbus/dbus/LICENSE | 25 +++ .../src/github.com/golang/protobuf/LICENSE | 31 +++ .../github.com/syndtr/gocapability/LICENSE | 24 +++ .../github.com/fsouza/go-dockerclient/LICENSE | 22 ++ .../github.com/Sirupsen/logrus/LICENSE | 21 ++ .../docker/docker/pkg/mflag/LICENSE | 27 +++ .../github.com/gorilla/context/LICENSE | 27 +++ .../external/github.com/gorilla/mux/LICENSE | 27 +++ .../src/github.com/godbus/dbus/LICENSE | 25 +++ .../src/github.com/golang/glog/LICENSE | 191 +++++++++++++++++ .../src/github.com/kr/pretty/License | 21 ++ .../_workspace/src/github.com/kr/text/License | 19 ++ .../src/github.com/prometheus/procfs/LICENSE | 201 +++++++++++++++++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../src/github.com/stretchr/objx/LICENSE.md | 23 ++ .../src/golang.org/x/oauth2/LICENSE | 27 +++ .../googleapi/internal/uritemplates/LICENSE | 18 ++ .../src/gopkg.in/olivere/elastic.v2/LICENSE | 20 ++ .../olivere/elastic.v2/uritemplates/LICENSE | 18 ++ .../src/github.com/google/cadvisor/LICENSE | 190 ++++++++++++++++ .../src/github.com/leekchan/gtf/LICENSE | 22 ++ .../github.com/peterbourgon/mergemap/LICENSE | 23 ++ .../_workspace/src/golang.org/x/net/LICENSE | 27 +++ .../_workspace/src/golang.org/x/net/PATENTS | 22 ++ .../bertimus9/systemstat/LICENSE | 20 ++ .../src/github.com/Sirupsen/logrus/LICENSE | 21 ++ .../src/github.com/abbot/go-http-auth/LICENSE | 178 +++++++++++++++ .../github.com/codegangsta/negroni/LICENSE | 21 ++ .../src/github.com/dgrijalva/jwt-go/LICENSE | 8 + .../github.com/docker/libcontainer/LICENSE | 191 +++++++++++++++++ .../src/github.com/docker/libcontainer/NOTICE | 16 ++ .../src/github.com/Sirupsen/logrus/LICENSE | 21 ++ .../src/github.com/codegangsta/cli/LICENSE | 21 ++ .../src/github.com/coreos/go-systemd/LICENSE | 191 +++++++++++++++++ .../vendor/src/github.com/godbus/dbus/LICENSE | 25 +++ .../github.com/syndtr/gocapability/LICENSE | 24 +++ .../src/github.com/docker/spdystream/LICENSE | 191 +++++++++++++++++ .../elazarl/go-bindata-assetfs/LICENSE | 23 ++ .../github.com/emicklei/go-restful/LICENSE | 22 ++ .../src/github.com/evanphx/json-patch/LICENSE | 25 +++ .../github.com/fsouza/go-dockerclient/LICENSE | 22 ++ .../github.com/Sirupsen/logrus/LICENSE | 21 ++ .../docker/docker/pkg/mflag/LICENSE | 27 +++ .../github.com/gorilla/context/LICENSE | 27 +++ .../external/github.com/gorilla/mux/LICENSE | 27 +++ .../src/github.com/ghodss/yaml/LICENSE | 50 +++++ .../src/github.com/godbus/dbus/LICENSE | 25 +++ .../src/github.com/golang/glog/LICENSE | 191 +++++++++++++++++ .../src/github.com/google/gofuzz/LICENSE | 202 ++++++++++++++++++ .../src/github.com/gorilla/context/LICENSE | 27 +++ .../src/github.com/gorilla/mux/LICENSE | 27 +++ .../src/github.com/imdario/mergo/LICENSE | 28 +++ .../imdario/mergo/testdata/license.yml | 3 + .../inconshreveable/mousetrap/LICENSE | 13 ++ .../github.com/jonboulle/clockwork/LICENSE | 201 +++++++++++++++++ .../src/github.com/juju/ratelimit/LICENSE | 191 +++++++++++++++++ .../src/github.com/kardianos/osext/LICENSE | 27 +++ .../_workspace/src/github.com/kr/pty/License | 23 ++ .../src/github.com/miekg/dns/COPYRIGHT | 9 + .../src/github.com/miekg/dns/LICENSE | 32 +++ .../github.com/mitchellh/mapstructure/LICENSE | 21 ++ .../src/github.com/onsi/ginkgo/LICENSE | 20 ++ .../src/github.com/onsi/gomega/LICENSE | 20 ++ .../src/github.com/pborman/uuid/LICENSE | 27 +++ .../src/github.com/prometheus/procfs/LICENSE | 201 +++++++++++++++++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../github.com/rackspace/gophercloud/LICENSE | 191 +++++++++++++++++ .../russross/blackfriday/LICENSE.txt | 29 +++ .../src/github.com/scalingdata/gcfg/LICENSE | 57 +++++ .../src/github.com/spf13/cobra/LICENSE.txt | 174 +++++++++++++++ .../src/github.com/spf13/pflag/LICENSE | 28 +++ .../src/github.com/vaughan0/go-ini/LICENSE | 14 ++ .../github.com/xyproto/simpleredis/LICENSE | 21 ++ .../src/golang.org/x/oauth2/LICENSE | 27 +++ .../googleapi/internal/uritemplates/LICENSE | 18 ++ .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 21 ++ .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 ++++++++++++++++ .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 +++ .../speter.net/go/exp/math/dec/inf/LICENSE | 57 +++++ .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 ++++++++++++++++++ .../charms/trusty/kubernetes-master/copyright | 13 ++ .../juju/charms/trusty/kubernetes/copyright | 13 ++ .../update-demo/local/LICENSE.angular | 21 ++ .../third_party/forked/json/LICENSE | 27 +++ .../third_party/forked/reflect/LICENSE | 27 +++ .../kubernetes/third_party/golang/LICENSE | 27 +++ .../kubernetes/third_party/golang/PATENTS | 22 ++ .../kubernetes/third_party/htpasswd/COPYING | 28 +++ .../kubernetes/third_party/pause/LICENSE | 19 ++ .../kubernetes/third_party/swagger-ui/LICENSE | 11 + .../blablacar/cnt/spec/ac-fullname.go | 4 +- .../{image-manifest.go => aci-manifest.go} | 26 ++- .../blablacar/cnt/spec/cnt-command.go | 11 + .../blablacar/cnt/spec/pod-manifest.go | 2 +- .../blablacar/cnt/utils/aci-utils.go | 51 +++++ .../blablacar/cnt/utils/attribute-files.go | 28 +++ .../blablacar/cnt/utils/image-manifest.go | 5 +- .../github.com/blablacar/cnt/utils/utils.go | 26 ++- 110 files changed, 6190 insertions(+), 22 deletions(-) create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE rename Godeps/_workspace/src/github.com/blablacar/cnt/spec/{image-manifest.go => aci-manifest.go} (60%) create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 3b5eab6..0cd981a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -37,13 +37,13 @@ }, { "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "45-5-g226d271", - "Rev": "226d271434d899ba1ff5502a36783f7ffcf48dc9" + "Comment": "53-10-g4ce5c8b", + "Rev": "4ce5c8b645f310300e3b86a0253390c2e2df9f9b" }, { "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "45-5-g226d271", - "Rev": "226d271434d899ba1ff5502a36783f7ffcf48dc9" + "Comment": "53-10-g4ce5c8b", + "Rev": "4ce5c8b645f310300e3b86a0253390c2e2df9f9b" }, { "ImportPath": "github.com/camlistore/camlistore/pkg/errorutil", diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE new file mode 100644 index 0000000..902306b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 Sean Dolphin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE new file mode 100644 index 0000000..9e4bd4d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2015 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE new file mode 100644 index 0000000..dc91298 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE @@ -0,0 +1,16 @@ +libcontainer +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (http://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see http://www.bis.doc.gov + +See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE new file mode 100644 index 0000000..1b1b192 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE @@ -0,0 +1,31 @@ +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE new file mode 100644 index 0000000..4e11de1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License new file mode 100644 index 0000000..05c783c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License new file mode 100644 index 0000000..480a328 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License @@ -0,0 +1,19 @@ +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md new file mode 100644 index 0000000..2199945 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md @@ -0,0 +1,23 @@ +objx - by Mat Ryer and Tyler Bunnell + +The MIT License (MIT) + +Copyright (c) 2014 Stretchr, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE new file mode 100644 index 0000000..8b22cdb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright © 2012-2015 Oliver Eilhard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE new file mode 100644 index 0000000..97cec18 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE @@ -0,0 +1,190 @@ + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE new file mode 100644 index 0000000..244f4d8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Kyoung-chan Lee (leekchan@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE new file mode 100644 index 0000000..22bf08c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Peter Bourgon, SoundCloud Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE new file mode 100644 index 0000000..8bff971 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Phillip Bond + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE new file mode 100644 index 0000000..08b5e20 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE new file mode 100644 index 0000000..df83a9c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE @@ -0,0 +1,8 @@ +Copyright (c) 2012 Dave Grijalva + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE new file mode 100644 index 0000000..dc91298 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE @@ -0,0 +1,16 @@ +libcontainer +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (http://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see http://www.bis.doc.gov + +See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE new file mode 100644 index 0000000..5782c72 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2014, Elazar Leibovich +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE new file mode 100644 index 0000000..ece7ec6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012,2013 Ernest Micklei + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE new file mode 100644 index 0000000..0eb9b72 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2014, Evan Phoenix +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the Evan Phoenix nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE new file mode 100644 index 0000000..4e11de1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE new file mode 100644 index 0000000..6866802 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml new file mode 100644 index 0000000..62fdb61 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml @@ -0,0 +1,3 @@ +import: ../../../../fossene/db/schema/thing.yml +fields: + site: string diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE new file mode 100644 index 0000000..ade9307 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License new file mode 100644 index 0000000..6b7558b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License @@ -0,0 +1,23 @@ +Copyright (c) 2011 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT new file mode 100644 index 0000000..35702b1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT @@ -0,0 +1,9 @@ +Copyright 2009 The Go Authors. All rights reserved. Use of this source code +is governed by a BSD-style license that can be found in the LICENSE file. +Extensions of the original work are copyright (c) 2011 Miek Gieben + +Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. + +Copyright 2014 CloudFlare. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE new file mode 100644 index 0000000..5763fa7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE @@ -0,0 +1,32 @@ +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE new file mode 100644 index 0000000..fbbbc9e --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE @@ -0,0 +1,191 @@ +Copyright 2012-2013 Rackspace, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +------ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE new file mode 100644 index 0000000..b0a9e76 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of gcfg's source code have been derived from Go, and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE new file mode 100644 index 0000000..968b453 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2013 Vaughan Newton + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE new file mode 100644 index 0000000..145d387 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Alexander F Rødseth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE new file mode 100644 index 0000000..c3d4cc3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nate Finch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE new file mode 100644 index 0000000..a68e67f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE @@ -0,0 +1,188 @@ + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml new file mode 100644 index 0000000..8da58fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml @@ -0,0 +1,31 @@ +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright new file mode 100644 index 0000000..a0b409a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright @@ -0,0 +1,13 @@ +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright new file mode 100644 index 0000000..a0b409a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright @@ -0,0 +1,13 @@ +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular new file mode 100644 index 0000000..020f87a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010-2014 Google, Inc. http://angularjs.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING new file mode 100644 index 0000000..c6b097c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING @@ -0,0 +1,28 @@ +Copyright (C) 2003-2013 Edgewall Software +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE new file mode 100644 index 0000000..2b5e5ff --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE @@ -0,0 +1,19 @@ +The Expat/MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE new file mode 100644 index 0000000..9f93e06 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE @@ -0,0 +1,11 @@ +Copyright 2014 Reverb Technologies, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go index ab7613c..c4f5517 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go @@ -2,9 +2,9 @@ package spec import ( "encoding/json" - log "github.com/Sirupsen/logrus" "github.com/appc/spec/discovery" "github.com/juju/errors" + "github.com/n0rad/go-erlog/logs" "net/http" "regexp" "strings" @@ -39,7 +39,7 @@ func (n ACFullname) LatestVersion() (string, error) { r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)(\-[\dA-Za-z]+){0,1}$`) url := getRedirectForLatest(endpoint.ACIEndpoints[0].ACI) - log.Debug("latest version url is ", url) + logs.WithField("url", url).Debug("latest verion url") for _, part := range strings.Split(url, "/") { if r.Match([]byte(part)) { diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/image-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go similarity index 60% rename from Godeps/_workspace/src/github.com/blablacar/cnt/spec/image-manifest.go rename to Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go index 3ae19b2..504fdac 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/image-manifest.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go @@ -2,6 +2,8 @@ package spec import ( "github.com/appc/spec/schema/types" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" ) type CntBuild struct { @@ -14,21 +16,37 @@ func (b *CntBuild) NoBuildImage() bool { type AciManifest struct { NameAndVersion ACFullname `json:"name"` - From ACFullname `json:"from"` + From interface{} `json:"from"` Build CntBuild `json:"build"` Aci AciDefinition `json:"aci"` } +func (m *AciManifest) GetFroms() ([]ACFullname, error) { + var froms []ACFullname + switch v := m.From.(type) { + case string: + froms = []ACFullname{*NewACFullName(m.From.(string))} + case []interface{}: + for _, from := range m.From.([]interface{}) { + froms = append(froms, *NewACFullName(from.(string))) + } + case nil: + return froms, nil + default: + return nil, errs.WithF(data.WithField("type", v), "Invalid from type format") + } + return froms, nil +} + type AciDefinition struct { - App *CntApp `json:"app,omitempty"` + App CntApp `json:"app,omitempty"` Annotations types.Annotations `json:"annotations,omitempty"` Dependencies []ACFullname `json:"dependencies,omitempty"` PathWhitelist []string `json:"pathWhitelist,omitempty"` } type CntApp struct { - Exec types.Exec `json:"exec"` - // EventHandlers []types.EventHandler `json:"eventHandlers,omitempty"` + Exec types.Exec `json:"exec"` User string `json:"user"` Group string `json:"group"` WorkingDirectory string `json:"workingDirectory,omitempty"` diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go new file mode 100644 index 0000000..e1bdc20 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go @@ -0,0 +1,11 @@ +package spec + +type CntCommand interface { + Build() error + Clean() + Push() + Install() + Test() + Graph() + Update() error +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go index ece7895..e10e00e 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go @@ -21,7 +21,7 @@ type PodDefinition struct { type RuntimeApp struct { Dependencies []ACFullname `json:"dependencies"` Name string `json:"name"` - App *CntApp `json:"app"` + App CntApp `json:"app"` Mounts []schema.Mount `json:"mounts"` Annotations types.Annotations `json:"annotations"` } diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go new file mode 100644 index 0000000..b2ff7dd --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go @@ -0,0 +1,51 @@ +package utils + +import ( + "github.com/appc/spec/aci" + "github.com/appc/spec/schema" + "io" + "io/ioutil" + "os" + "path/filepath" +) + +func ExtractManifestFromAci(aciPath string) schema.ImageManifest { + input, err := os.Open(aciPath) + if err != nil { + panic("cat-manifest: Cannot open %s: %v" + aciPath + err.Error()) + } + defer input.Close() + + tr, err := aci.NewCompressedTarReader(input) + if err != nil { + panic("cat-manifest: Cannot open tar %s: %v" + aciPath + err.Error()) + } + + im := schema.ImageManifest{} + +Tar: + for { + hdr, err := tr.Next() + switch err { + case io.EOF: + break Tar + case nil: + if filepath.Clean(hdr.Name) == aci.ManifestFile { + bytes, err := ioutil.ReadAll(tr) + if err != nil { + panic(err) + } + + err = im.UnmarshalJSON(bytes) + if err != nil { + panic(err) + } + return im + } + default: + panic("error reading tarball: %v" + err.Error()) + } + } + panic("Cannot found manifest if aci") + return im +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go new file mode 100644 index 0000000..a478f25 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go @@ -0,0 +1,28 @@ +package utils + +import ( + "github.com/blablacar/attributes-merger/attributes" + "github.com/google/cadvisor/utils" + "strings" +) + +func AttributeFiles(path string) ([]string, error) { + res := []string{} + if !utils.FileExists(path) { + return res, nil + } + + in := attributes.NewInputs(path) + // initialize input files list + err := in.ListFiles() + if err != nil { + return nil, err + } + + for _, file := range in.Files { + if strings.HasSuffix(file, ".yml") || strings.HasSuffix(file, ".yaml") { + res = append(res, in.Directory+file) + } + } + return res, nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go index db5bd85..72825e6 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go @@ -19,7 +19,7 @@ import ( // return im //} -func WriteImageManifest(m *spec.AciManifest, targetFile string, projectName string) { +func WriteImageManifest(m *spec.AciManifest, targetFile string, projectName string, cntVersion string) { name, err := types.NewACIdentifier(m.NameAndVersion.Name()) if err != nil { panic(err) @@ -44,6 +44,9 @@ func WriteImageManifest(m *spec.AciManifest, targetFile string, projectName stri im := schema.BlankImageManifest() im.Annotations = m.Aci.Annotations + + cntVersionIdentifier, _ := types.NewACIdentifier("cnt-version") + im.Annotations.Set(*cntVersionIdentifier, cntVersion) im.Dependencies = toAppcDependencies(m.Aci.Dependencies) im.Name = *name im.Labels = labels diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go index 40399c0..1a79050 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go +++ b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go @@ -3,8 +3,8 @@ package utils import ( "bytes" "fmt" - log "github.com/Sirupsen/logrus" "github.com/mitchellh/go-homedir" + "github.com/n0rad/go-erlog/logs" "io" "math/rand" "os" @@ -25,7 +25,9 @@ func ExecCmdGetStdoutAndStderr(head string, parts ...string) (string, string, er var stdout bytes.Buffer var stderr bytes.Buffer - log.Debug("Exec > ", head, " ", strings.Join(parts, " ")) + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } cmd := exec.Command(head, parts...) cmd.Stdout = &stdout cmd.Stderr = &stderr @@ -37,7 +39,9 @@ func ExecCmdGetStdoutAndStderr(head string, parts ...string) (string, string, er func ExecCmdGetOutput(head string, parts ...string) (string, error) { var stdout bytes.Buffer - log.Debug("Exec > ", head, " ", strings.Join(parts, " ")) + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } cmd := exec.Command(head, parts...) cmd.Stdout = &stdout cmd.Stderr = os.Stderr @@ -47,7 +51,9 @@ func ExecCmdGetOutput(head string, parts ...string) (string, error) { } func ExecCmd(head string, parts ...string) error { - log.Debug("Exec > ", head, " ", strings.Join(parts, " ")) + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } cmd := exec.Command(head, parts...) cmd.Stdout = os.Stdout cmd.Stdin = os.Stdin @@ -132,20 +138,20 @@ func CopyFile(src, dst string) (err error) { return } } - if err = os.Link(src, dst); err == nil { - return - } - err = copyFileContents(src, dst) + // if err = os.Link(src, dst); err == nil { + // return + // } + err = copyFileContents(src, dst, sfi) return } -func copyFileContents(src, dst string) (err error) { +func copyFileContents(src, dst string, sfi os.FileInfo) (err error) { in, err := os.Open(src) if err != nil { return } defer in.Close() - out, err := os.Create(dst) + out, err := os.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, sfi.Mode()) if err != nil { return } From 21b10abfc8269e48f39b40a677fbaebfd9cf5e56 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Mar 2016 19:08:15 +0100 Subject: [PATCH 113/163] update source to use new dgr structure --- work/service-generate.go | 26 +++++++++++++------------- work/spec.go | 14 ++++++++------ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/work/service-generate.go b/work/service-generate.go index a8925f0..d90d51b 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -3,7 +3,7 @@ package work import ( "github.com/appc/spec/discovery" "github.com/appc/spec/schema" - cntspec "github.com/blablacar/cnt/spec" + "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/ggn/utils" "github.com/n0rad/go-erlog/logs" "io/ioutil" @@ -63,7 +63,7 @@ func (s Service) NodeAttributes(hostname string) map[string]interface{} { return nil } -func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, contents []byte) error { +func (s Service) podManifestToMap(result map[string][]common.ACFullname, contents []byte) error { pod := schema.BlankPodManifest() err := pod.UnmarshalJSON(contents) if err != nil { @@ -71,10 +71,10 @@ func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, conten } var podname string - var acis []cntspec.ACFullname + var acis []common.ACFullname for i, podAci := range pod.Apps { version, _ := podAci.Image.Labels.Get("version") - fullname := cntspec.NewACFullName(podAci.Image.Name.String() + ":" + version) + fullname := common.NewACFullName(podAci.Image.Name.String() + ":" + version) if i == 0 { nameSplit := strings.SplitN(fullname.ShortName(), "_", 2) podname = fullname.DomainName() + "/" + nameSplit[0] @@ -91,7 +91,7 @@ func (s Service) podManifestToMap(result map[string][]cntspec.ACFullname, conten return nil } -func (s Service) aciManifestToMap(result map[string][]cntspec.ACFullname, contents []byte) error { +func (s Service) aciManifestToMap(result map[string][]common.ACFullname, contents []byte) error { aci := schema.BlankImageManifest() err := aci.UnmarshalJSON(contents) if err != nil { @@ -99,13 +99,13 @@ func (s Service) aciManifestToMap(result map[string][]cntspec.ACFullname, conten } version, _ := aci.Labels.Get("version") - fullname := cntspec.NewACFullName(aci.Name.String() + ":" + version) - result[fullname.Name()] = []cntspec.ACFullname{*fullname} + fullname := common.NewACFullName(aci.Name.String() + ":" + version) + result[fullname.Name()] = []common.ACFullname{*fullname} return nil } -func (s Service) sources(sources []string) map[string][]cntspec.ACFullname { - res := make(map[string][]cntspec.ACFullname) +func (s Service) sources(sources []string) map[string][]common.ACFullname { + res := make(map[string][]common.ACFullname) for _, source := range sources { content, err := ioutil.ReadFile(source) if err != nil { @@ -121,7 +121,7 @@ func (s Service) sources(sources []string) map[string][]cntspec.ACFullname { return res } -func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { +func (s Service) discoverPod(name common.ACFullname) []common.ACFullname { podFields := s.fields.WithField("pod", name) app, err := discovery.NewAppFromString(name.String()) @@ -159,7 +159,7 @@ func (s Service) discoverPod(name cntspec.ACFullname) []cntspec.ACFullname { if err != nil { logs.WithEF(err, logUrl).Fatal("Cannot read pod manifest content") } - tmpMap := make(map[string][]cntspec.ACFullname, 1) + tmpMap := make(map[string][]common.ACFullname, 1) if err := s.podManifestToMap(tmpMap, content); err != nil { logs.WithEF(err, logUrl).Fatal("Cannot read pod content") } @@ -192,7 +192,7 @@ func (s *Service) PrepareAciList() string { containerLog := s.fields.WithField("container", aci.String()) logs.WithFields(containerLog).Debug("Processing container") if strings.HasPrefix(aci.ShortName(), "pod-") && !strings.Contains(aci.ShortName(), "_") { // TODO this is CNT specific - var podAcis []cntspec.ACFullname + var podAcis []common.ACFullname if override[aci.Name()] != nil { logs.WithFields(containerLog).Debug("Using local source to resolve") podAcis = override[aci.Name()] @@ -204,7 +204,7 @@ func (s *Service) PrepareAciList() string { acis += aci.String() + " " } } else { - var taci cntspec.ACFullname + var taci common.ACFullname if override[aci.Name()] != nil { logs.WithFields(containerLog).Debug("Using local source to resolve") taci = override[aci.Name()][0] diff --git a/work/spec.go b/work/spec.go index 9a3db5a..ac692d4 100644 --- a/work/spec.go +++ b/work/spec.go @@ -1,6 +1,8 @@ package work -import "github.com/blablacar/cnt/spec" +import ( + "github.com/blablacar/dgr/bin-dgr/common" +) const PATH_ATTRIBUTES = "/attributes" @@ -38,11 +40,11 @@ type HookInfo struct { } type ServiceManifest struct { - ConcurrentUpdater int `yaml:"concurrentUpdater"` - Containers []spec.ACFullname `yaml:"containers"` - ExecStartPre []string `yaml:"execStartPre"` - ExecStart []string `yaml:"execStart"` - Nodes interface{} `yaml:"nodes"` + ConcurrentUpdater int `yaml:"concurrentUpdater"` + Containers []common.ACFullname `yaml:"containers"` + ExecStartPre []string `yaml:"execStartPre"` + ExecStart []string `yaml:"execStart"` + Nodes interface{} `yaml:"nodes"` } type UnitType int From f3baa33d34c462e672ad447ef2b88b4429f2ba5c Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 7 Mar 2016 19:27:58 +0100 Subject: [PATCH 114/163] add aciList attribute to unit templating --- work/service-generate.go | 16 ++++++++-------- work/service.go | 2 +- work/unit-generate.go | 8 +++++++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/work/service-generate.go b/work/service-generate.go index d90d51b..636afae 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -171,23 +171,23 @@ func (s Service) discoverPod(name common.ACFullname) []common.ACFullname { } } -func (s *Service) PrepareAciList() string { +func (s *Service) PrepareAcis() []string { if len(s.manifest.Containers) == 0 { - return "" + return []string{} } s.aciListMutex.Lock() defer s.aciListMutex.Unlock() - if s.aciList != "" { + if len(s.aciList) > 0 { return s.aciList } override := s.sources(BuildFlags.GenerateManifests) logs.WithFields(s.fields).WithField("data", override).Debug("Local resolved sources") - var acis string + var acis []string for _, aci := range s.manifest.Containers { containerLog := s.fields.WithField("container", aci.String()) logs.WithFields(containerLog).Debug("Processing container") @@ -201,7 +201,7 @@ func (s *Service) PrepareAciList() string { podAcis = s.discoverPod(aci) } for _, aci := range podAcis { - acis += aci.String() + " " + acis = append(acis, aci.String()) } } else { var taci common.ACFullname @@ -214,13 +214,13 @@ func (s *Service) PrepareAciList() string { taci = *aciTmp if err != nil { logs.WithEF(err, containerLog).Fatal("Cannot resolve aci") - return "" + return []string{} } } - acis += taci.String() + " " + acis = append(acis, taci.String()) } } - if acis == "" { + if len(acis) == 0 { logs.WithFields(s.fields).Error("Cannot resolve aci") } s.aciList = acis diff --git a/work/service.go b/work/service.go index 479506b..76b9f2b 100644 --- a/work/service.go +++ b/work/service.go @@ -33,7 +33,7 @@ type Service struct { generatedMutex *sync.Mutex units map[string]*Unit unitsMutex *sync.Mutex - aciList string + aciList []string aciListMutex *sync.Mutex } diff --git a/work/unit-generate.go b/work/unit-generate.go index 31847bb..64f2967 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -22,7 +22,13 @@ func (u *Unit) Generate(tmpl *utils.Templating) { logs.WithFields(u.Fields).Debug("Generate") data := u.GenerateAttributes() - data["acis"] = u.Service.PrepareAciList() + aciList := u.Service.PrepareAcis() + acis := "" + for _, aci := range aciList { + acis += aci + } + data["aciList"] = aciList + data["acis"] = acis out, err := json.Marshal(data) if err != nil { From 6222d1447937fd54dc1dc6472ab3f18ed7d139fd Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 09:18:07 +0100 Subject: [PATCH 115/163] update dep and add aciList {{range .aciList-}} {{if not (contains . "zabbix")-}} {{.-}} {{end-}} {{end}} --no-overlay --- Godeps/Godeps.json | 20 +- .../blablacar/cnt/spec/aci-manifest.go | 57 - .../blablacar/cnt/spec/cnt-command.go | 11 - .../blablacar/cnt/spec/pod-manifest.go | 32 - .../blablacar/cnt/utils/aci-utils.go | 51 - .../blablacar/cnt/utils/attribute-files.go | 28 - .../blablacar/cnt/utils/checksum.go | 36 - .../github.com/blablacar/cnt/utils/files.go | 20 - .../blablacar/cnt/utils/image-manifest.go | 92 -- .../blablacar/cnt/utils/pod-manifest.go | 28 - .../blablacar/cnt/utils/sha512sum.go | 32 - .../github.com/blablacar/cnt/utils/version.go | 63 - .../blablacar/cnt/utils/version_generator.go | 19 - .../src/github.com/spf13/pflag/LICENSE | 28 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../src/github.com/appc/spec/LICENSE | 202 +++ .../github.com/camlistore/camlistore/COPYING | 202 +++ .../clients/chrome/clip-it-good/LICENSE | 13 + .../camlistore/camlistore/misc/copyrightifity | 68 + .../camlistore/camlistore/pkg/legal/legal.go | 50 + .../pkg/legal/legalprint/legalprint.go | 42 + .../third_party/bazil.org/fuse/LICENSE | 93 ++ .../third_party/closure/lib/LICENSE | 176 +++ .../code.google.com/p/goauth2/LICENSE | 27 + .../code.google.com/p/goauth2/PATENTS | 22 + .../code.google.com/p/leveldb-go/LICENSE | 27 + .../code.google.com/p/snappy-go/LICENSE | 27 + .../code.google.com/p/xsrftoken/COPYING | 202 +++ .../third_party/fontawesome/LICENSE.txt | 4 + .../github.com/camlistore/lock/COPYING | 202 +++ .../github.com/cznic/exp/dbm/LICENSE | 27 + .../github.com/cznic/exp/lldb/LICENSE | 27 + .../github.com/cznic/fileutil/LICENSE | 27 + .../github.com/cznic/fileutil/falloc/LICENSE | 27 + .../github.com/cznic/fileutil/hdb/LICENSE | 27 + .../github.com/cznic/fileutil/storage/LICENSE | 27 + .../third_party/github.com/cznic/kv/LICENSE | 27 + .../github.com/cznic/mathutil/LICENSE | 27 + .../cznic/mathutil/mersenne/LICENSE | 27 + .../github.com/cznic/sortutil/LICENSE | 27 + .../github.com/cznic/zappy/LICENSE | 27 + .../github.com/davecgh/go-spew/LICENSE | 13 + .../github.com/go-sql-driver/mysql/LICENSE | 373 ++++++ .../github.com/golang/glog/LICENSE | 191 +++ .../github.com/gorilla/websocket/LICENSE | 23 + .../third_party/github.com/lib/pq/LICENSE.md | 8 + .../russross/blackfriday/LICENSE.txt | 29 + .../github.com/rwcarlsen/goexif/LICENSE | 24 + .../camlistore/third_party/glitch/LICENSE | 19 + .../third_party/golang.org/x/image/LICENSE | 27 + .../third_party/golang.org/x/image/PATENTS | 22 + .../third_party/labix.org/v2/mgo/LICENSE | 25 + .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 + .../camlistore/third_party/react/LICENSE.txt | 201 +++ .../github.com/hjfreyer/taglib-go/LICENSE | 191 +++ .../vendor/golang.org/x/oauth2/LICENSE | 27 + .../googleapi/internal/uritemplates/LICENSE | 18 + .../vendor/google.golang.org/cloud/LICENSE | 202 +++ .../vendor/google.golang.org/grpc/LICENSE | 28 + .../vendor/google.golang.org/grpc/PATENTS | 22 + .../src/github.com/coreos/go-semver/LICENSE | 202 +++ .../src/github.com/appc/cni/LICENSE | 202 +++ .../src/github.com/appc/docker2aci/LICENSE | 202 +++ .../src/github.com/appc/goaci/LICENSE | 202 +++ .../src/github.com/appc/spec/LICENSE | 202 +++ .../github.com/camlistore/camlistore/COPYING | 202 +++ .../clients/chrome/clip-it-good/LICENSE | 13 + .../camlistore/camlistore/misc/copyrightifity | 68 + .../camlistore/camlistore/pkg/legal/legal.go | 50 + .../pkg/legal/legalprint/legalprint.go | 42 + .../third_party/bazil.org/fuse/LICENSE | 93 ++ .../third_party/closure/lib/LICENSE | 176 +++ .../code.google.com/p/goauth2/LICENSE | 27 + .../code.google.com/p/goauth2/PATENTS | 22 + .../code.google.com/p/leveldb-go/LICENSE | 27 + .../code.google.com/p/snappy-go/LICENSE | 27 + .../code.google.com/p/xsrftoken/COPYING | 202 +++ .../third_party/fontawesome/LICENSE.txt | 4 + .../github.com/camlistore/lock/COPYING | 202 +++ .../github.com/cznic/exp/dbm/LICENSE | 27 + .../github.com/cznic/exp/lldb/LICENSE | 27 + .../github.com/cznic/fileutil/LICENSE | 27 + .../github.com/cznic/fileutil/falloc/LICENSE | 27 + .../github.com/cznic/fileutil/hdb/LICENSE | 27 + .../github.com/cznic/fileutil/storage/LICENSE | 27 + .../third_party/github.com/cznic/kv/LICENSE | 27 + .../github.com/cznic/mathutil/LICENSE | 27 + .../cznic/mathutil/mersenne/LICENSE | 27 + .../github.com/cznic/sortutil/LICENSE | 27 + .../github.com/cznic/zappy/LICENSE | 27 + .../github.com/davecgh/go-spew/LICENSE | 13 + .../github.com/go-sql-driver/mysql/LICENSE | 373 ++++++ .../github.com/golang/glog/LICENSE | 191 +++ .../github.com/gorilla/websocket/LICENSE | 23 + .../third_party/github.com/lib/pq/LICENSE.md | 8 + .../russross/blackfriday/LICENSE.txt | 29 + .../github.com/rwcarlsen/goexif/LICENSE | 24 + .../camlistore/third_party/glitch/LICENSE | 19 + .../third_party/golang.org/x/image/LICENSE | 27 + .../third_party/golang.org/x/image/PATENTS | 22 + .../third_party/labix.org/v2/mgo/LICENSE | 25 + .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 + .../camlistore/third_party/react/LICENSE.txt | 201 +++ .../github.com/hjfreyer/taglib-go/LICENSE | 191 +++ .../vendor/golang.org/x/oauth2/LICENSE | 27 + .../googleapi/internal/uritemplates/LICENSE | 18 + .../vendor/google.golang.org/cloud/LICENSE | 202 +++ .../vendor/google.golang.org/grpc/LICENSE | 28 + .../vendor/google.golang.org/grpc/PATENTS | 22 + .../src/github.com/camlistore/go4/LICENSE | 202 +++ .../github.com/camlistore/go4/legal/legal.go | 32 + .../src/github.com/coreos/go-iptables/LICENSE | 191 +++ .../src/github.com/coreos/go-semver/LICENSE | 202 +++ .../src/github.com/coreos/go-systemd/LICENSE | 191 +++ .../src/github.com/coreos/go-tspi/LICENSE | 202 +++ .../src/github.com/coreos/ioprogress/LICENSE | 21 + .../github.com/cpuguy83/go-md2man/LICENSE.md | 21 + .../_workspace/src/github.com/cznic/b/LICENSE | 27 + .../src/github.com/cznic/bufs/LICENSE | 27 + .../src/github.com/cznic/exp/dbm/LICENSE | 27 + .../src/github.com/cznic/exp/lldb/LICENSE | 27 + .../src/github.com/cznic/fileutil/LICENSE | 27 + .../github.com/cznic/fileutil/falloc/LICENSE | 27 + .../src/github.com/cznic/fileutil/hdb/LICENSE | 27 + .../github.com/cznic/fileutil/storage/LICENSE | 27 + .../src/github.com/cznic/mathutil/LICENSE | 27 + .../cznic/mathutil/mersenne/LICENSE | 27 + .../src/github.com/cznic/ql/LICENSE | 27 + .../src/github.com/cznic/sortutil/LICENSE | 27 + .../src/github.com/cznic/strutil/LICENSE | 27 + .../src/github.com/cznic/zappy/LICENSE | 27 + .../src/github.com/d2g/dhcp4/LICENSE | 27 + .../src/github.com/d2g/dhcp4client/LICENSE | 354 +++++ .../src/github.com/dustin/go-humanize/LICENSE | 21 + .../src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/protobuf/LICENSE | 31 + .../src/github.com/gorilla/context/LICENSE | 27 + .../src/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/hashicorp/errwrap/LICENSE | 354 +++++ .../hydrogen18/stoppableListener/LICENSE | 10 + .../inconshreveable/mousetrap/LICENSE | 13 + .../github.com/kballard/go-shellquote/LICENSE | 19 + .../_workspace/src/github.com/kr/pty/License | 23 + .../src/github.com/pborman/uuid/LICENSE | 27 + .../src/github.com/petar/GoLLRB/LICENSE | 27 + .../src/github.com/peterbourgon/diskv/LICENSE | 19 + .../russross/blackfriday/LICENSE.txt | 29 + .../shurcooL/sanitized_anchor_name/LICENSE | 19 + .../src/github.com/spf13/cobra/LICENSE.txt | 174 +++ .../spf13/cobra/cobra/cmd/licenses.go | 1133 +++++++++++++++++ .../src/github.com/spf13/pflag/LICENSE | 28 + .../github.com/syndtr/gocapability/LICENSE | 24 + .../github.com/vishvananda/netlink/LICENSE | 192 +++ .../src/golang.org/x/crypto/LICENSE | 27 + .../src/golang.org/x/crypto/PATENTS | 22 + .../_workspace/src/golang.org/x/net/LICENSE | 27 + .../_workspace/src/golang.org/x/net/PATENTS | 22 + .../_workspace/src/golang.org/x/sys/LICENSE | 27 + .../_workspace/src/golang.org/x/sys/PATENTS | 22 + .../_workspace/src/golang.org/x/tools/LICENSE | 27 + .../_workspace/src/golang.org/x/tools/PATENTS | 22 + .../src/google.golang.org/grpc/LICENSE | 28 + .../src/google.golang.org/grpc/PATENTS | 22 + .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 +++ .../update-demo/local/LICENSE.angular | 21 + .../kubernetes/third_party/golang/LICENSE | 27 + .../kubernetes/third_party/golang/PATENTS | 22 + .../kubernetes/third_party/htpasswd/COPYING | 28 + .../kubernetes/third_party/pause/LICENSE | 19 + .../kubernetes/third_party/swagger-ui/LICENSE | 11 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../src/github.com/coreos/rkt/LICENSE | 201 +++ .../github.com/coreos/rkt/pkg/acl/LICENSE.MIT | 22 + .../github.com/coreos/rkt/store/LICENSE.BSD | 30 + .../src/github.com/ghodss/yaml/LICENSE | 50 + .../github.com/SeanDolphin/bqschema/LICENSE | 201 +++ .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/abbot/go-http-auth/LICENSE | 178 +++ .../docker/docker/pkg/symlink/LICENSE.APACHE | 191 +++ .../docker/docker/pkg/symlink/LICENSE.BSD | 27 + .../github.com/docker/libcontainer/LICENSE | 191 +++ .../src/github.com/docker/libcontainer/NOTICE | 16 + .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/codegangsta/cli/LICENSE | 21 + .../src/github.com/coreos/go-systemd/LICENSE | 191 +++ .../vendor/src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/protobuf/LICENSE | 31 + .../github.com/syndtr/gocapability/LICENSE | 24 + .../github.com/fsouza/go-dockerclient/LICENSE | 22 + .../github.com/Sirupsen/logrus/LICENSE | 21 + .../docker/docker/pkg/mflag/LICENSE | 27 + .../github.com/gorilla/context/LICENSE | 27 + .../external/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/glog/LICENSE | 191 +++ .../src/github.com/kr/pretty/License | 21 + .../_workspace/src/github.com/kr/text/License | 19 + .../src/github.com/prometheus/procfs/LICENSE | 201 +++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../src/github.com/stretchr/objx/LICENSE.md | 23 + .../src/golang.org/x/oauth2/LICENSE | 27 + .../googleapi/internal/uritemplates/LICENSE | 18 + .../src/gopkg.in/olivere/elastic.v2/LICENSE | 20 + .../olivere/elastic.v2/uritemplates/LICENSE | 18 + .../src/github.com/google/cadvisor/LICENSE | 190 +++ .../src/github.com/hashicorp/errwrap/LICENSE | 354 +++++ .../inconshreveable/mousetrap/LICENSE | 13 + .../src/github.com/juju/errors/LICENSE | 191 +++ .../src/github.com/leekchan/gtf/LICENSE | 22 + .../src/github.com/mgutz/ansi/LICENSE | 9 + .../github.com/mitchellh/go-homedir/LICENSE | 21 + .../github.com/peterbourgon/mergemap/LICENSE | 23 + .../src/github.com/spf13/cobra/LICENSE.txt | 174 +++ .../src/github.com/spf13/pflag/LICENSE | 28 + .../github.com/syndtr/gocapability/LICENSE | 24 + .../_workspace/src/golang.org/x/net/LICENSE | 27 + .../_workspace/src/golang.org/x/net/PATENTS | 22 + .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 +++ .../src/gopkg.in/yaml.v2/LICENSE.libyaml} | 14 +- .../bertimus9/systemstat/LICENSE | 20 + .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/abbot/go-http-auth/LICENSE | 178 +++ .../github.com/codegangsta/negroni/LICENSE | 21 + .../src/github.com/dgrijalva/jwt-go/LICENSE | 8 + .../github.com/docker/libcontainer/LICENSE | 191 +++ .../src/github.com/docker/libcontainer/NOTICE | 16 + .../src/github.com/Sirupsen/logrus/LICENSE | 21 + .../src/github.com/codegangsta/cli/LICENSE | 21 + .../src/github.com/coreos/go-systemd/LICENSE | 191 +++ .../vendor/src/github.com/godbus/dbus/LICENSE | 25 + .../github.com/syndtr/gocapability/LICENSE | 24 + .../src/github.com/docker/spdystream/LICENSE | 191 +++ .../elazarl/go-bindata-assetfs/LICENSE | 23 + .../github.com/emicklei/go-restful/LICENSE | 22 + .../src/github.com/evanphx/json-patch/LICENSE | 25 + .../github.com/fsouza/go-dockerclient/LICENSE | 22 + .../github.com/Sirupsen/logrus/LICENSE | 21 + .../docker/docker/pkg/mflag/LICENSE | 27 + .../github.com/gorilla/context/LICENSE | 27 + .../external/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/ghodss/yaml/LICENSE | 50 + .../src/github.com/godbus/dbus/LICENSE | 25 + .../src/github.com/golang/glog/LICENSE | 191 +++ .../src/github.com/google/gofuzz/LICENSE | 202 +++ .../src/github.com/gorilla/context/LICENSE | 27 + .../src/github.com/gorilla/mux/LICENSE | 27 + .../src/github.com/imdario/mergo/LICENSE | 28 + .../imdario/mergo/testdata/license.yml | 3 + .../inconshreveable/mousetrap/LICENSE | 13 + .../github.com/jonboulle/clockwork/LICENSE | 201 +++ .../src/github.com/juju/ratelimit/LICENSE | 191 +++ .../src/github.com/kardianos/osext/LICENSE | 27 + .../_workspace/src/github.com/kr/pty/License | 23 + .../src/github.com/miekg/dns/COPYRIGHT | 9 + .../src/github.com/miekg/dns/LICENSE | 32 + .../github.com/mitchellh/mapstructure/LICENSE | 21 + .../src/github.com/onsi/ginkgo/LICENSE | 20 + .../src/github.com/onsi/gomega/LICENSE | 20 + .../src/github.com/pborman/uuid/LICENSE | 27 + .../src/github.com/prometheus/procfs/LICENSE | 201 +++ .../src/github.com/prometheus/procfs/NOTICE | 7 + .../github.com/rackspace/gophercloud/LICENSE | 191 +++ .../russross/blackfriday/LICENSE.txt | 29 + .../src/github.com/scalingdata/gcfg/LICENSE | 57 + .../src/github.com/spf13/cobra/LICENSE.txt | 174 +++ .../src/github.com/spf13/pflag/LICENSE | 28 + .../src/github.com/vaughan0/go-ini/LICENSE | 14 + .../github.com/xyproto/simpleredis/LICENSE | 21 + .../src/golang.org/x/oauth2/LICENSE | 27 + .../googleapi/internal/uritemplates/LICENSE | 18 + .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 21 + .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 +++ .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 +++ .../charms/trusty/kubernetes-master/copyright | 13 + .../juju/charms/trusty/kubernetes/copyright | 13 + .../update-demo/local/LICENSE.angular | 21 + .../third_party/forked/json/LICENSE | 27 + .../third_party/forked/reflect/LICENSE | 27 + .../kubernetes/third_party/golang/LICENSE | 27 + .../kubernetes/third_party/golang/PATENTS | 22 + .../kubernetes/third_party/htpasswd/COPYING | 28 + .../kubernetes/third_party/pause/LICENSE | 19 + .../kubernetes/third_party/swagger-ui/LICENSE | 11 + .../speter.net/go/exp/math/dec/inf/LICENSE | 57 + .../bin-dgr/common/acfullname.go} | 4 +- .../blablacar/dgr/bin-dgr/common/common.go | 9 + .../blablacar/dgr/bin-dgr/common/exec.go | 49 + .../utils.go => dgr/bin-dgr/common/files.go} | 70 +- .../blablacar/dgr/bin-dgr/common/manifest.go | 61 + .../{cnt/utils => dgr/bin-dgr/common}/tar.go | 2 +- .../dgr/bin-templater/template/directory.go | 116 ++ .../dgr/bin-templater/template/file.go | 130 ++ .../dgr/bin-templater/template/templating.go | 136 ++ .../kelseyhightower/memkv/.travis.yml | 5 - .../kelseyhightower/memkv/README.md | 44 - .../kelseyhightower/memkv/kvpair.go | 20 - .../github.com/kelseyhightower/memkv/store.go | 178 --- .../src/github.com/leekchan/gtf/.gitignore | 24 + .../src/github.com/leekchan/gtf/.travis.yml | 9 + .../src/github.com/leekchan/gtf/LICENSE | 22 + .../src/github.com/leekchan/gtf/README.md | 711 +++++++++++ .../src/github.com/leekchan/gtf/gtf.go | 463 +++++++ .../github.com/n0rad/go-erlog/errs/entry.go | 4 +- .../github.com/n0rad/go-erlog/formatter.go | 81 +- .../src/github.com/n0rad/go-erlog/logger.go | 17 - commands/ggn.go | 4 +- compile/version_generate.go | 33 - ggn/home.go | 8 +- main.go | 1 - utils/templating.go | 110 -- work/env.go | 8 +- work/service-generate.go | 4 +- work/service.go | 11 +- work/unit-generate.go | 3 +- work/unit.go | 5 +- 317 files changed, 20894 insertions(+), 975 deletions(-) delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/checksum.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/files.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/pod-manifest.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/sha512sum.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/version.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE rename Godeps/_workspace/src/github.com/{kelseyhightower/memkv/LICENSE => blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml} (77%) create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE rename Godeps/_workspace/src/github.com/blablacar/{cnt/spec/ac-fullname.go => dgr/bin-dgr/common/acfullname.go} (98%) create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go rename Godeps/_workspace/src/github.com/blablacar/{cnt/utils/utils.go => dgr/bin-dgr/common/files.go} (53%) create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go rename Godeps/_workspace/src/github.com/blablacar/{cnt/utils => dgr/bin-dgr/common}/tar.go (95%) create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go create mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go delete mode 100644 Godeps/_workspace/src/github.com/kelseyhightower/memkv/.travis.yml delete mode 100644 Godeps/_workspace/src/github.com/kelseyhightower/memkv/README.md delete mode 100644 Godeps/_workspace/src/github.com/kelseyhightower/memkv/kvpair.go delete mode 100644 Godeps/_workspace/src/github.com/kelseyhightower/memkv/store.go create mode 100644 Godeps/_workspace/src/github.com/leekchan/gtf/.gitignore create mode 100644 Godeps/_workspace/src/github.com/leekchan/gtf/.travis.yml create mode 100644 Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE create mode 100644 Godeps/_workspace/src/github.com/leekchan/gtf/README.md create mode 100644 Godeps/_workspace/src/github.com/leekchan/gtf/gtf.go delete mode 100644 compile/version_generate.go delete mode 100644 utils/templating.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 0cd981a..f813d8c 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/blablacar/ggn", - "GoVersion": "go1.5.3", + "GoVersion": "go1.6", "Packages": [ "./..." ], @@ -36,14 +36,14 @@ "Rev": "431a37282b0ef85175c8c30eb79f3918c378c7d1" }, { - "ImportPath": "github.com/blablacar/cnt/spec", - "Comment": "53-10-g4ce5c8b", - "Rev": "4ce5c8b645f310300e3b86a0253390c2e2df9f9b" + "ImportPath": "github.com/blablacar/dgr/bin-dgr/common", + "Comment": "56-32-g7627526", + "Rev": "76275266f686b07ea4a021d51ad711b781a464ad" }, { - "ImportPath": "github.com/blablacar/cnt/utils", - "Comment": "53-10-g4ce5c8b", - "Rev": "4ce5c8b645f310300e3b86a0253390c2e2df9f9b" + "ImportPath": "github.com/blablacar/dgr/bin-templater/template", + "Comment": "56-32-g7627526", + "Rev": "76275266f686b07ea4a021d51ad711b781a464ad" }, { "ImportPath": "github.com/camlistore/camlistore/pkg/errorutil", @@ -110,8 +110,8 @@ "Rev": "1b5e39b83d1835fa480e0c2ddefb040ee82d58b3" }, { - "ImportPath": "github.com/kelseyhightower/memkv", - "Rev": "32a4556de2a1aab8ea4c8600f5ea24db3fbd8908" + "ImportPath": "github.com/leekchan/gtf", + "Rev": "882e96b937c8506c67b5adf98ff1f84cd7b7b93a" }, { "ImportPath": "github.com/mgutz/ansi", @@ -123,7 +123,7 @@ }, { "ImportPath": "github.com/n0rad/go-erlog", - "Rev": "d91d1cac32e6fa5843dcef5818e10e83a4a7c1bf" + "Rev": "73ef27688910c7154b1428a4aa63b1d3f4ada1f9" }, { "ImportPath": "github.com/peterbourgon/mergemap", diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go deleted file mode 100644 index 504fdac..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/aci-manifest.go +++ /dev/null @@ -1,57 +0,0 @@ -package spec - -import ( - "github.com/appc/spec/schema/types" - "github.com/n0rad/go-erlog/data" - "github.com/n0rad/go-erlog/errs" -) - -type CntBuild struct { - Image types.ACIdentifier `json:"image"` -} - -func (b *CntBuild) NoBuildImage() bool { - return b.Image == "" -} - -type AciManifest struct { - NameAndVersion ACFullname `json:"name"` - From interface{} `json:"from"` - Build CntBuild `json:"build"` - Aci AciDefinition `json:"aci"` -} - -func (m *AciManifest) GetFroms() ([]ACFullname, error) { - var froms []ACFullname - switch v := m.From.(type) { - case string: - froms = []ACFullname{*NewACFullName(m.From.(string))} - case []interface{}: - for _, from := range m.From.([]interface{}) { - froms = append(froms, *NewACFullName(from.(string))) - } - case nil: - return froms, nil - default: - return nil, errs.WithF(data.WithField("type", v), "Invalid from type format") - } - return froms, nil -} - -type AciDefinition struct { - App CntApp `json:"app,omitempty"` - Annotations types.Annotations `json:"annotations,omitempty"` - Dependencies []ACFullname `json:"dependencies,omitempty"` - PathWhitelist []string `json:"pathWhitelist,omitempty"` -} - -type CntApp struct { - Exec types.Exec `json:"exec"` - User string `json:"user"` - Group string `json:"group"` - WorkingDirectory string `json:"workingDirectory,omitempty"` - Environment types.Environment `json:"environment,omitempty"` - MountPoints []types.MountPoint `json:"mountPoints,omitempty"` - Ports []types.Port `json:"ports,omitempty"` - Isolators types.Isolators `json:"isolators,omitempty"` -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go deleted file mode 100644 index e1bdc20..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/cnt-command.go +++ /dev/null @@ -1,11 +0,0 @@ -package spec - -type CntCommand interface { - Build() error - Clean() - Push() - Install() - Test() - Graph() - Update() error -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go deleted file mode 100644 index e10e00e..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/pod-manifest.go +++ /dev/null @@ -1,32 +0,0 @@ -package spec - -import ( - "github.com/appc/spec/schema" - "github.com/appc/spec/schema/types" -) - -type PodManifest struct { - Name ACFullname `json:"name"` - Pod *PodDefinition `json:"pod"` -} - -type PodDefinition struct { - Apps []RuntimeApp `json:"apps"` - Volumes []types.Volume `json:"volumes"` - Isolators []types.Isolator `json:"isolators"` - Annotations types.Annotations `json:"annotations"` - Ports []types.ExposedPort `json:"ports"` -} - -type RuntimeApp struct { - Dependencies []ACFullname `json:"dependencies"` - Name string `json:"name"` - App CntApp `json:"app"` - Mounts []schema.Mount `json:"mounts"` - Annotations types.Annotations `json:"annotations"` -} - -type Env struct { - Name string `json:"name"` - Value string `json:"value"` -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go deleted file mode 100644 index b2ff7dd..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/aci-utils.go +++ /dev/null @@ -1,51 +0,0 @@ -package utils - -import ( - "github.com/appc/spec/aci" - "github.com/appc/spec/schema" - "io" - "io/ioutil" - "os" - "path/filepath" -) - -func ExtractManifestFromAci(aciPath string) schema.ImageManifest { - input, err := os.Open(aciPath) - if err != nil { - panic("cat-manifest: Cannot open %s: %v" + aciPath + err.Error()) - } - defer input.Close() - - tr, err := aci.NewCompressedTarReader(input) - if err != nil { - panic("cat-manifest: Cannot open tar %s: %v" + aciPath + err.Error()) - } - - im := schema.ImageManifest{} - -Tar: - for { - hdr, err := tr.Next() - switch err { - case io.EOF: - break Tar - case nil: - if filepath.Clean(hdr.Name) == aci.ManifestFile { - bytes, err := ioutil.ReadAll(tr) - if err != nil { - panic(err) - } - - err = im.UnmarshalJSON(bytes) - if err != nil { - panic(err) - } - return im - } - default: - panic("error reading tarball: %v" + err.Error()) - } - } - panic("Cannot found manifest if aci") - return im -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go deleted file mode 100644 index a478f25..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/attribute-files.go +++ /dev/null @@ -1,28 +0,0 @@ -package utils - -import ( - "github.com/blablacar/attributes-merger/attributes" - "github.com/google/cadvisor/utils" - "strings" -) - -func AttributeFiles(path string) ([]string, error) { - res := []string{} - if !utils.FileExists(path) { - return res, nil - } - - in := attributes.NewInputs(path) - // initialize input files list - err := in.ListFiles() - if err != nil { - return nil, err - } - - for _, file := range in.Files { - if strings.HasSuffix(file, ".yml") || strings.HasSuffix(file, ".yaml") { - res = append(res, in.Directory+file) - } - } - return res, nil -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/checksum.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/checksum.go deleted file mode 100644 index fdef7db..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/checksum.go +++ /dev/null @@ -1,36 +0,0 @@ -package utils - -import ( - "crypto/md5" - "io" - "math" - "os" -) - -const filechunk = 8192 - -func ChecksumFile(path string) ([]byte, error) { - file, err := os.Open(path) - if err != nil { - return nil, err - } - defer file.Close() - - // calculate the file size - info, _ := file.Stat() - - filesize := info.Size() - - blocks := uint64(math.Ceil(float64(filesize) / float64(filechunk))) - - hash := md5.New() - - for i := uint64(0); i < blocks; i++ { - blocksize := int(math.Min(filechunk, float64(filesize-int64(i*filechunk)))) - buf := make([]byte, blocksize) - - file.Read(buf) - io.WriteString(hash, string(buf)) // append into the hash - } - return hash.Sum(nil), nil -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/files.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/files.go deleted file mode 100644 index 7e58f9c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/files.go +++ /dev/null @@ -1,20 +0,0 @@ -package utils - -import ( - "io" - "os" -) - -func IsDirEmpty(name string) (bool, error) { - f, err := os.Open(name) - if err != nil { - return false, err - } - defer f.Close() - - _, err = f.Readdir(1) - if err == io.EOF { - return true, nil - } - return false, err // Either not empty or error, suits both cases -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go deleted file mode 100644 index 72825e6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/image-manifest.go +++ /dev/null @@ -1,92 +0,0 @@ -package utils - -import ( - "github.com/appc/spec/schema" - "github.com/appc/spec/schema/types" - "github.com/blablacar/cnt/spec" - "io/ioutil" -) - -// -//func ReadManifest(path string) *schema.ImageManifest { -// im := new(schema.ImageManifest) -// content, err := ioutil.ReadFile(path) -// if err != nil { -// panic(err) -//// config.GetConfig().Log.Panic("Cannot read manifest file", err) -// } -// im.UnmarshalJSON(content) -// return im -//} - -func WriteImageManifest(m *spec.AciManifest, targetFile string, projectName string, cntVersion string) { - name, err := types.NewACIdentifier(m.NameAndVersion.Name()) - if err != nil { - panic(err) - } - - version := m.NameAndVersion.Version() - if version == "" { - version = GenerateVersion() - } - - labels := types.Labels{} - labels = append(labels, types.Label{Name: "version", Value: version}) - labels = append(labels, types.Label{Name: "os", Value: "linux"}) - labels = append(labels, types.Label{Name: "arch", Value: "amd64"}) - - if m.Aci.App.User == "" { - m.Aci.App.User = "0" - } - if m.Aci.App.Group == "" { - m.Aci.App.Group = "0" - } - - im := schema.BlankImageManifest() - im.Annotations = m.Aci.Annotations - - cntVersionIdentifier, _ := types.NewACIdentifier("cnt-version") - im.Annotations.Set(*cntVersionIdentifier, cntVersion) - im.Dependencies = toAppcDependencies(m.Aci.Dependencies) - im.Name = *name - im.Labels = labels - - im.App = &types.App{ - Exec: m.Aci.App.Exec, - EventHandlers: []types.EventHandler{{Name: "pre-start", Exec: []string{"/cnt/bin/prestart"}}}, - User: m.Aci.App.User, - Group: m.Aci.App.Group, - WorkingDirectory: m.Aci.App.WorkingDirectory, - Environment: m.Aci.App.Environment, - MountPoints: m.Aci.App.MountPoints, - Ports: m.Aci.App.Ports, - Isolators: m.Aci.App.Isolators, - } - - buff, err := im.MarshalJSON() - if err != nil { - panic(err) - } - err = ioutil.WriteFile(targetFile, buff, 0644) - if err != nil { - panic(err) - } -} - -func toAppcDependencies(dependencies []spec.ACFullname) types.Dependencies { - appcDependencies := types.Dependencies{} - for _, dep := range dependencies { - id, err := types.NewACIdentifier(dep.Name()) - if err != nil { - panic(err) - } - t := types.Dependency{ImageName: *id} - if dep.Version() != "" { - t.Labels = types.Labels{} - t.Labels = append(t.Labels, types.Label{Name: "version", Value: dep.Version()}) - } - - appcDependencies = append(appcDependencies, t) - } - return appcDependencies -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/pod-manifest.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/pod-manifest.go deleted file mode 100644 index fdcee72..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/pod-manifest.go +++ /dev/null @@ -1,28 +0,0 @@ -package utils - -import ( - "github.com/appc/spec/schema" - "io/ioutil" -) - -const POD_MANIFEST = `{ - "acVersion": "0.6.1", - "acKind": "PodManifest" -}` - -func BasicPodManifest() *schema.PodManifest { - im := new(schema.PodManifest) - im.UnmarshalJSON([]byte(POD_MANIFEST)) - return im -} - -func WritePodManifest(im *schema.PodManifest, targetFile string) { - buff, err := im.MarshalJSON() - if err != nil { - panic(err) - } - err = ioutil.WriteFile(targetFile, []byte(buff), 0644) - if err != nil { - panic(err) - } -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/sha512sum.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/sha512sum.go deleted file mode 100644 index 1076dea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/sha512sum.go +++ /dev/null @@ -1,32 +0,0 @@ -package utils - -import ( - "crypto/sha512" - "fmt" - "io" - "os" -) - -const StdinFileName = "-" - -func Sha512sum(filePath string) (res string, err error) { - // Open file. - var fr *os.File - if filePath == StdinFileName { - fr = os.Stdin - } else { - fr, err = os.Open(filePath) - if err != nil { - return "", err - } - defer fr.Close() - } - - h := sha512.New() - _, err = io.Copy(h, fr) - if err != nil { - return "", err - } - - return fmt.Sprintf("%x", h.Sum(nil)), nil -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version.go deleted file mode 100644 index cc5acad..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version.go +++ /dev/null @@ -1,63 +0,0 @@ -package utils - -import ( - "strconv" - "strings" -) - -// Version provides utility methods for comparing versions. -type Version string - -func (v Version) compareTo(other Version) int { - var ( - currTab = strings.Split(string(v), ".") - otherTab = strings.Split(string(other), ".") - ) - - max := len(currTab) - if len(otherTab) > max { - max = len(otherTab) - } - for i := 0; i < max; i++ { - var currInt, otherInt int - - if len(currTab) > i { - currInt, _ = strconv.Atoi(currTab[i]) - } - if len(otherTab) > i { - otherInt, _ = strconv.Atoi(otherTab[i]) - } - if currInt > otherInt { - return 1 - } - if otherInt > currInt { - return -1 - } - } - return 0 -} - -// LessThan checks if a version is less than another -func (v Version) LessThan(other Version) bool { - return v.compareTo(other) == -1 -} - -// LessThanOrEqualTo checks if a version is less than or equal to another -func (v Version) LessThanOrEqualTo(other Version) bool { - return v.compareTo(other) <= 0 -} - -// GreaterThan checks if a version is greater than another -func (v Version) GreaterThan(other Version) bool { - return v.compareTo(other) == 1 -} - -// GreaterThanOrEqualTo checks if a version is greater than or equal to another -func (v Version) GreaterThanOrEqualTo(other Version) bool { - return v.compareTo(other) >= 0 -} - -// Equal checks if a version is equal to another -func (v Version) Equal(other Version) bool { - return v.compareTo(other) == 0 -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator.go b/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator.go deleted file mode 100644 index 964c25b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/version_generator.go +++ /dev/null @@ -1,19 +0,0 @@ -package utils - -import ( - "fmt" - "time" -) - -func GenerateVersion() string { - return generateDate() + "-v" + GitHash() -} - -func generateDate() string { - return fmt.Sprintf("%s", time.Now().Format("20060102.150405")) -} - -func GitHash() string { - out, _ := ExecCmdGetOutput("git", "rev-parse", "--short", "HEAD") - return out -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE new file mode 100644 index 0000000..055361b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010 Brett Slatkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity new file mode 100644 index 0000000..14db513 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This script adds copyright headers to files. + +use strict; +my $header = do { local $/; <DATA> }; +$header =~ s!\s+$!\n!; +my $yyyy = (localtime())[5] + 1900; +$header =~ s/YYYY/$yyyy/ or die; + +unless (@ARGV == 1) { + die "Usage: copyrightify <filename>\n"; +} + +my $file = shift; +open(my $fh, $file) or die "Open $file error: $!\n"; +my $source = do { local $/; <$fh> }; +close($fh); +if ($source =~ /Copyright \d\d\d\d/) { + print STDERR "# $file - OK\n"; + exit; +} + +my $newsource = $source; +if ($file =~ /\.(go|java|aidl)$/) { + $header = "/*\n$header*/\n\n"; + $newsource = $header . $source; +} elsif ($file =~ /\.py$/) { + $header = join("", map { "# $_\n" } split(/\n/, $header)); + $newsource = $header . $source; +} else { + die "File type not supported."; +} + + +open(my $fh, ">$file") or die "Open $file error: $!\n"; +print $fh $newsource; +close($fh) or die; + +__END__ +Copyright YYYY The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go new file mode 100644 index 0000000..a75283f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go @@ -0,0 +1,50 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legal provides project-wide storage for compiled-in licenses. +package legal + +var licenses []string + +func init() { + RegisterLicense(` +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +`) +} + +// RegisterLicense stores the license text. +// It doesn't check whether the text was already present. +func RegisterLicense(text string) { + licenses = append(licenses, text) + return +} + +// Licenses returns a slice of the licenses. +func Licenses() []string { + return licenses +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go new file mode 100644 index 0000000..e4a3205 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go @@ -0,0 +1,42 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legalprint provides a printing helper for the legal package. +package legalprint + +import ( + "flag" + "fmt" + "io" + + "camlistore.org/pkg/legal" +) + +var ( + flagLegal = flag.Bool("legal", false, "show licenses") +) + +// MaybePrint will print the licenses if flagLegal has been set. +// It will return the value of the flagLegal. +func MaybePrint(out io.Writer) bool { + if !*flagLegal { + return false + } + for _, text := range legal.Licenses() { + fmt.Fprintln(out, text) + } + return true +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE new file mode 100644 index 0000000..d369cb8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE @@ -0,0 +1,93 @@ +Copyright (c) 2013, 2014 Tommi Virtanen. +Copyright (c) 2009, 2011, 2012 The Go Authors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The following included software components have additional copyright +notices and license terms that may differ from the above. + + +File fuse.go: + +// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, +// which carries this notice: +// +// The files in this directory are subject to the following license. +// +// The author of this software is Russ Cox. +// +// Copyright (c) 2006 Russ Cox +// +// Permission to use, copy, modify, and distribute this software for any +// purpose without fee is hereby granted, provided that this entire notice +// is included in all copies of any software which is or includes a copy +// or modification of this software and in all copies of the supporting +// documentation for such software. +// +// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY +// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS +// FITNESS FOR ANY PARTICULAR PURPOSE. + + +File fuse_kernel.go: + +// Derived from FUSE's fuse_kernel.h +/* + This file defines the kernel interface of FUSE + Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> + + + This -- and only this -- header file may also be distributed under + the terms of the BSD Licence as follows: + + Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE new file mode 100644 index 0000000..6765f09 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The goauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS new file mode 100644 index 0000000..9e87163 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the goauth2 project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE new file mode 100644 index 0000000..fec05ce --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE new file mode 100644 index 0000000..6050c10 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt new file mode 100644 index 0000000..1066d2f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt @@ -0,0 +1,4 @@ +fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) +css/*: MIT (http://opensource.org/licenses/mit-license.html) + +Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE new file mode 100644 index 0000000..50bbdd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The fileutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE new file mode 100644 index 0000000..7150ce3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 jnml. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of jnml nor the names of his +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE new file mode 100644 index 0000000..2a7cfd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2012-2013 Dave Collins <dave@davec.name> + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE new file mode 100644 index 0000000..14e2f77 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE new file mode 100644 index 0000000..09e5be6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Gorilla web toolkit +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md new file mode 100644 index 0000000..5773904 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md @@ -0,0 +1,8 @@ +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE new file mode 100644 index 0000000..aa62504 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE @@ -0,0 +1,24 @@ + +Copyright (c) 2012, Robert Carlsen & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE new file mode 100644 index 0000000..7efba3b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE @@ -0,0 +1,19 @@ +The files in here come from www.glitchthegame.com. + +License here: http://www.glitchthegame.com/public-domain-game-art/#licensing + +All files are provided by Tiny Speck under the Creative Commons CC0 1.0 +Universal License. This is a broadly permissive "No Rights Reserved" license — +you may do what you please with what we've provided. Our intention is to +dedicate these works to the public domain and make them freely available to all, +without restriction. All files are provided AS-IS. Tiny Speck cannot provide any +support to help you bring these assets into your own projects. + +Note: the Glitch logo and trademark are not among the things we are making +available under this license. Only items in the files explicitly included herein +are covered. + +There is no obligation to link or credit the works, but if you do, please link +to glitchthegame.com, our permanent "retirement" site for the game and these +assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack +(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE new file mode 100644 index 0000000..770c767 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE @@ -0,0 +1,25 @@ +mgo - MongoDB driver for Go + +Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE new file mode 100644 index 0000000..8903260 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE @@ -0,0 +1,25 @@ +BSON library for Go + +Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE new file mode 100644 index 0000000..a4c5efd --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE new file mode 100644 index 0000000..f4988b4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE @@ -0,0 +1,28 @@ +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS new file mode 100644 index 0000000..619f9db --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE new file mode 100644 index 0000000..055361b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE @@ -0,0 +1,13 @@ +Copyright 2010 Brett Slatkin + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity new file mode 100644 index 0000000..14db513 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity @@ -0,0 +1,68 @@ +#!/usr/bin/perl +# +# Copyright 2010 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# This script adds copyright headers to files. + +use strict; +my $header = do { local $/; <DATA> }; +$header =~ s!\s+$!\n!; +my $yyyy = (localtime())[5] + 1900; +$header =~ s/YYYY/$yyyy/ or die; + +unless (@ARGV == 1) { + die "Usage: copyrightify <filename>\n"; +} + +my $file = shift; +open(my $fh, $file) or die "Open $file error: $!\n"; +my $source = do { local $/; <$fh> }; +close($fh); +if ($source =~ /Copyright \d\d\d\d/) { + print STDERR "# $file - OK\n"; + exit; +} + +my $newsource = $source; +if ($file =~ /\.(go|java|aidl)$/) { + $header = "/*\n$header*/\n\n"; + $newsource = $header . $source; +} elsif ($file =~ /\.py$/) { + $header = join("", map { "# $_\n" } split(/\n/, $header)); + $newsource = $header . $source; +} else { + die "File type not supported."; +} + + +open(my $fh, ">$file") or die "Open $file error: $!\n"; +print $fh $newsource; +close($fh) or die; + +__END__ +Copyright YYYY The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go new file mode 100644 index 0000000..a75283f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go @@ -0,0 +1,50 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legal provides project-wide storage for compiled-in licenses. +package legal + +var licenses []string + +func init() { + RegisterLicense(` +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +`) +} + +// RegisterLicense stores the license text. +// It doesn't check whether the text was already present. +func RegisterLicense(text string) { + licenses = append(licenses, text) + return +} + +// Licenses returns a slice of the licenses. +func Licenses() []string { + return licenses +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go new file mode 100644 index 0000000..e4a3205 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go @@ -0,0 +1,42 @@ +/* +Copyright 2014 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legalprint provides a printing helper for the legal package. +package legalprint + +import ( + "flag" + "fmt" + "io" + + "camlistore.org/pkg/legal" +) + +var ( + flagLegal = flag.Bool("legal", false, "show licenses") +) + +// MaybePrint will print the licenses if flagLegal has been set. +// It will return the value of the flagLegal. +func MaybePrint(out io.Writer) bool { + if !*flagLegal { + return false + } + for _, text := range legal.Licenses() { + fmt.Fprintln(out, text) + } + return true +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE new file mode 100644 index 0000000..d369cb8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE @@ -0,0 +1,93 @@ +Copyright (c) 2013, 2014 Tommi Virtanen. +Copyright (c) 2009, 2011, 2012 The Go Authors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +The following included software components have additional copyright +notices and license terms that may differ from the above. + + +File fuse.go: + +// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, +// which carries this notice: +// +// The files in this directory are subject to the following license. +// +// The author of this software is Russ Cox. +// +// Copyright (c) 2006 Russ Cox +// +// Permission to use, copy, modify, and distribute this software for any +// purpose without fee is hereby granted, provided that this entire notice +// is included in all copies of any software which is or includes a copy +// or modification of this software and in all copies of the supporting +// documentation for such software. +// +// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY +// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS +// FITNESS FOR ANY PARTICULAR PURPOSE. + + +File fuse_kernel.go: + +// Derived from FUSE's fuse_kernel.h +/* + This file defines the kernel interface of FUSE + Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> + + + This -- and only this -- header file may also be distributed under + the terms of the BSD Licence as follows: + + Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE new file mode 100644 index 0000000..d9a10c0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE new file mode 100644 index 0000000..6765f09 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The goauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS new file mode 100644 index 0000000..9e87163 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the goauth2 project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE new file mode 100644 index 0000000..fec05ce --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE new file mode 100644 index 0000000..6050c10 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt new file mode 100644 index 0000000..1066d2f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt @@ -0,0 +1,4 @@ +fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) +css/*: MIT (http://opensource.org/licenses/mit-license.html) + +Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE new file mode 100644 index 0000000..50bbdd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The fileutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE new file mode 100644 index 0000000..7150ce3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 jnml. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of jnml nor the names of his +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE new file mode 100644 index 0000000..2a7cfd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2012-2013 Dave Collins <dave@davec.name> + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE new file mode 100644 index 0000000..14e2f77 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE new file mode 100644 index 0000000..09e5be6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Gorilla web toolkit +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md new file mode 100644 index 0000000..5773904 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md @@ -0,0 +1,8 @@ +Copyright (c) 2011-2013, 'pq' Contributors +Portions Copyright (C) 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE new file mode 100644 index 0000000..aa62504 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE @@ -0,0 +1,24 @@ + +Copyright (c) 2012, Robert Carlsen & Contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE new file mode 100644 index 0000000..7efba3b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE @@ -0,0 +1,19 @@ +The files in here come from www.glitchthegame.com. + +License here: http://www.glitchthegame.com/public-domain-game-art/#licensing + +All files are provided by Tiny Speck under the Creative Commons CC0 1.0 +Universal License. This is a broadly permissive "No Rights Reserved" license — +you may do what you please with what we've provided. Our intention is to +dedicate these works to the public domain and make them freely available to all, +without restriction. All files are provided AS-IS. Tiny Speck cannot provide any +support to help you bring these assets into your own projects. + +Note: the Glitch logo and trademark are not among the things we are making +available under this license. Only items in the files explicitly included herein +are covered. + +There is no obligation to link or credit the works, but if you do, please link +to glitchthegame.com, our permanent "retirement" site for the game and these +assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack +(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE new file mode 100644 index 0000000..770c767 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE @@ -0,0 +1,25 @@ +mgo - MongoDB driver for Go + +Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE new file mode 100644 index 0000000..8903260 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE @@ -0,0 +1,25 @@ +BSON library for Go + +Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE new file mode 100644 index 0000000..a4c5efd --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE new file mode 100644 index 0000000..f4988b4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE @@ -0,0 +1,28 @@ +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS new file mode 100644 index 0000000..619f9db --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go new file mode 100644 index 0000000..de9ae9c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go @@ -0,0 +1,32 @@ +/* +Copyright 2014 The Go4 Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package legal provides in-process storage for compiled-in licenses. +package legal + +var licenses []string + +// RegisterLicense stores the license text. +// It doesn't check whether the text was already present. +func RegisterLicense(text string) { + licenses = append(licenses, text) + return +} + +// Licenses returns a slice of the licenses. +func Licenses() []string { + return licenses +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE new file mode 100644 index 0000000..e06d208 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE @@ -0,0 +1,202 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE new file mode 100644 index 0000000..2298515 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md new file mode 100644 index 0000000..1cade6c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Brian Goff + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE new file mode 100644 index 0000000..54c6e90 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The b Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE new file mode 100644 index 0000000..7d80fe2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The bufs Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE new file mode 100644 index 0000000..80c7ae7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The dbm Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE new file mode 100644 index 0000000..27e4447 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The lldb Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE new file mode 100644 index 0000000..50bbdd2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The fileutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE new file mode 100644 index 0000000..1e92e33 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of CZ.NIC nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE new file mode 100644 index 0000000..128a1b6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The mathutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE new file mode 100644 index 0000000..4fa2a1f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The mersenne Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE new file mode 100644 index 0000000..0d10c02 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The ql Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE new file mode 100644 index 0000000..67983e0 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The sortutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE new file mode 100644 index 0000000..2fdd92c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The strutil Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE new file mode 100644 index 0000000..bc67059 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014 The zappy Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the names of the authors nor the names of the +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE new file mode 100644 index 0000000..f7d058a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 Skagerrak Software Limited. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Skagerrak Software Limited nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE new file mode 100644 index 0000000..c33dcc7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE new file mode 100644 index 0000000..8d9a94a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2005-2008 Dustin Sallings <dustin@spy.net> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +<http://www.opensource.org/licenses/mit-license.php> diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..670d88f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE new file mode 100644 index 0000000..1b1b192 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE @@ -0,0 +1,31 @@ +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE new file mode 100644 index 0000000..c33dcc7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE new file mode 100644 index 0000000..efcb241 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE @@ -0,0 +1,10 @@ +Copyright (c) 2014, Eric Urban +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE new file mode 100644 index 0000000..a6d7731 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2014 Kevin Ballard + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License new file mode 100644 index 0000000..6b7558b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License @@ -0,0 +1,23 @@ +Copyright (c) 2011 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE new file mode 100644 index 0000000..b75312c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2010, Petar Maymounkov +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +(*) Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +(*) Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +(*) Neither the name of Petar Maymounkov nor the names of its contributors may be +used to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE new file mode 100644 index 0000000..41ce7f1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2012 Peter Bourgon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE new file mode 100644 index 0000000..5f4e3ed --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Dmitri Shuralyov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go new file mode 100644 index 0000000..5ad9c96 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go @@ -0,0 +1,1133 @@ +// Copyright © 2015 Steve Francia <spf@spf13.com>. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Parts inspired by https://github.com/ryanuber/go-license + +package cmd + +import "strings" + +//Licenses contains all possible licenses a user can chose from +var Licenses map[string]License + +//License represents a software license agreement, containing the Name of +// the license, its possible matches (on the command line as given to cobra) +// the header to be used with each file on the file's creating, and the text +// of the license +type License struct { + Name string // The type of license in use + PossibleMatches []string // Similar names to guess + Text string // License text data + Header string // License header for source files +} + +// given a license name (in), try to match the license indicated +func matchLicense(in string) string { + for key, lic := range Licenses { + for _, match := range lic.PossibleMatches { + if strings.EqualFold(in, match) { + return key + } + } + } + return "" +} + +func init() { + Licenses = make(map[string]License) + + Licenses["apache"] = License{ + Name: "Apache 2.0", + PossibleMatches: []string{"apache", "apache20", "apache 2.0", "apache2.0", "apache-2.0"}, + Header: ` +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License.`, + Text: ` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +`, + } + + Licenses["mit"] = License{ + Name: "Mit", + PossibleMatches: []string{"mit"}, + Header: ` +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.`, + Text: `The MIT License (MIT) + +{{ .copyright }} + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +`, + } + + Licenses["bsd"] = License{ + Name: "NewBSD", + PossibleMatches: []string{"bsd", "newbsd", "3 clause bsd"}, + Header: ` +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.`, + Text: `{{ .copyright }} +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +`, + } + + Licenses["freebsd"] = License{ + Name: "Simplified BSD License", + PossibleMatches: []string{"freebsd", "simpbsd", "simple bsd", "2 clause bsd"}, + Header: ` +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.`, + Text: `{{ .copyright }} +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +`, + } + + Licenses["gpl3"] = License{ + Name: "GNU General Public License 3.0", + PossibleMatches: []string{"gpl3", "gpl", "gnu gpl3", "gnu gpl"}, + Header: `{{ .copyright }} + + This file is part of {{ .appName }}. + + {{ .appName }} is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + {{ .appName }} is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with {{ .appName }}. If not, see <http://www.gnu.org/licenses/>. + `, + Text: ` GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type 'show c' for details. + +The hypothetical commands 'show w' and 'show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. +`, + } + + // Licenses["apache20"] = License{ + // Name: "Apache 2.0", + // PossibleMatches: []string{"apache", "apache20", ""}, + // Header: ` + // `, + // Text: ` + // `, + // } +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE new file mode 100644 index 0000000..9f64db8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE @@ -0,0 +1,192 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Vishvananda Ishaya. + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE new file mode 100644 index 0000000..f4988b4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE @@ -0,0 +1,28 @@ +Copyright 2014, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS new file mode 100644 index 0000000..619f9db --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the GRPC project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of GRPC, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of GRPC. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of GRPC or any code incorporated within this +implementation of GRPC constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of GRPC +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular new file mode 100644 index 0000000..020f87a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010-2014 Google, Inc. http://angularjs.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING new file mode 100644 index 0000000..c6b097c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING @@ -0,0 +1,28 @@ +Copyright (C) 2003-2013 Edgewall Software +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE new file mode 100644 index 0000000..2b5e5ff --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE @@ -0,0 +1,19 @@ +The Expat/MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE new file mode 100644 index 0000000..9f93e06 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE @@ -0,0 +1,11 @@ +Copyright 2014 Reverb Technologies, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT new file mode 100644 index 0000000..ed21c8b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT @@ -0,0 +1,22 @@ +This project includes code derived from the MIT licensed naegelejd/go-acl +project. Here's a copy of its license: + + Copyright (c) 2015 Joseph Naegele + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD new file mode 100644 index 0000000..6b4b6ef --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD @@ -0,0 +1,30 @@ +This project includes code derived from the BSD licensed golang/go project. +Here's a copy of its license: + + Copyright (c) 2012 The Go Authors. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE new file mode 100644 index 0000000..902306b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2015 Sean Dolphin + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE new file mode 100644 index 0000000..9e4bd4d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014-2015 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE new file mode 100644 index 0000000..dc91298 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE @@ -0,0 +1,16 @@ +libcontainer +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (http://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see http://www.bis.doc.gov + +See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE new file mode 100644 index 0000000..1b1b192 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE @@ -0,0 +1,31 @@ +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE new file mode 100644 index 0000000..4e11de1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License new file mode 100644 index 0000000..05c783c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License new file mode 100644 index 0000000..480a328 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License @@ -0,0 +1,19 @@ +Copyright 2012 Keith Rarick + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md new file mode 100644 index 0000000..2199945 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md @@ -0,0 +1,23 @@ +objx - by Mat Ryer and Tyler Bunnell + +The MIT License (MIT) + +Copyright (c) 2014 Stretchr, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE new file mode 100644 index 0000000..8b22cdb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) +Copyright © 2012-2015 Oliver Eilhard + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the “Software”), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE new file mode 100644 index 0000000..97cec18 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE @@ -0,0 +1,190 @@ + Copyright 2014 The cAdvisor Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE new file mode 100644 index 0000000..c33dcc7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE @@ -0,0 +1,354 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. “Contributor” + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. “Contributor Version” + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor’s Contribution. + +1.3. “Contribution” + + means Covered Software of a particular Contributor. + +1.4. “Covered Software” + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. “Incompatible With Secondary Licenses” + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of version + 1.1 or earlier of the License, but not also under the terms of a + Secondary License. + +1.6. “Executable Form” + + means any form of the work other than Source Code Form. + +1.7. “Larger Work” + + means a work that combines Covered Software with other material, in a separate + file or files, that is not Covered Software. + +1.8. “License” + + means this document. + +1.9. “Licensable” + + means having the right to grant, to the maximum extent possible, whether at the + time of the initial grant or subsequently, any and all of the rights conveyed by + this License. + +1.10. “Modifications” + + means any of the following: + + a. any file in Source Code Form that results from an addition to, deletion + from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. “Patent Claims” of a Contributor + + means any patent claim(s), including without limitation, method, process, + and apparatus claims, in any patent Licensable by such Contributor that + would be infringed, but for the grant of the License, by the making, + using, selling, offering for sale, having made, import, or transfer of + either its Contributions or its Contributor Version. + +1.12. “Secondary License” + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. “Source Code Form” + + means the form of the work preferred for making modifications. + +1.14. “You” (or “Your”) + + means an individual or a legal entity exercising rights under this + License. For legal entities, “You” includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, “control” means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or as + part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its Contributions + or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution become + effective for each Contribution on the date the Contributor first distributes + such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under this + License. No additional rights or licenses will be implied from the distribution + or licensing of Covered Software under this License. Notwithstanding Section + 2.1(b) above, no patent license is granted by a Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party’s + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of its + Contributions. + + This License does not grant any rights in the trademarks, service marks, or + logos of any Contributor (except as may be necessary to comply with the + notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this License + (see Section 10.2) or under the terms of a Secondary License (if permitted + under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its Contributions + are its original creation(s) or it has sufficient rights to grant the + rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under applicable + copyright doctrines of fair use, fair dealing, or other equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under the + terms of this License. You must inform recipients that the Source Code Form + of the Covered Software is governed by the terms of this License, and how + they can obtain a copy of this License. You may not attempt to alter or + restrict the recipients’ rights in the Source Code Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this License, + or sublicense it under different terms, provided that the license for + the Executable Form does not attempt to limit or alter the recipients’ + rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for the + Covered Software. If the Larger Work is a combination of Covered Software + with a work governed by one or more Secondary Licenses, and the Covered + Software is not Incompatible With Secondary Licenses, this License permits + You to additionally distribute such Covered Software under the terms of + such Secondary License(s), so that the recipient of the Larger Work may, at + their option, further distribute the Covered Software under the terms of + either this License or such Secondary License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices (including + copyright notices, patent notices, disclaimers of warranty, or limitations + of liability) contained within the Source Code Form of the Covered + Software, except that You may alter any license notices to the extent + required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on behalf + of any Contributor. You must make it absolutely clear that any such + warranty, support, indemnity, or liability obligation is offered by You + alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, judicial + order, or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and the code + they affect. Such description must be placed in a text file included with all + distributions of the Covered Software under this License. Except to the + extent prohibited by statute or regulation, such description must be + sufficiently detailed for a recipient of ordinary skill to be able to + understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing basis, + if such Contributor fails to notify You of the non-compliance by some + reasonable means prior to 60 days after You have come back into compliance. + Moreover, Your grants from a particular Contributor are reinstated on an + ongoing basis if such Contributor notifies You of the non-compliance by + some reasonable means, this is the first time You have received notice of + non-compliance with this License from such Contributor, and You become + compliant prior to 30 days after Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, counter-claims, + and cross-claims) alleging that a Contributor Version directly or + indirectly infringes any patent, then the rights granted to You by any and + all Contributors for the Covered Software under Section 2.1 of this License + shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an “as is” basis, without + warranty of any kind, either expressed, implied, or statutory, including, + without limitation, warranties that the Covered Software is free of defects, + merchantable, fit for a particular purpose or non-infringing. The entire + risk as to the quality and performance of the Covered Software is with You. + Should any Covered Software prove defective in any respect, You (not any + Contributor) assume the cost of any necessary servicing, repair, or + correction. This disclaimer of warranty constitutes an essential part of this + License. No use of any Covered Software is authorized under this License + except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from such + party’s negligence to the extent applicable law prohibits such limitation. + Some jurisdictions do not allow the exclusion or limitation of incidental or + consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts of + a jurisdiction where the defendant maintains its principal place of business + and such litigation shall be governed by laws of that jurisdiction, without + reference to its conflict-of-law provisions. Nothing in this Section shall + prevent a party’s ability to bring cross-claims or counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject matter + hereof. If any provision of this License is held to be unenforceable, such + provision shall be reformed only to the extent necessary to make it + enforceable. Any law or regulation which provides that the language of a + contract shall be construed against the drafter shall not be used to construe + this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version of + the License under which You originally received the Covered Software, or + under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a modified + version of this License if you rename the license and remove any + references to the name of the license steward (except to note that such + modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then +You may include the notice in a location (such as a LICENSE file in a relevant +directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - “Incompatible With Secondary Licenses” Notice + + This Source Code Form is “Incompatible + With Secondary Licenses”, as defined by + the Mozilla Public License, v. 2.0. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE new file mode 100644 index 0000000..ade9307 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE new file mode 100644 index 0000000..244f4d8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Kyoung-chan Lee (leekchan@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE new file mode 100644 index 0000000..06ce0c3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) +Copyright (c) 2013 Mario L. Gutierrez + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE new file mode 100644 index 0000000..22bf08c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2013, Peter Bourgon, SoundCloud Ltd. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE new file mode 100644 index 0000000..a68e67f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE @@ -0,0 +1,188 @@ + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml similarity index 77% rename from Godeps/_workspace/src/github.com/kelseyhightower/memkv/LICENSE rename to Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml index 5516702..8da58fb 100644 --- a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/LICENSE +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml @@ -1,4 +1,16 @@ -Copyright (c) 2014 Kelsey Hightower +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE new file mode 100644 index 0000000..8bff971 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Phillip Bond + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE new file mode 100644 index 0000000..e454a52 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE new file mode 100644 index 0000000..08b5e20 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Jeremy Saenz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE new file mode 100644 index 0000000..df83a9c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE @@ -0,0 +1,8 @@ +Copyright (c) 2012 Dave Grijalva + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE new file mode 100644 index 0000000..dc91298 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE @@ -0,0 +1,16 @@ +libcontainer +Copyright 2012-2015 Docker, Inc. + +This product includes software developed at Docker, Inc. (http://www.docker.com). + +The following is courtesy of our legal counsel: + + +Use and transfer of Docker may be subject to certain restrictions by the +United States and other governments. +It is your responsibility to ensure that your use and/or transfer does not +violate applicable laws. + +For more information, please see http://www.bis.doc.gov + +See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE new file mode 100644 index 0000000..5515ccf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE @@ -0,0 +1,21 @@ +Copyright (C) 2013 Jeremy Saenz +All Rights Reserved. + +MIT LICENSE + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE new file mode 100644 index 0000000..80dd96d --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE @@ -0,0 +1,24 @@ +Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE new file mode 100644 index 0000000..2744858 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE new file mode 100644 index 0000000..5782c72 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2014, Elazar Leibovich +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE new file mode 100644 index 0000000..ece7ec6 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2012,2013 Ernest Micklei + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE new file mode 100644 index 0000000..0eb9b72 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2014, Evan Phoenix +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the Evan Phoenix nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE new file mode 100644 index 0000000..4e11de1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2015, go-dockerclient authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE new file mode 100644 index 0000000..f090cb4 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Simon Eskildsen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE new file mode 100644 index 0000000..ac74d8f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE new file mode 100644 index 0000000..7805d36 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE new file mode 100644 index 0000000..06b252b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE new file mode 100644 index 0000000..37ec93a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE new file mode 100644 index 0000000..6866802 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2013 Dario Castañé. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml new file mode 100644 index 0000000..62fdb61 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml @@ -0,0 +1,3 @@ +import: ../../../../fossene/db/schema/thing.yml +fields: + site: string diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE new file mode 100644 index 0000000..5f0d1fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE @@ -0,0 +1,13 @@ +Copyright 2014 Alan Shreve + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE new file mode 100644 index 0000000..5c304d1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE new file mode 100644 index 0000000..ade9307 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License new file mode 100644 index 0000000..6b7558b --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License @@ -0,0 +1,23 @@ +Copyright (c) 2011 Keith Rarick + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, +sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall +be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT new file mode 100644 index 0000000..35702b1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT @@ -0,0 +1,9 @@ +Copyright 2009 The Go Authors. All rights reserved. Use of this source code +is governed by a BSD-style license that can be found in the LICENSE file. +Extensions of the original work are copyright (c) 2011 Miek Gieben + +Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. + +Copyright 2014 CloudFlare. All rights reserved. Use of this source code is +governed by a BSD-style license that can be found in the LICENSE file. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE new file mode 100644 index 0000000..5763fa7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE @@ -0,0 +1,32 @@ +Extensions of the original work are copyright (c) 2011 Miek Gieben + +As this is fork of the official Go code the same license applies: + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE new file mode 100644 index 0000000..f9c841a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE new file mode 100644 index 0000000..9415ee7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013-2014 Onsi Fakhouri + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE new file mode 100644 index 0000000..5dc6826 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009,2014 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE new file mode 100644 index 0000000..53c5e9a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE new file mode 100644 index 0000000..fbbbc9e --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE @@ -0,0 +1,191 @@ +Copyright 2012-2013 Rackspace, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +------ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt new file mode 100644 index 0000000..2885af3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt @@ -0,0 +1,29 @@ +Blackfriday is distributed under the Simplified BSD License: + +> Copyright © 2011 Russ Ross +> All rights reserved. +> +> Redistribution and use in source and binary forms, with or without +> modification, are permitted provided that the following conditions +> are met: +> +> 1. Redistributions of source code must retain the above copyright +> notice, this list of conditions and the following disclaimer. +> +> 2. Redistributions in binary form must reproduce the above +> copyright notice, this list of conditions and the following +> disclaimer in the documentation and/or other materials provided with +> the distribution. +> +> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE new file mode 100644 index 0000000..b0a9e76 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of gcfg's source code have been derived from Go, and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt new file mode 100644 index 0000000..298f0e2 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt @@ -0,0 +1,174 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE new file mode 100644 index 0000000..63ed1cf --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012 Alex Ogier. All rights reserved. +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE new file mode 100644 index 0000000..968b453 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE @@ -0,0 +1,14 @@ +Copyright (c) 2013 Vaughan Newton + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE new file mode 100644 index 0000000..145d387 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Alexander F Rødseth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE new file mode 100644 index 0000000..d02f24f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The oauth2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE new file mode 100644 index 0000000..de9c88c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE @@ -0,0 +1,18 @@ +Copyright (c) 2013 Joshua Tacoma + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE new file mode 100644 index 0000000..c3d4cc3 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Nate Finch + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE new file mode 100644 index 0000000..a68e67f --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE @@ -0,0 +1,188 @@ + +Copyright (c) 2011-2014 - Canonical Inc. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml new file mode 100644 index 0000000..8da58fb --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml @@ -0,0 +1,31 @@ +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright new file mode 100644 index 0000000..a0b409a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright @@ -0,0 +1,13 @@ +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright new file mode 100644 index 0000000..a0b409a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright @@ -0,0 +1,13 @@ +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular new file mode 100644 index 0000000..020f87a --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2010-2014 Google, Inc. http://angularjs.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE new file mode 100644 index 0000000..7448756 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING new file mode 100644 index 0000000..c6b097c --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING @@ -0,0 +1,28 @@ +Copyright (C) 2003-2013 Edgewall Software +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. The name of the author may not be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE new file mode 100644 index 0000000..2b5e5ff --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE @@ -0,0 +1,19 @@ +The Expat/MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE new file mode 100644 index 0000000..9f93e06 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE @@ -0,0 +1,11 @@ +Copyright 2014 Reverb Technologies, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE new file mode 100644 index 0000000..efa1aa1 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE @@ -0,0 +1,57 @@ +Copyright (c) 2012 Péter Surányi. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +---------------------------------------------------------------------- +Portions of inf.Dec's source code have been derived from Go and are +covered by the following license: +---------------------------------------------------------------------- + +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/acfullname.go similarity index 98% rename from Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go rename to Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/acfullname.go index c4f5517..ccf1d42 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/spec/ac-fullname.go +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/acfullname.go @@ -1,4 +1,4 @@ -package spec +package common import ( "encoding/json" @@ -36,7 +36,7 @@ func (n ACFullname) LatestVersion() (string, error) { return "", errors.Annotate(err, "Latest discovery fail") } - r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)(\-[\dA-Za-z]+){0,1}$`) + r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)(\-[\dA-Za-z]+){0,1}$`) // TODO this is nexus specific url := getRedirectForLatest(endpoint.ACIEndpoints[0].ACI) logs.WithField("url", url).Debug("latest verion url") diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go new file mode 100644 index 0000000..ccafe41 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go @@ -0,0 +1,9 @@ +package common + +const PATH_IMAGE_ACI = "/image.aci" +const PATH_MANIFEST = "/manifest" +const PATH_ROOTFS = "/rootfs" + +const ENV_ACI_PATH = "ACI_PATH" +const ENV_ACI_TARGET = "ACI_TARGET" +const ENV_LOG_LEVEL = "LOG_LEVEL" diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go new file mode 100644 index 0000000..6d66f16 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go @@ -0,0 +1,49 @@ +package common + +import ( + "bytes" + "github.com/n0rad/go-erlog/logs" + "os" + "os/exec" + "strings" +) + +func ExecCmdGetStdoutAndStderr(head string, parts ...string) (string, string, error) { + var stdout bytes.Buffer + var stderr bytes.Buffer + + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } + cmd := exec.Command(head, parts...) + cmd.Stdout = &stdout + cmd.Stderr = &stderr + cmd.Start() + err := cmd.Wait() + return strings.TrimSpace(stdout.String()), strings.TrimSpace(stderr.String()), err +} + +func ExecCmdGetOutput(head string, parts ...string) (string, error) { + var stdout bytes.Buffer + + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } + cmd := exec.Command(head, parts...) + cmd.Stdout = &stdout + cmd.Stderr = os.Stderr + cmd.Start() + err := cmd.Wait() + return strings.TrimSpace(stdout.String()), err +} + +func ExecCmd(head string, parts ...string) error { + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } + cmd := exec.Command(head, parts...) + cmd.Stdout = os.Stdout + cmd.Stdin = os.Stdin + cmd.Stderr = os.Stderr + return cmd.Run() +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/files.go similarity index 53% rename from Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go rename to Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/files.go index 1a79050..62be1df 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/utils.go +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/files.go @@ -1,75 +1,23 @@ -package utils +package common import ( - "bytes" "fmt" - "github.com/mitchellh/go-homedir" - "github.com/n0rad/go-erlog/logs" "io" - "math/rand" "os" - "os/exec" - "strings" - "time" ) -func UserHomeOrFatal() string { - usr, err := homedir.Dir() +func IsDirEmpty(name string) (bool, error) { + f, err := os.Open(name) if err != nil { - panic(err) + return false, err } - return usr -} - -func ExecCmdGetStdoutAndStderr(head string, parts ...string) (string, string, error) { - var stdout bytes.Buffer - var stderr bytes.Buffer - - if logs.IsDebugEnabled() { - logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") - } - cmd := exec.Command(head, parts...) - cmd.Stdout = &stdout - cmd.Stderr = &stderr - cmd.Start() - err := cmd.Wait() - return strings.TrimSpace(stdout.String()), strings.TrimSpace(stderr.String()), err -} - -func ExecCmdGetOutput(head string, parts ...string) (string, error) { - var stdout bytes.Buffer - - if logs.IsDebugEnabled() { - logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") - } - cmd := exec.Command(head, parts...) - cmd.Stdout = &stdout - cmd.Stderr = os.Stderr - cmd.Start() - err := cmd.Wait() - return strings.TrimSpace(stdout.String()), err -} - -func ExecCmd(head string, parts ...string) error { - if logs.IsDebugEnabled() { - logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") - } - cmd := exec.Command(head, parts...) - cmd.Stdout = os.Stdout - cmd.Stdin = os.Stdin - cmd.Stderr = os.Stderr - return cmd.Run() -} - -var letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") + defer f.Close() -func RandSeq(n int) string { - rand.Seed(time.Now().UnixNano()) - b := make([]rune, n) - for i := range b { - b[i] = letters[rand.Intn(len(letters))] + _, err = f.Readdir(1) + if err == io.EOF { + return true, nil } - return string(b) + return false, err // Either not empty or error, suits both cases } func CopyDir(source string, dest string) (err error) { diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go new file mode 100644 index 0000000..57251af --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go @@ -0,0 +1,61 @@ +package common + +import ( + "github.com/appc/spec/aci" + "github.com/appc/spec/schema" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "io" + "io/ioutil" + "os" + "path/filepath" +) + +func ExtractManifestContentFromAci(aciPath string) ([]byte, error) { + fields := data.WithField("file", aciPath) + input, err := os.Open(aciPath) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot open file") + } + defer input.Close() + + tr, err := aci.NewCompressedTarReader(input) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot open file as tar") + } + +Tar: + for { + hdr, err := tr.Next() + switch err { + case io.EOF: + break Tar + case nil: + if filepath.Clean(hdr.Name) == aci.ManifestFile { + bytes, err := ioutil.ReadAll(tr) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot read manifest content in tar") + } + return bytes, nil + } + default: + return nil, errs.WithEF(err, fields, "error reading tarball file") + } + } + return nil, errs.WithEF(err, fields, "Cannot found manifest in file") +} + +func ExtractManifestFromAci(aciPath string) (*schema.ImageManifest, error) { + fields := data.WithField("file", aciPath) + content, err := ExtractManifestContentFromAci(aciPath) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot extract aci manifest content from file") + } + im := &schema.ImageManifest{} + + err = im.UnmarshalJSON(content) + if err != nil { + return nil, errs.WithEF(err, fields.WithField("content", string(content)), "Cannot unmarshall json content") + } + return im, nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/tar.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/tar.go similarity index 95% rename from Godeps/_workspace/src/github.com/blablacar/cnt/utils/tar.go rename to Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/tar.go index 6c61a9a..feaa23c 100644 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/utils/tar.go +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/tar.go @@ -1,4 +1,4 @@ -package utils +package common func Tar(zip bool, destination string, source ...string) error { zipFlag := "" diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go new file mode 100644 index 0000000..463d170 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go @@ -0,0 +1,116 @@ +package template + +import ( + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/logs" + "io/ioutil" + "os" + "strings" + txttmpl "text/template" +) + +type TemplateDir struct { + fields data.Fields + src string + dst string + partials *txttmpl.Template +} + +func NewTemplateDir(path string, targetRoot string) (*TemplateDir, error) { + fields := data.WithField("dir", path) + logs.WithF(fields).Info("Reading template dir") + tmplDir := &TemplateDir{ + fields: fields, + src: path, + dst: targetRoot, + } + return tmplDir, tmplDir.LoadPartial() +} + +func (t *TemplateDir) LoadPartial() error { + partials := []string{} + + directory, err := os.Open(t.src) + if err != nil { + return errs.WithEF(err, t.fields, "Failed to open template dir") + } + objects, err := directory.Readdir(-1) + if err != nil { + return errs.WithEF(err, t.fields, "Failed to read template dir") + } + for _, obj := range objects { + if !obj.IsDir() && strings.HasSuffix(obj.Name(), ".partial") { + partials = append(partials, t.src+"/"+obj.Name()) + } + } + + if len(partials) == 0 { + return nil + } + var tmpl *txttmpl.Template + for _, partial := range partials { + if tmpl == nil { + tmpl = txttmpl.New(partial) + } else { + tmpl = tmpl.New(partial) + } + + content, err := ioutil.ReadFile(partial) + if err != nil { + return errs.WithEF(err, t.fields.WithField("partial", partial), "Cannot read partial file") + } + tmpl, err = tmpl.Funcs(TemplateFunctions).Parse(CleanupOfTemplate(string(content))) + if err != nil { + return errs.WithEF(err, t.fields.WithField("partial", partial), "Failed to parse partial") + } + } + t.partials = tmpl + return nil +} + +func (t *TemplateDir) Process(attributes map[string]interface{}) error { + if err := t.processSingleDir(t.src, t.dst, attributes); err != nil { + return err + } + return nil +} + +func (t *TemplateDir) processSingleDir(src string, dst string, attributes map[string]interface{}) error { + sourceInfo, err := os.Stat(src) + if err != nil { + return errs.WithEF(err, t.fields, "Cannot read source dir stat") + } + + if err := os.MkdirAll(dst, sourceInfo.Mode()); err != nil { + return errs.WithEF(err, t.fields, "Cannot create target directory templates") + } + + directory, err := os.Open(src) + if err != nil { + return errs.WithEF(err, t.fields, "Cannot open directory") + } + objects, err := directory.Readdir(-1) + if err != nil { + return errs.WithEF(err, t.fields, "Cannot list files in directory") + } + for _, obj := range objects { + srcObj := src + "/" + obj.Name() + dstObj := dst + "/" + obj.Name() + if obj.IsDir() { + if err := t.processSingleDir(srcObj, dstObj, attributes); err != nil { + return err + } + } else if strings.HasSuffix(obj.Name(), ".tmpl") { + dstObj := dstObj[:len(dstObj)-5] + template, err := NewTemplateFile(t.partials, srcObj, obj.Mode()) + if err != nil { + return err + } + if err := template.runTemplate(dstObj, attributes); err != nil { + return err + } + } + } + return nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go new file mode 100644 index 0000000..65cd200 --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go @@ -0,0 +1,130 @@ +package template + +import ( + "bufio" + "bytes" + "github.com/blablacar/dgr/bin-dgr/common" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/logs" + "gopkg.in/yaml.v2" + "io/ioutil" + "os" + txttmpl "text/template" +) + +type TemplateFile struct { + Uid int `yaml:"uid"` + Gid int `yaml:"gid"` + CheckCmd string `yaml:"checkCmd"` + + fields data.Fields + Mode os.FileMode + template *Templating +} + +func NewTemplateFile(partials *txttmpl.Template, src string, mode os.FileMode) (*TemplateFile, error) { + fields := data.WithField("src", src) + + content, err := ioutil.ReadFile(src) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot read template file") + } + + template, err := NewTemplating(partials, src, string(content)) + if err != nil { + return nil, errs.WithEF(err, fields, "Failed to prepare template") + } + + t := &TemplateFile{ + Uid: 0, + Gid: 0, + fields: fields, + template: template, + Mode: mode, + } + err = t.loadTemplateConfig(src) + logs.WithF(fields).WithField("data", t).Trace("Template loaded") + return t, err +} + +func (t *TemplateFile) loadTemplateConfig(src string) error { + cfgPath := src + EXT_CFG + if _, err := os.Stat(cfgPath); os.IsNotExist(err) { + return nil + } + + source, err := ioutil.ReadFile(cfgPath) + if err != nil { + return err + } + err = yaml.Unmarshal([]byte(source), t) + if err != nil { + return errs.WithEF(err, data.WithField("name", src), "Cannot unmarshall cfg") + } + return nil +} + +//template.ExecuteTemplate(os.Stdout, "login", data) + +func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{}) error { + if logs.IsTraceEnabled() { + logs.WithF(f.fields).WithField("attributes", attributes).Trace("templating with attributes") + } + fields := f.fields.WithField("dst", dst) + + logs.WithF(fields).Info("Templating file") + + out, err := os.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, f.Mode) + if err != nil { + return errs.WithEF(err, fields, "Cannot open destination file") + } + defer func() { out.Close() }() + + buff := bytes.Buffer{} + writer := bufio.NewWriter(&buff) + if err := f.template.Execute(writer, attributes); err != nil { + return errs.WithEF(err, fields, "Templating execution failed") + } + + if err := writer.Flush(); err != nil { + return errs.WithEF(err, fields, "Failed to flush buffer") + } + buff.WriteByte('\n') + + b := buff.Bytes() + + if logs.IsTraceEnabled() { + logs.WithF(f.fields).WithField("result", string(b)).Trace("templating done") + } + + scanner := bufio.NewScanner(bytes.NewReader(b)) // TODO this sux + scanner.Split(bufio.ScanLines) + for i := 1; scanner.Scan(); i++ { + text := scanner.Text() + if bytes.Contains([]byte(text), []byte("<no value>")) { + return errs.WithF(fields.WithField("line", i).WithField("text", text), "Templating result have <no value>") + } + } + + if length, err := out.Write(b); length != len(b) || err != nil { + return errs.WithEF(err, fields, "Write to file failed") + } + + if err = out.Sync(); err != nil { + return errs.WithEF(err, fields, "Failed to sync output file") + } + if err = os.Chmod(dst, f.Mode); err != nil { + return errs.WithEF(err, fields.WithField("file", dst), "Failed to set mode on file") + } + if err = os.Chown(dst, f.Uid, f.Gid); err != nil { + return errs.WithEF(err, fields.WithField("file", dst), "Failed to set owner of file") + } + + if f.CheckCmd != "" { + if err = common.ExecCmd("/dgr/bin/busybox", "sh", "-c", f.CheckCmd); err != nil { + return errs.WithEF(err, fields.WithField("file", dst), "Check command failed after templating") + } + } + return nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go new file mode 100644 index 0000000..5a0ca1e --- /dev/null +++ b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go @@ -0,0 +1,136 @@ +package template + +import ( + "bufio" + "encoding/json" + "github.com/leekchan/gtf" + "io" + "os" + "path" + "strings" + txttmpl "text/template" + "time" +) + +type Templating struct { + template *txttmpl.Template + name string + content string + functions map[string]interface{} +} + +const EXT_CFG = ".cfg" + +var TemplateFunctions map[string]interface{} + +func NewTemplating(partials *txttmpl.Template, filePath, content string) (*Templating, error) { + t := Templating{ + name: filePath, + content: CleanupOfTemplate(content), + functions: TemplateFunctions, + } + if partials == nil { + partials = txttmpl.New(t.name) + } + + tmpl, err := partials.New(t.name).Funcs(t.functions).Funcs(map[string]interface{}(gtf.GtfFuncMap)).Parse(t.content) + t.template = tmpl + return &t, err +} + +func CleanupOfTemplate(content string) string { + var lines []string + var currentLine string + scanner := bufio.NewScanner(strings.NewReader(string(content))) + for scanner.Scan() { + part := strings.TrimRight(scanner.Text(), " ") + leftTrim := strings.TrimLeft(part, " ") + if strings.HasPrefix(leftTrim, "{{-") { + part = "{{" + leftTrim[3:] + } + currentLine += part + if strings.HasSuffix(currentLine, "-}}") { + currentLine = currentLine[0:len(currentLine)-3] + "}}" + } else { + lines = append(lines, currentLine) + currentLine = "" + } + } + if currentLine != "" { + lines = append(lines, currentLine) + } + return strings.Join(lines, "\n") +} + +func (t *Templating) Execute(wr io.Writer, data interface{}) error { + return t.template.Execute(wr, data) +} + +func (t *Templating) AddFunction(name string, fn interface{}) { + t.functions[name] = fn +} + +func (t *Templating) AddFunctions(fs map[string]interface{}) { + addFuncs(t.functions, fs) +} + +/////////////////////////////////// + +func ifOrDef(eif interface{}, yes interface{}, no interface{}) interface{} { + if eif != nil { + return yes + } + return no +} + +func orDef(val interface{}, def interface{}) interface{} { + if val != nil { + return val + } + return def +} + +func orDefs(val []interface{}, def interface{}) interface{} { + if val != nil && len(val) != 0 { + return val + } + return []interface{}{def} +} + +func addFuncs(out, in map[string]interface{}) { + for name, fn := range in { + out[name] = fn + } +} + +func UnmarshalJsonObject(data string) (map[string]interface{}, error) { + var ret map[string]interface{} + err := json.Unmarshal([]byte(data), &ret) + return ret, err +} + +func UnmarshalJsonArray(data string) ([]interface{}, error) { + var ret []interface{} + err := json.Unmarshal([]byte(data), &ret) + return ret, err +} + +func init() { + TemplateFunctions = make(map[string]interface{}) + TemplateFunctions["base"] = path.Base + TemplateFunctions["split"] = strings.Split + TemplateFunctions["json"] = UnmarshalJsonObject + TemplateFunctions["jsonArray"] = UnmarshalJsonArray + TemplateFunctions["dir"] = path.Dir + TemplateFunctions["getenv"] = os.Getenv + TemplateFunctions["join"] = strings.Join + TemplateFunctions["datetime"] = time.Now + TemplateFunctions["toUpper"] = strings.ToUpper + TemplateFunctions["toLower"] = strings.ToLower + TemplateFunctions["contains"] = strings.Contains + TemplateFunctions["replace"] = strings.Replace + TemplateFunctions["orDef"] = orDef + TemplateFunctions["orDefs"] = orDefs + TemplateFunctions["ifOrDef"] = ifOrDef + +} diff --git a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/.travis.yml b/Godeps/_workspace/src/github.com/kelseyhightower/memkv/.travis.yml deleted file mode 100644 index 98b4346..0000000 --- a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: go - -go: - - 1.3 - - tip diff --git a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/README.md b/Godeps/_workspace/src/github.com/kelseyhightower/memkv/README.md deleted file mode 100644 index 9cba2b8..0000000 --- a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# memkv - -Simple in memory k/v store. - -[![Build Status](https://travis-ci.org/kelseyhightower/memkv.svg)](https://travis-ci.org/kelseyhightower/memkv) [![GoDoc](https://godoc.org/github.com/kelseyhightower/memkv?status.png)](https://godoc.org/github.com/kelseyhightower/memkv) - -## Usage - -```Go -package main - -import ( - "fmt" - "log" - - "github.com/kelseyhightower/memkv" -) - -func main() { - s := memkv.New() - s.Set("/myapp/database/username", "admin") - s.Set("/myapp/database/password", "123456789") - s.Set("/myapp/port", "80") - kv, err := s.Get("/myapp/database/username") - if err != nil { - log.Fatal(err) - } - fmt.Printf("Key: %s, Value: %s\n", kv.Key, kv.Value) - ks, err := s.GetAll("/myapp/*/*") - if err == nil { - for _, kv := range ks { - fmt.Printf("Key: %s, Value: %s\n", kv.Key, kv.Value) - } - } -} -``` - ---- - -``` -Key: /myapp/database/username, Value: admin -Key: /myapp/database/password, Value: 123456789 -Key: /myapp/database/username, Value: admin -``` diff --git a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/kvpair.go b/Godeps/_workspace/src/github.com/kelseyhightower/memkv/kvpair.go deleted file mode 100644 index b717a2e..0000000 --- a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/kvpair.go +++ /dev/null @@ -1,20 +0,0 @@ -package memkv - -type KVPair struct { - Key string - Value string -} - -type KVPairs []KVPair - -func (ks KVPairs) Len() int { - return len(ks) -} - -func (ks KVPairs) Less(i, j int) bool { - return ks[i].Key < ks[j].Key -} - -func (ks KVPairs) Swap(i, j int) { - ks[i], ks[j] = ks[j], ks[i] -} diff --git a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/store.go b/Godeps/_workspace/src/github.com/kelseyhightower/memkv/store.go deleted file mode 100644 index ea49be3..0000000 --- a/Godeps/_workspace/src/github.com/kelseyhightower/memkv/store.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2014 Kelsey Hightower. All rights reserved. -// Use of this source code is governed by a BSD-style -// license found in the LICENSE file. - -// Package memkv implements an in-memory key/value store. -package memkv - -import ( - "errors" - "path" - "path/filepath" - "sort" - "strings" - "sync" -) - -var ErrNotExist = errors.New("key does not exist") -var ErrNoMatch = errors.New("no keys match") - -// A Store represents an in-memory key-value store safe for -// concurrent access. -type Store struct { - FuncMap map[string]interface{} - sync.RWMutex - m map[string]KVPair -} - -// New creates and initializes a new Store. -func New() Store { - s := Store{m: make(map[string]KVPair)} - s.FuncMap = map[string]interface{}{ - "exists": s.Exists, - "ls": s.List, - "lsdir": s.ListDir, - "get": s.Get, - "gets": s.GetAll, - "getv": s.GetValue, - "getvs": s.GetAllValues, - } - return s -} - -// Delete deletes the KVPair associated with key. -func (s Store) Del(key string) { - s.Lock() - delete(s.m, key) - s.Unlock() -} - -// Exists checks for the existence of key in the store. -func (s Store) Exists(key string) bool { - _, err := s.Get(key) - if err != nil { - return false - } - return true -} - -// Get gets the KVPair associated with key. If there is no KVPair -// associated with key, Get returns KVPair{}, ErrNotExist. -func (s Store) Get(key string) (KVPair, error) { - s.RLock() - kv, ok := s.m[key] - s.RUnlock() - if !ok { - return kv, ErrNotExist - } - return kv, nil -} - -// GetValue gets the value associated with key. If there are no values -// associated with key, GetValue returns "", ErrNotExist. -func (s Store) GetValue(key string) (string, error) { - kv, err := s.Get(key) - if err != nil { - return "", err - } - return kv.Value, nil -} - -// GetAll returns a KVPair for all nodes with keys matching pattern. -// The syntax of patterns is the same as in filepath.Match. -func (s Store) GetAll(pattern string) (KVPairs, error) { - ks := make(KVPairs, 0) - s.RLock() - defer s.RUnlock() - for _, kv := range s.m { - m, err := filepath.Match(pattern, kv.Key) - if err != nil { - return nil, err - } - if m { - ks = append(ks, kv) - } - } - if len(ks) == 0 { - return ks, nil - } - sort.Sort(ks) - return ks, nil -} - -func (s Store) GetAllValues(pattern string) ([]string, error) { - vs := make([]string, 0) - ks, err := s.GetAll(pattern) - if err != nil { - return vs, err - } - if len(ks) == 0 { - return vs, nil - } - for _, kv := range ks { - vs = append(vs, kv.Value) - } - sort.Strings(vs) - return vs, nil -} - -func (s Store) List(filePath string) []string { - vs := make([]string, 0) - m := make(map[string]bool) - s.RLock() - defer s.RUnlock() - for _, kv := range s.m { - if kv.Key == filePath { - m[path.Base(kv.Key)] = true - continue - } - if strings.HasPrefix(kv.Key, filePath) { - m[strings.Split(stripKey(kv.Key, filePath), "/")[0]] = true - } - } - for k := range m { - vs = append(vs, k) - } - sort.Strings(vs) - return vs -} - -func (s Store) ListDir(filePath string) []string { - vs := make([]string, 0) - m := make(map[string]bool) - s.RLock() - defer s.RUnlock() - for _, kv := range s.m { - if strings.HasPrefix(kv.Key, filePath) { - items := strings.Split(stripKey(kv.Key, filePath), "/") - if len(items) < 2 { - continue - } - m[items[0]] = true - } - } - for k := range m { - vs = append(vs, k) - } - sort.Strings(vs) - return vs -} - -// Set sets the KVPair entry associated with key to value. -func (s Store) Set(key string, value string) { - s.Lock() - s.m[key] = KVPair{key, value} - s.Unlock() -} - -func (s Store) Purge() { - s.Lock() - for k := range s.m { - delete(s.m, k) - } - s.Unlock() -} - -func stripKey(key, prefix string) string { - return strings.TrimPrefix(strings.TrimPrefix(key, prefix), "/") -} diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/.gitignore b/Godeps/_workspace/src/github.com/leekchan/gtf/.gitignore new file mode 100644 index 0000000..daf913b --- /dev/null +++ b/Godeps/_workspace/src/github.com/leekchan/gtf/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/.travis.yml b/Godeps/_workspace/src/github.com/leekchan/gtf/.travis.yml new file mode 100644 index 0000000..bbd90ac --- /dev/null +++ b/Godeps/_workspace/src/github.com/leekchan/gtf/.travis.yml @@ -0,0 +1,9 @@ +language: go +go: + - tip +before_install: + - go get github.com/axw/gocov/gocov + - go get github.com/mattn/goveralls + - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi +script: + - $HOME/gopath/bin/goveralls -service=travis-ci \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE b/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE new file mode 100644 index 0000000..244f4d8 --- /dev/null +++ b/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Kyoung-chan Lee (leekchan@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/README.md b/Godeps/_workspace/src/github.com/leekchan/gtf/README.md new file mode 100644 index 0000000..5f49fc7 --- /dev/null +++ b/Godeps/_workspace/src/github.com/leekchan/gtf/README.md @@ -0,0 +1,711 @@ +# gtf - a useful set of Golang Template Functions +[![Build Status](https://travis-ci.org/leekchan/gtf.svg?branch=master)](https://travis-ci.org/leekchan/gtf) +[![Coverage Status](https://coveralls.io/repos/leekchan/gtf/badge.svg?branch=master&service=github)](https://coveralls.io/github/leekchan/gtf?branch=master) +[![GoDoc](https://godoc.org/github.com/leekchan/gtf?status.svg)](https://godoc.org/github.com/leekchan/gtf) + +gtf is a useful set of Golang Template Functions. The goal of this project is implementing all built-in template filters of Django & Jinja2. + +## Basic usages + +### Method 1 : Uses gtf.New + +gtf.New is a wrapper function of [template.New](http://golang.org/pkg/text/template/#New). It automatically adds the gtf functions to the template's function map and returns [template.Template](http://golang.org/pkg/text/template/#Template). + +```Go +package main + +import ( + "net/http" + "github.com/leekchan/gtf" +) + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + filesize := 554832114 + tpl, _ := gtf.New("test").Parse("{{ . | filesizeformat }}") + tpl.Execute(w, filesize) + }) + http.ListenAndServe(":8080", nil) +} +``` + +### Method 2 : Adds gtf functions to the existing template. + +You can also add the gtf functions to the existing template. Just call ".Funcs(gtf.GtfFuncMap)". + +```Go +package main + +import ( + "net/http" + "html/template" + "github.com/leekchan/gtf" +) + +func main() { + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + filesize := 554832114 + tpl, _ := template.New("test").Funcs(gtf.GtfFuncMap).Parse("{{ . | filesizeformat }}") + tpl.Execute(w, filesize) + }) + http.ListenAndServe(":8080", nil) +} +``` + + +## Integration + +You can use gtf with any web frameworks (revel, beego, martini, gin, etc) which use the Golang's built-in [html/template package](http://golang.org/pkg/html/template/). + + +### Injection + +You can inject gtf functions into your webframework's original FuncMap by calling "gtf.Inject" / "gtf.ForceInject" / "gtf.InjectWithPrefix". + +#### gtf.Inject + +gtf.Inject injects gtf functions into the passed FuncMap. It does not overwrite the original function which have same name as a gtf function. + +```Go +Inject(originalFuncMap) +``` + +#### gtf.ForceInject + +gtf.ForceInject injects gtf functions into the passed FuncMap. It overwrites the original function which have same name as a gtf function. + +```Go +ForceInject(originalFuncMap) +``` + + +#### gtf.InjectWithPrefix + +gtf.Inject injects gtf functions into the passed FuncMap. It prefixes the gtf functions with the specified prefix. If there are many function which have same names as the gtf functions, you can use this function to prefix the gtf functions. + + +```Go +InjectWithPrefix(originalFuncMap, "gtf_") // prefix : gtf_ +``` + + +### [Revel](http://revel.github.io/) integration + +Calling "gtf.Inject(revel.TemplateFuncs)" injects gtf functions into revel.TemplateFuncs. Just add this one line in init() of init.go, and use gtf functions in your templates! :) + +```Go +// init.go + +package app + +import "github.com/revel/revel" +import "github.com/leekchan/gtf" + +func init() { + gtf.Inject(revel.TemplateFuncs) +} +``` + + +### [Beego](http://beego.me/) integration + +Add these three lines before "beego.Run()" in your main() function. This code snippet will inject gtf functions into beego's FuncMap. + +```Go +for k, v := range gtf.GtfFuncMap { + beego.AddFuncMap(k, v) +} +``` + +**Full example:** + +```Go +package main + +import ( + "github.com/astaxie/beego" + "github.com/beego/i18n" + + "github.com/beego/samples/WebIM/controllers" + + "github.com/leekchan/gtf" +) + +const ( + APP_VER = "0.1.1.0227" +) + +func main() { + beego.Info(beego.AppName, APP_VER) + + // Register routers. + beego.Router("/", &controllers.AppController{}) + // Indicate AppController.Join method to handle POST requests. + beego.Router("/join", &controllers.AppController{}, "post:Join") + + // Long polling. + beego.Router("/lp", &controllers.LongPollingController{}, "get:Join") + beego.Router("/lp/post", &controllers.LongPollingController{}) + beego.Router("/lp/fetch", &controllers.LongPollingController{}, "get:Fetch") + + // WebSocket. + beego.Router("/ws", &controllers.WebSocketController{}) + beego.Router("/ws/join", &controllers.WebSocketController{}, "get:Join") + + // Register template functions. + beego.AddFuncMap("i18n", i18n.Tr) + + // Register gtf functions. + for k, v := range gtf.GtfFuncMap { + beego.AddFuncMap(k, v) + } + + beego.Run() +} +``` + + +### Other web frameworks (TODO) + +I will add the detailed integration guides for other web frameworks soon! + + +## Safety +All gtf functions have their own recovery logics. The basic behavior of the recovery logic is silently swallowing all unexpected panics. All gtf functions would not make any panics in runtime. (**Production Ready!**) + +If a panic occurs inside a gtf function, the function will silently swallow the panic and return "" (empty string). If you meet any unexpected empty output, [please make an issue](https://github.com/leekchan/gtf/issues/new)! :) + + + +## Reference + +### Index + +* [replace](#replace) +* [default](#default) +* [length](#length) +* [lower](#lower) +* [upper](#upper) +* [truncatechars](#truncatechars) +* [urlencode](#urlencode) +* [wordcount](#wordcount) +* [divisibleby](#divisibleby) +* [lengthis](#lengthis) +* [trim](#trim) +* [capfirst](#capfirst) +* [pluralize](#pluralize) +* [yesno](#yesno) +* [rjust](#rjust) +* [ljust](#ljust) +* [center](#center) +* [filesizeformat](#filesizeformat) +* [apnumber](#apnumber) +* [intcomma](#intcomma) +* [ordinal](#ordinal) +* [first](#first) +* [last](#last) +* [join](#join) +* [slice](#slice) +* [random](#random) +* [striptags](#striptags) + + + +#### replace + +Removes all values of arg from the given string. + +* supported value types : string +* supported argument types : string + +``` +{{ value | replace " " }} +``` +If value is "The Go Programming Language", the output will be "TheGoProgrammingLanguage". + + + +#### default + +1. If the given string is ""(empty string), uses the given default argument. +1. If the given array/slice/map is empty, uses the given default argument. +1. If the given boolean value is false, uses the given default argument. + +* supported value types : string, array, slice, map, boolean +* supported argument types : all + +``` +{{ value | default "default value" }} +``` +If value is ""(the empty string), the output will be "default value". + + + +#### length + +Returns the length of the given string/array/slice/map. + +* supported value types : string, array, slice, map + +This function also supports unicode strings. + +``` +{{ value | length }} +``` +If value is "The Go Programming Language", the output will be 27. + + + +#### lower + +Converts the given string into all lowercase. + +* supported value types : string + +``` +{{ value | lower }} +``` +If value is "The Go Programming Language", the output will be "the go programming language". + + + +#### upper + +Converts the given string into all uppercase. + +* supported value types : string + +``` +{{ value | upper }} +``` +If value is "The Go Programming Language", the output will be "THE GO PROGRAMMING LANGUAGE". + + + +#### truncatechars + +Truncates the given string if it is longer than the specified number of characters. Truncated strings will end with a translatable ellipsis sequence ("...") + +* supported value types : string + +**Argument:** Number of characters to truncate to + +This function also supports unicode strings. + +``` +{{ value | truncatechars 12 }} +``` + +**Examples** + +1. If input is {{ "The Go Programming Language" | truncatechars 12 }}, the output will be "The Go Pr...". (basic string) +1. If input is {{ "안녕하세요. 반갑습니다." | truncatechars 12 }}, the output will be "안녕하세요. 반갑...". (unicode) +1. If input is {{ "안녕하세요. The Go Programming Language" | truncatechars 30 }}, the output will be "안녕하세요. The Go Programming L...". (unicode) +1. If input is {{ "The" | truncatechars 30 }}, the output will be "The". (If the length of the given string is shorter than the argument, the output will be the original string.) +1. If input is {{ "The Go Programming Language" | truncatechars 3 }}, the output will be "The". (If the argument is less than or equal to 3, the output will not contain "...".) +1. If input is {{ "The Go" | truncatechars -1 }}, the output will be "The Go". (If the argument is less than 0, the argument will be ignored.) + + + +#### urlencode + +Escapes the given string for use in a URL. + +* supported value types : string + +``` +{{ value | urlencode }} +``` + +If value is "http://www.example.org/foo?a=b&c=d", the output will be "http%3A%2F%2Fwww.example.org%2Ffoo%3Fa%3Db%26c%3Dd". + + + +#### wordcount + +Returns the number of words. + +* supported value types : string + +``` +{{ value | wordcount }} +``` + +If value is "The Go Programming Language", the output will be 4. + + + +#### divisibleby + +Returns true if the value is divisible by the argument. + +* supported value types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64 +* supported argument types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64 + +``` +{{ value | divisibleby 3 }} +``` + +**Examples** + +1. If input is {{ 21 | divisibleby 3 }}, the output will be true. +1. If input is {{ 21 | divisibleby 4 }}, the output will be false. +1. If input is {{ 3.0 | divisibleby 1.5 }}, the output will be true. + + + +#### lengthis + +Returns true if the value's length is the argument, or false otherwise. + +* supported value types : string, array, slice, map +* supported argument types : int + +``` +{{ value | lengthis 3 }} +``` + +This function also supports unicode strings. + +**Examples** + +1. If input is {{ "Go" | lengthis 2 }}, the output will be true. +1. If input is {{ "안녕하세요. Go!" | lengthis 10 }}, the output will be true. + + + +#### trim + +Strips leading and trailing whitespace. + +* supported value types : string + +``` +{{ value | trim }} +``` + + + +#### capfirst + +Capitalizes the first character of the given string. + +* supported value types : string + +``` +{{ value | capfirst }} +``` + +If value is "the go programming language", the output will be "The go programming language". + + + +#### pluralize + +Returns a plural suffix if the value is not 1. You can specify both a singular and plural suffix, separated by a comma. + +**Argument:** singular and plural suffix. + +1. "s" --> specify a singular suffix. +2. "y,ies" --> specify both a singular and plural suffix. + +* supported value types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 +* supported argument types : string + +``` +{{ value | pluralize "s" }} +{{ value | pluralize "y,ies" }} +``` + +**Examples** + +1. You have 0 message{{ 0 | pluralize "s" }} --> You have 0 messages +2. You have 1 message{{ 1 | pluralize "s" }} --> You have 1 message +3. 0 cand{{ 0 | pluralize "y,ies" }} --> 0 candies +4. 1 cand{{ 1 | pluralize "y,ies" }} --> 1 candy +5. 2 cand{{ 2 | pluralize "y,ies" }} --> 2 candies + + + +#### yesno + +Returns argument strings according to the given boolean value. + +* supported value types : boolean +* supported argument types : string + +**Argument:** any value for true and false + +``` +{{ value | yesno "yes!" "no!" }} +``` + + +#### rjust + +Right-aligns the given string in a field of a given width. This function also supports unicode strings. + +* supported value types : string + +``` +{{ value | rjust 10 }} +``` + +**Examples** + +1. If input is {{ "Go" | rjust 10 }}, the output will be "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Go". +1. If input is {{ "안녕하세요" | rjust 10 }}, the output will be "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;안녕하세요". + + + +#### ljust + +Left-aligns the given string in a field of a given width. This function also supports unicode strings. + +* supported value types : string + +``` +{{ value | ljust 10 }} +``` + +**Examples** + +1. If input is {{ "Go" | ljust 10 }}, the output will be "Go&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;". +1. If input is {{ "안녕하세요" | ljust 10 }}, the output will be "안녕하세요&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;". + + + +#### center + +Centers the given string in a field of a given width. This function also supports unicode strings. + +* supported value types : string + +``` +{{ value | center 10 }} +``` + +**Examples** + +1. If input is {{ "Go" | center 10 }}, the output will be "&nbsp;&nbsp;&nbsp;&nbsp;Go&nbsp;&nbsp;&nbsp;&nbsp;". +1. If input is {{ "안녕하세요" | center 10 }}, the output will be "&nbsp;&nbsp;안녕하세요&nbsp;&nbsp;&nbsp;". + + + +#### filesizeformat + +Formats the value like a human readable file size. + +* supported value types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64 + +``` +{{ value | filesizeformat }} +``` + +**Examples** + +1. {{ 234 | filesizeformat }} --> "234 bytes" +1. {{ 12345 | filesizeformat }} --> "12.1 KB" +1. {{ 12345.35335 | filesizeformat }} --> "12.1 KB" +1. {{ 1048576 | filesizeformat } --> "1 MB" +1. {{ 554832114 | filesizeformat }} --> "529.1 MB" +1. {{ 14868735121 | filesizeformat }} --> "13.8 GB" +1. {{ 14868735121365 | filesizeformat }} --> "13.5 TB" +1. {{ 1486873512136523 | filesizeformat }} --> "1.3 PB" + + + +#### apnumber + +For numbers 1-9, returns the number spelled out. Otherwise, returns the number. + +* supported value types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 + +``` +{{ value | apnumber }} +``` + +**Examples** + +1. {{ 1 | apnumber }} --> one +1. {{ 2 | apnumber }} --> two +1. {{ 3 | apnumber }} --> three +1. {{ 9 | apnumber }} --> nine +1. {{ 10 | apnumber }} --> 10 +1. {{ 1000 | apnumber }} --> 1000 + + + +#### intcomma + +Converts an integer to a string containing commas every three digits. + +* supported value types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 + +``` +{{ value | intcomma }} +``` + +**Examples** + +1. {{ 1000 | intcomma }} --> 1,000 +1. {{ -1000 | intcomma }} --> -1,000 +1. {{ 1578652313 | intcomma }} --> 1,578,652,313 + + + +#### ordinal + +Converts an integer to its ordinal as a string. + +* supported value types : int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 + +``` +{{ value | ordinal }} +``` + +**Examples** + +1. {{ 1 | ordinal }} --> 1st +1. {{ 2 | ordinal }} --> 2nd +1. {{ 3 | ordinal }} --> 3rd +1. {{ 11 | ordinal }} --> 11th +1. {{ 12 | ordinal }} --> 12th +1. {{ 13 | ordinal }} --> 13th +1. {{ 14 | ordinal }} --> 14th + + + +#### first + +Returns the first item in the given value. + +* supported value types : string, slice, array + +This function also supports unicode strings. + +``` +{{ value | first }} +``` + +**Examples** + +1. If value is the string "The go programming language", the output will be the string "T". +1. If value is the string "안녕하세요", the output will be the string "안". (unicode) +1. If value is the slice []string{"go", "python", "ruby"}, the output will be the string "go". +1. If value is the array [3]string{"go", "python", "ruby"}, the output will be the string "go". + + + +#### last + +Returns the last item in the given value. + +* supported value types : string, slice, array + +This function also supports unicode strings. + +``` +{{ value | last }} +``` + +**Examples** + +1. If value is the string "The go programming language", the output will be the string "e". +1. If value is the string "안녕하세요", the output will be the string "요". (unicode) +1. If value is the slice []string{"go", "python", "ruby"}, the output will be the string "ruby". +1. If value is the array [3]string{"go", "python", "ruby"}, the output will be the string "ruby". + + + + +#### join + +Concatenates the given slice to create a single string. The given argument (separator) will be placed between elements in the resulting string. + +``` +{{ value | join " " }} +``` + +If value is the slice []string{"go", "python", "ruby"}, the output will be the string "go python ruby" + + + + +#### slice + +Returns a slice of the given value. The first argument is the start position, and the second argument is the end position. + +* supported value types : string, slice +* supported argument types : int + +This function also supports unicode strings. + +``` +{{ value | slice 0 2 }} +``` + +**Examples** + +1. If input is {{ "The go programming language" | slice 0 6 }}, the output will be "The go". +1. If input is {{ "안녕하세요" | slice 0 2 }}, the output will be "안녕". (unicode) +1. If input is {{ []string{"go", "python", "ruby"} | slice 0 2 }}, the output will be []string{"go", "python"}. + + + + +#### random + +Returns a random item from the given value. + +* supported value types : string, slice, array + +This function also supports unicode strings. + +``` +{{ value | random }} +``` + +**Examples** + +1. If input is {{ "The go programming language" | random }}, the output could be "T". +1. If input is {{ "안녕하세요" | random }}, the output could be "안". (unicode) +1. If input is {{ []string{"go", "python", "ruby"} | random }}, the output could be "go". +1. If input is {{ [3]string{"go", "python", "ruby"} | random }}, the output could be "go". + + + + +#### striptags + +Makes all possible efforts to strip all [X]HTML tags from given value. + +* supported value types : string + +This function also supports unicode strings. + +``` +{{ value | striptags }} +``` + +**Examples** + +1. If input is {{ "&lt;strong&gt;text&lt;/strong&gt;" | striptags }}, the output will be "text". +1. If input is {{ "&lt;strong&gt;&lt;em&gt;&#50504;&#45397;&#54616;&#49464;&#50836;&lt;/em&gt;&lt;/strong&gt;" | striptags }}, the output will be "안녕하세요". (unicode) +1. If input is {{ "&lt;a href="/link"&gt;text &lt;strong&gt;&#50504;&#45397;&#54616;&#49464;&#50836;&lt;/strong&gt;&lt;/a&gt;" | striptags }}, the output will be "text 안녕하세요". + + + + + +## Goal +The first goal is implementing all built-in template filters of Django & Jinja2. + +* [Django | Built-in filter reference](https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#built-in-filter-reference) +* [Jinja2 | List of Builtin Filters](http://jinja.pocoo.org/docs/dev/templates/#builtin-filters) + +The final goal is building a ultimate set which contains hundreds of useful template functions. + + +## Contributing +I love pull requests :) You can add any useful template functions by submitting a pull request! diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/gtf.go b/Godeps/_workspace/src/github.com/leekchan/gtf/gtf.go new file mode 100644 index 0000000..836c9ce --- /dev/null +++ b/Godeps/_workspace/src/github.com/leekchan/gtf/gtf.go @@ -0,0 +1,463 @@ +package gtf + +import ( + "fmt" + "html/template" + "math" + "math/rand" + "net/url" + "reflect" + "regexp" + "strings" + "time" +) + +var striptagsRegexp = regexp.MustCompile("<[^>]*?>") + +// recovery will silently swallow all unexpected panics. +func recovery() { + recover() +} + +var GtfFuncMap = template.FuncMap{ + "replace": func(s1 string, s2 string) string { + defer recovery() + + return strings.Replace(s2, s1, "", -1) + }, + "default": func(arg interface{}, value interface{}) interface{} { + defer recovery() + + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.String, reflect.Slice, reflect.Array, reflect.Map: + if v.Len() == 0 { + return arg + } + case reflect.Bool: + if !v.Bool() { + return arg + } + default: + return value + } + + return value + }, + "length": func(value interface{}) int { + defer recovery() + + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.Slice, reflect.Array, reflect.Map: + return v.Len() + case reflect.String: + return len([]rune(v.String())) + } + + return 0 + }, + "lower": func(s string) string { + defer recovery() + + return strings.ToLower(s) + }, + "upper": func(s string) string { + defer recovery() + + return strings.ToUpper(s) + }, + "truncatechars": func(n int, s string) string { + defer recovery() + + if n < 0 { + return s + } + + r := []rune(s) + rLength := len(r) + + if n >= rLength { + return s + } + + if n > 3 && rLength > 3 { + return string(r[:n-3]) + "..." + } + + return string(r[:n]) + }, + "urlencode": func(s string) string { + defer recovery() + + return url.QueryEscape(s) + }, + "wordcount": func(s string) int { + defer recovery() + + return len(strings.Fields(s)) + }, + "divisibleby": func(arg interface{}, value interface{}) bool { + defer recovery() + + var v float64 + switch value.(type) { + case int, int8, int16, int32, int64: + v = float64(reflect.ValueOf(value).Int()) + case uint, uint8, uint16, uint32, uint64: + v = float64(reflect.ValueOf(value).Uint()) + case float32, float64: + v = reflect.ValueOf(value).Float() + default: + return false + } + + var a float64 + switch arg.(type) { + case int, int8, int16, int32, int64: + a = float64(reflect.ValueOf(arg).Int()) + case uint, uint8, uint16, uint32, uint64: + a = float64(reflect.ValueOf(arg).Uint()) + case float32, float64: + a = reflect.ValueOf(arg).Float() + default: + return false + } + + return math.Mod(v, a) == 0 + }, + "lengthis": func(arg int, value interface{}) bool { + defer recovery() + + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.Slice, reflect.Array, reflect.Map: + return v.Len() == arg + case reflect.String: + return len([]rune(v.String())) == arg + } + + return false + }, + "trim": func(s string) string { + defer recovery() + + return strings.TrimSpace(s) + }, + "capfirst": func(s string) string { + defer recovery() + + return strings.ToUpper(string(s[0])) + s[1:] + }, + "pluralize": func(arg string, value interface{}) string { + defer recovery() + + flag := false + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + flag = v.Int() == 1 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + flag = v.Uint() == 1 + default: + return "" + } + + if !strings.Contains(arg, ",") { + arg = "," + arg + } + + bits := strings.Split(arg, ",") + + if len(bits) > 2 { + return "" + } + + if flag { + return bits[0] + } + + return bits[1] + }, + "yesno": func(yes string, no string, value bool) string { + defer recovery() + + if value { + return yes + } + + return no + }, + "rjust": func(arg int, value string) string { + defer recovery() + + n := arg - len([]rune(value)) + + if n > 0 { + value = strings.Repeat(" ", n) + value + } + + return value + }, + "ljust": func(arg int, value string) string { + defer recovery() + + n := arg - len([]rune(value)) + + if n > 0 { + value = value + strings.Repeat(" ", n) + } + + return value + }, + "center": func(arg int, value string) string { + defer recovery() + + n := arg - len([]rune(value)) + + if n > 0 { + left := n / 2 + right := n - left + value = strings.Repeat(" ", left) + value + strings.Repeat(" ", right) + } + + return value + }, + "filesizeformat": func(value interface{}) string { + defer recovery() + + var size float64 + + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + size = float64(v.Int()) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + size = float64(v.Uint()) + case reflect.Float32, reflect.Float64: + size = v.Float() + default: + return "" + } + + var KB float64 = 1 << 10 + var MB float64 = 1 << 20 + var GB float64 = 1 << 30 + var TB float64 = 1 << 40 + var PB float64 = 1 << 50 + + filesizeFormat := func(filesize float64, suffix string) string { + return strings.Replace(fmt.Sprintf("%.1f %s", filesize, suffix), ".0", "", -1) + } + + var result string + if size < KB { + result = filesizeFormat(size, "bytes") + } else if size < MB { + result = filesizeFormat(size/KB, "KB") + } else if size < GB { + result = filesizeFormat(size/MB, "MB") + } else if size < TB { + result = filesizeFormat(size/GB, "GB") + } else if size < PB { + result = filesizeFormat(size/TB, "TB") + } else { + result = filesizeFormat(size/PB, "PB") + } + + return result + }, + "apnumber": func(value interface{}) interface{} { + defer recovery() + + name := [10]string{"one", "two", "three", "four", "five", + "six", "seven", "eight", "nine"} + + v := reflect.ValueOf(value) + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if v.Int() < 10 { + return name[v.Int()-1] + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + if v.Uint() < 10 { + return name[v.Uint()-1] + } + } + + return value + }, + "intcomma": func(value interface{}) string { + defer recovery() + + v := reflect.ValueOf(value) + + var x uint + minus := false + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if v.Int() < 0 { + minus = true + x = uint(-v.Int()) + } else { + x = uint(v.Int()) + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + x = uint(v.Uint()) + default: + return "" + } + + var result string + for x >= 1000 { + result = fmt.Sprintf(",%03d%s", x%1000, result) + x /= 1000 + } + result = fmt.Sprintf("%d%s", x, result) + + if minus { + result = "-" + result + } + + return result + }, + "ordinal": func(value interface{}) string { + defer recovery() + + v := reflect.ValueOf(value) + + var x uint + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if v.Int() < 0 { + return "" + } + x = uint(v.Int()) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + x = uint(v.Uint()) + default: + return "" + } + + suffixes := [10]string{"th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th"} + + switch x % 100 { + case 11, 12, 13: + return fmt.Sprintf("%d%s", x, suffixes[0]) + } + + return fmt.Sprintf("%d%s", x, suffixes[x%10]) + }, + "first": func(value interface{}) interface{} { + defer recovery() + + v := reflect.ValueOf(value) + + switch v.Kind() { + case reflect.String: + return string([]rune(v.String())[0]) + case reflect.Slice, reflect.Array: + return v.Index(0).Interface() + } + + return "" + }, + "last": func(value interface{}) interface{} { + defer recovery() + + v := reflect.ValueOf(value) + + switch v.Kind() { + case reflect.String: + str := []rune(v.String()) + return string(str[len(str)-1]) + case reflect.Slice, reflect.Array: + return v.Index(v.Len() - 1).Interface() + } + + return "" + }, + "join": func(arg string, value []string) string { + defer recovery() + + return strings.Join(value, arg) + }, + "slice": func(start int, end int, value interface{}) interface{} { + defer recovery() + + v := reflect.ValueOf(value) + + if start < 0 { + start = 0 + } + + switch v.Kind() { + case reflect.String: + str := []rune(v.String()) + + if end > len(str) { + end = len(str) + } + + return string(str[start:end]) + case reflect.Slice: + return v.Slice(start, end).Interface() + } + return "" + }, + "random": func(value interface{}) interface{} { + defer recovery() + + rand.Seed(time.Now().UTC().UnixNano()) + + v := reflect.ValueOf(value) + + switch v.Kind() { + case reflect.String: + str := []rune(v.String()) + return string(str[rand.Intn(len(str))]) + case reflect.Slice, reflect.Array: + return v.Index(rand.Intn(v.Len())).Interface() + } + + return "" + }, + "striptags": func(s string) string { + return strings.TrimSpace(striptagsRegexp.ReplaceAllString(s, "")) + }, +} + +// gtf.New is a wrapper function of template.New(http://golang.org/pkg/text/template/#New). +// It automatically adds the gtf functions to the template's function map +// and returns template.Template(http://golang.org/pkg/text/template/#Template). +func New(name string) *template.Template { + return template.New(name).Funcs(GtfFuncMap) +} + +// gtf.Inject injects gtf functions into the passed FuncMap. +// It does not overwrite the original function which have same name as a gtf function. +func Inject(funcs map[string]interface{}) { + for k, v := range GtfFuncMap { + if _, ok := funcs[k]; !ok { + funcs[k] = v + } + } +} + +// gtf.ForceInject injects gtf functions into the passed FuncMap. +// It overwrites the original function which have same name as a gtf function. +func ForceInject(funcs map[string]interface{}) { + for k, v := range GtfFuncMap { + funcs[k] = v + } +} + +// gtf.Inject injects gtf functions into the passed FuncMap. +// It prefixes the gtf functions with the specified prefix. +// If there are many function which have same names as the gtf functions, +// you can use this function to prefix the gtf functions. +func InjectWithPrefix(funcs map[string]interface{}, prefix string) { + for k, v := range GtfFuncMap { + funcs[prefix+k] = v + } +} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go index 9477b0b..3d9a6ce 100644 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go @@ -13,7 +13,7 @@ type EntryError struct { Fields data.Fields Message string Err error - stack []uintptr + Stack []uintptr frames []StackFrame } @@ -48,7 +48,7 @@ func WithEF(err error, fields data.Fields, msg string) *EntryError { func fill(entry *EntryError) *EntryError { stack := make([]uintptr, MaxStackDepth) length := runtime.Callers(2, stack[:]) - entry.stack = stack[:length] + entry.Stack = stack[:length] return entry } diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go index 1edcac9..72f3c40 100644 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go @@ -4,6 +4,8 @@ import ( "bytes" "fmt" "github.com/mgutz/ansi" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "io" "runtime" @@ -62,8 +64,8 @@ func (f *ErlogWriterAppender) SetLevel(level logs.Level) { } func (f *ErlogWriterAppender) Fire(event *LogEvent) { - keys := f.prepareKeys(event) - time := time.Now().Format("15:04:05") + keys := f.prepareKeys(event.Fields) + time := time.Now().Format("15:04:05") // TODO prepare format ? level := f.textLevel(event.Level) // isColored := isTerminal && (runtime.GOOS != "windows") @@ -88,11 +90,80 @@ func (f *ErlogWriterAppender) Fire(event *LogEvent) { } b.WriteByte('\n') + f.logError(b, event) + // f.mu.Lock() //TODO f.Out.Write(b.Bytes()) // f.mu.Unlock() } +func (f *ErlogWriterAppender) logError(b *bytes.Buffer, event *LogEvent) { + if event.Err == nil { + return + } + + for err := event.Err; err != nil; { + if e, ok := err.(*errs.EntryError); ok { + path, line := findFileAndName(e.Stack) + paths := strings.SplitN(path, "/", pathSkip+1) + fmt.Fprintf(b, " %s%30s:%-3d%s %s%-44s%s", + f.fileColor(event.Level), + f.reduceFilePath(paths[pathSkip], 30), + line, + reset, + f.textColor(event.Level), + e.Message, + reset) + + keys := f.prepareKeys(e.Fields) + for _, k := range keys { + v := e.Fields[k] + fmt.Fprintf(b, " %s%s%s=%+v", lvlColorInfo, k, reset, v) + } + b.WriteByte('\n') + + err = e.Err + } else { + fmt.Fprintf(b, " %s%s%s\n", + f.textColor(event.Level), + err.Error(), + reset) + err = nil + } + } +} + +func findFileAndName(ptrs []uintptr) (string, int) { + var frame errs.StackFrame + for i := 1; i < len(ptrs); i++ { + frame = errs.NewStackFrame(ptrs[i]) + if !strings.Contains(frame.Package, "n0rad/go-erlog") { + break + } + if strings.Contains(frame.Package, "n0rad/go-erlog/examples") { // TODO what to do with that ? + break + } + } + return frame.File, frame.LineNumber +} + +func toLog(err error, level logs.Level) { + if e, ok := err.(*errs.EntryError); ok { + logs.LogEntry(&logs.Entry{ + Message: e.Message, + Fields: e.Fields, + Level: level}) + if e.Err != nil { // TODO this sux + toLog(e.Err, level) + } + } else { + logs.LogEntry(&logs.Entry{ + Message: err.Error(), + Level: level, + }) + } +} + func (f *ErlogWriterAppender) reduceFilePath(path string, max int) string { if len(path) <= max { return path @@ -116,9 +187,9 @@ func (f *ErlogWriterAppender) reduceFilePath(path string, max int) string { return buffer.String() } -func (f *ErlogWriterAppender) prepareKeys(event *LogEvent) []string { - var keys []string = make([]string, 0, len(event.Entry.Fields)) - for k := range event.Entry.Fields { +func (f *ErlogWriterAppender) prepareKeys(fields data.Fields) []string { + var keys []string = make([]string, 0, len(fields)) + for k := range fields { keys = append(keys, k) } sort.Strings(keys) diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go index f01e900..4643109 100644 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go +++ b/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go @@ -7,23 +7,6 @@ import ( "strings" ) -//func toLog(err error, level log.Level) { -// if e, ok := err.(*EntryError); ok { -// log.LogEntry(&log.Entry{ -// Message: e.Message, -// Fields: e.Fields, -// Level: level}) -// if e.Err != nil { // TODO this sux -// toLog(e.Err, level) -// } -// } else { -// log.LogEntry(&log.Entry{ -// Message: err.Error(), -// Level: level, -// }) -// } -//} - type ErlogFactory struct { defaultLog *ErlogLogger logs map[string]*ErlogLogger diff --git a/commands/ggn.go b/commands/ggn.go index f5a8def..48c125c 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -3,7 +3,7 @@ package commands import ( "bufio" "fmt" - "github.com/blablacar/cnt/utils" + "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/work" "github.com/coreos/go-semver/semver" @@ -155,7 +155,7 @@ func logLevelFromArgs() string { } func checkFleetVersion() { - output, err := utils.ExecCmdGetOutput("fleetctl") + output, err := common.ExecCmdGetOutput("fleetctl") if err != nil { logs.Fatal("fleetctl is required in PATH") } diff --git a/compile/version_generate.go b/compile/version_generate.go deleted file mode 100644 index d65b1cd..0000000 --- a/compile/version_generate.go +++ /dev/null @@ -1,33 +0,0 @@ -package main - -import ( - "github.com/blablacar/cnt/utils" - "io/ioutil" - "os" - "strings" - "time" -) - -const version_template = `package ggn - -func init() { - Version = "X.X.X" - CommitHash = "HASH" - BuildDate = "DATE" -}` - -func main() { - hash := utils.GitHash() - - version := os.Getenv("VERSION") - if version == "" { - panic("You must set ggn version into VERSION env to generate. ex: # VERSION=1.0 go generate") - } - buildDate := time.Now() - - res := strings.Replace(version_template, "X.X.X", string(version), 1) - res = strings.Replace(res, "HASH", hash, 1) - res = strings.Replace(res, "DATE", buildDate.Format(time.RFC3339), 1) - - ioutil.WriteFile("ggn/version.go", []byte(res), 0644) -} diff --git a/ggn/home.go b/ggn/home.go index a3cd368..9b3863d 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -1,8 +1,8 @@ package ggn import ( - "github.com/blablacar/cnt/utils" "github.com/ghodss/yaml" + "github.com/mitchellh/go-homedir" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" "io/ioutil" @@ -64,5 +64,9 @@ func (h *HomeStruct) SaveMachinesCache(env string, data string) { } func DefaultHomeRoot() string { - return utils.UserHomeOrFatal() + "/.config" + home, err := homedir.Dir() + if err != nil { + logs.WithError(err).Fatal("Failed to find user home folder") + } + return home + "/.config" } diff --git a/main.go b/main.go index 0a1aff2..3a25096 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,6 @@ import ( _ "github.com/n0rad/go-erlog/register" ) -//go:generate go run compile/version_generate.go func main() { commands.Execute() } diff --git a/utils/templating.go b/utils/templating.go deleted file mode 100644 index bdacfba..0000000 --- a/utils/templating.go +++ /dev/null @@ -1,110 +0,0 @@ -package utils - -import ( - "bufio" - "encoding/json" - "github.com/kelseyhightower/memkv" - "io" - "os" - "path" - "strings" - "text/template" - "time" -) - -type Templating struct { - template *template.Template - name string - content string - functions map[string]interface{} - vars memkv.Store -} - -func NewTemplating(name, content string) *Templating { - t := new(Templating) - t.name = name - t.content = cleanupOfTemplate(content) - t.functions = newFuncMap() - t.vars = memkv.New() - addFuncs(t.functions, t.vars.FuncMap) - return t -} - -func cleanupOfTemplate(content string) string { - var lines []string - var currentLine string - scanner := bufio.NewScanner(strings.NewReader(string(content))) - for scanner.Scan() { - part := strings.TrimRight(scanner.Text(), " ") - leftTrim := strings.TrimLeft(part, " ") - if strings.HasPrefix(leftTrim, "{{-") { - part = "{{" + leftTrim[3:] - } - currentLine += part - if strings.HasSuffix(currentLine, "-}}") { - currentLine = currentLine[0:len(currentLine)-3] + "}}" - } else { - lines = append(lines, currentLine) - currentLine = "" - } - } - if currentLine != "" { - lines = append(lines, currentLine) - } - return strings.Join(lines, "\n") -} - -func (t *Templating) Parse() error { - tmpl, err := template.New(t.name).Funcs(t.functions).Parse(t.content) - t.template = tmpl - return err -} - -func (t *Templating) Execute(wr io.Writer, data interface{}) error { - return t.template.Execute(wr, data) -} - -func (t *Templating) AddFunctions(fs map[string]interface{}) { - addFuncs(t.functions, fs) -} - -func (t *Templating) AddVar(key string, value string) { - t.vars.Set(key, value) -} - -/////////////////////////////////// - -func newFuncMap() map[string]interface{} { - m := make(map[string]interface{}) - m["base"] = path.Base - m["split"] = strings.Split - m["json"] = UnmarshalJsonObject - m["jsonArray"] = UnmarshalJsonArray - m["dir"] = path.Dir - m["getenv"] = os.Getenv - m["join"] = strings.Join - m["datetime"] = time.Now - m["toUpper"] = strings.ToUpper - m["toLower"] = strings.ToLower - m["contains"] = strings.Contains - m["replace"] = strings.Replace - return m -} - -func addFuncs(out, in map[string]interface{}) { - for name, fn := range in { - out[name] = fn - } -} - -func UnmarshalJsonObject(data string) (map[string]interface{}, error) { - var ret map[string]interface{} - err := json.Unmarshal([]byte(data), &ret) - return ret, err -} - -func UnmarshalJsonArray(data string) ([]interface{}, error) { - var ret []interface{} - err := json.Unmarshal([]byte(data), &ret) - return ret, err -} diff --git a/work/env.go b/work/env.go index adabf46..582cd9a 100644 --- a/work/env.go +++ b/work/env.go @@ -3,7 +3,7 @@ package work import ( "fmt" "github.com/blablacar/attributes-merger/attributes" - cntUtils "github.com/blablacar/cnt/utils" + "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/utils" "github.com/coreos/etcd/client" @@ -218,7 +218,7 @@ func (e Env) runHook(path string, info HookInfo) { } logs.WithFields(hookFields).Debug("Running Hook") - if err := cntUtils.ExecCmd("bash", "-c", strings.Join(args, " ")); err != nil { + if err := common.ExecCmd("bash", "-c", strings.Join(args, " ")); err != nil { logs.WithFields(hookFields).Fatal("Hook status is failed") } } @@ -278,9 +278,9 @@ func (e Env) runFleetCmdInternal(getOutput bool, args []string) (string, string, var stderr string var err error if getOutput { - stdout, stderr, err = cntUtils.ExecCmdGetStdoutAndStderr("bash", "-c", strings.Join(args, " ")) + stdout, stderr, err = common.ExecCmdGetStdoutAndStderr("bash", "-c", strings.Join(args, " ")) } else { - err = cntUtils.ExecCmd("bash", "-c", strings.Join(args, " ")) + err = common.ExecCmd("bash", "-c", strings.Join(args, " ")) } return stdout, stderr, err } diff --git a/work/service-generate.go b/work/service-generate.go index 636afae..6d2ad3b 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -4,7 +4,7 @@ import ( "github.com/appc/spec/discovery" "github.com/appc/spec/schema" "github.com/blablacar/dgr/bin-dgr/common" - "github.com/blablacar/ggn/utils" + "github.com/blablacar/dgr/bin-templater/template" "github.com/n0rad/go-erlog/logs" "io/ioutil" "net/http" @@ -26,7 +26,7 @@ func (s *Service) Generate() { logs.WithEF(err, s.fields).Fatal("Cannot load service template") } - var timerTmpl *utils.Templating + var timerTmpl *template.Templating if s.hasTimer { timerTmpl, err = s.loadUnitTemplate(PATH_UNIT_TIMER_TEMPLATE) if err != nil { diff --git a/work/service.go b/work/service.go index 76b9f2b..b1df9cd 100644 --- a/work/service.go +++ b/work/service.go @@ -4,11 +4,13 @@ import ( "encoding/json" "fmt" "github.com/blablacar/attributes-merger/attributes" + "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/utils" "github.com/coreos/etcd/client" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "golang.org/x/net/context" "gopkg.in/yaml.v2" @@ -250,14 +252,17 @@ func (s *Service) loadAttributes() { logs.WithFields(s.fields).WithField("attributes", s.attributes).Debug("Attributes loaded") } -func (s *Service) loadUnitTemplate(filename string) (*utils.Templating, error) { +func (s *Service) loadUnitTemplate(filename string) (*template.Templating, error) { path := s.path + filename source, err := ioutil.ReadFile(path) if err != nil { return nil, errors.Annotate(err, "Cannot read unit template file") } - template := utils.NewTemplating(s.Name, string(source)) - return template, template.Parse() + template, err := template.NewTemplating(nil, path, string(source)) + if err != nil { + return nil, errs.WithEF(err, s.fields, "Failed to load unit template") + } + return template, nil } func (s *Service) manifestPath() string { diff --git a/work/unit-generate.go b/work/unit-generate.go index 64f2967..c9a234a 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -3,6 +3,7 @@ package work import ( "bytes" "encoding/json" + "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/utils" "github.com/n0rad/go-erlog/logs" "github.com/peterbourgon/mergemap" @@ -12,7 +13,7 @@ import ( "strings" ) -func (u *Unit) Generate(tmpl *utils.Templating) { +func (u *Unit) Generate(tmpl *template.Templating) { u.generatedMutex.Lock() defer u.generatedMutex.Unlock() diff --git a/work/unit.go b/work/unit.go index d845ebf..10babfc 100644 --- a/work/unit.go +++ b/work/unit.go @@ -3,11 +3,12 @@ package work import ( "bufio" "encoding/json" - "github.com/blablacar/cnt/utils" "github.com/coreos/fleet/unit" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" + + "github.com/blablacar/dgr/bin-dgr/common" "io/ioutil" "os" "strings" @@ -142,7 +143,7 @@ func (u *Unit) DisplayDiff() error { defer os.Remove(localPath) ioutil.WriteFile(remotePath, []byte(remote), 0644) defer os.Remove(remotePath) - return utils.ExecCmd("git", "diff", "--word-diff", remotePath, localPath) + return common.ExecCmd("git", "diff", "--word-diff", remotePath, localPath) } func (u *Unit) IsLocalContentSameAsRemote() (bool, error) { From 21364fbda507323fb1d32e630c900fa8f1dd9f66 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 09:40:47 +0100 Subject: [PATCH 116/163] use ldflags to inject version/hash/date --- build.sh | 26 +++++++++++++++++++------- commands/ggn.go | 10 +++++++++- commands/version.go | 11 +++++------ ggn/context.go | 4 ---- main.go | 6 +++++- 5 files changed, 38 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index 30e88fa..2fe98b1 100755 --- a/build.sh +++ b/build.sh @@ -4,11 +4,12 @@ set -e start=`date +%s` dir=$( dirname $0 ) -ENVS="darwin\nlinux" +ENVS="linux\ndarwin" [ -z "$1" ] || ENVS="$1" [ -f $GOPATH/bin/godep ] || go get github.com/tools/godep +[ -f /usr/bin/upx ] || (echo "upx is required to build dgr" && exit 1) # clean rm -Rf $dir/dist/*-amd64 @@ -20,17 +21,28 @@ godep save ./... || true gofmt -w -s . godep go test -cover $dir/... +if [ -z ${VERSION} ]; then + VERSION=0 +fi + + # build -if `command -v parallel >/dev/null 2>&1`; then - echo -e "$ENVS" | parallel --will-cite -j10 --workdir . "GOOS={} GOARCH=amd64 godep go build -o dist/{}-amd64/ggn" -else +#if `command -v parallel >/dev/null 2>&1`; then +# echo -e "$ENVS" | parallel --will-cite -j10 --workdir . "GOOS={} GOARCH=amd64 godep go build -o dist/{}-amd64/ggn" +#else for e in `echo -e "$ENVS"`; do - GOOS="$e" GOARCH=amd64 godep go build -o "dist/${e}-amd64/ggn" + GOOS="$e" GOARCH=amd64 godep go build --ldflags "-s -w -X main.BuildDate=`date -u '+%Y-%m-%d_%H:%M'` \ + -X main.GgnVersion=${VERSION} \ + -X main.CommitHash=`git rev-parse HEAD`" \ + -o "dist/${e}-amd64/ggn" ${dir}/ + + upx ${dir}/dist/${e}-amd64/ggn + done -fi +#fi # install -cp $dir/dist/linux-amd64/ggn $GOPATH/bin/ggn +cp $dir/dist/`go env GOHOSTOS`-`go env GOHOSTARCH`/ggn $GOPATH/bin/ggn end=`date +%s` echo "Duration : $((end-start))s" diff --git a/commands/ggn.go b/commands/ggn.go index 48c125c..4db38ca 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -16,7 +16,15 @@ import ( const FLEET_SUPPORTED_VERSION = "0.11.5" -func Execute() { +var CommitHash string +var GgnVersion string +var BuildDate string + +func Execute(commitHash string, ggnVersion string, buildDate string) { + CommitHash = commitHash + GgnVersion = ggnVersion + BuildDate = buildDate + checkFleetVersion() ggn.Home = discoverHome() diff --git a/commands/version.go b/commands/version.go index fdad4a4..7ed4b32 100644 --- a/commands/version.go +++ b/commands/version.go @@ -2,7 +2,6 @@ package commands import ( "fmt" - "github.com/blablacar/ggn/ggn" "github.com/spf13/cobra" "os" ) @@ -13,12 +12,12 @@ var versionCmd = &cobra.Command{ Long: `Print the version number of cnt`, Run: func(cmd *cobra.Command, args []string) { fmt.Print("ggn\n\n") - fmt.Printf("version : %s\n", ggn.Version) - if ggn.BuildDate != "" { - fmt.Printf("build date : %s\n", ggn.BuildDate) + fmt.Printf("version : %s\n", GgnVersion) + if BuildDate != "" { + fmt.Printf("build date : %s\n", BuildDate) } - if ggn.CommitHash != "" { - fmt.Printf("CommitHash : %s\n", ggn.CommitHash) + if CommitHash != "" { + fmt.Printf("CommitHash : %s\n", CommitHash) } os.Exit(0) }, diff --git a/ggn/context.go b/ggn/context.go index ed7bbd1..b5dba11 100644 --- a/ggn/context.go +++ b/ggn/context.go @@ -5,10 +5,6 @@ import ( ) var Home HomeStruct -var CommitHash = "" -var Version = "DEV" -var BuildDate = "" -var PathSkip = 0 func GetUserAndHost() string { user := os.Getenv("USER") diff --git a/main.go b/main.go index 3a25096..afd83ea 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,10 @@ import ( _ "github.com/n0rad/go-erlog/register" ) +var CommitHash string +var GgnVersion string +var BuildDate string + func main() { - commands.Execute() + commands.Execute(CommitHash, GgnVersion, BuildDate) } From 421737772181094d97f4aaf6c46f304c06f99e47 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 09:48:45 +0100 Subject: [PATCH 117/163] fix release script --- release.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/release.sh b/release.sh index 992e3f2..c4ac6f0 100755 --- a/release.sh +++ b/release.sh @@ -39,7 +39,8 @@ require_clean_work_tree () { fi } -VERSION=$version go generate +export VERSION=${version} +${dir}/clean.sh ${dir}/build.sh require_clean_work_tree @@ -48,12 +49,12 @@ for i in ${dir}/dist/*-amd64/ ; do if [ -d "$i" ]; then cd $i platform=${PWD##*/} - tar cvzf ggn-$platform-$version.tar.gz ggn + tar cvzf ggn-${platform}-${version}.tar.gz ggn cd - fi done -git tag $version -a -m "Version $version" +git tag ${version} -a -m "Version $version" git push --tags sleep 5 From 5c737619e4c8ebdd7ba77ab9d1217b5e3ad40a70 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 09:50:17 +0100 Subject: [PATCH 118/163] [#46] run generate before check commands --- work/env-check.go | 1 + work/service-check.go | 1 + work/service-update.go | 2 +- work/unit.go | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/work/env-check.go b/work/env-check.go index 8cc16fc..2a77194 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -6,6 +6,7 @@ import ( ) func (e Env) Check() { + e.Generate() logs.WithFields(e.fields).Debug("Running check") info := HookInfo{Command: "env/check", Action: "env/check"} diff --git a/work/service-check.go b/work/service-check.go index a7fd0fe..a127ac1 100644 --- a/work/service-check.go +++ b/work/service-check.go @@ -6,6 +6,7 @@ import ( ) func (s *Service) Check() { + s.Generate() logs.WithFields(s.fields).Debug("Running check") s.runHook(EARLY, "service/check", "check") defer s.runHook(LATE, "service/check", "check") diff --git a/work/service-update.go b/work/service-update.go index 57e62ca..66b1c6e 100644 --- a/work/service-update.go +++ b/work/service-update.go @@ -13,8 +13,8 @@ import ( ) func (s *Service) Update() error { - logs.WithFields(s.fields).Info("Updating service") s.Generate() + logs.WithFields(s.fields).Info("Updating service") s.Lock("service/update", 1*time.Hour, "Updating") defer s.Unlock("service/update") diff --git a/work/unit.go b/work/unit.go index 10babfc..5328ddd 100644 --- a/work/unit.go +++ b/work/unit.go @@ -67,6 +67,7 @@ func (u *Unit) GetService() *Service { } func (u *Unit) Check(command string) { + u.Service.Generate() logs.WithFields(u.Fields).Debug("Check") info := HookInfo{ From bdfeef0c06cafe09f06e663d1f5b9b66688207ae Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 10:41:21 +0100 Subject: [PATCH 119/163] up --- work/unit-generate.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/unit-generate.go b/work/unit-generate.go index c9a234a..40b261d 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -26,7 +26,7 @@ func (u *Unit) Generate(tmpl *template.Templating) { aciList := u.Service.PrepareAcis() acis := "" for _, aci := range aciList { - acis += aci + acis += aci + " " } data["aciList"] = aciList data["acis"] = acis From 0007d0797deb11da5a96f844adedff8ed401af37 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 11:01:43 +0100 Subject: [PATCH 120/163] [#44] list-machines --- commands/prepare-env.go | 10 +++++++++- work/env.go | 12 ++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/commands/prepare-env.go b/commands/prepare-env.go index b892368..4d27a0a 100644 --- a/commands/prepare-env.go +++ b/commands/prepare-env.go @@ -35,6 +35,14 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { }, } + listMachinesCmd := &cobra.Command{ + Use: "list-machines", + Short: "Run list-machines command on " + env.GetName(), + Run: func(cmd *cobra.Command, args []string) { + env.FleetctlListMachines() + }, + } + generateCmd := &cobra.Command{ Use: "generate", Short: "Generate units for " + env.GetName(), @@ -42,7 +50,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { env.Generate() }, } - envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, listUnitsCmd) + envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, listUnitsCmd, listMachinesCmd) for _, serviceName := range env.ListServices() { service := env.LoadService(serviceName) diff --git a/work/env.go b/work/env.go index 582cd9a..700b992 100644 --- a/work/env.go +++ b/work/env.go @@ -85,6 +85,18 @@ func (e Env) FleetctlListUnits() { } } +func (e Env) FleetctlListMachines() { + stdout, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-machines", "--full", "--no-legend") + if err != nil { + logs.WithEF(err, e.fields).Fatal("Failed to list-machines") + } + + machines := strings.Split(stdout, "\n") + for _, machine := range machines { + fmt.Println(machine) + } +} + func (e Env) LoadService(name string) *Service { e.servicesMutex.Lock() defer e.servicesMutex.Unlock() From 733d684072df4bcc49f5e838ea344f6e03fee359 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 8 Mar 2016 11:20:30 +0100 Subject: [PATCH 121/163] try to fix travis --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 181b7b8..c1d8aac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,5 +3,8 @@ language: go go: - 1.5 +install: + - sudo apt-get install upx + script: - ./build.sh \ No newline at end of file From b56207272338fe4339be75b94a69ce439b4ee3f1 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 15 Apr 2016 11:26:37 +0200 Subject: [PATCH 122/163] just log if generate fail during service/env check --- commands/prepare-service.go | 8 +++++-- commands/prepare-unit.go | 5 +++- work/env-check.go | 4 +++- work/env-generate.go | 4 +++- work/service-check.go | 7 ++++-- work/service-generate.go | 46 ++++++++++++++++++++++--------------- work/service-update.go | 19 ++++++++------- work/service.go | 4 +++- work/unit-command.go | 16 +++++++++---- work/unit-generate.go | 10 +++++--- work/unit.go | 4 +++- 11 files changed, 84 insertions(+), 43 deletions(-) diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 7182325..3208c21 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -22,7 +22,9 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { Short: "generate units for " + service.Name + " on env " + service.GetEnv().GetName(), Long: `generate units using remote resolved or local pod/aci manifests`, Run: func(cmd *cobra.Command, args []string) { - service.Generate() + if err := service.Generate(); err != nil { + logs.WithE(err).Fatal("Generate failed") + } }, } @@ -30,7 +32,9 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { Use: "check [manifest...]", Short: "Check units for " + service.Name + " on env " + service.GetEnv().GetName(), Run: func(cmd *cobra.Command, args []string) { - service.Check() + if err := service.Check(); err != nil { + logs.WithE(err).Fatal("Check failed") + } }, } diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 509890b..495d01f 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -2,6 +2,7 @@ package commands import ( "github.com/blablacar/ggn/work" + "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" ) @@ -113,7 +114,9 @@ func prepareUnitCommands(unit *work.Unit) *cobra.Command { Use: "generate", Short: getShortDescription(unit, "generate"), Run: func(cmd *cobra.Command, args []string) { - unit.Service.Generate() + if err := unit.Service.Generate(); err != nil { + logs.WithE(err).Error("Generate failed") + } }, } diff --git a/work/env-check.go b/work/env-check.go index 2a77194..ac360cd 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -40,7 +40,9 @@ func (e Env) concurrentChecker(services []string) { wg.Add(1) go func() { for service := range aChan { - e.LoadService(service).Check() + if err := e.LoadService(service).Check(); err != nil { + logs.WithE(err).WithField("service", service).Error("Check failed") + } } wg.Done() }() diff --git a/work/env-generate.go b/work/env-generate.go index d1b5a57..d0bac00 100644 --- a/work/env-generate.go +++ b/work/env-generate.go @@ -8,6 +8,8 @@ func (e Env) Generate() { for _, service := range services { service := e.LoadService(service) - service.Generate() + if err := service.Generate(); err != nil { + logs.WithE(err).Error("Generate failed") + } } } diff --git a/work/service-check.go b/work/service-check.go index a127ac1..ca190d5 100644 --- a/work/service-check.go +++ b/work/service-check.go @@ -5,14 +5,17 @@ import ( "sync" ) -func (s *Service) Check() { - s.Generate() +func (s *Service) Check() error { + if err := s.Generate(); err != nil { + return err + } logs.WithFields(s.fields).Debug("Running check") s.runHook(EARLY, "service/check", "check") defer s.runHook(LATE, "service/check", "check") s.concurrentChecker(s.ListUnits()) + return nil // for _, unitName := range s.ListUnits() { // s.LoadUnit(unitName).Check("service/check") // } diff --git a/work/service-generate.go b/work/service-generate.go index 6d2ad3b..2621ef4 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -5,25 +5,26 @@ import ( "github.com/appc/spec/schema" "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/dgr/bin-templater/template" + "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "io/ioutil" "net/http" "strings" ) -func (s *Service) Generate() { +func (s *Service) Generate() error { s.generatedMutex.Lock() defer s.generatedMutex.Unlock() if s.generated { - return + return nil } logs.WithFields(s.fields).Debug("Generating units") serviceTmpl, err := s.loadUnitTemplate(PATH_UNIT_SERVICE_TEMPLATE) if err != nil { - logs.WithEF(err, s.fields).Fatal("Cannot load service template") + return errs.WithEF(err, s.fields, "Cannot load service template") } var timerTmpl *template.Templating @@ -36,20 +37,25 @@ func (s *Service) Generate() { if len(s.nodesAsJsonMap) == 0 { logs.WithFields(s.fields).Fatal("No node to process in manifest") - return + return nil } for _, unitName := range s.ListUnits() { unit := s.LoadUnit(unitName) if unit.GetType() == TYPE_SERVICE { - unit.Generate(serviceTmpl) + if err := unit.Generate(serviceTmpl); err != nil { + return err + } } else if unit.GetType() == TYPE_TIMER { - unit.Generate(timerTmpl) + if err := unit.Generate(timerTmpl); err != nil { + return err + } } else { logs.WithFields(s.fields).WithField("type", unit.GetType()).Fatal("Unknown unit type") } } s.generated = true + return nil } func (s Service) NodeAttributes(hostname string) map[string]interface{} { @@ -121,7 +127,7 @@ func (s Service) sources(sources []string) map[string][]common.ACFullname { return res } -func (s Service) discoverPod(name common.ACFullname) []common.ACFullname { +func (s Service) discoverPod(name common.ACFullname) ([]common.ACFullname, error) { podFields := s.fields.WithField("pod", name) app, err := discovery.NewAppFromString(name.String()) @@ -146,13 +152,11 @@ func (s Service) discoverPod(name common.ACFullname) []common.ACFullname { logUrl := podFields.WithField("url", url) response, err := http.Get(url) if err != nil { - logs.WithEF(err, logUrl).Fatal("Cannot get pod manifest content") - return nil + return nil, errs.WithEF(err, logUrl, "Cannot get pod manifest content") } else { if response.StatusCode != 200 { - logs.WithFields(logUrl).WithField("status_code", response.StatusCode). - WithField("status_message", response.Status). - Fatal("Receive response error for discovery") + return nil, errs.WithF(logUrl.WithField("status_code", response.StatusCode). + WithField("status_message", response.Status), "Receive response error for discovery") } defer response.Body.Close() content, err := ioutil.ReadAll(response.Body) @@ -167,21 +171,21 @@ func (s Service) discoverPod(name common.ACFullname) []common.ACFullname { if acis == nil { logs.WithFields(logUrl).Fatal("Discovered pod name does not match requested") } - return acis + return acis, nil } } -func (s *Service) PrepareAcis() []string { +func (s *Service) PrepareAcis() ([]string, error) { if len(s.manifest.Containers) == 0 { - return []string{} + return []string{}, nil } s.aciListMutex.Lock() defer s.aciListMutex.Unlock() if len(s.aciList) > 0 { - return s.aciList + return s.aciList, nil } override := s.sources(BuildFlags.GenerateManifests) @@ -198,7 +202,11 @@ func (s *Service) PrepareAcis() []string { podAcis = override[aci.Name()] } else { logs.WithFields(containerLog).Debug("Using remote source to resolve") - podAcis = s.discoverPod(aci) + pAcis, err := s.discoverPod(aci) + if err != nil { + return []string{}, err + } + podAcis = pAcis } for _, aci := range podAcis { acis = append(acis, aci.String()) @@ -214,7 +222,7 @@ func (s *Service) PrepareAcis() []string { taci = *aciTmp if err != nil { logs.WithEF(err, containerLog).Fatal("Cannot resolve aci") - return []string{} + return []string{}, nil } } acis = append(acis, taci.String()) @@ -224,5 +232,5 @@ func (s *Service) PrepareAcis() []string { logs.WithFields(s.fields).Error("Cannot resolve aci") } s.aciList = acis - return acis + return acis, nil } diff --git a/work/service-update.go b/work/service-update.go index 66b1c6e..f734748 100644 --- a/work/service-update.go +++ b/work/service-update.go @@ -13,7 +13,9 @@ import ( ) func (s *Service) Update() error { - s.Generate() + if err := s.Generate(); err != nil { + return err + } logs.WithFields(s.fields).Info("Updating service") s.Lock("service/update", 1*time.Hour, "Updating") @@ -28,16 +30,17 @@ func (s *Service) Update() error { } func (s *Service) updateUnit(u Unit) { + uField := s.fields.WithField("unit", u.Name) ask: for { same, err := u.IsLocalContentSameAsRemote() if err != nil { - logs.WithEF(err, s.fields).Warn("Cannot compare local and remote service") + logs.WithEF(err, uField).Warn("Cannot compare local and remote service") } if same { - logs.WithFields(s.fields).Info("Remote service is already up to date") + logs.WithFields(uField).Info("Remote service is already up to date") if !u.IsRunning() { - logs.WithFields(s.fields).Info("But service is not running") + logs.WithFields(uField).Info("But service is not running") } else if !BuildFlags.All { return } @@ -51,18 +54,18 @@ ask: case ACTION_DIFF: u.DisplayDiff() case ACTION_QUIT: - logs.WithFields(s.fields).Debug("User want to quit") + logs.WithFields(uField).Debug("User want to quit") if globalUpdater == 0 { s.Unlock("service/update") } os.Exit(1) case ACTION_SKIP: - logs.WithFields(s.fields).Debug("User skip this service") + logs.WithFields(uField).Debug("User skip this service") return case ACTION_YES: break ask default: - logs.WithFields(s.fields).Fatal("Should not be here") + logs.WithFields(uField).Fatal("Should not be here") } } @@ -74,7 +77,7 @@ ask: atomic.AddUint32(&globalUpdater, 1) } - logs.WithFields(s.fields).Info("Updating unit") + logs.WithFields(uField).Info("Updating unit") u.UpdateInside("service/update") time.Sleep(time.Second * 2) diff --git a/work/service.go b/work/service.go index b1df9cd..60e8e61 100644 --- a/work/service.go +++ b/work/service.go @@ -137,7 +137,9 @@ func (s *Service) LoadUnit(name string) *Unit { } func (s *Service) Diff() { - s.Generate() + if err := s.Generate(); err != nil { + logs.WithEF(err, s.fields).Fatal("Generate failed") + } for _, unitName := range s.ListUnits() { unit := s.LoadUnit(unitName) unit.Diff("service/diff") diff --git a/work/unit-command.go b/work/unit-command.go index fdf54c4..9a2f4f2 100644 --- a/work/unit-command.go +++ b/work/unit-command.go @@ -14,7 +14,9 @@ func (u *Unit) Start(command string) error { } if !u.IsLoaded() { logs.WithFields(u.Fields).Debug("unit is not loaded yet") - u.Service.Generate() + if err := u.Service.Generate(); err != nil { + logs.WithEF(err, u.Fields).Fatal("Generate failed") + } u.Load(command) } else { logs.WithFields(u.Fields).Debug("unit is already loaded") @@ -27,7 +29,9 @@ func (u *Unit) Unload(command string) error { } func (u *Unit) Load(command string) error { - u.Service.Generate() + if err := u.Service.Generate(); err != nil { + logs.WithEF(err, u.Fields).Fatal("Generate failed") + } return u.runAction(command, "load") } @@ -59,7 +63,9 @@ func (u *Unit) Restart(command string) error { } func (u *Unit) Update(command string) error { - u.Service.Generate() + if err := u.Service.Generate(); err != nil { + logs.WithEF(err, u.Fields).Fatal("Generate failed") + } logs.WithFields(u.Fields).Debug("Update") u.runHook(EARLY, command, "update") defer u.runHook(LATE, command, "update") @@ -116,7 +122,9 @@ func (u *Unit) Ssh(command string) { func (u *Unit) Diff(command string) { logs.WithFields(u.Fields).Debug("diff") - u.Service.Generate() + if err := u.Service.Generate(); err != nil { + logs.WithEF(err, u.Fields).Fatal("Generate failed") + } u.runHook(EARLY, command, "diff") defer u.runHook(LATE, command, "diff") diff --git a/work/unit-generate.go b/work/unit-generate.go index 40b261d..402cfe5 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -13,17 +13,20 @@ import ( "strings" ) -func (u *Unit) Generate(tmpl *template.Templating) { +func (u *Unit) Generate(tmpl *template.Templating) error { u.generatedMutex.Lock() defer u.generatedMutex.Unlock() if u.generated { - return + return nil } logs.WithFields(u.Fields).Debug("Generate") data := u.GenerateAttributes() - aciList := u.Service.PrepareAcis() + aciList, err := u.Service.PrepareAcis() + if err != nil { + return err + } acis := "" for _, aci := range aciList { acis += aci + " " @@ -56,6 +59,7 @@ func (u *Unit) Generate(tmpl *template.Templating) { } u.generated = true + return nil } func (u Unit) GenerateAttributes() map[string]interface{} { diff --git a/work/unit.go b/work/unit.go index 5328ddd..c4ddd26 100644 --- a/work/unit.go +++ b/work/unit.go @@ -67,7 +67,9 @@ func (u *Unit) GetService() *Service { } func (u *Unit) Check(command string) { - u.Service.Generate() + if err := u.Service.Generate(); err != nil { + logs.WithEF(err, u.Fields).Fatal("Generate failed") + } logs.WithFields(u.Fields).Debug("Check") info := HookInfo{ From 0b122e22712cdbd1eb60a83fc1718d5be19b35a3 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 23 May 2016 14:53:28 +0200 Subject: [PATCH 123/163] [#53] support partial templating of services --- Godeps/Godeps.json | 118 +- Godeps/_workspace/.gitignore | 2 - .../src/github.com/afex/hystrix-go/LICENSE | 20 - .../appc/spec/schema/lastditch/doc.go | 28 - .../appc/spec/schema/lastditch/image.go | 45 - .../appc/spec/schema/lastditch/labels.go | 38 - .../appc/spec/schema/lastditch/pod.go | 57 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../src/github.com/appc/spec/LICENSE | 202 --- .../github.com/camlistore/camlistore/COPYING | 202 --- .../clients/chrome/clip-it-good/LICENSE | 13 - .../camlistore/camlistore/misc/copyrightifity | 68 - .../camlistore/camlistore/pkg/legal/legal.go | 50 - .../pkg/legal/legalprint/legalprint.go | 42 - .../third_party/bazil.org/fuse/LICENSE | 93 -- .../third_party/closure/lib/LICENSE | 176 --- .../code.google.com/p/goauth2/LICENSE | 27 - .../code.google.com/p/goauth2/PATENTS | 22 - .../code.google.com/p/leveldb-go/LICENSE | 27 - .../code.google.com/p/snappy-go/LICENSE | 27 - .../code.google.com/p/xsrftoken/COPYING | 202 --- .../third_party/fontawesome/LICENSE.txt | 4 - .../github.com/camlistore/lock/COPYING | 202 --- .../github.com/cznic/exp/dbm/LICENSE | 27 - .../github.com/cznic/exp/lldb/LICENSE | 27 - .../github.com/cznic/fileutil/LICENSE | 27 - .../github.com/cznic/fileutil/falloc/LICENSE | 27 - .../github.com/cznic/fileutil/hdb/LICENSE | 27 - .../github.com/cznic/fileutil/storage/LICENSE | 27 - .../third_party/github.com/cznic/kv/LICENSE | 27 - .../github.com/cznic/mathutil/LICENSE | 27 - .../cznic/mathutil/mersenne/LICENSE | 27 - .../github.com/cznic/zappy/LICENSE | 27 - .../github.com/davecgh/go-spew/LICENSE | 13 - .../github.com/go-sql-driver/mysql/LICENSE | 373 ------ .../github.com/golang/glog/LICENSE | 191 --- .../github.com/gorilla/websocket/LICENSE | 23 - .../third_party/github.com/lib/pq/LICENSE.md | 8 - .../russross/blackfriday/LICENSE.txt | 29 - .../github.com/rwcarlsen/goexif/LICENSE | 24 - .../camlistore/third_party/glitch/LICENSE | 19 - .../third_party/golang.org/x/image/LICENSE | 27 - .../third_party/labix.org/v2/mgo/LICENSE | 25 - .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 - .../camlistore/third_party/react/LICENSE.txt | 201 --- .../github.com/hjfreyer/taglib-go/LICENSE | 191 --- .../vendor/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../vendor/google.golang.org/cloud/LICENSE | 202 --- .../vendor/google.golang.org/grpc/LICENSE | 28 - .../vendor/google.golang.org/grpc/PATENTS | 22 - .../github.com/SeanDolphin/bqschema/LICENSE | 201 --- .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/abbot/go-http-auth/LICENSE | 178 --- .../docker/docker/pkg/symlink/LICENSE.APACHE | 191 --- .../docker/docker/pkg/symlink/LICENSE.BSD | 27 - .../github.com/docker/libcontainer/LICENSE | 191 --- .../src/github.com/docker/libcontainer/NOTICE | 16 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../vendor/src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/protobuf/LICENSE | 31 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../github.com/fsouza/go-dockerclient/LICENSE | 22 - .../github.com/Sirupsen/logrus/LICENSE | 21 - .../docker/docker/pkg/mflag/LICENSE | 27 - .../github.com/gorilla/context/LICENSE | 27 - .../external/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/kr/pretty/License | 21 - .../_workspace/src/github.com/kr/text/License | 19 - .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../src/github.com/stretchr/objx/LICENSE.md | 23 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../src/gopkg.in/olivere/elastic.v2/LICENSE | 20 - .../olivere/elastic.v2/uritemplates/LICENSE | 18 - .../src/github.com/onsi/gomega/LICENSE | 20 - .../src/github.com/spf13/pflag/LICENSE | 28 - .../_workspace/src/golang.org/x/net/LICENSE | 27 - .../_workspace/src/golang.org/x/net/PATENTS | 22 - .../bertimus9/systemstat/LICENSE | 20 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/abbot/go-http-auth/LICENSE | 178 --- .../github.com/codegangsta/negroni/LICENSE | 21 - .../src/github.com/dgrijalva/jwt-go/LICENSE | 8 - .../github.com/docker/libcontainer/LICENSE | 191 --- .../src/github.com/docker/libcontainer/NOTICE | 16 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../vendor/src/github.com/godbus/dbus/LICENSE | 25 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../src/github.com/docker/spdystream/LICENSE | 191 --- .../elazarl/go-bindata-assetfs/LICENSE | 23 - .../github.com/emicklei/go-restful/LICENSE | 22 - .../src/github.com/evanphx/json-patch/LICENSE | 25 - .../github.com/fsouza/go-dockerclient/LICENSE | 22 - .../github.com/Sirupsen/logrus/LICENSE | 21 - .../docker/docker/pkg/mflag/LICENSE | 27 - .../github.com/gorilla/context/LICENSE | 27 - .../external/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/ghodss/yaml/LICENSE | 50 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/gorilla/context/LICENSE | 27 - .../src/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/imdario/mergo/LICENSE | 28 - .../imdario/mergo/testdata/license.yml | 3 - .../inconshreveable/mousetrap/LICENSE | 13 - .../src/github.com/juju/ratelimit/LICENSE | 191 --- .../src/github.com/kardianos/osext/LICENSE | 27 - .../_workspace/src/github.com/kr/pty/License | 23 - .../src/github.com/miekg/dns/COPYRIGHT | 9 - .../src/github.com/miekg/dns/LICENSE | 32 - .../github.com/mitchellh/mapstructure/LICENSE | 21 - .../src/github.com/onsi/ginkgo/LICENSE | 20 - .../src/github.com/onsi/gomega/LICENSE | 20 - .../src/github.com/pborman/uuid/LICENSE | 27 - .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../github.com/rackspace/gophercloud/LICENSE | 191 --- .../russross/blackfriday/LICENSE.txt | 29 - .../src/github.com/scalingdata/gcfg/LICENSE | 57 - .../src/github.com/spf13/cobra/LICENSE.txt | 174 --- .../src/github.com/spf13/pflag/LICENSE | 28 - .../src/github.com/vaughan0/go-ini/LICENSE | 14 - .../github.com/xyproto/simpleredis/LICENSE | 21 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 21 - .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 --- .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../charms/trusty/kubernetes-master/copyright | 13 - .../juju/charms/trusty/kubernetes/copyright | 13 - .../update-demo/local/LICENSE.angular | 21 - .../third_party/forked/json/LICENSE | 27 - .../third_party/forked/reflect/LICENSE | 27 - .../kubernetes/third_party/golang/LICENSE | 27 - .../kubernetes/third_party/golang/PATENTS | 22 - .../kubernetes/third_party/htpasswd/COPYING | 28 - .../kubernetes/third_party/pause/LICENSE | 19 - .../kubernetes/third_party/swagger-ui/LICENSE | 11 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../src/github.com/spf13/pflag/LICENSE | 28 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../src/github.com/appc/spec/LICENSE | 202 --- .../github.com/camlistore/camlistore/COPYING | 202 --- .../clients/chrome/clip-it-good/LICENSE | 13 - .../camlistore/camlistore/misc/copyrightifity | 68 - .../camlistore/camlistore/pkg/legal/legal.go | 50 - .../pkg/legal/legalprint/legalprint.go | 42 - .../third_party/bazil.org/fuse/LICENSE | 93 -- .../third_party/closure/lib/LICENSE | 176 --- .../code.google.com/p/goauth2/LICENSE | 27 - .../code.google.com/p/goauth2/PATENTS | 22 - .../code.google.com/p/leveldb-go/LICENSE | 27 - .../code.google.com/p/snappy-go/LICENSE | 27 - .../code.google.com/p/xsrftoken/COPYING | 202 --- .../third_party/fontawesome/LICENSE.txt | 4 - .../github.com/camlistore/lock/COPYING | 202 --- .../github.com/cznic/exp/dbm/LICENSE | 27 - .../github.com/cznic/exp/lldb/LICENSE | 27 - .../github.com/cznic/fileutil/LICENSE | 27 - .../github.com/cznic/fileutil/falloc/LICENSE | 27 - .../github.com/cznic/fileutil/hdb/LICENSE | 27 - .../github.com/cznic/fileutil/storage/LICENSE | 27 - .../third_party/github.com/cznic/kv/LICENSE | 27 - .../github.com/cznic/mathutil/LICENSE | 27 - .../cznic/mathutil/mersenne/LICENSE | 27 - .../github.com/cznic/sortutil/LICENSE | 27 - .../github.com/cznic/zappy/LICENSE | 27 - .../github.com/davecgh/go-spew/LICENSE | 13 - .../github.com/go-sql-driver/mysql/LICENSE | 373 ------ .../github.com/golang/glog/LICENSE | 191 --- .../github.com/gorilla/websocket/LICENSE | 23 - .../third_party/github.com/lib/pq/LICENSE.md | 8 - .../russross/blackfriday/LICENSE.txt | 29 - .../github.com/rwcarlsen/goexif/LICENSE | 24 - .../camlistore/third_party/glitch/LICENSE | 19 - .../third_party/golang.org/x/image/LICENSE | 27 - .../third_party/golang.org/x/image/PATENTS | 22 - .../third_party/labix.org/v2/mgo/LICENSE | 25 - .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 - .../camlistore/third_party/react/LICENSE.txt | 201 --- .../github.com/hjfreyer/taglib-go/LICENSE | 191 --- .../vendor/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../vendor/google.golang.org/cloud/LICENSE | 202 --- .../vendor/google.golang.org/grpc/LICENSE | 28 - .../vendor/google.golang.org/grpc/PATENTS | 22 - .../src/github.com/coreos/go-semver/LICENSE | 202 --- .../src/github.com/appc/cni/LICENSE | 202 --- .../src/github.com/appc/docker2aci/LICENSE | 202 --- .../src/github.com/appc/goaci/LICENSE | 202 --- .../src/github.com/appc/spec/LICENSE | 202 --- .../github.com/camlistore/camlistore/COPYING | 202 --- .../clients/chrome/clip-it-good/LICENSE | 13 - .../camlistore/camlistore/misc/copyrightifity | 68 - .../camlistore/camlistore/pkg/legal/legal.go | 50 - .../pkg/legal/legalprint/legalprint.go | 42 - .../third_party/bazil.org/fuse/LICENSE | 93 -- .../third_party/closure/lib/LICENSE | 176 --- .../code.google.com/p/goauth2/LICENSE | 27 - .../code.google.com/p/goauth2/PATENTS | 22 - .../code.google.com/p/leveldb-go/LICENSE | 27 - .../code.google.com/p/snappy-go/LICENSE | 27 - .../code.google.com/p/xsrftoken/COPYING | 202 --- .../third_party/fontawesome/LICENSE.txt | 4 - .../github.com/camlistore/lock/COPYING | 202 --- .../github.com/cznic/exp/dbm/LICENSE | 27 - .../github.com/cznic/exp/lldb/LICENSE | 27 - .../github.com/cznic/fileutil/LICENSE | 27 - .../github.com/cznic/fileutil/falloc/LICENSE | 27 - .../github.com/cznic/fileutil/hdb/LICENSE | 27 - .../github.com/cznic/fileutil/storage/LICENSE | 27 - .../third_party/github.com/cznic/kv/LICENSE | 27 - .../github.com/cznic/mathutil/LICENSE | 27 - .../cznic/mathutil/mersenne/LICENSE | 27 - .../github.com/cznic/sortutil/LICENSE | 27 - .../github.com/cznic/zappy/LICENSE | 27 - .../github.com/davecgh/go-spew/LICENSE | 13 - .../github.com/go-sql-driver/mysql/LICENSE | 373 ------ .../github.com/golang/glog/LICENSE | 191 --- .../github.com/gorilla/websocket/LICENSE | 23 - .../third_party/github.com/lib/pq/LICENSE.md | 8 - .../russross/blackfriday/LICENSE.txt | 29 - .../github.com/rwcarlsen/goexif/LICENSE | 24 - .../camlistore/third_party/glitch/LICENSE | 19 - .../third_party/golang.org/x/image/LICENSE | 27 - .../third_party/golang.org/x/image/PATENTS | 22 - .../third_party/labix.org/v2/mgo/LICENSE | 25 - .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 - .../camlistore/third_party/react/LICENSE.txt | 201 --- .../github.com/hjfreyer/taglib-go/LICENSE | 191 --- .../vendor/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../vendor/google.golang.org/cloud/LICENSE | 202 --- .../vendor/google.golang.org/grpc/LICENSE | 28 - .../vendor/google.golang.org/grpc/PATENTS | 22 - .../src/github.com/camlistore/go4/LICENSE | 202 --- .../github.com/camlistore/go4/legal/legal.go | 32 - .../src/github.com/coreos/go-iptables/LICENSE | 191 --- .../src/github.com/coreos/go-semver/LICENSE | 202 --- .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../src/github.com/coreos/go-tspi/LICENSE | 202 --- .../src/github.com/coreos/ioprogress/LICENSE | 21 - .../github.com/cpuguy83/go-md2man/LICENSE.md | 21 - .../_workspace/src/github.com/cznic/b/LICENSE | 27 - .../src/github.com/cznic/bufs/LICENSE | 27 - .../src/github.com/cznic/exp/dbm/LICENSE | 27 - .../src/github.com/cznic/exp/lldb/LICENSE | 27 - .../src/github.com/cznic/fileutil/LICENSE | 27 - .../github.com/cznic/fileutil/falloc/LICENSE | 27 - .../src/github.com/cznic/fileutil/hdb/LICENSE | 27 - .../github.com/cznic/fileutil/storage/LICENSE | 27 - .../src/github.com/cznic/mathutil/LICENSE | 27 - .../cznic/mathutil/mersenne/LICENSE | 27 - .../src/github.com/cznic/ql/LICENSE | 27 - .../src/github.com/cznic/sortutil/LICENSE | 27 - .../src/github.com/cznic/strutil/LICENSE | 27 - .../src/github.com/cznic/zappy/LICENSE | 27 - .../src/github.com/d2g/dhcp4/LICENSE | 27 - .../src/github.com/d2g/dhcp4client/LICENSE | 354 ----- .../src/github.com/dustin/go-humanize/LICENSE | 21 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/protobuf/LICENSE | 31 - .../src/github.com/gorilla/context/LICENSE | 27 - .../src/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/hashicorp/errwrap/LICENSE | 354 ----- .../hydrogen18/stoppableListener/LICENSE | 10 - .../inconshreveable/mousetrap/LICENSE | 13 - .../github.com/kballard/go-shellquote/LICENSE | 19 - .../_workspace/src/github.com/kr/pty/License | 23 - .../src/github.com/pborman/uuid/LICENSE | 27 - .../src/github.com/petar/GoLLRB/LICENSE | 27 - .../src/github.com/peterbourgon/diskv/LICENSE | 19 - .../russross/blackfriday/LICENSE.txt | 29 - .../shurcooL/sanitized_anchor_name/LICENSE | 19 - .../src/github.com/spf13/cobra/LICENSE.txt | 174 --- .../spf13/cobra/cobra/cmd/licenses.go | 1133 ----------------- .../src/github.com/spf13/pflag/LICENSE | 28 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../github.com/vishvananda/netlink/LICENSE | 192 --- .../src/golang.org/x/crypto/LICENSE | 27 - .../src/golang.org/x/crypto/PATENTS | 22 - .../_workspace/src/golang.org/x/net/LICENSE | 27 - .../_workspace/src/golang.org/x/net/PATENTS | 22 - .../_workspace/src/golang.org/x/sys/LICENSE | 27 - .../_workspace/src/golang.org/x/sys/PATENTS | 22 - .../_workspace/src/golang.org/x/tools/LICENSE | 27 - .../_workspace/src/golang.org/x/tools/PATENTS | 22 - .../src/google.golang.org/grpc/LICENSE | 28 - .../src/google.golang.org/grpc/PATENTS | 22 - .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 --- .../update-demo/local/LICENSE.angular | 21 - .../kubernetes/third_party/golang/LICENSE | 27 - .../kubernetes/third_party/golang/PATENTS | 22 - .../kubernetes/third_party/htpasswd/COPYING | 28 - .../kubernetes/third_party/pause/LICENSE | 19 - .../kubernetes/third_party/swagger-ui/LICENSE | 11 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../github.com/coreos/rkt/pkg/acl/LICENSE.MIT | 22 - .../github.com/coreos/rkt/store/LICENSE.BSD | 30 - .../src/github.com/ghodss/yaml/LICENSE | 50 - .../github.com/SeanDolphin/bqschema/LICENSE | 201 --- .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/abbot/go-http-auth/LICENSE | 178 --- .../docker/docker/pkg/symlink/LICENSE.APACHE | 191 --- .../docker/docker/pkg/symlink/LICENSE.BSD | 27 - .../github.com/docker/libcontainer/LICENSE | 191 --- .../src/github.com/docker/libcontainer/NOTICE | 16 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../vendor/src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/protobuf/LICENSE | 31 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../github.com/fsouza/go-dockerclient/LICENSE | 22 - .../github.com/Sirupsen/logrus/LICENSE | 21 - .../docker/docker/pkg/mflag/LICENSE | 27 - .../github.com/gorilla/context/LICENSE | 27 - .../external/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/kr/pretty/License | 21 - .../_workspace/src/github.com/kr/text/License | 19 - .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../src/github.com/stretchr/objx/LICENSE.md | 23 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../src/gopkg.in/olivere/elastic.v2/LICENSE | 20 - .../olivere/elastic.v2/uritemplates/LICENSE | 18 - .../src/github.com/google/cadvisor/LICENSE | 190 --- .../src/github.com/hashicorp/errwrap/LICENSE | 354 ----- .../inconshreveable/mousetrap/LICENSE | 13 - .../src/github.com/juju/errors/LICENSE | 191 --- .../src/github.com/leekchan/gtf/LICENSE | 22 - .../src/github.com/mgutz/ansi/LICENSE | 9 - .../github.com/mitchellh/go-homedir/LICENSE | 21 - .../github.com/peterbourgon/mergemap/LICENSE | 23 - .../src/github.com/spf13/cobra/LICENSE.txt | 174 --- .../src/github.com/spf13/pflag/LICENSE | 28 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../_workspace/src/golang.org/x/net/LICENSE | 27 - .../_workspace/src/golang.org/x/net/PATENTS | 22 - .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 --- .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - .../bertimus9/systemstat/LICENSE | 20 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/abbot/go-http-auth/LICENSE | 178 --- .../github.com/codegangsta/negroni/LICENSE | 21 - .../src/github.com/dgrijalva/jwt-go/LICENSE | 8 - .../github.com/docker/libcontainer/LICENSE | 191 --- .../src/github.com/docker/libcontainer/NOTICE | 16 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../vendor/src/github.com/godbus/dbus/LICENSE | 25 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../src/github.com/docker/spdystream/LICENSE | 191 --- .../elazarl/go-bindata-assetfs/LICENSE | 23 - .../github.com/emicklei/go-restful/LICENSE | 22 - .../src/github.com/evanphx/json-patch/LICENSE | 25 - .../github.com/fsouza/go-dockerclient/LICENSE | 22 - .../github.com/Sirupsen/logrus/LICENSE | 21 - .../docker/docker/pkg/mflag/LICENSE | 27 - .../github.com/gorilla/context/LICENSE | 27 - .../external/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/ghodss/yaml/LICENSE | 50 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/google/gofuzz/LICENSE | 202 --- .../src/github.com/gorilla/context/LICENSE | 27 - .../src/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/imdario/mergo/LICENSE | 28 - .../imdario/mergo/testdata/license.yml | 3 - .../inconshreveable/mousetrap/LICENSE | 13 - .../github.com/jonboulle/clockwork/LICENSE | 201 --- .../src/github.com/juju/ratelimit/LICENSE | 191 --- .../src/github.com/kardianos/osext/LICENSE | 27 - .../_workspace/src/github.com/kr/pty/License | 23 - .../src/github.com/miekg/dns/COPYRIGHT | 9 - .../src/github.com/miekg/dns/LICENSE | 32 - .../github.com/mitchellh/mapstructure/LICENSE | 21 - .../src/github.com/onsi/ginkgo/LICENSE | 20 - .../src/github.com/onsi/gomega/LICENSE | 20 - .../src/github.com/pborman/uuid/LICENSE | 27 - .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../github.com/rackspace/gophercloud/LICENSE | 191 --- .../russross/blackfriday/LICENSE.txt | 29 - .../src/github.com/scalingdata/gcfg/LICENSE | 57 - .../src/github.com/spf13/cobra/LICENSE.txt | 174 --- .../src/github.com/spf13/pflag/LICENSE | 28 - .../src/github.com/vaughan0/go-ini/LICENSE | 14 - .../github.com/xyproto/simpleredis/LICENSE | 21 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 21 - .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 --- .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 --- .../charms/trusty/kubernetes-master/copyright | 13 - .../juju/charms/trusty/kubernetes/copyright | 13 - .../update-demo/local/LICENSE.angular | 21 - .../third_party/forked/json/LICENSE | 27 - .../third_party/forked/reflect/LICENSE | 27 - .../kubernetes/third_party/golang/LICENSE | 27 - .../kubernetes/third_party/golang/PATENTS | 22 - .../kubernetes/third_party/htpasswd/COPYING | 28 - .../kubernetes/third_party/pause/LICENSE | 19 - .../kubernetes/third_party/swagger-ui/LICENSE | 11 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../blablacar/dgr/bin-dgr/common/common.go | 9 - .../blablacar/dgr/bin-dgr/common/manifest.go | 61 - .../github.com/camlistore/camlistore/COPYING | 202 --- .../clients/chrome/clip-it-good/LICENSE | 13 - .../camlistore/camlistore/misc/copyrightifity | 68 - .../camlistore/camlistore/pkg/legal/legal.go | 50 - .../pkg/legal/legalprint/legalprint.go | 42 - .../third_party/bazil.org/fuse/LICENSE | 93 -- .../third_party/closure/lib/LICENSE | 176 --- .../code.google.com/p/goauth2/LICENSE | 27 - .../code.google.com/p/goauth2/PATENTS | 22 - .../code.google.com/p/leveldb-go/LICENSE | 27 - .../code.google.com/p/snappy-go/LICENSE | 27 - .../code.google.com/p/xsrftoken/COPYING | 202 --- .../third_party/fontawesome/LICENSE.txt | 4 - .../github.com/camlistore/lock/COPYING | 202 --- .../github.com/cznic/exp/dbm/LICENSE | 27 - .../github.com/cznic/exp/lldb/LICENSE | 27 - .../github.com/cznic/fileutil/LICENSE | 27 - .../github.com/cznic/fileutil/falloc/LICENSE | 27 - .../github.com/cznic/fileutil/hdb/LICENSE | 27 - .../github.com/cznic/fileutil/storage/LICENSE | 27 - .../third_party/github.com/cznic/kv/LICENSE | 27 - .../github.com/cznic/mathutil/LICENSE | 27 - .../cznic/mathutil/mersenne/LICENSE | 27 - .../github.com/cznic/sortutil/LICENSE | 27 - .../github.com/cznic/zappy/LICENSE | 27 - .../github.com/davecgh/go-spew/LICENSE | 13 - .../github.com/go-sql-driver/mysql/LICENSE | 373 ------ .../github.com/golang/glog/LICENSE | 191 --- .../github.com/gorilla/websocket/LICENSE | 23 - .../third_party/github.com/lib/pq/LICENSE.md | 8 - .../russross/blackfriday/LICENSE.txt | 29 - .../github.com/rwcarlsen/goexif/LICENSE | 24 - .../camlistore/third_party/glitch/LICENSE | 19 - .../third_party/golang.org/x/image/LICENSE | 27 - .../third_party/golang.org/x/image/PATENTS | 22 - .../third_party/labix.org/v2/mgo/LICENSE | 25 - .../third_party/labix.org/v2/mgo/bson/LICENSE | 25 - .../camlistore/third_party/react/LICENSE.txt | 201 --- .../github.com/hjfreyer/taglib-go/LICENSE | 191 --- .../vendor/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../vendor/google.golang.org/cloud/LICENSE | 202 --- .../vendor/google.golang.org/grpc/LICENSE | 28 - .../vendor/google.golang.org/grpc/PATENTS | 22 - .../src/github.com/akrennmair/gopcap/LICENSE | 27 - .../bgentry/speakeasy/LICENSE_WINDOWS | 201 --- .../src/github.com/boltdb/bolt/LICENSE | 20 - .../src/github.com/bradfitz/http2/LICENSE | 7 - .../src/github.com/cheggaaa/pb/LICENSE | 12 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/google/btree/LICENSE | 202 --- .../github.com/jonboulle/clockwork/LICENSE | 201 --- .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../src/github.com/xiang90/probing/LICENSE | 22 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../src/google.golang.org/grpc/LICENSE | 28 - .../src/google.golang.org/grpc/PATENTS | 22 - .../src/github.com/coreos/etcd/LICENSE | 202 --- .../code.google.com/p/go-uuid/uuid/LICENSE | 27 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../github.com/jonboulle/clockwork/LICENSE | 201 --- .../googleapi/internal/uritemplates/LICENSE | 18 - .../src/github.com/coreos/fleet/LICENSE | 202 --- .../github.com/coreos/fleet/pkg/lease/etcd.go | 205 --- .../coreos/fleet/pkg/lease/interface.go | 72 -- .../src/github.com/coreos/fleet/ssh/LICENSE | 42 - .../src/github.com/coreos/go-semver/LICENSE | 202 --- .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../coreos/go-systemd/unit/escape.go | 116 -- .../coreos/go-systemd/unit/option.go | 54 - .../coreos/go-systemd/unit/serialize.go | 75 -- .../src/github.com/ghodss/yaml/LICENSE | 50 - .../github.com/SeanDolphin/bqschema/LICENSE | 201 --- .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/abbot/go-http-auth/LICENSE | 178 --- .../docker/docker/pkg/symlink/LICENSE.APACHE | 191 --- .../docker/docker/pkg/symlink/LICENSE.BSD | 27 - .../github.com/docker/libcontainer/LICENSE | 191 --- .../src/github.com/docker/libcontainer/NOTICE | 16 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../vendor/src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/protobuf/LICENSE | 31 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../github.com/fsouza/go-dockerclient/LICENSE | 22 - .../github.com/Sirupsen/logrus/LICENSE | 21 - .../docker/docker/pkg/mflag/LICENSE | 27 - .../github.com/gorilla/context/LICENSE | 27 - .../external/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/kr/pretty/License | 21 - .../_workspace/src/github.com/kr/text/License | 19 - .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../src/github.com/stretchr/objx/LICENSE.md | 23 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../src/gopkg.in/olivere/elastic.v2/LICENSE | 20 - .../olivere/elastic.v2/uritemplates/LICENSE | 18 - .../src/github.com/google/cadvisor/LICENSE | 190 --- .../cadvisor/utils/cloudinfo/cloudinfo.go | 87 -- .../google/cadvisor/utils/cloudinfo/gce.go | 36 - .../google/cadvisor/utils/cpuload/cpuload.go | 45 - .../cadvisor/utils/cpuload/netlink/conn.go | 95 -- .../cadvisor/utils/cpuload/netlink/defs.go | 26 - .../utils/cpuload/netlink/example/example.go | 40 - .../cadvisor/utils/cpuload/netlink/netlink.go | 241 ---- .../cadvisor/utils/cpuload/netlink/reader.go | 78 -- .../github.com/google/cadvisor/utils/fs/fs.go | 44 - .../cadvisor/utils/fs/mockfs/fakefile.go | 35 - .../google/cadvisor/utils/fs/mockfs/mockfs.go | 55 - .../google/cadvisor/utils/machine/machine.go | 297 ----- .../oomparser/containerOomExampleLog.txt | 44 - .../utils/oomparser/oomexample/main.go | 41 - .../cadvisor/utils/oomparser/oomparser.go | 220 ---- .../utils/oomparser/systemOomExampleLog.txt | 362 ------ .../google/cadvisor/utils/procfs/doc.go | 17 - .../google/cadvisor/utils/procfs/jiffy.go | 33 - .../cadvisor/utils/sysfs/fakesysfs/fake.go | 114 -- .../google/cadvisor/utils/sysfs/sysfs.go | 249 ---- .../google/cadvisor/utils/sysinfo/sysinfo.go | 210 --- .../inconshreveable/mousetrap/LICENSE | 13 - .../github.com/jonboulle/clockwork/LICENSE | 201 --- .../src/github.com/juju/errors/LICENSE | 191 --- .../src/github.com/leekchan/gtf/LICENSE | 22 - .../src/github.com/mgutz/ansi/LICENSE | 9 - .../mgutz/ansi/cmd/ansi-mgutz/main.go | 135 -- .../github.com/mitchellh/go-homedir/LICENSE | 21 - .../github.com/n0rad/go-erlog/docs/basic.png | Bin 27719 -> 0 bytes .../n0rad/go-erlog/examples/advanced/main.go | 30 - .../n0rad/go-erlog/examples/basic/main.go | 23 - .../examples/dedicated_logger/main.go | 8 - .../n0rad/go-erlog/examples/erlog/main.go | 21 - .../n0rad/go-erlog/examples/fields/fields.go | 16 - .../github.com/peterbourgon/mergemap/LICENSE | 23 - .../src/github.com/spf13/cobra/LICENSE.txt | 174 --- .../src/github.com/spf13/pflag/LICENSE | 28 - .../src/github.com/ugorji/go/LICENSE | 22 - .../ugorji/go/codec/codecgen/README.md | 36 - .../ugorji/go/codec/codecgen/gen.go | 273 ---- .../github.com/ugorji/go/codec/codecgen/z.go | 3 - .../ugorji/go/codec/fast-path.not.go | 32 - .../src/github.com/ugorji/go/codec/tests.sh | 80 -- .../_workspace/src/golang.org/x/net/LICENSE | 27 - .../_workspace/src/golang.org/x/net/PATENTS | 22 - .../x/net/context/ctxhttp/cancelreq.go | 18 - .../x/net/context/ctxhttp/cancelreq_go14.go | 23 - .../x/net/context/ctxhttp/ctxhttp.go | 79 -- .../src/golang.org/x/net/html/atom/table.go | 713 ----------- .../golang.org/x/net/html/charset/charset.go | 244 ---- .../src/golang.org/x/net/html/charset/gen.go | 111 -- .../golang.org/x/net/html/charset/table.go | 235 ---- .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 --- .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - .../bertimus9/systemstat/LICENSE | 20 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/abbot/go-http-auth/LICENSE | 178 --- .../github.com/codegangsta/negroni/LICENSE | 21 - .../src/github.com/dgrijalva/jwt-go/LICENSE | 8 - .../github.com/docker/libcontainer/LICENSE | 191 --- .../src/github.com/docker/libcontainer/NOTICE | 16 - .../src/github.com/Sirupsen/logrus/LICENSE | 21 - .../src/github.com/codegangsta/cli/LICENSE | 21 - .../src/github.com/coreos/go-systemd/LICENSE | 191 --- .../vendor/src/github.com/godbus/dbus/LICENSE | 25 - .../github.com/syndtr/gocapability/LICENSE | 24 - .../src/github.com/docker/spdystream/LICENSE | 191 --- .../elazarl/go-bindata-assetfs/LICENSE | 23 - .../github.com/emicklei/go-restful/LICENSE | 22 - .../src/github.com/evanphx/json-patch/LICENSE | 25 - .../github.com/fsouza/go-dockerclient/LICENSE | 22 - .../github.com/Sirupsen/logrus/LICENSE | 21 - .../docker/docker/pkg/mflag/LICENSE | 27 - .../github.com/gorilla/context/LICENSE | 27 - .../external/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/ghodss/yaml/LICENSE | 50 - .../src/github.com/godbus/dbus/LICENSE | 25 - .../src/github.com/golang/glog/LICENSE | 191 --- .../src/github.com/google/gofuzz/LICENSE | 202 --- .../src/github.com/gorilla/context/LICENSE | 27 - .../src/github.com/gorilla/mux/LICENSE | 27 - .../src/github.com/imdario/mergo/LICENSE | 28 - .../imdario/mergo/testdata/license.yml | 3 - .../inconshreveable/mousetrap/LICENSE | 13 - .../github.com/jonboulle/clockwork/LICENSE | 201 --- .../src/github.com/juju/ratelimit/LICENSE | 191 --- .../src/github.com/kardianos/osext/LICENSE | 27 - .../_workspace/src/github.com/kr/pty/License | 23 - .../src/github.com/miekg/dns/COPYRIGHT | 9 - .../src/github.com/miekg/dns/LICENSE | 32 - .../github.com/mitchellh/mapstructure/LICENSE | 21 - .../src/github.com/onsi/ginkgo/LICENSE | 20 - .../src/github.com/onsi/gomega/LICENSE | 20 - .../src/github.com/pborman/uuid/LICENSE | 27 - .../src/github.com/prometheus/procfs/LICENSE | 201 --- .../src/github.com/prometheus/procfs/NOTICE | 7 - .../github.com/rackspace/gophercloud/LICENSE | 191 --- .../russross/blackfriday/LICENSE.txt | 29 - .../src/github.com/scalingdata/gcfg/LICENSE | 57 - .../src/github.com/spf13/cobra/LICENSE.txt | 174 --- .../src/github.com/spf13/pflag/LICENSE | 28 - .../src/github.com/vaughan0/go-ini/LICENSE | 14 - .../github.com/xyproto/simpleredis/LICENSE | 21 - .../src/golang.org/x/oauth2/LICENSE | 27 - .../googleapi/internal/uritemplates/LICENSE | 18 - .../gopkg.in/natefinch/lumberjack.v2/LICENSE | 21 - .../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 --- .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../_workspace/src/k8s.io/kubernetes/LICENSE | 202 --- .../charms/trusty/kubernetes-master/copyright | 13 - .../juju/charms/trusty/kubernetes/copyright | 13 - .../update-demo/local/LICENSE.angular | 21 - .../third_party/forked/json/LICENSE | 27 - .../third_party/forked/reflect/LICENSE | 27 - .../kubernetes/third_party/golang/LICENSE | 27 - .../kubernetes/third_party/golang/PATENTS | 22 - .../kubernetes/third_party/htpasswd/COPYING | 28 - .../kubernetes/third_party/pause/LICENSE | 19 - .../kubernetes/third_party/swagger-ui/LICENSE | 11 - .../speter.net/go/exp/math/dec/inf/LICENSE | 57 - .../camlistore/pkg/errorutil/highlight.go | 0 .../coreos/go-semver/semver/semver.go | 203 +++ .../coreos/go-semver/semver/sort.go | 24 + .../src/github.com/spf13/pflag/LICENSE | 0 .../src/github.com/spf13/pflag/README.md | 155 +++ .../src/github.com/spf13/pflag/flag.go | 1133 +++++++++++++++++ .../src/golang.org/x/net/html/atom/atom.go | 0 .../src/golang.org/x/net/html/atom/gen.go | 20 +- .../src/golang.org/x/net/html/atom/table.go | 694 ++++++++++ .../src/golang.org/x/net/html/const.go | 6 +- .../src/golang.org/x/net/html/doc.go | 4 +- .../src/golang.org/x/net/html/doctype.go | 0 .../src/golang.org/x/net/html/entity.go | 2 +- .../src/golang.org/x/net/html/escape.go | 4 +- .../src/golang.org/x/net/html/foreign.go | 0 .../src/golang.org/x/net/html/node.go | 2 +- .../src/golang.org/x/net/html/parse.go | 44 +- .../src/golang.org/x/net/html/render.go | 2 +- .../src/golang.org/x/net/html/token.go | 2 +- .../kubernetes/pkg/api/resource/quantity.go | 12 +- .../kubernetes/pkg/api/resource/suffix.go | 0 .../speter.net/go/exp/math/dec/inf/LICENSE | 0 .../src/speter.net/go/exp/math/dec/inf/dec.go | 0 .../speter.net/go/exp/math/dec/inf/rounder.go | 0 .../github.com/appc/spec/LICENSE | 0 .../github.com/appc/spec/aci/build.go | 0 .../github.com/appc/spec/aci/doc.go | 0 .../github.com/appc/spec/aci/file.go | 0 .../github.com/appc/spec/aci/layout.go | 0 .../github.com/appc/spec/aci/writer.go | 0 .../appc/spec/discovery/discovery.go | 4 +- .../github.com/appc/spec/discovery/doc.go | 0 .../github.com/appc/spec/discovery/http.go | 0 .../github.com/appc/spec/discovery/myapp.html | 0 .../appc/spec/discovery/myapp2.html | 0 .../github.com/appc/spec/discovery/parse.go | 0 .../appc/spec/pkg/device/device_posix.go | 0 .../github.com/appc/spec/pkg/tarheader/doc.go | 0 .../appc/spec/pkg/tarheader/pop_darwin.go | 0 .../appc/spec/pkg/tarheader/pop_linux.go | 0 .../appc/spec/pkg/tarheader/pop_posix.go | 0 .../appc/spec/pkg/tarheader/tarheader.go | 0 .../appc/spec/schema/common/common.go | 0 .../github.com/appc/spec/schema/doc.go | 0 .../github.com/appc/spec/schema/image.go | 2 +- .../github.com/appc/spec/schema/kind.go | 0 .../github.com/appc/spec/schema/pod.go | 2 +- .../appc/spec/schema/types/acidentifier.go | 0 .../appc/spec/schema/types/ackind.go | 0 .../appc/spec/schema/types/acname.go | 0 .../appc/spec/schema/types/annotations.go | 0 .../github.com/appc/spec/schema/types/app.go | 0 .../github.com/appc/spec/schema/types/date.go | 0 .../appc/spec/schema/types/dependencies.go | 0 .../github.com/appc/spec/schema/types/doc.go | 0 .../appc/spec/schema/types/environment.go | 0 .../appc/spec/schema/types/errors.go | 0 .../appc/spec/schema/types/event_handler.go | 0 .../github.com/appc/spec/schema/types/exec.go | 0 .../github.com/appc/spec/schema/types/hash.go | 0 .../appc/spec/schema/types/isolator.go | 0 .../schema/types/isolator_linux_specific.go | 0 .../spec/schema/types/isolator_resources.go | 2 +- .../appc/spec/schema/types/labels.go | 0 .../appc/spec/schema/types/mountpoint.go | 0 .../github.com/appc/spec/schema/types/port.go | 0 .../appc/spec/schema/types/semver.go | 2 +- .../github.com/appc/spec/schema/types/url.go | 0 .../github.com/appc/spec/schema/types/uuid.go | 0 .../appc/spec/schema/types/volume.go | 0 .../github.com/appc/spec/schema/version.go | 0 .../attributes-merger/attributes/inputs.go | 0 .../attributes-merger/attributes/merger.go | 0 .../github.com/blablacar/dgr/LICENSE.md | 0 .../dgr/bin-dgr/common/acfullname.go | 6 + .../dgr/bin-dgr/common/aci-manifest.go | 146 +++ .../blablacar/dgr/bin-dgr/common/common.go | 45 + .../dgr/bin-dgr/common/dgr-manifest.go | 141 ++ .../blablacar/dgr/bin-dgr/common/exec.go | 14 + .../blablacar/dgr/bin-dgr/common/files.go | 0 .../dgr/bin-dgr/common/rkt-client.go | 176 +++ .../blablacar/dgr/bin-dgr/common/tar.go | 9 +- .../blablacar/dgr/bin-dgr/common/version.go | 63 + .../dgr/bin-dgr/common/version_generator.go | 28 + .../dgr/bin-templater/template/directory.go | 19 +- .../dgr/bin-templater/template/file.go | 14 +- .../dgr/bin-templater/template/templating.go | 150 ++- .../src/github.com/ugorji/go/codec/0doc.go | 8 +- .../src/github.com/ugorji/go/codec/README.md | 0 .../src/github.com/ugorji/go/codec/binc.go | 4 - .../src/github.com/ugorji/go/codec/cbor.go | 1 - .../src/github.com/ugorji/go/codec/decode.go | 1 - .../src/github.com/ugorji/go/codec/encode.go | 119 +- .../ugorji/go/codec/fast-path.generated.go | 0 .../ugorji/go/codec/fast-path.go.tmpl | 0 .../ugorji/go/codec/gen-dec-array.go.tmpl | 0 .../ugorji/go/codec/gen-dec-map.go.tmpl | 0 .../ugorji/go/codec/gen-helper.generated.go | 0 .../ugorji/go/codec/gen-helper.go.tmpl | 0 .../ugorji/go/codec/gen.generated.go | 0 .../src/github.com/ugorji/go/codec/gen.go | 0 .../src/github.com/ugorji/go/codec/helper.go | 200 +-- .../ugorji/go/codec/helper_internal.go | 0 .../ugorji/go/codec/helper_not_unsafe.go | 0 .../ugorji/go/codec/helper_unsafe.go | 0 .../src/github.com/ugorji/go/codec/json.go | 129 +- .../src/github.com/ugorji/go/codec/msgpack.go | 1 - .../src/github.com/ugorji/go/codec/noop.go | 0 .../github.com/ugorji/go/codec/prebuild.go | 0 .../github.com/ugorji/go/codec/prebuild.sh | 0 .../src/github.com/ugorji/go/codec/rpc.go | 0 .../src/github.com/ugorji/go/codec/simple.go | 1 - .../ugorji/go/codec/test-cbor-goldens.json | 0 .../src/github.com/ugorji/go/codec/test.py | 0 .../src/github.com/ugorji/go/codec/time.go | 13 +- .../src/golang.org/x/net/context/context.go | 0 .../github.com/coreos/etcd}/LICENSE | 0 .../github.com/coreos/etcd/NOTICE | 0 .../github.com/coreos/etcd/client/README.md | 0 .../coreos/etcd/client/auth_role.go | 2 +- .../coreos/etcd/client/auth_user.go | 2 +- .../coreos/etcd/client/cancelreq.go | 0 .../coreos/etcd/client/cancelreq_go14.go | 0 .../github.com/coreos/etcd/client/client.go | 2 +- .../coreos/etcd/client/cluster_error.go | 0 .../github.com/coreos/etcd/client/curl.go | 0 .../github.com/coreos/etcd/client/discover.go | 0 .../github.com/coreos/etcd/client/doc.go | 0 .../coreos/etcd/client/keys.generated.go | 2 +- .../github.com/coreos/etcd/client/keys.go | 4 +- .../github.com/coreos/etcd/client/members.go | 2 +- .../github.com/coreos/etcd/client/srv.go | 0 .../coreos/etcd/pkg/pathutil/path.go | 0 .../github.com/coreos/etcd/pkg/types/id.go | 0 .../github.com/coreos/etcd/pkg/types/set.go | 0 .../github.com/coreos/etcd/pkg/types/slice.go | 0 .../github.com/coreos/etcd/pkg/types/urls.go | 0 .../coreos/etcd/pkg/types/urlsmap.go | 0 .../coreos/go-systemd/unit/deserialize.go | 99 +- .../coreos/go-systemd/unit/option.go | 36 + .../coreos/go-systemd/unit/serialize.go | 51 + .../github.com/jonboulle/clockwork/.gitignore | 0 .../jonboulle/clockwork/.travis.yml | 2 - .../github.com/jonboulle/clockwork}/LICENSE | 0 .../github.com/jonboulle/clockwork/README.md | 0 .../jonboulle/clockwork/clockwork.go | 12 +- .../github.com/coreos/fleet}/LICENSE | 0 .../github.com/coreos/fleet/NOTICE | 0 .../github.com/coreos/fleet/log/log.go | 0 .../github.com/coreos/fleet/pkg/args.go | 0 .../github.com/coreos/fleet/pkg/backoff.go | 0 .../github.com/coreos/fleet/pkg/filepath.go | 0 .../github.com/coreos/fleet/pkg/filesystem.go | 0 .../github.com/coreos/fleet/pkg/flag.go | 0 .../github.com/coreos/fleet/pkg/http.go | 0 .../github.com/coreos/fleet/pkg/reconcile.go | 2 +- .../github.com/coreos/fleet/pkg/set.go | 0 .../github.com/coreos/fleet/pkg/tls.go | 0 .../github.com/coreos/fleet/unit/fake.go | 0 .../github.com/coreos/fleet/unit/generator.go | 0 .../github.com/coreos/fleet/unit/manager.go | 0 .../github.com/coreos/fleet/unit/unit.go | 2 +- .../github.com/coreos/go-semver}/LICENSE | 0 .../coreos/go-semver/semver/semver.go | 0 .../coreos/go-semver/semver/sort.go | 0 .../github.com/ghodss/yaml/.gitignore | 0 .../github.com/ghodss/yaml/LICENSE | 0 .../github.com/ghodss/yaml/README.md | 0 .../github.com/ghodss/yaml/fields.go | 0 .../github.com/ghodss/yaml/yaml.go | 0 .../github.com/google/cadvisor/LICENSE | 0 .../github.com/google/cadvisor/utils/path.go | 0 .../google/cadvisor/utils/timed_store.go | 0 .../github.com/google/cadvisor/utils/utils.go | 0 .../inconshreveable/mousetrap/LICENSE | 0 .../inconshreveable/mousetrap/README.md | 0 .../inconshreveable/mousetrap/trap_others.go | 0 .../inconshreveable/mousetrap/trap_windows.go | 0 .../mousetrap/trap_windows_1.4.go | 0 .../github.com/juju/errors/.gitignore | 0 .../github.com/juju/errors/LICENSE | 0 .../github.com/juju/errors/Makefile | 0 .../github.com/juju/errors/README.md | 0 .../github.com/juju/errors/doc.go | 0 .../github.com/juju/errors/error.go | 0 .../github.com/juju/errors/errortypes.go | 0 .../github.com/juju/errors/functions.go | 0 .../github.com/juju/errors/path.go | 0 .../github.com/leekchan/gtf/.gitignore | 0 .../github.com/leekchan/gtf/.travis.yml | 0 .../github.com/leekchan/gtf/LICENSE | 0 .../github.com/leekchan/gtf/README.md | 0 .../github.com/leekchan/gtf/gtf.go | 0 .../github.com/mgutz/ansi/.gitignore | 0 .../github.com/mgutz/ansi/LICENSE | 0 .../github.com/mgutz/ansi/README.md | 0 .../github.com/mgutz/ansi/ansi.go | 0 .../github.com/mgutz/ansi/doc.go | 0 .../github.com/mgutz/ansi/print.go | 0 .../github.com/mitchellh/go-homedir/LICENSE | 0 .../github.com/mitchellh/go-homedir/README.md | 0 .../mitchellh/go-homedir/homedir.go | 0 .../github.com/n0rad/go-erlog/Makefile | 0 .../github.com/n0rad/go-erlog/appender.go | 0 .../github.com/n0rad/go-erlog/data/data.go | 0 .../github.com/n0rad/go-erlog/errs/entry.go | 0 .../n0rad/go-erlog/errs/stackframe.go | 0 .../github.com/n0rad/go-erlog/event.go | 0 .../github.com/n0rad/go-erlog/formatter.go | 4 +- .../github.com/n0rad/go-erlog/logger.go | 0 .../github.com/n0rad/go-erlog/logs/default.go | 0 .../github.com/n0rad/go-erlog/logs/dummy.go | 0 .../github.com/n0rad/go-erlog/logs/entry.go | 0 .../github.com/n0rad/go-erlog/logs/levels.go | 0 .../github.com/n0rad/go-erlog/logs/logger.go | 0 .../github.com/n0rad/go-erlog/readme.md | 0 .../n0rad/go-erlog/register/register.go | 0 .../peterbourgon/mergemap/.gitignore | 0 .../github.com/peterbourgon/mergemap/LICENSE | 0 .../peterbourgon/mergemap/README.md | 0 .../peterbourgon/mergemap/mergemap.go | 0 .../github.com/spf13/cobra/.gitignore | 0 .../github.com/spf13/cobra/.travis.yml | 0 .../github.com/spf13/cobra/LICENSE.txt | 0 .../github.com/spf13/cobra/README.md | 0 .../spf13/cobra/bash_completions.go | 0 .../spf13/cobra/bash_completions.md | 0 .../github.com/spf13/cobra/cobra.go | 0 .../github.com/spf13/cobra/command.go | 0 .../github.com/spf13/cobra/md_docs.go | 0 .../github.com/spf13/cobra/md_docs.md | 0 .../github.com/spf13/pflag/.travis.yml | 0 .../github.com/spf13/pflag/LICENSE | 0 .../github.com/spf13/pflag/README.md | 0 .../github.com/spf13/pflag/bool.go | 0 .../github.com/spf13/pflag/duration.go | 0 .../github.com/spf13/pflag/flag.go | 0 .../github.com/spf13/pflag/float32.go | 0 .../github.com/spf13/pflag/float64.go | 0 .../github.com/spf13/pflag/int.go | 0 .../github.com/spf13/pflag/int32.go | 0 .../github.com/spf13/pflag/int64.go | 0 .../github.com/spf13/pflag/int8.go | 0 .../github.com/spf13/pflag/int_slice.go | 0 .../github.com/spf13/pflag/ip.go | 0 .../github.com/spf13/pflag/ipmask.go | 0 .../github.com/spf13/pflag/string.go | 0 .../github.com/spf13/pflag/string_slice.go | 0 .../github.com/spf13/pflag/uint.go | 0 .../github.com/spf13/pflag/uint16.go | 0 .../github.com/spf13/pflag/uint32.go | 0 .../github.com/spf13/pflag/uint64.go | 0 .../github.com/spf13/pflag/uint8.go | 0 .../golang.org/x/net}/LICENSE | 0 .../image => vendor/golang.org/x/net}/PATENTS | 0 vendor/golang.org/x/net/context/context.go | 447 +++++++ .../src => vendor}/gopkg.in/yaml.v2/LICENSE | 0 .../gopkg.in/yaml.v2/LICENSE.libyaml | 0 .../src => vendor}/gopkg.in/yaml.v2/README.md | 0 .../src => vendor}/gopkg.in/yaml.v2/apic.go | 0 .../src => vendor}/gopkg.in/yaml.v2/decode.go | 0 .../gopkg.in/yaml.v2/emitterc.go | 0 .../src => vendor}/gopkg.in/yaml.v2/encode.go | 0 .../gopkg.in/yaml.v2/parserc.go | 0 .../gopkg.in/yaml.v2/readerc.go | 0 .../gopkg.in/yaml.v2/resolve.go | 0 .../gopkg.in/yaml.v2/scannerc.go | 0 .../src => vendor}/gopkg.in/yaml.v2/sorter.go | 0 .../gopkg.in/yaml.v2/writerc.go | 0 .../src => vendor}/gopkg.in/yaml.v2/yaml.go | 0 .../src => vendor}/gopkg.in/yaml.v2/yamlh.go | 0 .../gopkg.in/yaml.v2/yamlprivateh.go | 0 work/env.go | 15 + work/service.go | 2 +- work/spec.go | 1 + 923 files changed, 3808 insertions(+), 45007 deletions(-) delete mode 100644 Godeps/_workspace/.gitignore delete mode 100644 Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/doc.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go delete mode 100644 Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go delete mode 100644 Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS delete mode 100644 Godeps/_workspace/src/github.com/coreos/etcd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go delete mode 100644 Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go delete mode 100644 Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go delete mode 100644 Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go delete mode 100644 Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/juju/errors/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/mgutz/ansi/cmd/ansi-mgutz/main.go delete mode 100644 Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/docs/basic.png delete mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go delete mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go delete mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go delete mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go delete mode 100644 Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go delete mode 100644 Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt delete mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/LICENSE delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go delete mode 100644 Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh delete mode 100644 Godeps/_workspace/src/golang.org/x/net/LICENSE delete mode 100644 Godeps/_workspace/src/golang.org/x/net/PATENTS delete mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/atom/table.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/gen.go delete mode 100644 Godeps/_workspace/src/golang.org/x/net/html/charset/table.go delete mode 100644 Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE delete mode 100644 Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE delete mode 100644 Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE delete mode 100644 Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go (100%) create mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go create mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE (100%) create mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md create mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/atom/atom.go (100%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/atom/gen.go (96%) create mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/const.go (93%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/doc.go (95%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/doctype.go (100%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/entity.go (99%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/escape.go (96%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/foreign.go (100%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/node.go (98%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/parse.go (97%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/render.go (99%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/golang.org/x/net/html/token.go (99%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go (98%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE (100%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go (100%) rename {Godeps => vendor/github.com/appc/spec/Godeps}/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/aci/build.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/aci/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/aci/file.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/aci/layout.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/aci/writer.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/discovery/discovery.go (97%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/discovery/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/discovery/http.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/discovery/myapp.html (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/discovery/myapp2.html (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/discovery/parse.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/pkg/device/device_posix.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/pkg/tarheader/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/pkg/tarheader/pop_darwin.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/pkg/tarheader/pop_linux.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/pkg/tarheader/pop_posix.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/pkg/tarheader/tarheader.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/common/common.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/image.go (97%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/kind.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/pod.go (97%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/acidentifier.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/ackind.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/acname.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/annotations.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/app.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/date.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/dependencies.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/environment.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/errors.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/event_handler.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/exec.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/hash.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/isolator.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/isolator_linux_specific.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/isolator_resources.go (98%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/labels.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/mountpoint.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/port.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/semver.go (96%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/url.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/uuid.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/types/volume.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/appc/spec/schema/version.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/blablacar/attributes-merger/attributes/inputs.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/blablacar/attributes-merger/attributes/merger.go (100%) rename Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE => vendor/github.com/blablacar/dgr/LICENSE.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-dgr/common/acfullname.go (92%) create mode 100644 vendor/github.com/blablacar/dgr/bin-dgr/common/aci-manifest.go create mode 100644 vendor/github.com/blablacar/dgr/bin-dgr/common/common.go create mode 100644 vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-dgr/common/exec.go (76%) rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-dgr/common/files.go (100%) create mode 100644 vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-dgr/common/tar.go (54%) create mode 100644 vendor/github.com/blablacar/dgr/bin-dgr/common/version.go create mode 100644 vendor/github.com/blablacar/dgr/bin-dgr/common/version_generator.go rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-templater/template/directory.go (81%) rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-templater/template/file.go (93%) rename {Godeps/_workspace/src => vendor}/github.com/blablacar/dgr/bin-templater/template/templating.go (51%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/0doc.go (94%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/README.md (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/binc.go (99%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/cbor.go (99%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/decode.go (99%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/encode.go (95%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/gen.generated.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/gen.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/helper.go (88%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/helper_internal.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/json.go (91%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/msgpack.go (99%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/noop.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/prebuild.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/prebuild.sh (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/rpc.go (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/simple.go (99%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/test.py (100%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/github.com/ugorji/go/codec/time.go (94%) rename {Godeps => vendor/github.com/coreos/etcd/Godeps}/_workspace/src/golang.org/x/net/context/context.go (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver => vendor/github.com/coreos/etcd}/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/NOTICE (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/auth_role.go (98%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/auth_user.go (98%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/cancelreq.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/cancelreq_go14.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/client.go (99%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/cluster_error.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/curl.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/discover.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/keys.generated.go (99%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/keys.go (99%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/members.go (98%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/client/srv.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/pkg/pathutil/path.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/pkg/types/id.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/pkg/types/set.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/pkg/types/slice.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/pkg/types/urls.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/etcd/pkg/types/urlsmap.go (100%) rename {Godeps => vendor/github.com/coreos/fleet/Godeps}/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go (59%) create mode 100644 vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go create mode 100644 vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go rename {Godeps => vendor/github.com/coreos/fleet/Godeps}/_workspace/src/github.com/jonboulle/clockwork/.gitignore (100%) rename {Godeps => vendor/github.com/coreos/fleet/Godeps}/_workspace/src/github.com/jonboulle/clockwork/.travis.yml (65%) rename {Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt => vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork}/LICENSE (100%) rename {Godeps => vendor/github.com/coreos/fleet/Godeps}/_workspace/src/github.com/jonboulle/clockwork/README.md (100%) rename {Godeps => vendor/github.com/coreos/fleet/Godeps}/_workspace/src/github.com/jonboulle/clockwork/clockwork.go (90%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz => vendor/github.com/coreos/fleet}/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/NOTICE (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/log/log.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/args.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/backoff.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/filepath.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/filesystem.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/flag.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/http.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/reconcile.go (96%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/set.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/pkg/tls.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/unit/fake.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/unit/generator.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/unit/manager.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/fleet/unit/unit.go (98%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes => vendor/github.com/coreos/go-semver}/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/go-semver/semver/semver.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/coreos/go-semver/semver/sort.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/ghodss/yaml/.gitignore (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/ghodss/yaml/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/ghodss/yaml/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/ghodss/yaml/fields.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/ghodss/yaml/yaml.go (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/google/cadvisor/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/google/cadvisor/utils/path.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/google/cadvisor/utils/timed_store.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/google/cadvisor/utils/utils.go (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/inconshreveable/mousetrap/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/inconshreveable/mousetrap/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/inconshreveable/mousetrap/trap_others.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/inconshreveable/mousetrap/trap_windows.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/inconshreveable/mousetrap/trap_windows_1.4.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/.gitignore (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/juju/errors/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/Makefile (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/error.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/errortypes.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/functions.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/juju/errors/path.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/leekchan/gtf/.gitignore (100%) rename {Godeps/_workspace/src => vendor}/github.com/leekchan/gtf/.travis.yml (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/leekchan/gtf/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/leekchan/gtf/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/leekchan/gtf/gtf.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/mgutz/ansi/.gitignore (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/mgutz/ansi/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/mgutz/ansi/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/mgutz/ansi/ansi.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/mgutz/ansi/doc.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/mgutz/ansi/print.go (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/mitchellh/go-homedir/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/mitchellh/go-homedir/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/mitchellh/go-homedir/homedir.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/Makefile (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/appender.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/data/data.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/errs/entry.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/errs/stackframe.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/event.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/formatter.go (99%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/logger.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/logs/default.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/logs/dummy.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/logs/entry.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/logs/levels.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/logs/logger.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/readme.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/n0rad/go-erlog/register/register.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/peterbourgon/mergemap/.gitignore (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/peterbourgon/mergemap/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/peterbourgon/mergemap/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/peterbourgon/mergemap/mergemap.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/.gitignore (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/.travis.yml (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/github.com/spf13/cobra/LICENSE.txt (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/bash_completions.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/bash_completions.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/cobra.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/command.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/md_docs.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/cobra/md_docs.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/.travis.yml (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src => vendor}/github.com/spf13/pflag/LICENSE (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/README.md (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/bool.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/duration.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/flag.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/float32.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/float64.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/int.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/int32.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/int64.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/int8.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/int_slice.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/ip.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/ipmask.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/string.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/string_slice.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/uint.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/uint16.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/uint32.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/uint64.go (100%) rename {Godeps/_workspace/src => vendor}/github.com/spf13/pflag/uint8.go (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil => vendor/golang.org/x/net}/LICENSE (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image => vendor/golang.org/x/net}/PATENTS (100%) create mode 100644 vendor/golang.org/x/net/context/context.go rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/LICENSE (100%) rename {Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/LICENSE.libyaml (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/README.md (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/apic.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/decode.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/emitterc.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/encode.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/parserc.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/readerc.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/resolve.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/scannerc.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/sorter.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/writerc.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/yaml.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/yamlh.go (100%) rename {Godeps/_workspace/src => vendor}/gopkg.in/yaml.v2/yamlprivateh.go (100%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index f813d8c..193f972 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,10 +1,46 @@ { "ImportPath": "github.com/blablacar/ggn", "GoVersion": "go1.6", + "GodepVersion": "v65", "Packages": [ "./..." ], "Deps": [ + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, { "ImportPath": "github.com/appc/spec/aci", "Comment": "v0.7.1-30-g1e5ab3d", @@ -30,6 +66,16 @@ "Comment": "v0.7.1-30-g1e5ab3d", "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" }, + { + "ImportPath": "github.com/appc/spec/schema/common", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, + { + "ImportPath": "github.com/appc/spec/schema/types", + "Comment": "v0.7.1-30-g1e5ab3d", + "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + }, { "ImportPath": "github.com/blablacar/attributes-merger/attributes", "Comment": "0.1-6-g431a372", @@ -37,17 +83,23 @@ }, { "ImportPath": "github.com/blablacar/dgr/bin-dgr/common", - "Comment": "56-32-g7627526", - "Rev": "76275266f686b07ea4a021d51ad711b781a464ad" + "Comment": "68-3-g9c108bb", + "Rev": "9c108bbb994fd002da65d0373b0dfcd6308f0a7c" }, { "ImportPath": "github.com/blablacar/dgr/bin-templater/template", - "Comment": "56-32-g7627526", - "Rev": "76275266f686b07ea4a021d51ad711b781a464ad" + "Comment": "68-3-g9c108bb", + "Rev": "9c108bbb994fd002da65d0373b0dfcd6308f0a7c" }, { - "ImportPath": "github.com/camlistore/camlistore/pkg/errorutil", - "Rev": "58958f44ee2eaa5139097dec3e02f47df0aba180" + "ImportPath": "github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec", + "Comment": "v2.3.0-alpha.0-7-gdcf0b45", + "Rev": "dcf0b454838a1b554bd276d4a341ae08f6e2f660" + }, + { + "ImportPath": "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context", + "Comment": "v2.3.0-alpha.0-7-gdcf0b45", + "Rev": "dcf0b454838a1b554bd276d4a341ae08f6e2f660" }, { "ImportPath": "github.com/coreos/etcd/client", @@ -64,6 +116,16 @@ "Comment": "v2.3.0-alpha.0-7-gdcf0b45", "Rev": "dcf0b454838a1b554bd276d4a341ae08f6e2f660" }, + { + "ImportPath": "github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit", + "Comment": "v0.10.1-116-g2d02451", + "Rev": "2d024517a2c9f1e7492ef00f9ac26500b27556b2" + }, + { + "ImportPath": "github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork", + "Comment": "v0.10.1-116-g2d02451", + "Rev": "2d024517a2c9f1e7492ef00f9ac26500b27556b2" + }, { "ImportPath": "github.com/coreos/fleet/log", "Comment": "v0.10.1-116-g2d02451", @@ -83,11 +145,6 @@ "ImportPath": "github.com/coreos/go-semver/semver", "Rev": "d043ae190b3202550d026daf009359bb5d761672" }, - { - "ImportPath": "github.com/coreos/go-systemd/unit", - "Comment": "v4", - "Rev": "b4a58d95188dd092ae20072bac14cece0e67c388" - }, { "ImportPath": "github.com/ghodss/yaml", "Rev": "c3eb24aeea63668ebdac08d2e252f20df8b6b1ae" @@ -101,10 +158,6 @@ "ImportPath": "github.com/inconshreveable/mousetrap", "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" }, - { - "ImportPath": "github.com/jonboulle/clockwork", - "Rev": "fad208dd89dbc316a149043e332a192477f0e2a2" - }, { "ImportPath": "github.com/juju/errors", "Rev": "1b5e39b83d1835fa480e0c2ddefb040ee82d58b3" @@ -123,7 +176,23 @@ }, { "ImportPath": "github.com/n0rad/go-erlog", - "Rev": "73ef27688910c7154b1428a4aa63b1d3f4ada1f9" + "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + }, + { + "ImportPath": "github.com/n0rad/go-erlog/data", + "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + }, + { + "ImportPath": "github.com/n0rad/go-erlog/errs", + "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + }, + { + "ImportPath": "github.com/n0rad/go-erlog/logs", + "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + }, + { + "ImportPath": "github.com/n0rad/go-erlog/register", + "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" }, { "ImportPath": "github.com/peterbourgon/mergemap", @@ -137,30 +206,13 @@ "ImportPath": "github.com/spf13/pflag", "Rev": "67cbc198fd11dab704b214c1e629a97af392c085" }, - { - "ImportPath": "github.com/ugorji/go/codec", - "Rev": "8bb56663530600b54f72c79871451ea5725b6763" - }, { "ImportPath": "golang.org/x/net/context", "Rev": "ea47fc708ee3e20177f3ca3716217c4ab75942cb" }, - { - "ImportPath": "golang.org/x/net/html", - "Rev": "ea47fc708ee3e20177f3ca3716217c4ab75942cb" - }, { "ImportPath": "gopkg.in/yaml.v2", "Rev": "7ad95dd0798a40da1ccdff6dff35fd177b5edf40" - }, - { - "ImportPath": "k8s.io/kubernetes/pkg/api/resource", - "Comment": "v1.1.0-alpha.1-152-g77e2d4f", - "Rev": "77e2d4f9185ecbedab327f228960d4ba33703025" - }, - { - "ImportPath": "speter.net/go/exp/math/dec/inf", - "Rev": "42ca6cd68aa922bc3f32f1e056e61b65945d9ad7" } ] } diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore deleted file mode 100644 index f037d68..0000000 --- a/Godeps/_workspace/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/pkg -/bin diff --git a/Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE b/Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE deleted file mode 100644 index 998eea7..0000000 --- a/Godeps/_workspace/src/github.com/afex/hystrix-go/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 keith - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/doc.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/doc.go deleted file mode 100644 index 9cc5734..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package lastditch provides fallback redefinitions of parts of -// schemas provided by schema package. -// -// Almost no validation of schemas is done (besides checking if data -// really is `JSON`-encoded and kind is either `ImageManifest` or -// `PodManifest`. This is to get as much data as possible from an -// invalid manifest. The main aim of the package is to be used for the -// better error reporting. The another aim might be to force some -// operation (like removing a pod), which would otherwise fail because -// of an invalid manifest. -// -// To avoid validation during deserialization, types provided by this -// package use plain strings. -package lastditch diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go deleted file mode 100644 index dc5055a..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/image.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lastditch - -import ( - "encoding/json" - - "github.com/appc/spec/schema" - "github.com/appc/spec/schema/types" -) - -type ImageManifest struct { - ACVersion string `json:"acVersion"` - ACKind string `json:"acKind"` - Name string `json:"name"` - Labels Labels `json:"labels,omitempty"` -} - -// a type just to avoid a recursion during unmarshalling -type imageManifest ImageManifest - -func (im *ImageManifest) UnmarshalJSON(data []byte) error { - i := imageManifest(*im) - err := json.Unmarshal(data, &i) - if err != nil { - return err - } - if i.ACKind != string(schema.ImageManifestKind) { - return types.InvalidACKindError(schema.ImageManifestKind) - } - *im = ImageManifest(i) - return nil -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go deleted file mode 100644 index 5cf93a0..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/labels.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lastditch - -import ( - "encoding/json" -) - -type Labels []Label - -// a type just to avoid a recursion during unmarshalling -type labels Labels - -type Label struct { - Name string `json:"name"` - Value string `json:"value"` -} - -func (l *Labels) UnmarshalJSON(data []byte) error { - var jl labels - if err := json.Unmarshal(data, &jl); err != nil { - return err - } - *l = Labels(jl) - return nil -} diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go b/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go deleted file mode 100644 index 2e9d845..0000000 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/lastditch/pod.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015 The appc Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lastditch - -import ( - "encoding/json" - - "github.com/appc/spec/schema" - "github.com/appc/spec/schema/types" -) - -type PodManifest struct { - ACVersion string `json:"acVersion"` - ACKind string `json:"acKind"` - Apps AppList `json:"apps"` -} - -type AppList []RuntimeApp - -type RuntimeApp struct { - Name string `json:"name"` - Image RuntimeImage `json:"image"` -} - -type RuntimeImage struct { - Name string `json:"name"` - ID string `json:"id"` - Labels Labels `json:"labels,omitempty"` -} - -// a type just to avoid a recursion during unmarshalling -type podManifest PodManifest - -func (pm *PodManifest) UnmarshalJSON(data []byte) error { - p := podManifest(*pm) - err := json.Unmarshal(data, &p) - if err != nil { - return err - } - if p.ACKind != string(schema.PodManifestKind) { - return types.InvalidACKindError(schema.PodManifestKind) - } - *pm = PodManifest(p) - return nil -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE deleted file mode 100644 index 055361b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2010 Brett Slatkin - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity deleted file mode 100644 index 14db513..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# Copyright 2010 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# This script adds copyright headers to files. - -use strict; -my $header = do { local $/; <DATA> }; -$header =~ s!\s+$!\n!; -my $yyyy = (localtime())[5] + 1900; -$header =~ s/YYYY/$yyyy/ or die; - -unless (@ARGV == 1) { - die "Usage: copyrightify <filename>\n"; -} - -my $file = shift; -open(my $fh, $file) or die "Open $file error: $!\n"; -my $source = do { local $/; <$fh> }; -close($fh); -if ($source =~ /Copyright \d\d\d\d/) { - print STDERR "# $file - OK\n"; - exit; -} - -my $newsource = $source; -if ($file =~ /\.(go|java|aidl)$/) { - $header = "/*\n$header*/\n\n"; - $newsource = $header . $source; -} elsif ($file =~ /\.py$/) { - $header = join("", map { "# $_\n" } split(/\n/, $header)); - $newsource = $header . $source; -} else { - die "File type not supported."; -} - - -open(my $fh, ">$file") or die "Open $file error: $!\n"; -print $fh $newsource; -close($fh) or die; - -__END__ -Copyright YYYY The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go deleted file mode 100644 index a75283f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legal provides project-wide storage for compiled-in licenses. -package legal - -var licenses []string - -func init() { - RegisterLicense(` -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -`) -} - -// RegisterLicense stores the license text. -// It doesn't check whether the text was already present. -func RegisterLicense(text string) { - licenses = append(licenses, text) - return -} - -// Licenses returns a slice of the licenses. -func Licenses() []string { - return licenses -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go deleted file mode 100644 index e4a3205..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legalprint provides a printing helper for the legal package. -package legalprint - -import ( - "flag" - "fmt" - "io" - - "camlistore.org/pkg/legal" -) - -var ( - flagLegal = flag.Bool("legal", false, "show licenses") -) - -// MaybePrint will print the licenses if flagLegal has been set. -// It will return the value of the flagLegal. -func MaybePrint(out io.Writer) bool { - if !*flagLegal { - return false - } - for _, text := range legal.Licenses() { - fmt.Fprintln(out, text) - } - return true -} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE deleted file mode 100644 index d369cb8..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE +++ /dev/null @@ -1,93 +0,0 @@ -Copyright (c) 2013, 2014 Tommi Virtanen. -Copyright (c) 2009, 2011, 2012 The Go Authors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The following included software components have additional copyright -notices and license terms that may differ from the above. - - -File fuse.go: - -// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, -// which carries this notice: -// -// The files in this directory are subject to the following license. -// -// The author of this software is Russ Cox. -// -// Copyright (c) 2006 Russ Cox -// -// Permission to use, copy, modify, and distribute this software for any -// purpose without fee is hereby granted, provided that this entire notice -// is included in all copies of any software which is or includes a copy -// or modification of this software and in all copies of the supporting -// documentation for such software. -// -// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY -// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS -// FITNESS FOR ANY PARTICULAR PURPOSE. - - -File fuse_kernel.go: - -// Derived from FUSE's fuse_kernel.h -/* - This file defines the kernel interface of FUSE - Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> - - - This -- and only this -- header file may also be distributed under - the terms of the BSD Licence as follows: - - Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE deleted file mode 100644 index d9a10c0..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE deleted file mode 100644 index 6765f09..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The goauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS deleted file mode 100644 index 9e87163..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the goauth2 project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE deleted file mode 100644 index fec05ce..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE deleted file mode 100644 index 6050c10..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt deleted file mode 100644 index 1066d2f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt +++ /dev/null @@ -1,4 +0,0 @@ -fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) -css/*: MIT (http://opensource.org/licenses/mit-license.html) - -Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE deleted file mode 100644 index 50bbdd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The fileutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE deleted file mode 100644 index 7150ce3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 jnml. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of jnml nor the names of his -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE deleted file mode 100644 index 2a7cfd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2012-2013 Dave Collins <dave@davec.name> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE deleted file mode 100644 index 14e2f77..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 09e5be6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013, Gorilla web toolkit -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md deleted file mode 100644 index 5773904..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2011-2013, 'pq' Contributors -Portions Copyright (C) 2011 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE deleted file mode 100644 index aa62504..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ - -Copyright (c) 2012, Robert Carlsen & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE deleted file mode 100644 index 7efba3b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The files in here come from www.glitchthegame.com. - -License here: http://www.glitchthegame.com/public-domain-game-art/#licensing - -All files are provided by Tiny Speck under the Creative Commons CC0 1.0 -Universal License. This is a broadly permissive "No Rights Reserved" license — -you may do what you please with what we've provided. Our intention is to -dedicate these works to the public domain and make them freely available to all, -without restriction. All files are provided AS-IS. Tiny Speck cannot provide any -support to help you bring these assets into your own projects. - -Note: the Glitch logo and trademark are not among the things we are making -available under this license. Only items in the files explicitly included herein -are covered. - -There is no obligation to link or credit the works, but if you do, please link -to glitchthegame.com, our permanent "retirement" site for the game and these -assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack -(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE deleted file mode 100644 index 770c767..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -mgo - MongoDB driver for Go - -Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE deleted file mode 100644 index 8903260..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -BSON library for Go - -Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE deleted file mode 100644 index a4c5efd..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE deleted file mode 100644 index f4988b4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2014, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS deleted file mode 100644 index 619f9db..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the GRPC project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of GRPC, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of GRPC. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of GRPC or any code incorporated within this -implementation of GRPC constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of GRPC -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE deleted file mode 100644 index 902306b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 Sean Dolphin - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE deleted file mode 100644 index e454a52..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE +++ /dev/null @@ -1,178 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE deleted file mode 100644 index 9e4bd4d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014-2015 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE deleted file mode 100644 index dc91298..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE +++ /dev/null @@ -1,16 +0,0 @@ -libcontainer -Copyright 2012-2015 Docker, Inc. - -This product includes software developed at Docker, Inc. (http://www.docker.com). - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see http://www.bis.doc.gov - -See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 1b1b192..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE deleted file mode 100644 index 4e11de1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015, go-dockerclient authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License deleted file mode 100644 index 05c783c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License deleted file mode 100644 index 480a328..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md deleted file mode 100644 index 2199945..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -objx - by Mat Ryer and Tyler Bunnell - -The MIT License (MIT) - -Copyright (c) 2014 Stretchr, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE deleted file mode 100644 index 8b22cdb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) -Copyright © 2012-2015 Oliver Eilhard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/golang.org/x/net/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE deleted file mode 100644 index 8bff971..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Phillip Bond - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE deleted file mode 100644 index e454a52..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE +++ /dev/null @@ -1,178 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE deleted file mode 100644 index 08b5e20..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jeremy Saenz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE deleted file mode 100644 index df83a9c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2012 Dave Grijalva - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE deleted file mode 100644 index dc91298..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE +++ /dev/null @@ -1,16 +0,0 @@ -libcontainer -Copyright 2012-2015 Docker, Inc. - -This product includes software developed at Docker, Inc. (http://www.docker.com). - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see http://www.bis.doc.gov - -See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE deleted file mode 100644 index 5782c72..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2014, Elazar Leibovich -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE deleted file mode 100644 index ece7ec6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012,2013 Ernest Micklei - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE deleted file mode 100644 index 0eb9b72..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014, Evan Phoenix -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the Evan Phoenix nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE deleted file mode 100644 index 4e11de1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015, go-dockerclient authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE deleted file mode 100644 index 7805d36..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Sam Ghods - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE deleted file mode 100644 index 6866802..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2013 Dario Castañé. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml deleted file mode 100644 index 62fdb61..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml +++ /dev/null @@ -1,3 +0,0 @@ -import: ../../../../fossene/db/schema/thing.yml -fields: - site: string diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f0d1fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Alan Shreve - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE deleted file mode 100644 index ade9307..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -All files in this repository are licensed as follows. If you contribute -to this repository, it is assumed that you license your contribution -under the same license unless you state otherwise. - -All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License deleted file mode 100644 index 6b7558b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2011 Keith Rarick - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT deleted file mode 100644 index 35702b1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2009 The Go Authors. All rights reserved. Use of this source code -is governed by a BSD-style license that can be found in the LICENSE file. -Extensions of the original work are copyright (c) 2011 Miek Gieben - -Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is -governed by a BSD-style license that can be found in the LICENSE file. - -Copyright 2014 CloudFlare. All rights reserved. Use of this source code is -governed by a BSD-style license that can be found in the LICENSE file. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE deleted file mode 100644 index 5763fa7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Extensions of the original work are copyright (c) 2011 Miek Gieben - -As this is fork of the official Go code the same license applies: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE deleted file mode 100644 index f9c841a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE deleted file mode 100644 index 5dc6826..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE deleted file mode 100644 index fbbbc9e..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Copyright 2012-2013 Rackspace, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - ------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE deleted file mode 100644 index b0a9e76..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of gcfg's source code have been derived from Go, and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE deleted file mode 100644 index 968b453..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2013 Vaughan Newton - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE deleted file mode 100644 index 145d387..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Alexander F Rødseth - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE deleted file mode 100644 index c3d4cc3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Nate Finch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright deleted file mode 100644 index a0b409a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright deleted file mode 100644 index a0b409a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular deleted file mode 100644 index 020f87a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2010-2014 Google, Inc. http://angularjs.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING deleted file mode 100644 index c6b097c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (C) 2003-2013 Edgewall Software -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE deleted file mode 100644 index 2b5e5ff..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The Expat/MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE deleted file mode 100644 index 9f93e06..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2014 Reverb Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/appc/spec/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE deleted file mode 100644 index 055361b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2010 Brett Slatkin - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity deleted file mode 100644 index 14db513..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# Copyright 2010 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# This script adds copyright headers to files. - -use strict; -my $header = do { local $/; <DATA> }; -$header =~ s!\s+$!\n!; -my $yyyy = (localtime())[5] + 1900; -$header =~ s/YYYY/$yyyy/ or die; - -unless (@ARGV == 1) { - die "Usage: copyrightify <filename>\n"; -} - -my $file = shift; -open(my $fh, $file) or die "Open $file error: $!\n"; -my $source = do { local $/; <$fh> }; -close($fh); -if ($source =~ /Copyright \d\d\d\d/) { - print STDERR "# $file - OK\n"; - exit; -} - -my $newsource = $source; -if ($file =~ /\.(go|java|aidl)$/) { - $header = "/*\n$header*/\n\n"; - $newsource = $header . $source; -} elsif ($file =~ /\.py$/) { - $header = join("", map { "# $_\n" } split(/\n/, $header)); - $newsource = $header . $source; -} else { - die "File type not supported."; -} - - -open(my $fh, ">$file") or die "Open $file error: $!\n"; -print $fh $newsource; -close($fh) or die; - -__END__ -Copyright YYYY The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go deleted file mode 100644 index a75283f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legal provides project-wide storage for compiled-in licenses. -package legal - -var licenses []string - -func init() { - RegisterLicense(` -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -`) -} - -// RegisterLicense stores the license text. -// It doesn't check whether the text was already present. -func RegisterLicense(text string) { - licenses = append(licenses, text) - return -} - -// Licenses returns a slice of the licenses. -func Licenses() []string { - return licenses -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go deleted file mode 100644 index e4a3205..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legalprint provides a printing helper for the legal package. -package legalprint - -import ( - "flag" - "fmt" - "io" - - "camlistore.org/pkg/legal" -) - -var ( - flagLegal = flag.Bool("legal", false, "show licenses") -) - -// MaybePrint will print the licenses if flagLegal has been set. -// It will return the value of the flagLegal. -func MaybePrint(out io.Writer) bool { - if !*flagLegal { - return false - } - for _, text := range legal.Licenses() { - fmt.Fprintln(out, text) - } - return true -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE deleted file mode 100644 index d369cb8..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE +++ /dev/null @@ -1,93 +0,0 @@ -Copyright (c) 2013, 2014 Tommi Virtanen. -Copyright (c) 2009, 2011, 2012 The Go Authors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The following included software components have additional copyright -notices and license terms that may differ from the above. - - -File fuse.go: - -// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, -// which carries this notice: -// -// The files in this directory are subject to the following license. -// -// The author of this software is Russ Cox. -// -// Copyright (c) 2006 Russ Cox -// -// Permission to use, copy, modify, and distribute this software for any -// purpose without fee is hereby granted, provided that this entire notice -// is included in all copies of any software which is or includes a copy -// or modification of this software and in all copies of the supporting -// documentation for such software. -// -// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY -// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS -// FITNESS FOR ANY PARTICULAR PURPOSE. - - -File fuse_kernel.go: - -// Derived from FUSE's fuse_kernel.h -/* - This file defines the kernel interface of FUSE - Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> - - - This -- and only this -- header file may also be distributed under - the terms of the BSD Licence as follows: - - Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE deleted file mode 100644 index d9a10c0..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE deleted file mode 100644 index 6765f09..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The goauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS deleted file mode 100644 index 9e87163..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the goauth2 project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE deleted file mode 100644 index fec05ce..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE deleted file mode 100644 index 6050c10..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt deleted file mode 100644 index 1066d2f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt +++ /dev/null @@ -1,4 +0,0 @@ -fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) -css/*: MIT (http://opensource.org/licenses/mit-license.html) - -Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE deleted file mode 100644 index 50bbdd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The fileutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE deleted file mode 100644 index 7150ce3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 jnml. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of jnml nor the names of his -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE deleted file mode 100644 index 2a7cfd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2012-2013 Dave Collins <dave@davec.name> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE deleted file mode 100644 index 14e2f77..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 09e5be6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013, Gorilla web toolkit -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md deleted file mode 100644 index 5773904..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2011-2013, 'pq' Contributors -Portions Copyright (C) 2011 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE deleted file mode 100644 index aa62504..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ - -Copyright (c) 2012, Robert Carlsen & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE deleted file mode 100644 index 7efba3b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The files in here come from www.glitchthegame.com. - -License here: http://www.glitchthegame.com/public-domain-game-art/#licensing - -All files are provided by Tiny Speck under the Creative Commons CC0 1.0 -Universal License. This is a broadly permissive "No Rights Reserved" license — -you may do what you please with what we've provided. Our intention is to -dedicate these works to the public domain and make them freely available to all, -without restriction. All files are provided AS-IS. Tiny Speck cannot provide any -support to help you bring these assets into your own projects. - -Note: the Glitch logo and trademark are not among the things we are making -available under this license. Only items in the files explicitly included herein -are covered. - -There is no obligation to link or credit the works, but if you do, please link -to glitchthegame.com, our permanent "retirement" site for the game and these -assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack -(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE deleted file mode 100644 index 770c767..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -mgo - MongoDB driver for Go - -Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE deleted file mode 100644 index 8903260..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -BSON library for Go - -Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE deleted file mode 100644 index a4c5efd..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE deleted file mode 100644 index f4988b4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2014, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS deleted file mode 100644 index 619f9db..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the GRPC project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of GRPC, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of GRPC. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of GRPC or any code incorporated within this -implementation of GRPC constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of GRPC -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE deleted file mode 100644 index 8f71f43..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/cni/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/docker2aci/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/goaci/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/appc/spec/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE deleted file mode 100644 index 055361b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2010 Brett Slatkin - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity deleted file mode 100644 index 14db513..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# Copyright 2010 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# This script adds copyright headers to files. - -use strict; -my $header = do { local $/; <DATA> }; -$header =~ s!\s+$!\n!; -my $yyyy = (localtime())[5] + 1900; -$header =~ s/YYYY/$yyyy/ or die; - -unless (@ARGV == 1) { - die "Usage: copyrightify <filename>\n"; -} - -my $file = shift; -open(my $fh, $file) or die "Open $file error: $!\n"; -my $source = do { local $/; <$fh> }; -close($fh); -if ($source =~ /Copyright \d\d\d\d/) { - print STDERR "# $file - OK\n"; - exit; -} - -my $newsource = $source; -if ($file =~ /\.(go|java|aidl)$/) { - $header = "/*\n$header*/\n\n"; - $newsource = $header . $source; -} elsif ($file =~ /\.py$/) { - $header = join("", map { "# $_\n" } split(/\n/, $header)); - $newsource = $header . $source; -} else { - die "File type not supported."; -} - - -open(my $fh, ">$file") or die "Open $file error: $!\n"; -print $fh $newsource; -close($fh) or die; - -__END__ -Copyright YYYY The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go deleted file mode 100644 index a75283f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legal provides project-wide storage for compiled-in licenses. -package legal - -var licenses []string - -func init() { - RegisterLicense(` -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -`) -} - -// RegisterLicense stores the license text. -// It doesn't check whether the text was already present. -func RegisterLicense(text string) { - licenses = append(licenses, text) - return -} - -// Licenses returns a slice of the licenses. -func Licenses() []string { - return licenses -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go deleted file mode 100644 index e4a3205..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legalprint provides a printing helper for the legal package. -package legalprint - -import ( - "flag" - "fmt" - "io" - - "camlistore.org/pkg/legal" -) - -var ( - flagLegal = flag.Bool("legal", false, "show licenses") -) - -// MaybePrint will print the licenses if flagLegal has been set. -// It will return the value of the flagLegal. -func MaybePrint(out io.Writer) bool { - if !*flagLegal { - return false - } - for _, text := range legal.Licenses() { - fmt.Fprintln(out, text) - } - return true -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE deleted file mode 100644 index d369cb8..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE +++ /dev/null @@ -1,93 +0,0 @@ -Copyright (c) 2013, 2014 Tommi Virtanen. -Copyright (c) 2009, 2011, 2012 The Go Authors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The following included software components have additional copyright -notices and license terms that may differ from the above. - - -File fuse.go: - -// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, -// which carries this notice: -// -// The files in this directory are subject to the following license. -// -// The author of this software is Russ Cox. -// -// Copyright (c) 2006 Russ Cox -// -// Permission to use, copy, modify, and distribute this software for any -// purpose without fee is hereby granted, provided that this entire notice -// is included in all copies of any software which is or includes a copy -// or modification of this software and in all copies of the supporting -// documentation for such software. -// -// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY -// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS -// FITNESS FOR ANY PARTICULAR PURPOSE. - - -File fuse_kernel.go: - -// Derived from FUSE's fuse_kernel.h -/* - This file defines the kernel interface of FUSE - Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> - - - This -- and only this -- header file may also be distributed under - the terms of the BSD Licence as follows: - - Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE deleted file mode 100644 index d9a10c0..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE deleted file mode 100644 index 6765f09..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The goauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS deleted file mode 100644 index 9e87163..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the goauth2 project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE deleted file mode 100644 index fec05ce..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE deleted file mode 100644 index 6050c10..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt deleted file mode 100644 index 1066d2f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt +++ /dev/null @@ -1,4 +0,0 @@ -fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) -css/*: MIT (http://opensource.org/licenses/mit-license.html) - -Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE deleted file mode 100644 index 50bbdd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The fileutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE deleted file mode 100644 index 7150ce3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 jnml. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of jnml nor the names of his -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE deleted file mode 100644 index 2a7cfd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2012-2013 Dave Collins <dave@davec.name> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE deleted file mode 100644 index 14e2f77..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 09e5be6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013, Gorilla web toolkit -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md deleted file mode 100644 index 5773904..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2011-2013, 'pq' Contributors -Portions Copyright (C) 2011 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE deleted file mode 100644 index aa62504..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ - -Copyright (c) 2012, Robert Carlsen & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE deleted file mode 100644 index 7efba3b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The files in here come from www.glitchthegame.com. - -License here: http://www.glitchthegame.com/public-domain-game-art/#licensing - -All files are provided by Tiny Speck under the Creative Commons CC0 1.0 -Universal License. This is a broadly permissive "No Rights Reserved" license — -you may do what you please with what we've provided. Our intention is to -dedicate these works to the public domain and make them freely available to all, -without restriction. All files are provided AS-IS. Tiny Speck cannot provide any -support to help you bring these assets into your own projects. - -Note: the Glitch logo and trademark are not among the things we are making -available under this license. Only items in the files explicitly included herein -are covered. - -There is no obligation to link or credit the works, but if you do, please link -to glitchthegame.com, our permanent "retirement" site for the game and these -assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack -(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE deleted file mode 100644 index 770c767..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -mgo - MongoDB driver for Go - -Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE deleted file mode 100644 index 8903260..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -BSON library for Go - -Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE deleted file mode 100644 index a4c5efd..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE deleted file mode 100644 index f4988b4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2014, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS deleted file mode 100644 index 619f9db..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the GRPC project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of GRPC, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of GRPC. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of GRPC or any code incorporated within this -implementation of GRPC constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of GRPC -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE deleted file mode 100644 index 8f71f43..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go deleted file mode 100644 index de9ae9c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/camlistore/go4/legal/legal.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2014 The Go4 Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legal provides in-process storage for compiled-in licenses. -package legal - -var licenses []string - -// RegisterLicense stores the license text. -// It doesn't check whether the text was already present. -func RegisterLicense(text string) { - licenses = append(licenses, text) - return -} - -// Licenses returns a slice of the licenses. -func Licenses() []string { - return licenses -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-iptables/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE deleted file mode 100644 index e06d208..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/go-tspi/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE deleted file mode 100644 index 2298515..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/coreos/ioprogress/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md deleted file mode 100644 index 1cade6c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cpuguy83/go-md2man/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Brian Goff - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE deleted file mode 100644 index 54c6e90..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/b/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The b Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE deleted file mode 100644 index 7d80fe2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/bufs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The bufs Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE deleted file mode 100644 index 80c7ae7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/dbm/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The dbm Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE deleted file mode 100644 index 27e4447..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/exp/lldb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The lldb Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE deleted file mode 100644 index 50bbdd2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The fileutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/falloc/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/hdb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/fileutil/storage/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE deleted file mode 100644 index 128a1b6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The mathutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE deleted file mode 100644 index 4fa2a1f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/mathutil/mersenne/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The mersenne Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE deleted file mode 100644 index 0d10c02..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/ql/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The ql Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE deleted file mode 100644 index 67983e0..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/sortutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The sortutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE deleted file mode 100644 index 2fdd92c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/strutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The strutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE deleted file mode 100644 index bc67059..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/cznic/zappy/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The zappy Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE deleted file mode 100644 index f7d058a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 Skagerrak Software Limited. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Skagerrak Software Limited nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE deleted file mode 100644 index c33dcc7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/d2g/dhcp4client/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE deleted file mode 100644 index 8d9a94a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/dustin/go-humanize/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2005-2008 Dustin Sallings <dustin@spy.net> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -<http://www.opensource.org/licenses/mit-license.php> diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 670d88f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 1b1b192..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE deleted file mode 100644 index c33dcc7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE deleted file mode 100644 index efcb241..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/hydrogen18/stoppableListener/LICENSE +++ /dev/null @@ -1,10 +0,0 @@ -Copyright (c) 2014, Eric Urban -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f0d1fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Alan Shreve - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE deleted file mode 100644 index a6d7731..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kballard/go-shellquote/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2014 Kevin Ballard - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE -OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License deleted file mode 100644 index 6b7558b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/kr/pty/License +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2011 Keith Rarick - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE deleted file mode 100644 index 5dc6826..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE deleted file mode 100644 index b75312c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/petar/GoLLRB/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2010, Petar Maymounkov -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -(*) Redistributions of source code must retain the above copyright notice, this list -of conditions and the following disclaimer. - -(*) Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -(*) Neither the name of Petar Maymounkov nor the names of its contributors may be -used to endorse or promote products derived from this software without specific -prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE deleted file mode 100644 index 41ce7f1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/peterbourgon/diskv/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011-2012 Peter Bourgon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE deleted file mode 100644 index 5f4e3ed..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/shurcooL/sanitized_anchor_name/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Dmitri Shuralyov - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go deleted file mode 100644 index 5ad9c96..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/cobra/cobra/cmd/licenses.go +++ /dev/null @@ -1,1133 +0,0 @@ -// Copyright © 2015 Steve Francia <spf@spf13.com>. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Parts inspired by https://github.com/ryanuber/go-license - -package cmd - -import "strings" - -//Licenses contains all possible licenses a user can chose from -var Licenses map[string]License - -//License represents a software license agreement, containing the Name of -// the license, its possible matches (on the command line as given to cobra) -// the header to be used with each file on the file's creating, and the text -// of the license -type License struct { - Name string // The type of license in use - PossibleMatches []string // Similar names to guess - Text string // License text data - Header string // License header for source files -} - -// given a license name (in), try to match the license indicated -func matchLicense(in string) string { - for key, lic := range Licenses { - for _, match := range lic.PossibleMatches { - if strings.EqualFold(in, match) { - return key - } - } - } - return "" -} - -func init() { - Licenses = make(map[string]License) - - Licenses["apache"] = License{ - Name: "Apache 2.0", - PossibleMatches: []string{"apache", "apache20", "apache 2.0", "apache2.0", "apache-2.0"}, - Header: ` -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License.`, - Text: ` - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -`, - } - - Licenses["mit"] = License{ - Name: "Mit", - PossibleMatches: []string{"mit"}, - Header: ` -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.`, - Text: `The MIT License (MIT) - -{{ .copyright }} - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -`, - } - - Licenses["bsd"] = License{ - Name: "NewBSD", - PossibleMatches: []string{"bsd", "newbsd", "3 clause bsd"}, - Header: ` -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE.`, - Text: `{{ .copyright }} -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -`, - } - - Licenses["freebsd"] = License{ - Name: "Simplified BSD License", - PossibleMatches: []string{"freebsd", "simpbsd", "simple bsd", "2 clause bsd"}, - Header: ` -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE.`, - Text: `{{ .copyright }} -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -`, - } - - Licenses["gpl3"] = License{ - Name: "GNU General Public License 3.0", - PossibleMatches: []string{"gpl3", "gpl", "gnu gpl3", "gnu gpl"}, - Header: `{{ .copyright }} - - This file is part of {{ .appName }}. - - {{ .appName }} is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - {{ .appName }} is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with {{ .appName }}. If not, see <http://www.gnu.org/licenses/>. - `, - Text: ` GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - <program> Copyright (C) <year> <name of author> - This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type 'show c' for details. - -The hypothetical commands 'show w' and 'show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -<http://www.gnu.org/licenses/>. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -<http://www.gnu.org/philosophy/why-not-lgpl.html>. -`, - } - - // Licenses["apache20"] = License{ - // Name: "Apache 2.0", - // PossibleMatches: []string{"apache", "apache20", ""}, - // Header: ` - // `, - // Text: ` - // `, - // } -} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE deleted file mode 100644 index 9f64db8..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/github.com/vishvananda/netlink/LICENSE +++ /dev/null @@ -1,192 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Vishvananda Ishaya. - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/crypto/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/net/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/sys/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/golang.org/x/tools/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE deleted file mode 100644 index f4988b4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2014, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS deleted file mode 100644 index 619f9db..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/google.golang.org/grpc/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the GRPC project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of GRPC, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of GRPC. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of GRPC or any code incorporated within this -implementation of GRPC constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of GRPC -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular deleted file mode 100644 index 020f87a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/examples/update-demo/local/LICENSE.angular +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2010-2014 Google, Inc. http://angularjs.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING deleted file mode 100644 index c6b097c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (C) 2003-2013 Edgewall Software -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE deleted file mode 100644 index 2b5e5ff..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The Expat/MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE deleted file mode 100644 index 9f93e06..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2014 Reverb Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT deleted file mode 100644 index ed21c8b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/pkg/acl/LICENSE.MIT +++ /dev/null @@ -1,22 +0,0 @@ -This project includes code derived from the MIT licensed naegelejd/go-acl -project. Here's a copy of its license: - - Copyright (c) 2015 Joseph Naegele - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD deleted file mode 100644 index 6b4b6ef..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/store/LICENSE.BSD +++ /dev/null @@ -1,30 +0,0 @@ -This project includes code derived from the BSD licensed golang/go project. -Here's a copy of its license: - - Copyright (c) 2012 The Go Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE deleted file mode 100644 index 7805d36..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Sam Ghods - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE deleted file mode 100644 index 902306b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 Sean Dolphin - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE deleted file mode 100644 index e454a52..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE +++ /dev/null @@ -1,178 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE deleted file mode 100644 index 9e4bd4d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014-2015 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE deleted file mode 100644 index dc91298..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE +++ /dev/null @@ -1,16 +0,0 @@ -libcontainer -Copyright 2012-2015 Docker, Inc. - -This product includes software developed at Docker, Inc. (http://www.docker.com). - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see http://www.bis.doc.gov - -See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 1b1b192..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE deleted file mode 100644 index 4e11de1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015, go-dockerclient authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License deleted file mode 100644 index 05c783c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License deleted file mode 100644 index 480a328..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md deleted file mode 100644 index 2199945..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -objx - by Mat Ryer and Tyler Bunnell - -The MIT License (MIT) - -Copyright (c) 2014 Stretchr, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE deleted file mode 100644 index 8b22cdb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) -Copyright © 2012-2015 Oliver Eilhard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE deleted file mode 100644 index 97cec18..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE +++ /dev/null @@ -1,190 +0,0 @@ - Copyright 2014 The cAdvisor Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE deleted file mode 100644 index c33dcc7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/hashicorp/errwrap/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f0d1fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Alan Shreve - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE deleted file mode 100644 index ade9307..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/juju/errors/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -All files in this repository are licensed as follows. If you contribute -to this repository, it is assumed that you license your contribution -under the same license unless you state otherwise. - -All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE deleted file mode 100644 index 244f4d8..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Kyoung-chan Lee (leekchan@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE deleted file mode 100644 index 06ce0c3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2013 Mario L. Gutierrez - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE deleted file mode 100644 index f9c841a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE deleted file mode 100644 index 22bf08c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013, Peter Bourgon, SoundCloud Ltd. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/golang.org/x/net/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE deleted file mode 100644 index 8bff971..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Phillip Bond - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE deleted file mode 100644 index e454a52..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE +++ /dev/null @@ -1,178 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE deleted file mode 100644 index 08b5e20..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jeremy Saenz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE deleted file mode 100644 index df83a9c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2012 Dave Grijalva - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE deleted file mode 100644 index dc91298..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE +++ /dev/null @@ -1,16 +0,0 @@ -libcontainer -Copyright 2012-2015 Docker, Inc. - -This product includes software developed at Docker, Inc. (http://www.docker.com). - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see http://www.bis.doc.gov - -See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE deleted file mode 100644 index 5782c72..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2014, Elazar Leibovich -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE deleted file mode 100644 index ece7ec6..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012,2013 Ernest Micklei - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE deleted file mode 100644 index 0eb9b72..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014, Evan Phoenix -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the Evan Phoenix nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE deleted file mode 100644 index 4e11de1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015, go-dockerclient authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE deleted file mode 100644 index 7805d36..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Sam Ghods - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE deleted file mode 100644 index 6866802..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2013 Dario Castañé. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml deleted file mode 100644 index 62fdb61..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml +++ /dev/null @@ -1,3 +0,0 @@ -import: ../../../../fossene/db/schema/thing.yml -fields: - site: string diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f0d1fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Alan Shreve - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE deleted file mode 100644 index 5c304d1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE deleted file mode 100644 index ade9307..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -All files in this repository are licensed as follows. If you contribute -to this repository, it is assumed that you license your contribution -under the same license unless you state otherwise. - -All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License deleted file mode 100644 index 6b7558b..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2011 Keith Rarick - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT deleted file mode 100644 index 35702b1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2009 The Go Authors. All rights reserved. Use of this source code -is governed by a BSD-style license that can be found in the LICENSE file. -Extensions of the original work are copyright (c) 2011 Miek Gieben - -Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is -governed by a BSD-style license that can be found in the LICENSE file. - -Copyright 2014 CloudFlare. All rights reserved. Use of this source code is -governed by a BSD-style license that can be found in the LICENSE file. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE deleted file mode 100644 index 5763fa7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Extensions of the original work are copyright (c) 2011 Miek Gieben - -As this is fork of the official Go code the same license applies: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE deleted file mode 100644 index f9c841a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE deleted file mode 100644 index 5dc6826..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE deleted file mode 100644 index fbbbc9e..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Copyright 2012-2013 Rackspace, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - ------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE deleted file mode 100644 index b0a9e76..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of gcfg's source code have been derived from Go, and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE deleted file mode 100644 index 968b453..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2013 Vaughan Newton - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE deleted file mode 100644 index 145d387..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Alexander F Rødseth - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE deleted file mode 100644 index c3d4cc3..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Nate Finch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright deleted file mode 100644 index a0b409a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright deleted file mode 100644 index a0b409a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular deleted file mode 100644 index 020f87a..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2010-2014 Google, Inc. http://angularjs.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING deleted file mode 100644 index c6b097c..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (C) 2003-2013 Edgewall Software -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE deleted file mode 100644 index 2b5e5ff..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The Expat/MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE deleted file mode 100644 index 9f93e06..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2014 Reverb Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go deleted file mode 100644 index ccafe41..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/common.go +++ /dev/null @@ -1,9 +0,0 @@ -package common - -const PATH_IMAGE_ACI = "/image.aci" -const PATH_MANIFEST = "/manifest" -const PATH_ROOTFS = "/rootfs" - -const ENV_ACI_PATH = "ACI_PATH" -const ENV_ACI_TARGET = "ACI_TARGET" -const ENV_LOG_LEVEL = "LOG_LEVEL" diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go b/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go deleted file mode 100644 index 57251af..0000000 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/manifest.go +++ /dev/null @@ -1,61 +0,0 @@ -package common - -import ( - "github.com/appc/spec/aci" - "github.com/appc/spec/schema" - "github.com/n0rad/go-erlog/data" - "github.com/n0rad/go-erlog/errs" - "io" - "io/ioutil" - "os" - "path/filepath" -) - -func ExtractManifestContentFromAci(aciPath string) ([]byte, error) { - fields := data.WithField("file", aciPath) - input, err := os.Open(aciPath) - if err != nil { - return nil, errs.WithEF(err, fields, "Cannot open file") - } - defer input.Close() - - tr, err := aci.NewCompressedTarReader(input) - if err != nil { - return nil, errs.WithEF(err, fields, "Cannot open file as tar") - } - -Tar: - for { - hdr, err := tr.Next() - switch err { - case io.EOF: - break Tar - case nil: - if filepath.Clean(hdr.Name) == aci.ManifestFile { - bytes, err := ioutil.ReadAll(tr) - if err != nil { - return nil, errs.WithEF(err, fields, "Cannot read manifest content in tar") - } - return bytes, nil - } - default: - return nil, errs.WithEF(err, fields, "error reading tarball file") - } - } - return nil, errs.WithEF(err, fields, "Cannot found manifest in file") -} - -func ExtractManifestFromAci(aciPath string) (*schema.ImageManifest, error) { - fields := data.WithField("file", aciPath) - content, err := ExtractManifestContentFromAci(aciPath) - if err != nil { - return nil, errs.WithEF(err, fields, "Cannot extract aci manifest content from file") - } - im := &schema.ImageManifest{} - - err = im.UnmarshalJSON(content) - if err != nil { - return nil, errs.WithEF(err, fields.WithField("content", string(content)), "Cannot unmarshall json content") - } - return im, nil -} diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING b/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE deleted file mode 100644 index 055361b..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/clients/chrome/clip-it-good/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2010 Brett Slatkin - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity b/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity deleted file mode 100644 index 14db513..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/misc/copyrightifity +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/perl -# -# Copyright 2010 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# -# This script adds copyright headers to files. - -use strict; -my $header = do { local $/; <DATA> }; -$header =~ s!\s+$!\n!; -my $yyyy = (localtime())[5] + 1900; -$header =~ s/YYYY/$yyyy/ or die; - -unless (@ARGV == 1) { - die "Usage: copyrightify <filename>\n"; -} - -my $file = shift; -open(my $fh, $file) or die "Open $file error: $!\n"; -my $source = do { local $/; <$fh> }; -close($fh); -if ($source =~ /Copyright \d\d\d\d/) { - print STDERR "# $file - OK\n"; - exit; -} - -my $newsource = $source; -if ($file =~ /\.(go|java|aidl)$/) { - $header = "/*\n$header*/\n\n"; - $newsource = $header . $source; -} elsif ($file =~ /\.py$/) { - $header = join("", map { "# $_\n" } split(/\n/, $header)); - $newsource = $header . $source; -} else { - die "File type not supported."; -} - - -open(my $fh, ">$file") or die "Open $file error: $!\n"; -print $fh $newsource; -close($fh) or die; - -__END__ -Copyright YYYY The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go deleted file mode 100644 index a75283f..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legal.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legal provides project-wide storage for compiled-in licenses. -package legal - -var licenses []string - -func init() { - RegisterLicense(` -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -`) -} - -// RegisterLicense stores the license text. -// It doesn't check whether the text was already present. -func RegisterLicense(text string) { - licenses = append(licenses, text) - return -} - -// Licenses returns a slice of the licenses. -func Licenses() []string { - return licenses -} diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go b/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go deleted file mode 100644 index e4a3205..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/legal/legalprint/legalprint.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 2014 The Camlistore Authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package legalprint provides a printing helper for the legal package. -package legalprint - -import ( - "flag" - "fmt" - "io" - - "camlistore.org/pkg/legal" -) - -var ( - flagLegal = flag.Bool("legal", false, "show licenses") -) - -// MaybePrint will print the licenses if flagLegal has been set. -// It will return the value of the flagLegal. -func MaybePrint(out io.Writer) bool { - if !*flagLegal { - return false - } - for _, text := range legal.Licenses() { - fmt.Fprintln(out, text) - } - return true -} diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE deleted file mode 100644 index d369cb8..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/bazil.org/fuse/LICENSE +++ /dev/null @@ -1,93 +0,0 @@ -Copyright (c) 2013, 2014 Tommi Virtanen. -Copyright (c) 2009, 2011, 2012 The Go Authors. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The following included software components have additional copyright -notices and license terms that may differ from the above. - - -File fuse.go: - -// Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, -// which carries this notice: -// -// The files in this directory are subject to the following license. -// -// The author of this software is Russ Cox. -// -// Copyright (c) 2006 Russ Cox -// -// Permission to use, copy, modify, and distribute this software for any -// purpose without fee is hereby granted, provided that this entire notice -// is included in all copies of any software which is or includes a copy -// or modification of this software and in all copies of the supporting -// documentation for such software. -// -// THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -// WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION OR WARRANTY -// OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR ITS -// FITNESS FOR ANY PARTICULAR PURPOSE. - - -File fuse_kernel.go: - -// Derived from FUSE's fuse_kernel.h -/* - This file defines the kernel interface of FUSE - Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> - - - This -- and only this -- header file may also be distributed under - the terms of the BSD Licence as follows: - - Copyright (C) 2001-2007 Miklos Szeredi. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. -*/ diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE deleted file mode 100644 index d9a10c0..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/closure/lib/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE deleted file mode 100644 index 6765f09..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The goauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS deleted file mode 100644 index 9e87163..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/goauth2/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the goauth2 project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE deleted file mode 100644 index fec05ce..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/leveldb-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The LevelDB-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE deleted file mode 100644 index 6050c10..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/snappy-go/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/code.google.com/p/xsrftoken/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt deleted file mode 100644 index 1066d2f..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/fontawesome/LICENSE.txt +++ /dev/null @@ -1,4 +0,0 @@ -fonts/*: SIL OFL 1.1 (http://scripts.sil.org/OFL) -css/*: MIT (http://opensource.org/licenses/mit-license.html) - -Details at http://fortawesome.github.io/Font-Awesome/license/ diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/camlistore/lock/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/dbm/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/exp/lldb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE deleted file mode 100644 index 50bbdd2..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014 The fileutil Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the names of the authors nor the names of the -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/falloc/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/hdb/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/fileutil/storage/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/kv/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE deleted file mode 100644 index 1e92e33..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 CZ.NIC z.s.p.o. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of CZ.NIC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE deleted file mode 100644 index 7150ce3..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/mathutil/mersenne/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 jnml. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of jnml nor the names of his -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE deleted file mode 100644 index 65d761b..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/zappy/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE deleted file mode 100644 index 2a7cfd2..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/davecgh/go-spew/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2012-2013 Dave Collins <dave@davec.name> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE deleted file mode 100644 index 14e2f77..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/go-sql-driver/mysql/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 09e5be6..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013, Gorilla web toolkit -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or - other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md deleted file mode 100644 index 5773904..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/lib/pq/LICENSE.md +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2011-2013, 'pq' Contributors -Portions Copyright (C) 2011 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE deleted file mode 100644 index aa62504..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/rwcarlsen/goexif/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ - -Copyright (c) 2012, Robert Carlsen & Contributors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE deleted file mode 100644 index 7efba3b..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/glitch/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The files in here come from www.glitchthegame.com. - -License here: http://www.glitchthegame.com/public-domain-game-art/#licensing - -All files are provided by Tiny Speck under the Creative Commons CC0 1.0 -Universal License. This is a broadly permissive "No Rights Reserved" license — -you may do what you please with what we've provided. Our intention is to -dedicate these works to the public domain and make them freely available to all, -without restriction. All files are provided AS-IS. Tiny Speck cannot provide any -support to help you bring these assets into your own projects. - -Note: the Glitch logo and trademark are not among the things we are making -available under this license. Only items in the files explicitly included herein -are covered. - -There is no obligation to link or credit the works, but if you do, please link -to glitchthegame.com, our permanent "retirement" site for the game and these -assets. Of course, links/shoutouts to Tiny Speck (tinyspeck.com) and/or Slack -(slack.com) are appreciated. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE deleted file mode 100644 index 770c767..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -mgo - MongoDB driver for Go - -Copyright (c) 2010-2013 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE deleted file mode 100644 index 8903260..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/labix.org/v2/mgo/bson/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -BSON library for Go - -Copyright (c) 2010-2012 - Gustavo Niemeyer <gustavo@niemeyer.net> - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt b/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/react/LICENSE.txt +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/github.com/hjfreyer/taglib-go/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE deleted file mode 100644 index a4c5efd..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/cloud/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2014 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE deleted file mode 100644 index f4988b4..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2014, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS deleted file mode 100644 index 619f9db..0000000 --- a/Godeps/_workspace/src/github.com/camlistore/camlistore/vendor/google.golang.org/grpc/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the GRPC project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of GRPC, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of GRPC. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of GRPC or any code incorporated within this -implementation of GRPC constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of GRPC -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE deleted file mode 100644 index 385fac9..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/akrennmair/gopcap/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009-2011 Andreas Krennmair. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Andreas Krennmair nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS deleted file mode 100644 index ff177f6..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bgentry/speakeasy/LICENSE_WINDOWS +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [2013] [the CloudFoundry Authors] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE deleted file mode 100644 index 004e77f..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/boltdb/bolt/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Ben Johnson - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE deleted file mode 100644 index 2dc6853..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/bradfitz/http2/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright 2014 Google & the Go AUTHORS - -Go AUTHORS are: -See https://code.google.com/p/go/source/browse/AUTHORS - -Licensed under the terms of Go itself: -https://code.google.com/p/go/source/browse/LICENSE diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE deleted file mode 100644 index 13ef3fe..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/cheggaaa/pb/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2012, Sergey Cherepanov -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/google/btree/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE deleted file mode 100644 index 5c304d1..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE deleted file mode 100644 index cde8b8b..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/github.com/xiang90/probing/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Xiang Li - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE deleted file mode 100644 index f4988b4..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2014, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS b/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS deleted file mode 100644 index 619f9db..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/Godeps/_workspace/src/google.golang.org/grpc/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the GRPC project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of GRPC, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of GRPC. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of GRPC or any code incorporated within this -implementation of GRPC constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of GRPC -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/LICENSE b/Godeps/_workspace/src/github.com/coreos/etcd/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/coreos/etcd/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE deleted file mode 100644 index 5dc6826..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/code.google.com/p/go-uuid/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 670d88f..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE deleted file mode 100644 index 5c304d1..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go deleted file mode 100644 index 15671d4..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/etcd.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lease - -import ( - "encoding/json" - "path" - "time" - - etcd "github.com/coreos/etcd/client" - "golang.org/x/net/context" -) - -const ( - leasePrefix = "lease" -) - -type etcdLeaseMetadata struct { - MachineID string - Version int -} - -// etcdLease implements the Lease interface -type etcdLease struct { - mgr *etcdLeaseManager - key string - meta etcdLeaseMetadata - idx uint64 - ttl time.Duration -} - -func (l *etcdLease) Release() error { - opts := &etcd.DeleteOptions{ - PrevIndex: l.idx, - } - _, err := l.mgr.kAPI.Delete(l.mgr.ctx(), l.key, opts) - return err -} - -func (l *etcdLease) Renew(period time.Duration) error { - val, err := serializeLeaseMetadata(l.meta.MachineID, l.meta.Version) - opts := &etcd.SetOptions{ - PrevIndex: l.idx, - TTL: period, - } - resp, err := l.mgr.kAPI.Set(l.mgr.ctx(), l.key, val, opts) - if err != nil { - return err - } - - renewed := l.mgr.leaseFromResponse(resp) - *l = *renewed - - return nil -} - -func (l *etcdLease) MachineID() string { - return l.meta.MachineID -} - -func (l *etcdLease) Version() int { - return l.meta.Version -} - -func (l *etcdLease) Index() uint64 { - return l.idx -} - -func (l *etcdLease) TimeRemaining() time.Duration { - return l.ttl -} - -func serializeLeaseMetadata(machID string, ver int) (string, error) { - meta := etcdLeaseMetadata{ - MachineID: machID, - Version: ver, - } - - b, err := json.Marshal(meta) - if err != nil { - return "", err - } - - return string(b), nil -} - -type etcdLeaseManager struct { - kAPI etcd.KeysAPI - keyPrefix string - reqTimeout time.Duration -} - -func NewEtcdLeaseManager(kAPI etcd.KeysAPI, keyPrefix string, reqTimeout time.Duration) *etcdLeaseManager { - return &etcdLeaseManager{kAPI: kAPI, keyPrefix: keyPrefix, reqTimeout: reqTimeout} -} - -func (r *etcdLeaseManager) ctx() context.Context { - ctx, _ := context.WithTimeout(context.Background(), r.reqTimeout) - return ctx -} - -func (r *etcdLeaseManager) leasePath(name string) string { - return path.Join(r.keyPrefix, leasePrefix, name) -} - -func (r *etcdLeaseManager) GetLease(name string) (Lease, error) { - key := r.leasePath(name) - resp, err := r.kAPI.Get(r.ctx(), key, nil) - if err != nil { - if isEtcdError(err, etcd.ErrorCodeKeyNotFound) { - err = nil - } - return nil, err - } - - l := r.leaseFromResponse(resp) - return l, nil -} - -func (r *etcdLeaseManager) StealLease(name, machID string, ver int, period time.Duration, idx uint64) (Lease, error) { - val, err := serializeLeaseMetadata(machID, ver) - if err != nil { - return nil, err - } - - key := r.leasePath(name) - opts := &etcd.SetOptions{ - PrevIndex: idx, - TTL: period, - } - resp, err := r.kAPI.Set(r.ctx(), key, val, opts) - if err != nil { - if isEtcdError(err, etcd.ErrorCodeNodeExist) { - err = nil - } - return nil, err - } - - l := r.leaseFromResponse(resp) - return l, nil -} - -func (r *etcdLeaseManager) AcquireLease(name string, machID string, ver int, period time.Duration) (Lease, error) { - val, err := serializeLeaseMetadata(machID, ver) - if err != nil { - return nil, err - } - - key := r.leasePath(name) - opts := &etcd.SetOptions{ - TTL: period, - PrevExist: etcd.PrevNoExist, - } - - resp, err := r.kAPI.Set(r.ctx(), key, val, opts) - if err != nil { - if isEtcdError(err, etcd.ErrorCodeNodeExist) { - err = nil - } - return nil, err - } - - l := r.leaseFromResponse(resp) - return l, nil -} - -func (r *etcdLeaseManager) leaseFromResponse(res *etcd.Response) *etcdLease { - l := &etcdLease{ - mgr: r, - key: res.Node.Key, - idx: res.Node.ModifiedIndex, - ttl: res.Node.TTLDuration(), - } - - err := json.Unmarshal([]byte(res.Node.Value), &l.meta) - - // fall back to using the entire value as the MachineID for - // backwards-compatibility with engines that are not aware - // of this versioning mechanism - if err != nil { - l.meta = etcdLeaseMetadata{ - MachineID: res.Node.Value, - Version: 0, - } - } - - return l -} - -func isEtcdError(err error, code int) bool { - eerr, ok := err.(etcd.Error) - return ok && eerr.Code == code -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go b/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go deleted file mode 100644 index 3b87ca0..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/lease/interface.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package lease - -import "time" - -// Lease proxies to an auto-expiring lease stored in a LeaseRegistry. -// The creator of a Lease must repeatedly call Renew to keep their lease -// from expiring. -type Lease interface { - // Renew attempts to extend the Lease TTL to the provided duration. - // The operation will succeed only if the Lease has not changed in - // the LeaseRegistry since it was last renewed or first acquired. - // An error is returned if the Lease has already expired, or if the - // operation fails for any other reason. - Renew(time.Duration) error - - // Release relinquishes the ownership of a Lease back to the Registry. - // After calling Release, the Lease object should be discarded. An - // error is returned if the Lease has already expired, or if the - // operation fails for any other reason. - Release() error - - // MachineID returns the ID of the Machine that holds this Lease. This - // value must be considered a cached value as it is not guaranteed to - // be correct. - MachineID() string - - // Version returns the current version at which the lessee is operating. - // This value has the same correctness guarantees as MachineID. - // It is up to the caller to determine what this Version means. - Version() int - - // Index exposes the relative time at which the Lease was created or - // renewed. For example, this could be implemented as the ModifiedIndex - // field of a node in etcd. - Index() uint64 - - // TimeRemaining represents the amount of time left on the Lease when - // it was fetched from the LeaseRegistry. - TimeRemaining() time.Duration -} - -type Manager interface { - // GetLease fetches a Lease only if it exists. If it does not - // exist, a nil Lease will be returned. Any other failures - // result in non-nil error and nil Lease objects. - GetLease(name string) (Lease, error) - - // AcquireLease acquires a named lease only if the lease is not - // currently held. If a Lease cannot be acquired, a nil Lease - // object is returned. An error is returned only if there is a - // failure communicating with the Registry. - AcquireLease(name, machID string, ver int, period time.Duration) (Lease, error) - - // StealLease attempts to replace the lessee of the Lease identified - // by the provided name and index with a new lessee. This function - // will fail if the named Lease has progressed past the given index. - StealLease(name, machID string, ver int, period time.Duration, idx uint64) (Lease, error) -} diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE b/Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE deleted file mode 100644 index e321c9b..0000000 --- a/Godeps/_workspace/src/github.com/coreos/fleet/ssh/LICENSE +++ /dev/null @@ -1,42 +0,0 @@ -Portions of fleet's ssh package (particularly related to known_hosts handling) -are derived from the OpenSSH source, the copyright notices and licenses for -which follow below. - -/* - * Author: Tatu Ylonen <ylo@cs.hut.fi> - * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland - * All rights reserved - * Simple pattern matching, with '*' and '?' as wildcards. - * Functions for manipulating the known hosts files. - * - * As far as I am concerned, the code I have written for this software - * can be used freely for any purpose. Any derived versions of this - * software must be clearly marked as such, and if the derived work is - * incompatible with the protocol description in the RFC file, it must be - * called by a name other than "ssh" or "Secure Shell". - */ - -/* - * Copyright (c) 2000 Markus Friedl. All rights reserved. - * Copyright (c) 1999 Niels Provos. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ diff --git a/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go deleted file mode 100644 index 63b1172..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/escape.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Implements systemd-escape [--unescape] [--path] - -package unit - -import ( - "fmt" - "strconv" - "strings" -) - -const ( - allowed = `:_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789` -) - -// If isPath is true: -// We remove redundant '/'s, the leading '/', and trailing '/'. -// If the result is empty, a '/' is inserted. -// -// We always: -// Replace the following characters with `\x%x`: -// Leading `.` -// `-`, `\`, and anything not in this set: `:-_.\[0-9a-zA-Z]` -// Replace '/' with '-'. -func escape(unescaped string, isPath bool) string { - e := []byte{} - inSlashes := false - start := true - for i := 0; i < len(unescaped); i++ { - c := unescaped[i] - if isPath { - if c == '/' { - inSlashes = true - continue - } else if inSlashes { - inSlashes = false - if !start { - e = append(e, '-') - } - } - } - - if c == '/' { - e = append(e, '-') - } else if start && c == '.' || strings.IndexByte(allowed, c) == -1 { - e = append(e, []byte(fmt.Sprintf(`\x%x`, c))...) - } else { - e = append(e, c) - } - start = false - } - if isPath && len(e) == 0 { - e = append(e, '-') - } - return string(e) -} - -// If isPath is true: -// We always return a string beginning with '/'. -// -// We always: -// Replace '-' with '/'. -// Replace `\x%x` with the value represented in hex. -func unescape(escaped string, isPath bool) string { - u := []byte{} - for i := 0; i < len(escaped); i++ { - c := escaped[i] - if c == '-' { - c = '/' - } else if c == '\\' && len(escaped)-i >= 4 && escaped[i+1] == 'x' { - n, err := strconv.ParseInt(escaped[i+2:i+4], 16, 8) - if err == nil { - c = byte(n) - i += 3 - } - } - u = append(u, c) - } - if isPath && (len(u) == 0 || u[0] != '/') { - u = append([]byte("/"), u...) - } - return string(u) -} - -// UnitNameEscape escapes a string as `systemd-escape` would -func UnitNameEscape(unescaped string) string { - return escape(unescaped, false) -} - -// UnitNameUnescape unescapes a string as `systemd-escape --unescape` would -func UnitNameUnescape(escaped string) string { - return unescape(escaped, false) -} - -// UnitNamePathEscape escapes a string as `systemd-escape --path` would -func UnitNamePathEscape(unescaped string) string { - return escape(unescaped, true) -} - -// UnitNamePathUnescape unescapes a string as `systemd-escape --path --unescape` would -func UnitNamePathUnescape(escaped string) string { - return unescape(escaped, true) -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go deleted file mode 100644 index e5d21e1..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "fmt" -) - -type UnitOption struct { - Section string - Name string - Value string -} - -func NewUnitOption(section, name, value string) *UnitOption { - return &UnitOption{Section: section, Name: name, Value: value} -} - -func (uo *UnitOption) String() string { - return fmt.Sprintf("{Section: %q, Name: %q, Value: %q}", uo.Section, uo.Name, uo.Value) -} - -func (uo *UnitOption) Match(other *UnitOption) bool { - return uo.Section == other.Section && - uo.Name == other.Name && - uo.Value == other.Value -} - -func AllMatch(u1 []*UnitOption, u2 []*UnitOption) bool { - length := len(u1) - if length != len(u2) { - return false - } - - for i := 0; i < length; i++ { - if !u1[i].Match(u2[i]) { - return false - } - } - - return true -} diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go b/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go deleted file mode 100644 index e07799c..0000000 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package unit - -import ( - "bytes" - "io" -) - -// Serialize encodes all of the given UnitOption objects into a -// unit file. When serialized the options are sorted in their -// supplied order but grouped by section. -func Serialize(opts []*UnitOption) io.Reader { - var buf bytes.Buffer - - if len(opts) == 0 { - return &buf - } - - // Index of sections -> ordered options - idx := map[string][]*UnitOption{} - // Separately preserve order in which sections were seen - sections := []string{} - for _, opt := range opts { - sec := opt.Section - if _, ok := idx[sec]; !ok { - sections = append(sections, sec) - } - idx[sec] = append(idx[sec], opt) - } - - for i, sect := range sections { - writeSectionHeader(&buf, sect) - writeNewline(&buf) - - opts := idx[sect] - for _, opt := range opts { - writeOption(&buf, opt) - writeNewline(&buf) - } - if i < len(sections)-1 { - writeNewline(&buf) - } - } - - return &buf -} - -func writeNewline(buf *bytes.Buffer) { - buf.WriteRune('\n') -} - -func writeSectionHeader(buf *bytes.Buffer, section string) { - buf.WriteRune('[') - buf.WriteString(section) - buf.WriteRune(']') -} - -func writeOption(buf *bytes.Buffer, opt *UnitOption) { - buf.WriteString(opt.Name) - buf.WriteRune('=') - buf.WriteString(opt.Value) -} diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE deleted file mode 100644 index 7805d36..0000000 --- a/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Sam Ghods - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE deleted file mode 100644 index 902306b..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2015 Sean Dolphin - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE deleted file mode 100644 index e454a52..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE +++ /dev/null @@ -1,178 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE deleted file mode 100644 index 9e4bd4d..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.APACHE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014-2015 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/docker/pkg/symlink/LICENSE.BSD +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE deleted file mode 100644 index dc91298..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE +++ /dev/null @@ -1,16 +0,0 @@ -libcontainer -Copyright 2012-2015 Docker, Inc. - -This product includes software developed at Docker, Inc. (http://www.docker.com). - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see http://www.bis.doc.gov - -See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE deleted file mode 100644 index 1b1b192..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/golang/protobuf/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Go support for Protocol Buffers - Google's data interchange format - -Copyright 2010 The Go Authors. All rights reserved. -https://github.com/golang/protobuf - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE deleted file mode 100644 index 4e11de1..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015, go-dockerclient authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License deleted file mode 100644 index 05c783c..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/pretty/License +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License deleted file mode 100644 index 480a328..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/kr/text/License +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2012 Keith Rarick - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md deleted file mode 100644 index 2199945..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/stretchr/objx/LICENSE.md +++ /dev/null @@ -1,23 +0,0 @@ -objx - by Mat Ryer and Tyler Bunnell - -The MIT License (MIT) - -Copyright (c) 2014 Stretchr, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE deleted file mode 100644 index 8b22cdb..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) -Copyright © 2012-2015 Oliver Eilhard - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the “Software”), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/Godeps/_workspace/src/gopkg.in/olivere/elastic.v2/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE b/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE deleted file mode 100644 index 97cec18..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE +++ /dev/null @@ -1,190 +0,0 @@ - Copyright 2014 The cAdvisor Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go deleted file mode 100644 index e073fae..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/cloudinfo.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Get information about the cloud provider (if any) cAdvisor is running on. - -package cloudinfo - -import ( - info "github.com/google/cadvisor/info/v1" -) - -type CloudInfo interface { - GetCloudProvider() info.CloudProvider - GetInstanceType() info.InstanceType -} - -type realCloudInfo struct { - cloudProvider info.CloudProvider - instanceType info.InstanceType -} - -func NewRealCloudInfo() CloudInfo { - cloudProvider := detectCloudProvider() - instanceType := detectInstanceType(cloudProvider) - return &realCloudInfo{ - cloudProvider: cloudProvider, - instanceType: instanceType, - } -} - -func (self *realCloudInfo) GetCloudProvider() info.CloudProvider { - return self.cloudProvider -} - -func (self *realCloudInfo) GetInstanceType() info.InstanceType { - return self.instanceType -} - -func detectCloudProvider() info.CloudProvider { - switch { - case onGCE(): - return info.GCE - case onAWS(): - return info.AWS - case onBaremetal(): - return info.Baremetal - } - return info.UnkownProvider -} - -func detectInstanceType(cloudProvider info.CloudProvider) info.InstanceType { - switch cloudProvider { - case info.GCE: - return getGceInstanceType() - case info.AWS: - return getAwsInstanceType() - case info.Baremetal: - return info.NoInstance - } - return info.UnknownInstance -} - -//TODO: Implement method. -func onAWS() bool { - return false -} - -//TODO: Implement method. -func getAwsInstanceType() info.InstanceType { - return info.UnknownInstance -} - -//TODO: Implement method. -func onBaremetal() bool { - return false -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go deleted file mode 100644 index 496bbab..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cloudinfo/gce.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cloudinfo - -import ( - "strings" - - info "github.com/google/cadvisor/info/v1" - "google.golang.org/cloud/compute/metadata" -) - -func onGCE() bool { - return metadata.OnGCE() -} - -func getGceInstanceType() info.InstanceType { - machineType, err := metadata.Get("instance/machine-type") - if err != nil { - return info.UnknownInstance - } - - responseParts := strings.Split(machineType, "/") // Extract the instance name from the machine type. - return info.InstanceType(responseParts[len(responseParts)-1]) -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go deleted file mode 100644 index 2d0d37d..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/cpuload.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package cpuload - -import ( - "fmt" - - "github.com/golang/glog" - info "github.com/google/cadvisor/info/v1" - "github.com/google/cadvisor/utils/cpuload/netlink" -) - -type CpuLoadReader interface { - // Start the reader. - Start() error - - // Stop the reader and clean up internal state. - Stop() - - // Retrieve Cpu load for a given group. - // name is the full hierarchical name of the container. - // Path is an absolute filesystem path for a container under CPU cgroup hierarchy. - GetCpuLoad(name string, path string) (info.LoadStats, error) -} - -func New() (CpuLoadReader, error) { - reader, err := netlink.New() - if err != nil { - return nil, fmt.Errorf("failed to create a netlink based cpuload reader: %v", err) - } - glog.Info("Using a netlink-based load reader") - return reader, nil -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go deleted file mode 100644 index 7eb2204..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/conn.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package netlink - -import ( - "bufio" - "bytes" - "encoding/binary" - "os" - "syscall" -) - -type Connection struct { - // netlink socket - fd int - // cache pid to use in every netlink request. - pid uint32 - // sequence number for netlink messages. - seq uint32 - addr syscall.SockaddrNetlink - rbuf *bufio.Reader -} - -// Create and bind a new netlink socket. -func newConnection() (*Connection, error) { - - fd, err := syscall.Socket(syscall.AF_NETLINK, syscall.SOCK_DGRAM, syscall.NETLINK_GENERIC) - if err != nil { - return nil, err - } - - conn := new(Connection) - conn.fd = fd - conn.seq = 0 - conn.pid = uint32(os.Getpid()) - conn.addr.Family = syscall.AF_NETLINK - conn.rbuf = bufio.NewReader(conn) - err = syscall.Bind(fd, &conn.addr) - if err != nil { - syscall.Close(fd) - return nil, err - } - return conn, err -} - -func (self *Connection) Read(b []byte) (n int, err error) { - n, _, err = syscall.Recvfrom(self.fd, b, 0) - return n, err -} - -func (self *Connection) Write(b []byte) (n int, err error) { - err = syscall.Sendto(self.fd, b, 0, &self.addr) - return len(b), err -} - -func (self *Connection) Close() error { - return syscall.Close(self.fd) -} - -func (self *Connection) WriteMessage(msg syscall.NetlinkMessage) error { - w := bytes.NewBuffer(nil) - msg.Header.Len = uint32(syscall.NLMSG_HDRLEN + len(msg.Data)) - msg.Header.Seq = self.seq - self.seq++ - msg.Header.Pid = self.pid - binary.Write(w, binary.LittleEndian, msg.Header) - _, err := w.Write(msg.Data) - if err != nil { - return err - } - _, err = self.Write(w.Bytes()) - return err -} - -func (self *Connection) ReadMessage() (msg syscall.NetlinkMessage, err error) { - err = binary.Read(self.rbuf, binary.LittleEndian, &msg.Header) - if err != nil { - return msg, err - } - msg.Data = make([]byte, msg.Header.Len-syscall.NLMSG_HDRLEN) - _, err = self.rbuf.Read(msg.Data) - return msg, err -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go deleted file mode 100644 index a45d870..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/defs.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package netlink - -/* -#include <linux/taskstats.h> -*/ -import "C" - -type TaskStats C.struct_taskstats - -const ( - __TASKSTATS_CMD_MAX = C.__TASKSTATS_CMD_MAX -) diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go deleted file mode 100644 index 42e6086..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/example/example.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "log" - - "github.com/google/cadvisor/utils/cpuload/netlink" -) - -func main() { - n, err := netlink.New() - if err != nil { - log.Printf("Failed to create cpu load util: %s", err) - return - } - defer n.Stop() - - paths := []string{"/sys/fs/cgroup/cpu", "/sys/fs/cgroup/cpu/docker"} - names := []string{"/", "/docker"} - for i, path := range paths { - stats, err := n.GetCpuLoad(names[i], path) - if err != nil { - log.Printf("Error getting cpu load for %q: %s", path, err) - } - log.Printf("Task load for %s: %+v", path, stats) - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go deleted file mode 100644 index 7ca05f3..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/netlink.go +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package netlink - -import ( - "bytes" - "encoding/binary" - "fmt" - "syscall" - - info "github.com/google/cadvisor/info/v1" -) - -const ( - // Kernel constants for tasks stats. - genlIdCtrl = syscall.NLMSG_MIN_TYPE // GENL_ID_CTRL - taskstatsGenlName = "TASKSTATS" // TASKSTATS_GENL_NAME - cgroupStatsCmdAttrFd = 0x1 // CGROUPSTATS_CMD_ATTR_FD - ctrlAttrFamilyId = 0x1 // CTRL_ATTR_FAMILY_ID - ctrlAttrFamilyName = 0x2 // CTRL_ATTR_FAMILY_NAME - ctrlCmdGetFamily = 0x3 // CTRL_CMD_GETFAMILY -) - -var ( - // TODO(rjnagal): Verify and fix for other architectures. - Endian = binary.LittleEndian -) - -type genMsghdr struct { - Command uint8 - Version uint8 - Reserved uint16 -} - -type netlinkMessage struct { - Header syscall.NlMsghdr - GenHeader genMsghdr - Data []byte -} - -func (self netlinkMessage) toRawMsg() (rawmsg syscall.NetlinkMessage) { - rawmsg.Header = self.Header - w := bytes.NewBuffer([]byte{}) - binary.Write(w, Endian, self.GenHeader) - w.Write(self.Data) - rawmsg.Data = w.Bytes() - return rawmsg -} - -type loadStatsResp struct { - Header syscall.NlMsghdr - GenHeader genMsghdr - Stats info.LoadStats -} - -// Return required padding to align 'size' to 'alignment'. -func padding(size int, alignment int) int { - unalignedPart := size % alignment - return (alignment - unalignedPart) % alignment -} - -// Get family id for taskstats subsystem. -func getFamilyId(conn *Connection) (uint16, error) { - msg := prepareFamilyMessage() - conn.WriteMessage(msg.toRawMsg()) - - resp, err := conn.ReadMessage() - if err != nil { - return 0, err - } - id, err := parseFamilyResp(resp) - if err != nil { - return 0, err - } - return id, nil -} - -// Append an attribute to the message. -// Adds attribute info (length and type), followed by the data and necessary padding. -// Can be called multiple times to add attributes. Only fixed size and string type -// attributes are handled. We don't need nested attributes for task stats. -func addAttribute(buf *bytes.Buffer, attrType uint16, data interface{}, dataSize int) { - attr := syscall.RtAttr{ - Len: syscall.SizeofRtAttr, - Type: attrType, - } - attr.Len += uint16(dataSize) - binary.Write(buf, Endian, attr) - switch data := data.(type) { - case string: - binary.Write(buf, Endian, []byte(data)) - buf.WriteByte(0) // terminate - default: - binary.Write(buf, Endian, data) - } - for i := 0; i < padding(int(attr.Len), syscall.NLMSG_ALIGNTO); i++ { - buf.WriteByte(0) - } -} - -// Prepares the message and generic headers and appends attributes as data. -func prepareMessage(headerType uint16, cmd uint8, attributes []byte) (msg netlinkMessage) { - msg.Header.Type = headerType - msg.Header.Flags = syscall.NLM_F_REQUEST - msg.GenHeader.Command = cmd - msg.GenHeader.Version = 0x1 - msg.Data = attributes - return msg -} - -// Prepares message to query family id for task stats. -func prepareFamilyMessage() (msg netlinkMessage) { - buf := bytes.NewBuffer([]byte{}) - addAttribute(buf, ctrlAttrFamilyName, taskstatsGenlName, len(taskstatsGenlName)+1) - return prepareMessage(genlIdCtrl, ctrlCmdGetFamily, buf.Bytes()) -} - -// Prepares message to query task stats for a task group. -func prepareCmdMessage(id uint16, cfd uintptr) (msg netlinkMessage) { - buf := bytes.NewBuffer([]byte{}) - addAttribute(buf, cgroupStatsCmdAttrFd, uint32(cfd), 4) - return prepareMessage(id, __TASKSTATS_CMD_MAX+1, buf.Bytes()) -} - -// Extracts returned family id from the response. -func parseFamilyResp(msg syscall.NetlinkMessage) (uint16, error) { - m := new(netlinkMessage) - m.Header = msg.Header - err := verifyHeader(msg) - if err != nil { - return 0, err - } - buf := bytes.NewBuffer(msg.Data) - // extract generic header from data. - err = binary.Read(buf, Endian, &m.GenHeader) - if err != nil { - return 0, err - } - id := uint16(0) - // Extract attributes. kernel reports family name, id, version, etc. - // Scan till we find id. - for buf.Len() > syscall.SizeofRtAttr { - var attr syscall.RtAttr - err = binary.Read(buf, Endian, &attr) - if err != nil { - return 0, err - } - if attr.Type == ctrlAttrFamilyId { - err = binary.Read(buf, Endian, &id) - if err != nil { - return 0, err - } - return id, nil - } - payload := int(attr.Len) - syscall.SizeofRtAttr - skipLen := payload + padding(payload, syscall.SizeofRtAttr) - name := make([]byte, skipLen) - err = binary.Read(buf, Endian, name) - if err != nil { - return 0, err - } - } - return 0, fmt.Errorf("family id not found in the response.") -} - -// Extract task stats from response returned by kernel. -func parseLoadStatsResp(msg syscall.NetlinkMessage) (*loadStatsResp, error) { - m := new(loadStatsResp) - m.Header = msg.Header - err := verifyHeader(msg) - if err != nil { - return m, err - } - buf := bytes.NewBuffer(msg.Data) - // Scan the general header. - err = binary.Read(buf, Endian, &m.GenHeader) - if err != nil { - return m, err - } - // cgroup stats response should have just one attribute. - // Read it directly into the stats structure. - var attr syscall.RtAttr - err = binary.Read(buf, Endian, &attr) - if err != nil { - return m, err - } - err = binary.Read(buf, Endian, &m.Stats) - if err != nil { - return m, err - } - return m, err -} - -// Verify and return any error reported by kernel. -func verifyHeader(msg syscall.NetlinkMessage) error { - switch msg.Header.Type { - case syscall.NLMSG_DONE: - return fmt.Errorf("expected a response, got nil") - case syscall.NLMSG_ERROR: - buf := bytes.NewBuffer(msg.Data) - var errno int32 - binary.Read(buf, Endian, errno) - return fmt.Errorf("netlink request failed with error %s", syscall.Errno(-errno)) - } - return nil -} - -// Get load stats for a task group. -// id: family id for taskstats. -// fd: fd to path to the cgroup directory under cpu hierarchy. -// conn: open netlink connection used to communicate with kernel. -func getLoadStats(id uint16, fd uintptr, conn *Connection) (info.LoadStats, error) { - msg := prepareCmdMessage(id, fd) - err := conn.WriteMessage(msg.toRawMsg()) - if err != nil { - return info.LoadStats{}, err - } - - resp, err := conn.ReadMessage() - if err != nil { - return info.LoadStats{}, err - } - - parsedmsg, err := parseLoadStatsResp(resp) - if err != nil { - return info.LoadStats{}, err - } - return parsedmsg.Stats, nil -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go deleted file mode 100644 index 6833765..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/cpuload/netlink/reader.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package netlink - -import ( - "fmt" - "os" - - "github.com/golang/glog" - info "github.com/google/cadvisor/info/v1" -) - -type NetlinkReader struct { - familyId uint16 - conn *Connection -} - -func New() (*NetlinkReader, error) { - conn, err := newConnection() - if err != nil { - return nil, fmt.Errorf("failed to create a new connection: %s", err) - } - - id, err := getFamilyId(conn) - if err != nil { - return nil, fmt.Errorf("failed to get netlink family id for task stats: %s", err) - } - glog.V(4).Infof("Family id for taskstats: %d", id) - return &NetlinkReader{ - familyId: id, - conn: conn, - }, nil -} - -func (self *NetlinkReader) Stop() { - if self.conn != nil { - self.conn.Close() - } -} - -func (self *NetlinkReader) Start() error { - // We do the start setup for netlink in New(). Nothing to do here. - return nil -} - -// Returns instantaneous number of running tasks in a group. -// Caller can use historical data to calculate cpu load. -// path is an absolute filesystem path for a container under the CPU cgroup hierarchy. -// NOTE: non-hierarchical load is returned. It does not include load for subcontainers. -func (self *NetlinkReader) GetCpuLoad(name string, path string) (info.LoadStats, error) { - if len(path) == 0 { - return info.LoadStats{}, fmt.Errorf("cgroup path can not be empty!") - } - - cfd, err := os.Open(path) - if err != nil { - return info.LoadStats{}, fmt.Errorf("failed to open cgroup path %s: %q", path, err) - } - - stats, err := getLoadStats(self.familyId, cfd.Fd(), self.conn) - if err != nil { - return info.LoadStats{}, err - } - glog.V(4).Infof("Task stats for %q: %+v", path, stats) - return stats, nil -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go deleted file mode 100644 index d5999a9..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/fs.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package fs - -import ( - "io" - "os" -) - -type osFS struct{} - -func (osFS) Open(name string) (File, error) { return os.Open(name) } -func (osFS) Stat(name string) (os.FileInfo, error) { return os.Stat(name) } - -var fs FileSystem = osFS{} - -type FileSystem interface { - Open(name string) (File, error) -} - -type File interface { - io.ReadWriteCloser -} - -// Useful for tests. Not thread safe. -func ChangeFileSystem(filesystem FileSystem) { - fs = filesystem -} - -func Open(name string) (File, error) { - return fs.Open(name) -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go deleted file mode 100644 index 77a3f48..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/fakefile.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package mockfs - -import "bytes" - -type FakeFile struct { - bytes.Buffer - Name string -} - -func (self *FakeFile) Close() error { - return nil -} - -func AddTextFile(mockfs *MockFileSystem, name, content string) *FakeFile { - f := &FakeFile{ - Name: name, - Buffer: *bytes.NewBufferString(content), - } - mockfs.EXPECT().Open(name).Return(f, nil).AnyTimes() - return f -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go deleted file mode 100644 index cc3d615..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/fs/mockfs/mockfs.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Automatically generated by MockGen. DO NOT EDIT! -// Source: github.com/google/cadvisor/utils/fs (interfaces: FileSystem) - -package mockfs - -import ( - gomock "github.com/golang/mock/gomock" - fs "github.com/google/cadvisor/utils/fs" -) - -// Mock of FileSystem interface -type MockFileSystem struct { - ctrl *gomock.Controller - recorder *_MockFileSystemRecorder -} - -// Recorder for MockFileSystem (not exported) -type _MockFileSystemRecorder struct { - mock *MockFileSystem -} - -func NewMockFileSystem(ctrl *gomock.Controller) *MockFileSystem { - mock := &MockFileSystem{ctrl: ctrl} - mock.recorder = &_MockFileSystemRecorder{mock} - return mock -} - -func (_m *MockFileSystem) EXPECT() *_MockFileSystemRecorder { - return _m.recorder -} - -func (_m *MockFileSystem) Open(_param0 string) (fs.File, error) { - ret := _m.ctrl.Call(_m, "Open", _param0) - ret0, _ := ret[0].(fs.File) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -func (_mr *_MockFileSystemRecorder) Open(arg0 interface{}) *gomock.Call { - return _mr.mock.ctrl.RecordCall(_mr.mock, "Open", arg0) -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go deleted file mode 100644 index c483b05..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/machine/machine.go +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package machine - -import ( - "fmt" - "io/ioutil" - "regexp" - "strconv" - "strings" - - // s390/s390x changes - "runtime" - "syscall" - - "github.com/golang/glog" - info "github.com/google/cadvisor/info/v1" - "github.com/google/cadvisor/utils" - "github.com/google/cadvisor/utils/sysfs" - "github.com/google/cadvisor/utils/sysinfo" -) - -// The utils/machine package contains functions that extract machine-level specs. - -var cpuRegExp = regexp.MustCompile("processor\\t*: +([0-9]+)") -var coreRegExp = regexp.MustCompile("core id\\t*: +([0-9]+)") -var nodeRegExp = regexp.MustCompile("physical id\\t*: +([0-9]+)") -var CpuClockSpeedMHz = regexp.MustCompile("cpu MHz\\t*: +([0-9]+.[0-9]+)") -var memoryCapacityRegexp = regexp.MustCompile("MemTotal: *([0-9]+) kB") -var swapCapacityRegexp = regexp.MustCompile("SwapTotal: *([0-9]+) kB") - -// GetClockSpeed returns the CPU clock speed, given a []byte formatted as the /proc/cpuinfo file. -func GetClockSpeed(procInfo []byte) (uint64, error) { - // s390/s390x changes - if true == isSystemZ() { - return 0, nil - } - - // First look through sys to find a max supported cpu frequency. - const maxFreqFile = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" - if utils.FileExists(maxFreqFile) { - val, err := ioutil.ReadFile(maxFreqFile) - if err != nil { - return 0, err - } - var maxFreq uint64 - n, err := fmt.Sscanf(string(val), "%d", &maxFreq) - if err != nil || n != 1 { - return 0, fmt.Errorf("could not parse frequency %q", val) - } - return maxFreq, nil - } - // Fall back to /proc/cpuinfo - matches := CpuClockSpeedMHz.FindSubmatch(procInfo) - if len(matches) != 2 { - //Check if we are running on Power systems which have a different format - CpuClockSpeedMHz, _ = regexp.Compile("clock\\t*: +([0-9]+.[0-9]+)MHz") - matches = CpuClockSpeedMHz.FindSubmatch(procInfo) - if len(matches) != 2 { - return 0, fmt.Errorf("could not detect clock speed from output: %q", string(procInfo)) - } - } - speed, err := strconv.ParseFloat(string(matches[1]), 64) - if err != nil { - return 0, err - } - // Convert to kHz - return uint64(speed * 1000), nil -} - -// GetMachineMemoryCapacity returns the machine's total memory from /proc/meminfo. -// Returns the total memory capacity as an int64 (number of bytes). -func GetMachineMemoryCapacity() (int64, error) { - out, err := ioutil.ReadFile("/proc/meminfo") - if err != nil { - return 0, err - } - - memoryCapacity, err := parseCapacity(out, memoryCapacityRegexp) - if err != nil { - return 0, err - } - return memoryCapacity, err -} - -// GetMachineSwapCapacity returns the machine's total swap from /proc/meminfo. -// Returns the total swap capacity as an int64 (number of bytes). -func GetMachineSwapCapacity() (int64, error) { - out, err := ioutil.ReadFile("/proc/meminfo") - if err != nil { - return 0, err - } - - swapCapacity, err := parseCapacity(out, swapCapacityRegexp) - if err != nil { - return 0, err - } - return swapCapacity, err -} - -// parseCapacity matches a Regexp in a []byte, returning the resulting value in bytes. -// Assumes that the value matched by the Regexp is in KB. -func parseCapacity(b []byte, r *regexp.Regexp) (int64, error) { - matches := r.FindSubmatch(b) - if len(matches) != 2 { - return -1, fmt.Errorf("failed to match regexp in output: %q", string(b)) - } - m, err := strconv.ParseInt(string(matches[1]), 10, 64) - if err != nil { - return -1, err - } - - // Convert to bytes. - return m * 1024, err -} - -func GetTopology(sysFs sysfs.SysFs, cpuinfo string) ([]info.Node, int, error) { - nodes := []info.Node{} - - // s390/s390x changes - if true == isSystemZ() { - return nodes, getNumCores(), nil - } - - numCores := 0 - lastThread := -1 - lastCore := -1 - lastNode := -1 - for _, line := range strings.Split(cpuinfo, "\n") { - ok, val, err := extractValue(line, cpuRegExp) - if err != nil { - return nil, -1, fmt.Errorf("could not parse cpu info from %q: %v", line, err) - } - if ok { - thread := val - numCores++ - if lastThread != -1 { - // New cpu section. Save last one. - nodeIdx, err := addNode(&nodes, lastNode) - if err != nil { - return nil, -1, fmt.Errorf("failed to add node %d: %v", lastNode, err) - } - nodes[nodeIdx].AddThread(lastThread, lastCore) - lastCore = -1 - lastNode = -1 - } - lastThread = thread - } - ok, val, err = extractValue(line, coreRegExp) - if err != nil { - return nil, -1, fmt.Errorf("could not parse core info from %q: %v", line, err) - } - if ok { - lastCore = val - } - ok, val, err = extractValue(line, nodeRegExp) - if err != nil { - return nil, -1, fmt.Errorf("could not parse node info from %q: %v", line, err) - } - if ok { - lastNode = val - } - } - nodeIdx, err := addNode(&nodes, lastNode) - if err != nil { - return nil, -1, fmt.Errorf("failed to add node %d: %v", lastNode, err) - } - nodes[nodeIdx].AddThread(lastThread, lastCore) - if numCores < 1 { - return nil, numCores, fmt.Errorf("could not detect any cores") - } - for idx, node := range nodes { - caches, err := sysinfo.GetCacheInfo(sysFs, node.Cores[0].Threads[0]) - if err != nil { - glog.Errorf("failed to get cache information for node %d: %v", node.Id, err) - continue - } - numThreadsPerCore := len(node.Cores[0].Threads) - numThreadsPerNode := len(node.Cores) * numThreadsPerCore - for _, cache := range caches { - c := info.Cache{ - Size: cache.Size, - Level: cache.Level, - Type: cache.Type, - } - if cache.Cpus == numThreadsPerNode && cache.Level > 2 { - // Add a node-level cache. - nodes[idx].AddNodeCache(c) - } else if cache.Cpus == numThreadsPerCore { - // Add to each core. - nodes[idx].AddPerCoreCache(c) - } - // Ignore unknown caches. - } - } - return nodes, numCores, nil -} - -func extractValue(s string, r *regexp.Regexp) (bool, int, error) { - matches := r.FindSubmatch([]byte(s)) - if len(matches) == 2 { - val, err := strconv.ParseInt(string(matches[1]), 10, 32) - if err != nil { - return true, -1, err - } - return true, int(val), nil - } - return false, -1, nil -} - -func findNode(nodes []info.Node, id int) (bool, int) { - for i, n := range nodes { - if n.Id == id { - return true, i - } - } - return false, -1 -} - -func addNode(nodes *[]info.Node, id int) (int, error) { - var idx int - if id == -1 { - // Some VMs don't fill topology data. Export single package. - id = 0 - } - - ok, idx := findNode(*nodes, id) - if !ok { - // New node - node := info.Node{Id: id} - // Add per-node memory information. - meminfo := fmt.Sprintf("/sys/devices/system/node/node%d/meminfo", id) - out, err := ioutil.ReadFile(meminfo) - // Ignore if per-node info is not available. - if err == nil { - m, err := parseCapacity(out, memoryCapacityRegexp) - if err != nil { - return -1, err - } - node.Memory = uint64(m) - } - *nodes = append(*nodes, node) - idx = len(*nodes) - 1 - } - return idx, nil -} - -// s390/s390x changes -func getMachineArch() (string, error) { - uname := syscall.Utsname{} - err := syscall.Uname(&uname) - if err != nil { - return "", err - } - - var arch string - for _, val := range uname.Machine { - arch += string(int(val)) - } - - return arch, nil -} - -// s390/s390x changes -func isSystemZ() bool { - arch, err := getMachineArch() - if err == nil { - if true == strings.Contains(arch, "390") { - return true - } - } - return false -} - -// s390/s390x changes -func getNumCores() int { - maxProcs := runtime.GOMAXPROCS(0) - numCPU := runtime.NumCPU() - - if maxProcs < numCPU { - return maxProcs - } - - return numCPU -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt deleted file mode 100644 index be6632e..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/containerOomExampleLog.txt +++ /dev/null @@ -1,44 +0,0 @@ -Jan 5 15:19:01 CRON[14500]: (root) CMD (touch /var/run/crond.sittercheck) -Jan 5 15:19:04 cookie_monster[1249]: uid 0, pid 14504, "/var/lib/certs/machine_cert.crt" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" -Jan 5 15:19:04 cookie_monster[1249]: uid 0, pid 14504, "/var/lib/certs/machine_cert.key" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" -Jan 5 15:19:05 nsscacheclient[14504]: SUCCESS: Completed run (v29/c20 rtime:0.334299 utime:0.136923 stime:0.011736 maxrss:5260k dials:1 sent:1793 rcvd:5143). -Jan 5 15:19:27 kernel: [ 5864.708440] memorymonster invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=0 -Jan 5 15:19:27 kernel: [ 5864.708443] memorymonster cpuset=/ mems_allowed=0 -Jan 5 15:19:27 kernel: [ 5864.708446] CPU: 5 PID: 13536 Comm: memorymonster Tainted: P OX 3.13.0-43-generic #72-Ubuntu -Jan 5 15:19:27 kernel: [ 5864.708447] Hardware name: Hewlett-Packard HP Z420 Workstation/1589, BIOS J61 v03.65 12/19/2013 -Jan 5 15:19:27 kernel: [ 5864.708448] ffff88072ae10800 ffff8807a4835c48 ffffffff81720bf6 ffff8807a8e86000 -Jan 5 15:19:27 kernel: [ 5864.708451] ffff8807a4835cd0 ffffffff8171b4b1 0000000000000246 ffff88072ae10800 -Jan 5 15:19:27 kernel: [ 5864.708453] ffff8807a4835c90 ffff8807a4835ca0 ffffffff811522a7 0000000000000001 -Jan 5 15:19:27 kernel: [ 5864.708455] Call Trace: -Jan 5 15:19:27 kernel: [ 5864.708460] [<ffffffff81720bf6>] dump_stack+0x45/0x56 -Jan 5 15:19:27 kernel: [ 5864.708463] [<ffffffff8171b4b1>] dump_header+0x7f/0x1f1 -Jan 5 15:19:27 kernel: [ 5864.708465] [<ffffffff811522a7>] ? find_lock_task_mm+0x27/0x70 -Jan 5 15:19:27 kernel: [ 5864.708467] [<ffffffff811526de>] oom_kill_process+0x1ce/0x330 -Jan 5 15:19:27 kernel: [ 5864.708470] [<ffffffff812d6ce5>] ? security_capable_noaudit+0x15/0x20 -Jan 5 15:19:27 kernel: [ 5864.708474] [<ffffffff811b491c>] mem_cgroup_oom_synchronize+0x51c/0x560 -Jan 5 15:19:27 kernel: [ 5864.708476] [<ffffffff811b3e50>] ? mem_cgroup_charge_common+0xa0/0xa0 -Jan 5 15:19:27 kernel: [ 5864.708478] [<ffffffff81152e64>] pagefault_out_of_memory+0x14/0x80 -Jan 5 15:19:27 kernel: [ 5864.708480] [<ffffffff81719aa1>] mm_fault_error+0x8e/0x180 -Jan 5 15:19:27 kernel: [ 5864.708482] [<ffffffff8172cf31>] __do_page_fault+0x4a1/0x560 -Jan 5 15:19:27 kernel: [ 5864.708485] [<ffffffff810a0255>] ? set_next_entity+0x95/0xb0 -Jan 5 15:19:27 kernel: [ 5864.708489] [<ffffffff81012609>] ? __switch_to+0x169/0x4c0 -Jan 5 15:19:27 kernel: [ 5864.708490] [<ffffffff8172d00a>] do_page_fault+0x1a/0x70 -Jan 5 15:19:27 kernel: [ 5864.708492] [<ffffffff81729468>] page_fault+0x28/0x30 -Jan 5 15:19:27 kernel: [ 5864.708493] Task in /mem2 killed as a result of limit of /mem2 -Jan 5 15:19:27 kernel: [ 5864.708495] memory: usage 980kB, limit 980kB, failcnt 4152239 -Jan 5 15:19:27 kernel: [ 5864.708495] memory+swap: usage 0kB, limit 18014398509481983kB, failcnt 0 -Jan 5 15:19:27 kernel: [ 5864.708496] kmem: usage 0kB, limit 18014398509481983kB, failcnt 0 -Jan 5 15:19:27 kernel: [ 5864.708497] Memory cgroup stats for /mem2: cache:0KB rss:980KB rss_huge:0KB mapped_file:0KB writeback:20KB inactive_anon:560KB active_anon:420KB inactive_file:0KB active_file:0KB unevictable:0KB -Jan 5 15:19:27 kernel: [ 5864.708505] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name -Jan 5 15:19:27 kernel: [ 5864.708600] [13536] 275858 13536 8389663 343 16267 8324326 0 memorymonster -Jan 5 15:19:27 kernel: [ 5864.708607] Memory cgroup out of memory: Kill process 13536 (memorymonster) score 996 or sacrifice child -Jan 5 15:19:27 kernel: [ 5864.708608] Killed process 13536 (memorymonster) total-vm:33558652kB, anon-rss:920kB, file-rss:452kB -Jan 5 15:20:01 CRON[14608]: (root) CMD (touch /var/run/crond.sittercheck) -Jan 5 15:20:01 CRON[14609]: (root) CMD (/usr/bin/alarm 6000 /usr/share/update-notifier/reevaluate.py) -Jan 5 15:20:01 CRON[14610]: (root) CMD (/usr/bin/corp_cronwrap -j 80 -t 600 -A -K -L -l 'nsscache-client' /usr/bin/nsscacheclient all) -Jan 5 15:20:01 /usr/bin/lock: called by /bin/bash for . uid 0, euid 0. -Jan 5 15:21:01 CRON[14639]: (root) CMD (touch /var/run/crond.sittercheck) -Jan 5 15:21:05 cookie_monster[1249]: uid 0, pid 14643, "/var/lib/certs/machine_cert.crt" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" -Jan 5 15:21:05 cookie_monster[1249]: uid 0, pid 14643, "/var/lib/certs/machine_cert.key" accessed by exe "/usr/bin/nsscacheclient", cwd "/root", comm "/usr/bin/nsscacheclient" -Jan 5 15:21:05 nsscacheclient[14643]: auto.auto(no change) time:0.042264697000000004 retries:0 -Jan 5 15:21:05 nsscacheclient[14643]: auto.home(63c07d09->8686499b write:3631382) time:0.318774602 retries:0 \ No newline at end of file diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go deleted file mode 100644 index 8667d32..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomexample/main.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package main - -import ( - "flag" - - "github.com/golang/glog" - "github.com/google/cadvisor/utils/oomparser" -) - -// demonstrates how to run oomparser.OomParser to get OomInstance information -func main() { - flag.Parse() - // out is a user-provided channel from which the user can read incoming - // OomInstance objects - outStream := make(chan *oomparser.OomInstance) - oomLog, err := oomparser.New() - if err != nil { - glog.Infof("Couldn't make a new oomparser. %v", err) - } else { - go oomLog.StreamOoms(outStream) - // demonstration of how to get oomLog's list of oomInstances or access - // the user-declared oomInstance channel, here called outStream - for oomInstance := range outStream { - glog.Infof("Reading the buffer. Output is %v", oomInstance) - } - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go deleted file mode 100644 index a1c9bd1..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/oomparser.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package oomparser - -import ( - "bufio" - "fmt" - "io" - "os" - "os/exec" - "path" - "regexp" - "strconv" - "time" - - "github.com/golang/glog" - "github.com/google/cadvisor/utils" -) - -var containerRegexp *regexp.Regexp = regexp.MustCompile( - `Task in (.*) killed as a result of limit of (.*)`) -var lastLineRegexp *regexp.Regexp = regexp.MustCompile( - `(^[A-Z]{1}[a-z]{2} .*[0-9]{1,2} [0-9]{1,2}:[0-9]{2}:[0-9]{2}) .* Killed process ([0-9]+) \(([0-9A-Za-z_]+)\)`) -var firstLineRegexp *regexp.Regexp = regexp.MustCompile( - `invoked oom-killer:`) - -// struct to hold file from which we obtain OomInstances -type OomParser struct { - ioreader *bufio.Reader -} - -// struct that contains information related to an OOM kill instance -type OomInstance struct { - // process id of the killed process - Pid int - // the name of the killed process - ProcessName string - // the time that the process was reported to be killed, - // accurate to the minute - TimeOfDeath time.Time - // the absolute name of the container that OOMed - ContainerName string - // the absolute name of the container that was killed - // due to the OOM. - VictimContainerName string -} - -// gets the container name from a line and adds it to the oomInstance. -func getContainerName(line string, currentOomInstance *OomInstance) error { - parsedLine := containerRegexp.FindStringSubmatch(line) - if parsedLine == nil { - return nil - } - currentOomInstance.ContainerName = path.Join("/", parsedLine[1]) - currentOomInstance.VictimContainerName = path.Join("/", parsedLine[2]) - return nil -} - -// gets the pid, name, and date from a line and adds it to oomInstance -func getProcessNamePid(line string, currentOomInstance *OomInstance) (bool, error) { - reList := lastLineRegexp.FindStringSubmatch(line) - - if reList == nil { - return false, nil - } - const longForm = "Jan _2 15:04:05 2006" - stringYear := strconv.Itoa(time.Now().Year()) - linetime, err := time.ParseInLocation(longForm, reList[1]+" "+stringYear, time.Local) - if err != nil { - return false, err - } - - currentOomInstance.TimeOfDeath = linetime - pid, err := strconv.Atoi(reList[2]) - if err != nil { - return false, err - } - currentOomInstance.Pid = pid - currentOomInstance.ProcessName = reList[3] - return true, nil -} - -// uses regex to see if line is the start of a kernel oom log -func checkIfStartOfOomMessages(line string) bool { - potential_oom_start := firstLineRegexp.MatchString(line) - if potential_oom_start { - return true - } - return false -} - -// reads the file and sends only complete lines over a channel to analyzeLines. -// Should prevent EOF errors that occur when lines are read before being fully -// written to the log. It reads line by line splitting on -// the "\n" character. -func readLinesFromFile(lineChannel chan string, ioreader *bufio.Reader) { - linefragment := "" - var line string - var err error - for true { - line, err = ioreader.ReadString('\n') - if err == io.EOF { - if line != "" { - linefragment += line - } - time.Sleep(100 * time.Millisecond) - } else if err == nil { - if linefragment != "" { - line = linefragment + line - linefragment = "" - } - lineChannel <- line - } else if err != nil && err != io.EOF { - glog.Errorf("exiting analyzeLinesHelper with error %v", err) - } - } -} - -// Calls goroutine for readLinesFromFile, which feeds it complete lines. -// Lines are checked against a regexp to check for the pid, process name, etc. -// At the end of an oom message group, StreamOoms adds the new oomInstance to -// oomLog -func (self *OomParser) StreamOoms(outStream chan *OomInstance) { - lineChannel := make(chan string, 10) - go func() { - readLinesFromFile(lineChannel, self.ioreader) - }() - - for line := range lineChannel { - in_oom_kernel_log := checkIfStartOfOomMessages(line) - if in_oom_kernel_log { - oomCurrentInstance := &OomInstance{ - ContainerName: "/", - } - finished := false - for !finished { - err := getContainerName(line, oomCurrentInstance) - if err != nil { - glog.Errorf("%v", err) - } - finished, err = getProcessNamePid(line, oomCurrentInstance) - if err != nil { - glog.Errorf("%v", err) - } - line = <-lineChannel - } - in_oom_kernel_log = false - outStream <- oomCurrentInstance - } - } - glog.Infof("exiting analyzeLines") -} - -func callJournalctl() (io.ReadCloser, error) { - cmd := exec.Command("journalctl", "-k", "-f") - readcloser, err := cmd.StdoutPipe() - if err != nil { - return nil, err - } - if err := cmd.Start(); err != nil { - return nil, err - } - return readcloser, err -} - -func trySystemd() (*OomParser, error) { - readcloser, err := callJournalctl() - if err != nil { - return nil, err - } - glog.Infof("oomparser using systemd") - return &OomParser{ - ioreader: bufio.NewReader(readcloser), - }, nil - -} - -// List of possible kernel log files. These are prioritized in order so that -// we will use the first one that is available. -var kernelLogFiles = []string{"/var/log/kern.log", "/var/log/messages", "/var/log/syslog"} - -// looks for system files that contain kernel messages and if one is found, sets -// the systemFile attribute of the OomParser object -func getSystemFile() (string, error) { - for _, logFile := range kernelLogFiles { - if utils.FileExists(logFile) { - glog.Infof("OOM parser using kernel log file: %q", logFile) - return logFile, nil - } - } - return "", fmt.Errorf("unable to find any kernel log file available from our set: %v", kernelLogFiles) -} - -// initializes an OomParser object and calls getSystemFile to set the systemFile -// attribute. Returns and OomParser object and an error -func New() (*OomParser, error) { - systemFile, err := getSystemFile() - if err != nil { - return trySystemd() - } - file, err := os.Open(systemFile) - if err != nil { - return trySystemd() - } - return &OomParser{ - ioreader: bufio.NewReader(file), - }, nil -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt b/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt deleted file mode 100644 index 9d38bbd..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/oomparser/systemOomExampleLog.txt +++ /dev/null @@ -1,362 +0,0 @@ -[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 -[ 0.000000] Hierarchical RCU implementation. -[ 0.000000] RCU dyntick-idle grace-period acceleration is enabled. -[ 0.000000] RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1. -[ 0.000000] Offload RCU callbacks from all CPUs -[ 0.000000] Offload RCU callbacks from CPUs: 0. -[ 0.000000] NR_IRQS:16640 nr_irqs:256 16 -[ 0.000000] Console: colour dummy device 80x25 -[ 0.000000] console [ttyS0] enabled -[ 0.000000] allocated 7340032 bytes of page_cgroup -[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups -[ 0.000000] tsc: Detected 2500.000 MHz processor -[ 0.008000] Calibrating delay loop (skipped) preset value.. 5000.00 BogoMIPS (lpj=10000000) -[ 0.008000] pid_max: default: 32768 minimum: 301 -[ 0.008000] Security Framework initialized -[ 0.008000] AppArmor: AppArmor initialized -[ 0.008000] Yama: becoming mindful. -[ 0.008200] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes) -[ 0.011365] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes) -[ 0.013066] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes) -[ 0.014030] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes) -[ 0.016266] Initializing cgroup subsys memory -[ 0.016898] Initializing cgroup subsys devices -[ 0.017546] Initializing cgroup subsys freezer -[ 0.018193] Initializing cgroup subsys blkio -[ 0.018793] Initializing cgroup subsys perf_event -[ 0.019416] Initializing cgroup subsys hugetlb -[ 0.020067] Disabled fast string operations -[ 0.020681] CPU: Physical Processor ID: 0 -[ 0.021238] CPU: Processor Core ID: 0 -[ 0.022587] mce: CPU supports 32 MCE banks -[ 0.023260] Last level iTLB entries: 4KB 512, 2MB 0, 4MB 0 -[ 0.023260] Last level dTLB entries: 4KB 512, 2MB 0, 4MB 0 -[ 0.023260] tlb_flushall_shift: 6 -[ 0.043758] Freeing SMP alternatives memory: 32K (ffffffff81e6c000 - ffffffff81e74000) -[ 0.048361] ACPI: Core revision 20131115 -[ 0.049516] ACPI: All ACPI Tables successfully acquired -[ 0.050342] ftrace: allocating 28458 entries in 112 pages -[ 0.060327] Enabling x2apic -[ 0.060740] Enabled x2apic -[ 0.064005] Switched APIC routing to physical x2apic. -[ 0.065489] ..TIMER: vector=0x30 apic1=0 pin1=0 apic2=-1 pin2=-1 -[ 0.066331] smpboot: CPU0: Intel(R) Xeon(R) CPU @ 2.50GHz (fam: 06, model: 3e, stepping: 04) -[ 0.072000] APIC calibration not consistent with PM-Timer: 227ms instead of 100ms -[ 0.072000] APIC delta adjusted to PM-Timer: 6250028 (14249259) -[ 0.074382] Performance Events: unsupported p6 CPU model 62 no PMU driver, software events only. -[ 0.077174] x86: Booted up 1 node, 1 CPUs -[ 0.077738] smpboot: Total of 1 processors activated (5000.00 BogoMIPS) -[ 0.078932] NMI watchdog: disabled (cpu0): hardware events not enabled -[ 0.079945] devtmpfs: initialized -[ 0.081784] EVM: security.selinux -[ 0.082251] EVM: security.SMACK64 -[ 0.082720] EVM: security.ima -[ 0.083135] EVM: security.capability -[ 0.084729] pinctrl core: initialized pinctrl subsystem -[ 0.085517] regulator-dummy: no parameters -[ 0.086187] RTC time: 19:51:09, date: 01/28/15 -[ 0.086869] NET: Registered protocol family 16 -[ 0.087613] cpuidle: using governor ladder -[ 0.088009] cpuidle: using governor menu -[ 0.088580] ACPI: bus type PCI registered -[ 0.089191] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 -[ 0.090220] PCI: Using configuration type 1 for base access -[ 0.091749] bio: create slab <bio-0> at 0 -[ 0.092215] ACPI: Added _OSI(Module Device) -[ 0.092799] ACPI: Added _OSI(Processor Device) -[ 0.093410] ACPI: Added _OSI(3.0 _SCP Extensions) -[ 0.094173] ACPI: Added _OSI(Processor Aggregator Device) -[ 0.096962] ACPI: Interpreter enabled -[ 0.097483] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20131115/hwxface-580) -[ 0.098762] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20131115/hwxface-580) -[ 0.100011] ACPI: (supports S0 S3 S4 S5) -[ 0.100555] ACPI: Using IOAPIC for interrupt routing -[ 0.101252] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug -[ 0.102545] ACPI: No dock devices found. -[ 0.105210] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff]) -[ 0.106060] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI] -[ 0.108025] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM -[ 0.109116] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge. -[ 0.112685] PCI host bridge to bus 0000:00 -[ 0.113294] pci_bus 0000:00: root bus resource [bus 00-ff] -[ 0.114054] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7] -[ 0.115065] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff] -[ 0.116004] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff] -[ 0.116955] pci_bus 0000:00: root bus resource [mem 0x6cc00000-0xfebfffff] -[ 0.117916] pci 0000:00:01.0: [8086:7110] type 00 class 0x060100 -[ 0.122089] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 -[ 0.125713] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI -[ 0.127117] pci 0000:00:03.0: [1af4:1004] type 00 class 0x000000 -[ 0.128752] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc03f] -[ 0.130322] pci 0000:00:03.0: reg 0x14: [mem 0xfebfe000-0xfebfe07f] -[ 0.133571] pci 0000:00:04.0: [1af4:1000] type 00 class 0x020000 -[ 0.135267] pci 0000:00:04.0: reg 0x10: [io 0xc040-0xc07f] -[ 0.136777] pci 0000:00:04.0: reg 0x14: [mem 0xfebff000-0xfebff03f] -[ 0.140811] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11) -[ 0.141879] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11) -[ 0.142886] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11) -[ 0.144086] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11) -[ 0.145067] ACPI: PCI Interrupt Link [LNKS] (IRQs *9) -[ 0.146245] ACPI: Enabled 16 GPEs in block 00 to 0F -[ 0.147038] ACPI: \_SB_.PCI0: notify handler is installed -[ 0.147840] Found 1 acpi root devices -[ 0.148136] vgaarb: loaded -[ 0.148780] SCSI subsystem initialized -[ 0.149472] libata version 3.00 loaded. -[ 0.150070] ACPI: bus type USB registered -[ 0.150659] usbcore: registered new interface driver usbfs -[ 0.151536] usbcore: registered new interface driver hub -[ 0.152055] usbcore: registered new device driver usb -[ 0.153144] PCI: Using ACPI for IRQ routing -[ 0.153756] PCI: pci_cache_line_size set to 64 bytes -[ 0.154617] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff] -[ 0.156004] e820: reserve RAM buffer [mem 0x6cbfe000-0x6fffffff] -[ 0.156993] NetLabel: Initializing -[ 0.157498] NetLabel: domain hash size = 128 -[ 0.158082] NetLabel: protocols = UNLABELED CIPSOv4 -[ 0.158815] NetLabel: unlabeled traffic allowed by default -[ 0.160005] Switched to clocksource kvm-clock -[ 0.168695] AppArmor: AppArmor Filesystem Enabled -[ 0.169361] pnp: PnP ACPI init -[ 0.169853] ACPI: bus type PNP registered -[ 0.170499] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) -[ 0.171591] pnp 00:01: Plug and Play ACPI device, IDs PNP0501 (active) -[ 0.172574] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active) -[ 0.173782] pnp: PnP ACPI: found 3 devices -[ 0.174430] ACPI: bus type PNP unregistered -[ 0.181364] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7] -[ 0.182172] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff] -[ 0.183049] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff] -[ 0.184120] pci_bus 0000:00: resource 7 [mem 0x6cc00000-0xfebfffff] -[ 0.185051] NET: Registered protocol family 2 -[ 0.185859] TCP established hash table entries: 16384 (order: 5, 131072 bytes) -[ 0.187117] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) -[ 0.188393] TCP: Hash tables configured (established 16384 bind 16384) -[ 0.189429] TCP: reno registered -[ 0.189929] UDP hash table entries: 1024 (order: 3, 32768 bytes) -[ 0.190824] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes) -[ 0.191830] NET: Registered protocol family 1 -[ 0.192585] PCI: CLS 0 bytes, default 64 -[ 0.193412] Trying to unpack rootfs image as initramfs... -[ 0.897565] Freeing initrd memory: 18780K (ffff880035b42000 - ffff880036d99000) -[ 0.898982] microcode: CPU0 sig=0x306e4, pf=0x1, revision=0x1 -[ 0.899884] microcode: Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba -[ 0.901196] Scanning for low memory corruption every 60 seconds -[ 0.902497] Initialise system trusted keyring -[ 0.903169] audit: initializing netlink socket (disabled) -[ 0.904016] type=2000 audit(1422474669.702:1): initialized -[ 0.926617] HugeTLB registered 2 MB page size, pre-allocated 0 pages -[ 0.928567] zbud: loaded -[ 0.929030] VFS: Disk quotas dquot_6.5.2 -[ 0.929685] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) -[ 0.931113] fuse init (API version 7.22) -[ 0.931781] msgmni has been set to 3390 -[ 0.932595] Key type big_key registered -[ 0.933680] Key type asymmetric registered -[ 0.934332] Asymmetric key parser 'x509' registered -[ 0.935078] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) -[ 0.936224] io scheduler noop registered -[ 0.936858] io scheduler deadline registered (default) -[ 0.937675] io scheduler cfq registered -[ 0.938307] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 -[ 0.939158] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 -[ 0.940239] efifb: probing for efifb -[ 0.940788] efifb: framebuffer at 0xa0000, mapped to 0xffff8800000a0000, using 64k, total 64k -[ 0.942044] efifb: mode is 640x480x1, linelength=80, pages=1 -[ 0.942964] efifb: scrolling: redraw -[ 0.943525] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0 -[ 0.945209] Console: switching to colour frame buffer device 80x30 -[ 0.946826] fb0: EFI VGA frame buffer device -[ 0.947485] intel_idle: does not run on family 6 model 62 -[ 0.948380] ipmi message handler version 39.2 -[ 0.949036] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0 -[ 0.950135] ACPI: Power Button [PWRF] -[ 0.950722] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1 -[ 0.951773] ACPI: Sleep Button [SLPF] -[ 0.952529] GHES: HEST is not enabled! -[ 0.953921] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11 -[ 0.955783] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10 -[ 0.957395] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled -[ 1.112167] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A -[ 1.134843] 00:02: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A -[ 1.137110] Linux agpgart interface v0.103 -[ 1.138975] brd: module loaded -[ 1.140117] loop: module loaded -[ 1.140923] libphy: Fixed MDIO Bus: probed -[ 1.141640] tun: Universal TUN/TAP device driver, 1.6 -[ 1.142342] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com> -[ 1.144063] virtio-pci 0000:00:04.0: irq 40 for MSI/MSI-X -[ 1.144871] virtio-pci 0000:00:04.0: irq 41 for MSI/MSI-X -[ 1.145670] virtio-pci 0000:00:04.0: irq 42 for MSI/MSI-X -[ 1.151673] PPP generic driver version 2.4.2 -[ 1.152344] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver -[ 1.153399] ehci-pci: EHCI PCI platform driver -[ 1.154021] ehci-platform: EHCI generic platform driver -[ 1.154939] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver -[ 1.155973] ohci-pci: OHCI PCI platform driver -[ 1.156675] ohci-platform: OHCI generic platform driver -[ 1.157423] uhci_hcd: USB Universal Host Controller Interface driver -[ 1.158352] i8042: PNP: No PS/2 controller found. Probing ports directly. -[ 3.646820] i8042: No controller found -[ 3.647493] tsc: Refined TSC clocksource calibration: 2500.002 MHz -[ 3.648490] mousedev: PS/2 mouse device common for all mice -[ 3.649499] rtc_cmos 00:00: RTC can wake from S4 -[ 3.650595] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0 -[ 3.651521] rtc_cmos 00:00: alarms up to one day, 114 bytes nvram -[ 3.652422] device-mapper: uevent: version 1.0.3 -[ 3.653131] device-mapper: ioctl: 4.27.0-ioctl (2013-10-30) initialised: dm-devel@redhat.com -[ 3.654281] ledtrig-cpu: registered to indicate activity on CPUs -[ 3.655182] TCP: cubic registered -[ 3.655704] NET: Registered protocol family 10 -[ 3.656551] NET: Registered protocol family 17 -[ 3.657183] Key type dns_resolver registered -[ 3.657931] Loading compiled-in X.509 certificates -[ 3.659264] Loaded X.509 cert 'Magrathea: Glacier signing key: 23984ac203784325ccf7b95b51f6c119380eb933' -[ 3.660726] registered taskstats version 1 -[ 3.663211] Key type trusted registered -[ 3.665462] Key type encrypted registered -[ 3.667679] AppArmor: AppArmor sha1 policy hashing enabled -[ 3.668454] IMA: No TPM chip found, activating TPM-bypass! -[ 3.669388] regulator-dummy: disabling -[ 3.669971] Magic number: 15:428:901 -[ 3.670625] clocksource clocksource0: hash matches -[ 3.671311] acpi PNP0501:01: hash matches -[ 3.671953] rtc_cmos 00:00: setting system clock to 2015-01-28 19:51:13 UTC (1422474673) -[ 3.673268] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found -[ 3.674088] EDD information not available. -[ 3.674668] PM: Hibernation image not present or could not be loaded. -[ 3.676577] Freeing unused kernel memory: 1332K (ffffffff81d1f000 - ffffffff81e6c000) -[ 3.678370] Write protecting the kernel read-only data: 12288k -[ 3.681251] Freeing unused kernel memory: 828K (ffff880001731000 - ffff880001800000) -[ 3.684444] Freeing unused kernel memory: 700K (ffff880001b51000 - ffff880001c00000) -[ 3.700162] systemd-udevd[90]: starting version 204 -[ 3.866262] virtio-pci 0000:00:03.0: irq 43 for MSI/MSI-X -[ 3.867187] virtio-pci 0000:00:03.0: irq 44 for MSI/MSI-X -[ 3.867997] virtio-pci 0000:00:03.0: irq 45 for MSI/MSI-X -[ 3.876214] virtio-pci 0000:00:03.0: irq 46 for MSI/MSI-X -[ 3.880005] scsi0 : Virtio SCSI HBA -[ 3.912410] scsi 0:0:1:0: Direct-Access Google PersistentDisk 1 PQ: 0 ANSI: 6 -[ 3.938957] sd 0:0:1:0: Attached scsi generic sg0 type 0 -[ 3.939845] sd 0:0:1:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB) -[ 3.941149] sd 0:0:1:0: [sda] 4096-byte physical blocks -[ 3.942233] sd 0:0:1:0: [sda] Write Protect is off -[ 3.942988] sd 0:0:1:0: [sda] Mode Sense: 1f 00 00 08 -[ 3.944398] sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA -[ 3.961885] sda: sda1 -[ 3.963152] sd 0:0:1:0: [sda] Attached SCSI disk -[ 4.414649] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null) -[ 5.293574] random: init urandom read with 73 bits of entropy available -[ 6.418187] random: nonblocking pool is initialized -[ 6.692508] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro -[ 7.121847] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready -[ 7.681714] systemd-udevd[293]: starting version 204 -[ 8.437234] lp: driver loaded but no devices found -[ 9.164195] piix4_smbus 0000:00:01.3: SMBus base address uninitialized - upgrade BIOS or use force_addr=0xaddr -[ 9.648096] device-mapper: multipath: version 1.6.0 loaded -[ 10.434575] type=1400 audit(1422474680.256:2): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/sbin/dhclient" pid=368 comm="apparmor_parser" -[ 10.437242] type=1400 audit(1422474680.260:3): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=368 comm="apparmor_parser" -[ 10.439901] type=1400 audit(1422474680.260:4): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=368 comm="apparmor_parser" -[ 11.126295] type=1400 audit(1422474680.948:5): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=412 comm="apparmor_parser" -[ 11.129123] type=1400 audit(1422474680.952:6): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=412 comm="apparmor_parser" -[ 11.132139] type=1400 audit(1422474680.956:7): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=412 comm="apparmor_parser" -[ 11.196173] type=1400 audit(1422474681.020:8): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/sbin/dhclient" pid=458 comm="apparmor_parser" -[ 11.198887] type=1400 audit(1422474681.020:9): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=458 comm="apparmor_parser" -[ 11.201484] type=1400 audit(1422474681.028:10): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=458 comm="apparmor_parser" -[ 11.361371] init: udev-fallback-graphics main process (454) terminated with status 1 -[ 11.378437] type=1400 audit(1422474681.200:11): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-client.action" pid=458 comm="apparmor_parser" -[ 14.366411] init: failsafe main process (491) killed by TERM signal -kateknister@kateknister-test3:~$ tail -f /var/log/syslog -Jan 28 19:51:47 localhost ntpdate[1240]: adjust time server 169.254.169.254 offset -0.383723 sec -Jan 28 19:51:47 localhost ntpd[1312]: ntpd 4.2.6p5@1.2349-o Wed Oct 9 19:08:06 UTC 2013 (1) -Jan 28 19:51:47 localhost ntpd[1313]: proto: precision = 0.449 usec -Jan 28 19:51:47 localhost ntpd[1313]: ntp_io: estimated max descriptors: 1024, initial socket boundary: 16 -Jan 28 19:51:47 localhost ntpd[1313]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123 -Jan 28 19:51:47 localhost ntpd[1313]: Listen and drop on 1 v6wildcard :: UDP 123 -Jan 28 19:51:47 localhost ntpd[1313]: Listen normally on 2 lo 127.0.0.1 UDP 123 -Jan 28 19:51:47 localhost ntpd[1313]: Listen normally on 3 eth0 10.240.192.196 UDP 123 -Jan 28 19:51:47 localhost ntpd[1313]: peers refreshed -Jan 28 19:51:47 localhost ntpd[1313]: Listening on routing socket on fd #20 for interface updates -Jan 28 19:58:45 localhost kernel: [ 455.498827] badsysprogram invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0 -Jan 28 19:58:45 localhost kernel: [ 455.500173] badsysprogram cpuset=/ mems_allowed=0 -Jan 28 19:58:45 localhost kernel: [ 455.501007] CPU: 0 PID: 1532 Comm: badsysprogram Not tainted 3.13.0-27-generic #50-Ubuntu -Jan 28 19:58:45 localhost kernel: [ 455.502301] Hardware name: Google Google, BIOS Google 01/01/2011 -Jan 28 19:58:45 localhost kernel: [ 455.503298] 0000000000000000 ffff880069715a90 ffffffff817199c4 ffff8800680d8000 -Jan 28 19:58:45 localhost kernel: [ 455.504563] ffff880069715b18 ffffffff817142ff 0000000000000000 0000000000000000 -Jan 28 19:58:45 localhost kernel: [ 455.505779] 0000000000000000 0000000000000000 0000000000000000 0000000000000000 -Jan 28 19:58:45 localhost kernel: [ 455.506971] Call Trace: -Jan 28 19:58:45 localhost kernel: [ 455.507353] [<ffffffff817199c4>] dump_stack+0x45/0x56 -Jan 28 19:58:45 localhost kernel: [ 455.508289] [<ffffffff817142ff>] dump_header+0x7f/0x1f1 -Jan 28 19:58:45 localhost kernel: [ 455.509112] [<ffffffff8115196e>] oom_kill_process+0x1ce/0x330 -Jan 28 19:58:45 localhost kernel: [ 455.510023] [<ffffffff812d3395>] ? security_capable_noaudit+0x15/0x20 -Jan 28 19:58:45 localhost kernel: [ 455.510994] [<ffffffff811520a4>] out_of_memory+0x414/0x450 -Jan 28 19:58:45 localhost kernel: [ 455.511820] [<ffffffff81158377>] __alloc_pages_nodemask+0xa87/0xb20 -Jan 28 19:58:45 localhost kernel: [ 455.512815] [<ffffffff811985da>] alloc_pages_vma+0x9a/0x140 -Jan 28 19:58:45 localhost kernel: [ 455.513647] [<ffffffff8117909b>] handle_mm_fault+0xb2b/0xf10 -Jan 28 19:58:45 localhost kernel: [ 455.514498] [<ffffffff81725924>] __do_page_fault+0x184/0x560 -Jan 28 19:58:45 localhost kernel: [ 455.515415] [<ffffffff8101b7d9>] ? sched_clock+0x9/0x10 -Jan 28 19:58:45 localhost kernel: [ 455.516318] [<ffffffff8109d13d>] ? sched_clock_local+0x1d/0x80 -Jan 28 19:58:45 localhost kernel: [ 455.517242] [<ffffffff811112ec>] ? acct_account_cputime+0x1c/0x20 -Jan 28 19:58:45 localhost kernel: [ 455.518141] [<ffffffff8109d76b>] ? account_user_time+0x8b/0xa0 -Jan 28 19:58:45 localhost kernel: [ 455.519014] [<ffffffff8109dd84>] ? vtime_account_user+0x54/0x60 -Jan 28 19:58:45 localhost kernel: [ 455.519910] [<ffffffff81725d1a>] do_page_fault+0x1a/0x70 -Jan 28 19:58:45 localhost kernel: [ 455.520712] [<ffffffff81722188>] page_fault+0x28/0x30 -Jan 28 19:58:45 localhost kernel: [ 455.521498] Mem-Info: -Jan 28 19:58:45 localhost kernel: [ 455.521873] Node 0 DMA per-cpu: -Jan 28 19:58:45 localhost kernel: [ 455.522388] CPU 0: hi: 0, btch: 1 usd: 0 -Jan 28 19:58:45 localhost kernel: [ 455.598342] Node 0 DMA32 per-cpu: -Jan 28 19:58:45 localhost kernel: [ 455.598890] CPU 0: hi: 186, btch: 31 usd: 86 -Jan 28 19:58:45 localhost kernel: [ 455.599687] active_anon:405991 inactive_anon:57 isolated_anon:0 -Jan 28 19:58:45 localhost kernel: [ 455.599687] active_file:35 inactive_file:69 isolated_file:0 -Jan 28 19:58:45 localhost kernel: [ 455.599687] unevictable:0 dirty:0 writeback:0 unstable:0 -Jan 28 19:58:45 localhost kernel: [ 455.599687] free:12929 slab_reclaimable:1635 slab_unreclaimable:1919 -Jan 28 19:58:45 localhost kernel: [ 455.599687] mapped:34 shmem:70 pagetables:1423 bounce:0 -Jan 28 19:58:45 localhost kernel: [ 455.599687] free_cma:0 -Jan 28 19:58:45 localhost kernel: [ 455.604585] Node 0 DMA free:7124kB min:412kB low:512kB high:616kB active_anon:8508kB inactive_anon:4kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15992kB managed:15908kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:4kB slab_reclaimable:16kB slab_unreclaimable:16kB kernel_stack:0kB pagetables:12kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes -Jan 28 19:58:45 localhost kernel: [ 455.610811] lowmem_reserve[]: 0 1679 1679 1679 -Jan 28 19:58:45 localhost kernel: [ 455.611600] Node 0 DMA32 free:44592kB min:44640kB low:55800kB high:66960kB active_anon:1615456kB inactive_anon:224kB active_file:140kB inactive_file:276kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:1765368kB managed:1722912kB mlocked:0kB dirty:0kB writeback:0kB mapped:136kB shmem:276kB slab_reclaimable:6524kB slab_unreclaimable:7660kB kernel_stack:592kB pagetables:5680kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:819 all_unreclaimable? yes -Jan 28 19:58:45 localhost kernel: [ 455.618372] lowmem_reserve[]: 0 0 0 0 -Jan 28 19:58:45 localhost kernel: [ 455.619041] Node 0 DMA: 5*4kB (UM) 6*8kB (UEM) 7*16kB (UEM) 1*32kB (M) 2*64kB (UE) 3*128kB (UEM) 1*256kB (E) 2*512kB (EM) 3*1024kB (UEM) 1*2048kB (R) 0*4096kB = 7124kB -Jan 28 19:58:45 localhost kernel: [ 455.621861] Node 0 DMA32: 74*4kB (UEM) 125*8kB (UEM) 78*16kB (UEM) 26*32kB (UE) 12*64kB (UEM) 4*128kB (UE) 4*256kB (UE) 2*512kB (E) 11*1024kB (UE) 7*2048kB (UE) 3*4096kB (UR) = 44592kB -Jan 28 19:58:45 localhost kernel: [ 455.625174] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB -Jan 28 19:58:45 localhost kernel: [ 455.626394] 204 total pagecache pages -Jan 28 19:58:45 localhost kernel: [ 455.626954] 0 pages in swap cache -Jan 28 19:58:45 localhost kernel: [ 455.627455] Swap cache stats: add 0, delete 0, find 0/0 -Jan 28 19:58:45 localhost kernel: [ 455.628242] Free swap = 0kB -Jan 28 19:58:45 localhost kernel: [ 455.628686] Total swap = 0kB -Jan 28 19:58:45 localhost kernel: [ 455.629147] 445340 pages RAM -Jan 28 19:58:45 localhost kernel: [ 455.629577] 0 pages HighMem/MovableOnly -Jan 28 19:58:45 localhost kernel: [ 455.630301] 10614 pages reserved -Jan 28 19:58:45 localhost kernel: [ 455.630787] [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name -Jan 28 19:58:45 localhost kernel: [ 455.631937] [ 273] 0 273 4869 50 13 0 0 upstart-udev-br -Jan 28 19:58:45 localhost kernel: [ 455.633290] [ 293] 0 293 12802 154 28 0 -1000 systemd-udevd -Jan 28 19:58:45 localhost kernel: [ 455.634671] [ 321] 0 321 3819 54 12 0 0 upstart-file-br -Jan 28 19:58:45 localhost kernel: [ 455.636070] [ 326] 102 326 9805 109 24 0 0 dbus-daemon -Jan 28 19:58:45 localhost kernel: [ 455.637373] [ 334] 101 334 63960 94 26 0 0 rsyslogd -Jan 28 19:58:45 localhost kernel: [ 455.638761] [ 343] 0 343 10863 102 26 0 0 systemd-logind -Jan 28 19:58:45 localhost kernel: [ 455.640158] [ 546] 0 546 3815 60 13 0 0 upstart-socket- -Jan 28 19:58:45 localhost kernel: [ 455.641534] [ 710] 0 710 2556 587 8 0 0 dhclient -Jan 28 19:58:45 localhost kernel: [ 455.642834] [ 863] 0 863 3955 48 13 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.644139] [ 865] 0 865 3955 50 13 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.645325] [ 867] 0 867 3955 51 13 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.646621] [ 868] 0 868 3955 51 12 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.647963] [ 870] 0 870 3955 49 13 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.649234] [ 915] 0 915 5914 61 16 0 0 cron -Jan 28 19:58:45 localhost kernel: [ 455.650439] [ 1015] 0 1015 10885 1524 25 0 0 manage_addresse -Jan 28 19:58:45 localhost kernel: [ 455.651817] [ 1028] 0 1028 3955 49 13 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.653091] [ 1033] 0 1033 3197 48 12 0 0 getty -Jan 28 19:58:45 localhost kernel: [ 455.654783] [ 1264] 0 1264 11031 1635 26 0 0 manage_accounts -Jan 28 19:58:45 localhost kernel: [ 455.656657] [ 1268] 0 1268 15341 180 33 0 -1000 sshd -Jan 28 19:58:45 localhost kernel: [ 455.657865] [ 1313] 104 1313 6804 154 17 0 0 ntpd -Jan 28 19:58:45 localhost kernel: [ 455.659085] [ 1389] 0 1389 25889 255 55 0 0 sshd -Jan 28 19:58:45 localhost kernel: [ 455.660440] [ 1407] 1020 1407 25889 255 52 0 0 sshd -Jan 28 19:58:45 localhost kernel: [ 455.661595] [ 1408] 1020 1408 5711 581 17 0 0 bash -Jan 28 19:58:45 localhost kernel: [ 455.662887] [ 1425] 0 1425 25889 256 53 0 0 sshd -Jan 28 19:58:45 localhost kernel: [ 455.664075] [ 1443] 1020 1443 25889 257 52 0 0 sshd -Jan 28 19:58:45 localhost kernel: [ 455.665330] [ 1444] 1020 1444 5711 581 16 0 0 bash -Jan 28 19:58:45 localhost kernel: [ 455.666450] [ 1476] 1020 1476 1809 25 9 0 0 tail -Jan 28 19:58:45 localhost kernel: [ 455.667682] [ 1532] 1020 1532 410347 398810 788 0 0 badsysprogram -Jan 28 19:58:45 localhost kernel: [ 455.669006] Out of memory: Kill process 1532 (badsysprogram) score 919 or sacrifice child -Jan 28 19:58:45 localhost kernel: [ 455.670291] Killed process 1532 (badsysprogram) total-vm:1641388kB, anon-rss:1595164kB, file-rss:76kB -[ 0.170499] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active) -[ 0.171591] pnp 00:01: Plug and Play ACPI device, IDs PNP0501 (active) -[ 0.172574] pnp 00:02: Plug and Play ACPI device, IDs PNP0501 (active) diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go deleted file mode 100644 index 763a556..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/doc.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// procfs contains several low level functions to read information from /proc -// filesystem, and also provides some utility functions like JiffiesToDuration. -package procfs diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go deleted file mode 100644 index b36772a..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/procfs/jiffy.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package procfs - -/* -#include <unistd.h> -*/ -import "C" -import "time" - -var userHz uint64 - -func init() { - userHzLong := C.sysconf(C._SC_CLK_TCK) - userHz = uint64(userHzLong) -} - -func JiffiesToDuration(jiffies uint64) time.Duration { - d := jiffies * 1000000000 / userHz - return time.Duration(d) -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go deleted file mode 100644 index 963fc61..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/fakesysfs/fake.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package fakesysfs - -import ( - "os" - "time" - - "github.com/google/cadvisor/utils/sysfs" -) - -// If we extend sysfs to support more interfaces, it might be worth making this a mock instead of a fake. -type FileInfo struct { - EntryName string -} - -func (self *FileInfo) Name() string { - return self.EntryName -} - -func (self *FileInfo) Size() int64 { - return 1234567 -} - -func (self *FileInfo) Mode() os.FileMode { - return 0 -} - -func (self *FileInfo) ModTime() time.Time { - return time.Time{} -} - -func (self *FileInfo) IsDir() bool { - return true -} - -func (self *FileInfo) Sys() interface{} { - return nil -} - -type FakeSysFs struct { - info FileInfo - cache sysfs.CacheInfo -} - -func (self *FakeSysFs) GetBlockDevices() ([]os.FileInfo, error) { - self.info.EntryName = "sda" - return []os.FileInfo{&self.info}, nil -} - -func (self *FakeSysFs) GetBlockDeviceSize(name string) (string, error) { - return "1234567", nil -} - -func (self *FakeSysFs) GetBlockDeviceScheduler(name string) (string, error) { - return "noop deadline [cfq]", nil -} - -func (self *FakeSysFs) GetBlockDeviceNumbers(name string) (string, error) { - return "8:0\n", nil -} - -func (self *FakeSysFs) GetNetworkDevices() ([]os.FileInfo, error) { - return []os.FileInfo{&self.info}, nil -} - -func (self *FakeSysFs) GetNetworkAddress(name string) (string, error) { - return "42:01:02:03:04:f4\n", nil -} - -func (self *FakeSysFs) GetNetworkMtu(name string) (string, error) { - return "1024\n", nil -} - -func (self *FakeSysFs) GetNetworkSpeed(name string) (string, error) { - return "1000\n", nil -} - -func (self *FakeSysFs) GetNetworkStatValue(name string, stat string) (uint64, error) { - return 1024, nil -} - -func (self *FakeSysFs) GetCaches(id int) ([]os.FileInfo, error) { - self.info.EntryName = "index0" - return []os.FileInfo{&self.info}, nil -} - -func (self *FakeSysFs) GetCacheInfo(cpu int, cache string) (sysfs.CacheInfo, error) { - return self.cache, nil -} - -func (self *FakeSysFs) SetCacheInfo(cache sysfs.CacheInfo) { - self.cache = cache -} - -func (self *FakeSysFs) SetEntryName(name string) { - self.info.EntryName = name -} - -func (self *FakeSysFs) GetSystemUUID() (string, error) { - return "1F862619-BA9F-4526-8F85-ECEAF0C97430", nil -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go deleted file mode 100644 index 5667e01..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysfs/sysfs.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sysfs - -import ( - "fmt" - "io/ioutil" - "os" - "path" - "strconv" - "strings" -) - -const ( - blockDir = "/sys/block" - cacheDir = "/sys/devices/system/cpu/cpu" - netDir = "/sys/class/net" - dmiDir = "/sys/class/dmi" - ppcDevTree = "/proc/device-tree" - s390xDevTree = "/etc" // s390/s390x changes -) - -type CacheInfo struct { - // size in bytes - Size uint64 - // cache type - instruction, data, unified - Type string - // distance from cpus in a multi-level hierarchy - Level int - // number of cpus that can access this cache. - Cpus int -} - -// Abstracts the lowest level calls to sysfs. -type SysFs interface { - // Get directory information for available block devices. - GetBlockDevices() ([]os.FileInfo, error) - // Get Size of a given block device. - GetBlockDeviceSize(string) (string, error) - // Get scheduler type for the block device. - GetBlockDeviceScheduler(string) (string, error) - // Get device major:minor number string. - GetBlockDeviceNumbers(string) (string, error) - - GetNetworkDevices() ([]os.FileInfo, error) - GetNetworkAddress(string) (string, error) - GetNetworkMtu(string) (string, error) - GetNetworkSpeed(string) (string, error) - GetNetworkStatValue(dev string, stat string) (uint64, error) - - // Get directory information for available caches accessible to given cpu. - GetCaches(id int) ([]os.FileInfo, error) - // Get information for a cache accessible from the given cpu. - GetCacheInfo(cpu int, cache string) (CacheInfo, error) - - GetSystemUUID() (string, error) -} - -type realSysFs struct{} - -func NewRealSysFs() (SysFs, error) { - return &realSysFs{}, nil -} - -func (self *realSysFs) GetBlockDevices() ([]os.FileInfo, error) { - return ioutil.ReadDir(blockDir) -} - -func (self *realSysFs) GetBlockDeviceNumbers(name string) (string, error) { - dev, err := ioutil.ReadFile(path.Join(blockDir, name, "/dev")) - if err != nil { - return "", err - } - return string(dev), nil -} - -func (self *realSysFs) GetBlockDeviceScheduler(name string) (string, error) { - sched, err := ioutil.ReadFile(path.Join(blockDir, name, "/queue/scheduler")) - if err != nil { - return "", err - } - return string(sched), nil -} - -func (self *realSysFs) GetBlockDeviceSize(name string) (string, error) { - size, err := ioutil.ReadFile(path.Join(blockDir, name, "/size")) - if err != nil { - return "", err - } - return string(size), nil -} - -func (self *realSysFs) GetNetworkDevices() ([]os.FileInfo, error) { - files, err := ioutil.ReadDir(netDir) - if err != nil { - return nil, err - } - - // Filter out non-directory & non-symlink files - var dirs []os.FileInfo - for _, f := range files { - if f.Mode()|os.ModeSymlink != 0 { - f, err = os.Stat(path.Join(netDir, f.Name())) - if err != nil { - continue - } - } - if f.IsDir() { - dirs = append(dirs, f) - } - } - return dirs, nil -} - -func (self *realSysFs) GetNetworkAddress(name string) (string, error) { - address, err := ioutil.ReadFile(path.Join(netDir, name, "/address")) - if err != nil { - return "", err - } - return string(address), nil -} - -func (self *realSysFs) GetNetworkMtu(name string) (string, error) { - mtu, err := ioutil.ReadFile(path.Join(netDir, name, "/mtu")) - if err != nil { - return "", err - } - return string(mtu), nil -} - -func (self *realSysFs) GetNetworkSpeed(name string) (string, error) { - speed, err := ioutil.ReadFile(path.Join(netDir, name, "/speed")) - if err != nil { - return "", err - } - return string(speed), nil -} - -func (self *realSysFs) GetNetworkStatValue(dev string, stat string) (uint64, error) { - statPath := path.Join(netDir, dev, "/statistics", stat) - out, err := ioutil.ReadFile(statPath) - if err != nil { - return 0, fmt.Errorf("failed to read stat from %q for device %q", statPath, dev) - } - var s uint64 - n, err := fmt.Sscanf(string(out), "%d", &s) - if err != nil || n != 1 { - return 0, fmt.Errorf("could not parse value from %q for file %s", string(out), statPath) - } - return s, nil -} - -func (self *realSysFs) GetCaches(id int) ([]os.FileInfo, error) { - cpuPath := fmt.Sprintf("%s%d/cache", cacheDir, id) - return ioutil.ReadDir(cpuPath) -} - -func bitCount(i uint64) (count int) { - for i != 0 { - if i&1 == 1 { - count++ - } - i >>= 1 - } - return -} - -func getCpuCount(cache string) (count int, err error) { - out, err := ioutil.ReadFile(path.Join(cache, "/shared_cpu_map")) - if err != nil { - return 0, err - } - masks := strings.Split(string(out), ",") - for _, mask := range masks { - // convert hex string to uint64 - m, err := strconv.ParseUint(strings.TrimSpace(mask), 16, 64) - if err != nil { - return 0, fmt.Errorf("failed to parse cpu map %q: %v", string(out), err) - } - count += bitCount(m) - } - return -} - -func (self *realSysFs) GetCacheInfo(id int, name string) (CacheInfo, error) { - cachePath := fmt.Sprintf("%s%d/cache/%s", cacheDir, id, name) - out, err := ioutil.ReadFile(path.Join(cachePath, "/size")) - if err != nil { - return CacheInfo{}, err - } - var size uint64 - n, err := fmt.Sscanf(string(out), "%dK", &size) - if err != nil || n != 1 { - return CacheInfo{}, err - } - // convert to bytes - size = size * 1024 - out, err = ioutil.ReadFile(path.Join(cachePath, "/level")) - if err != nil { - return CacheInfo{}, err - } - var level int - n, err = fmt.Sscanf(string(out), "%d", &level) - if err != nil || n != 1 { - return CacheInfo{}, err - } - - out, err = ioutil.ReadFile(path.Join(cachePath, "/type")) - if err != nil { - return CacheInfo{}, err - } - cacheType := strings.TrimSpace(string(out)) - cpuCount, err := getCpuCount(cachePath) - if err != nil { - return CacheInfo{}, err - } - return CacheInfo{ - Size: size, - Level: level, - Type: cacheType, - Cpus: cpuCount, - }, nil -} - -func (self *realSysFs) GetSystemUUID() (string, error) { - if id, err := ioutil.ReadFile(path.Join(dmiDir, "id", "product_uuid")); err == nil { - return strings.TrimSpace(string(id)), nil - } else if id, err = ioutil.ReadFile(path.Join(ppcDevTree, "system-id")); err == nil { - return strings.TrimSpace(string(id)), nil - } else if id, err = ioutil.ReadFile(path.Join(ppcDevTree, "vm,uuid")); err == nil { - return strings.TrimSpace(string(id)), nil - } else if id, err = ioutil.ReadFile(path.Join(s390xDevTree, "machine-id")); err == nil { - return strings.TrimSpace(string(id)), nil - } else { - return "", err - } -} diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go b/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go deleted file mode 100644 index 2701738..0000000 --- a/Godeps/_workspace/src/github.com/google/cadvisor/utils/sysinfo/sysinfo.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2014 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sysinfo - -import ( - "fmt" - "regexp" - "strconv" - "strings" - - info "github.com/google/cadvisor/info/v1" - "github.com/google/cadvisor/utils/sysfs" -) - -var schedulerRegExp = regexp.MustCompile(".*\\[(.*)\\].*") - -// Get information about block devices present on the system. -// Uses the passed in system interface to retrieve the low level OS information. -func GetBlockDeviceInfo(sysfs sysfs.SysFs) (map[string]info.DiskInfo, error) { - disks, err := sysfs.GetBlockDevices() - if err != nil { - return nil, err - } - - diskMap := make(map[string]info.DiskInfo) - for _, disk := range disks { - name := disk.Name() - // Ignore non-disk devices. - // TODO(rjnagal): Maybe just match hd, sd, and dm prefixes. - if strings.HasPrefix(name, "loop") || strings.HasPrefix(name, "ram") || strings.HasPrefix(name, "sr") { - continue - } - disk_info := info.DiskInfo{ - Name: name, - } - dev, err := sysfs.GetBlockDeviceNumbers(name) - if err != nil { - return nil, err - } - n, err := fmt.Sscanf(dev, "%d:%d", &disk_info.Major, &disk_info.Minor) - if err != nil || n != 2 { - return nil, fmt.Errorf("could not parse device numbers from %s for device %s", dev, name) - } - out, err := sysfs.GetBlockDeviceSize(name) - if err != nil { - return nil, err - } - // Remove trailing newline before conversion. - size, err := strconv.ParseUint(strings.TrimSpace(out), 10, 64) - if err != nil { - return nil, err - } - // size is in 512 bytes blocks. - disk_info.Size = size * 512 - - sched, err := sysfs.GetBlockDeviceScheduler(name) - if err != nil { - sched = "none" - } else { - matches := schedulerRegExp.FindSubmatch([]byte(sched)) - if len(matches) < 2 { - sched = "none" - } else { - sched = string(matches[1]) - } - } - disk_info.Scheduler = sched - device := fmt.Sprintf("%d:%d", disk_info.Major, disk_info.Minor) - diskMap[device] = disk_info - } - return diskMap, nil -} - -// Get information about network devices present on the system. -func GetNetworkDevices(sysfs sysfs.SysFs) ([]info.NetInfo, error) { - devs, err := sysfs.GetNetworkDevices() - if err != nil { - return nil, err - } - netDevices := []info.NetInfo{} - for _, dev := range devs { - name := dev.Name() - // Ignore docker, loopback, and veth devices. - ignoredDevices := []string{"lo", "veth", "docker"} - ignored := false - for _, prefix := range ignoredDevices { - if strings.HasPrefix(name, prefix) { - ignored = true - break - } - } - if ignored { - continue - } - address, err := sysfs.GetNetworkAddress(name) - if err != nil { - return nil, err - } - mtuStr, err := sysfs.GetNetworkMtu(name) - if err != nil { - return nil, err - } - var mtu int64 - n, err := fmt.Sscanf(mtuStr, "%d", &mtu) - if err != nil || n != 1 { - return nil, fmt.Errorf("could not parse mtu from %s for device %s", mtuStr, name) - } - netInfo := info.NetInfo{ - Name: name, - MacAddress: strings.TrimSpace(address), - Mtu: mtu, - } - speed, err := sysfs.GetNetworkSpeed(name) - // Some devices don't set speed. - if err == nil { - var s int64 - n, err := fmt.Sscanf(speed, "%d", &s) - if err != nil || n != 1 { - return nil, fmt.Errorf("could not parse speed from %s for device %s", speed, name) - } - netInfo.Speed = s - } - netDevices = append(netDevices, netInfo) - } - return netDevices, nil -} - -func GetCacheInfo(sysFs sysfs.SysFs, id int) ([]sysfs.CacheInfo, error) { - caches, err := sysFs.GetCaches(id) - if err != nil { - return nil, err - } - - info := []sysfs.CacheInfo{} - for _, cache := range caches { - if !strings.HasPrefix(cache.Name(), "index") { - continue - } - cacheInfo, err := sysFs.GetCacheInfo(id, cache.Name()) - if err != nil { - return nil, err - } - info = append(info, cacheInfo) - } - return info, nil -} - -func GetNetworkStats(name string) (info.InterfaceStats, error) { - // TODO(rjnagal): Take syfs as an argument. - sysFs, err := sysfs.NewRealSysFs() - if err != nil { - return info.InterfaceStats{}, err - } - return getNetworkStats(name, sysFs) -} - -func getNetworkStats(name string, sysFs sysfs.SysFs) (info.InterfaceStats, error) { - var stats info.InterfaceStats - var err error - stats.Name = name - stats.RxBytes, err = sysFs.GetNetworkStatValue(name, "rx_bytes") - if err != nil { - return stats, err - } - stats.RxPackets, err = sysFs.GetNetworkStatValue(name, "rx_packets") - if err != nil { - return stats, err - } - stats.RxErrors, err = sysFs.GetNetworkStatValue(name, "rx_errors") - if err != nil { - return stats, err - } - stats.RxDropped, err = sysFs.GetNetworkStatValue(name, "rx_dropped") - if err != nil { - return stats, err - } - stats.TxBytes, err = sysFs.GetNetworkStatValue(name, "tx_bytes") - if err != nil { - return stats, err - } - stats.TxPackets, err = sysFs.GetNetworkStatValue(name, "tx_packets") - if err != nil { - return stats, err - } - stats.TxErrors, err = sysFs.GetNetworkStatValue(name, "tx_errors") - if err != nil { - return stats, err - } - stats.TxDropped, err = sysFs.GetNetworkStatValue(name, "tx_dropped") - if err != nil { - return stats, err - } - return stats, nil -} - -func GetSystemUUID(sysFs sysfs.SysFs) (string, error) { - return sysFs.GetSystemUUID() -} diff --git a/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f0d1fb..0000000 --- a/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Alan Shreve - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE deleted file mode 100644 index 5c304d1..0000000 --- a/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/github.com/juju/errors/LICENSE b/Godeps/_workspace/src/github.com/juju/errors/LICENSE deleted file mode 100644 index ade9307..0000000 --- a/Godeps/_workspace/src/github.com/juju/errors/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -All files in this repository are licensed as follows. If you contribute -to this repository, it is assumed that you license your contribution -under the same license unless you state otherwise. - -All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE b/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE deleted file mode 100644 index 244f4d8..0000000 --- a/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Kyoung-chan Lee (leekchan@gmail.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE b/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE deleted file mode 100644 index 06ce0c3..0000000 --- a/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License (MIT) -Copyright (c) 2013 Mario L. Gutierrez - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/cmd/ansi-mgutz/main.go b/Godeps/_workspace/src/github.com/mgutz/ansi/cmd/ansi-mgutz/main.go deleted file mode 100644 index 66ab779..0000000 --- a/Godeps/_workspace/src/github.com/mgutz/ansi/cmd/ansi-mgutz/main.go +++ /dev/null @@ -1,135 +0,0 @@ -package main - -import ( - "fmt" - "sort" - "strconv" - - "github.com/mattn/go-colorable" - "github.com/mgutz/ansi" -) - -func main() { - printColors() - print256Colors() - printConstants() -} - -func pad(s string, length int) string { - for len(s) < length { - s += " " - } - return s -} - -func padColor(s string, styles []string) string { - buffer := "" - for _, style := range styles { - buffer += ansi.Color(pad(s+style, 20), s+style) - } - return buffer -} - -func printPlain() { - ansi.DisableColors(true) - bgColors := []string{ - "", - ":black", - ":red", - ":green", - ":yellow", - ":blue", - ":magenta", - ":cyan", - ":white", - } - for fg := range ansi.Colors { - for _, bg := range bgColors { - println(padColor(fg, []string{"" + bg, "+b" + bg, "+bh" + bg, "+u" + bg})) - println(padColor(fg, []string{"+uh" + bg, "+B" + bg, "+Bb" + bg /* backgrounds */, "" + bg + "+h"})) - println(padColor(fg, []string{"+b" + bg + "+h", "+bh" + bg + "+h", "+u" + bg + "+h", "+uh" + bg + "+h"})) - } - } -} - -func printColors() { - ansi.DisableColors(false) - stdout := colorable.NewColorableStdout() - - bgColors := []string{ - "", - ":black", - ":red", - ":green", - ":yellow", - ":blue", - ":magenta", - ":cyan", - ":white", - } - - keys := []string{} - for fg := range ansi.Colors { - _, err := strconv.Atoi(fg) - if err != nil { - keys = append(keys, fg) - } - } - sort.Strings(keys) - - for _, fg := range keys { - for _, bg := range bgColors { - fmt.Fprintln(stdout, padColor(fg, []string{"" + bg, "+b" + bg, "+bh" + bg, "+u" + bg})) - fmt.Fprintln(stdout, padColor(fg, []string{"+uh" + bg, "+B" + bg, "+Bb" + bg /* backgrounds */, "" + bg + "+h"})) - fmt.Fprintln(stdout, padColor(fg, []string{"+b" + bg + "+h", "+bh" + bg + "+h", "+u" + bg + "+h", "+uh" + bg + "+h"})) - } - } -} - -func print256Colors() { - ansi.DisableColors(false) - stdout := colorable.NewColorableStdout() - - bgColors := []string{""} - for i := 0; i < 256; i++ { - key := fmt.Sprintf(":%d", i) - bgColors = append(bgColors, key) - } - - keys := []string{} - for fg := range ansi.Colors { - n, err := strconv.Atoi(fg) - if err == nil { - keys = append(keys, fmt.Sprintf("%3d", n)) - } - } - sort.Strings(keys) - - for _, fg := range keys { - for _, bg := range bgColors { - fmt.Fprintln(stdout, padColor(fg, []string{"" + bg, "+b" + bg, "+u" + bg})) - fmt.Fprintln(stdout, padColor(fg, []string{"+B" + bg, "+Bb" + bg})) - } - } -} - -func printConstants() { - stdout := colorable.NewColorableStdout() - fmt.Fprintln(stdout, ansi.DefaultFG, "ansi.DefaultFG", ansi.Reset) - fmt.Fprintln(stdout, ansi.Black, "ansi.Black", ansi.Reset) - fmt.Fprintln(stdout, ansi.Red, "ansi.Red", ansi.Reset) - fmt.Fprintln(stdout, ansi.Green, "ansi.Green", ansi.Reset) - fmt.Fprintln(stdout, ansi.Yellow, "ansi.Yellow", ansi.Reset) - fmt.Fprintln(stdout, ansi.Blue, "ansi.Blue", ansi.Reset) - fmt.Fprintln(stdout, ansi.Magenta, "ansi.Magenta", ansi.Reset) - fmt.Fprintln(stdout, ansi.Cyan, "ansi.Cyan", ansi.Reset) - fmt.Fprintln(stdout, ansi.White, "ansi.White", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightBlack, "ansi.LightBlack", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightRed, "ansi.LightRed", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightGreen, "ansi.LightGreen", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightYellow, "ansi.LightYellow", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightBlue, "ansi.LightBlue", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightMagenta, "ansi.LightMagenta", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightCyan, "ansi.LightCyan", ansi.Reset) - fmt.Fprintln(stdout, ansi.LightWhite, "ansi.LightWhite", ansi.Reset) -} diff --git a/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE b/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE deleted file mode 100644 index f9c841a..0000000 --- a/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/docs/basic.png b/Godeps/_workspace/src/github.com/n0rad/go-erlog/docs/basic.png deleted file mode 100644 index 0baf970959fc70505a04e6ae8ea285bd25fe689a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 27719 zcmd43byQr>)-Bq&OMn2u3GN!)A-KD{1_|!&PJrO<!QB$v9fG^NyUX4D&N=UmH{SQ% z`|OWb3}AP4kEW|??W#G~oQp7dSurGd9C#22gd`y@q6h+k3j){qu+YHIA83#Dz%OV+ zDKQby+xu5`Yf(JV17|C);Q#_5puc~Efl|}4fle4l37M}j>tL`bYzzo9T2??8zJ;>7 zqwsfYYZDts;2{VkY;R)VXktv{V&P~`BqkvvZ%l6j0|F6&Bt!(2T^Ema+_Y6@Zr@gi zq3Ex8Lc`Z-e_`Vg$x`}<n<pj;-{R?xA0}9Q3$iFQ|JIt6YLbeLoF8n#`*BL|8)d4W zXyT4<Eys2!`sb_1m+G@1k5kvN9dPg`5B?{Iu~oB`*11KGEQeVQkCRpt5G>xm8xo?u zF4VuTwc$2@#fQpB3tJiDRKg;^x9D#w{?HH{$l2mfc-jHWXeHmz$H49FO!8AFK6OY& zxjNHb#Ez!<2LuG<ZBPpmgV-Pjz}BJG>!=A7BhV0G&S`wXL3>~$(Ahtd`{OCG#K?5P z&dDmF|9R_0W&c%>KGHf12t`@UQpMd`AIJAQC?9kVRrRq022?0DvL_KQ_1Qc9V+^5L zubSMhcRj7P+02DRRhQ!~3gY{xdkmCJ3v*Al_~eTP;sCox=x7JSQ_wl8;L4ofa-JJf z$(XYTL4a7H^q~X_1zF%bJV2TdO(^;(z7imtl8VxVI0b#x%*y&9a|nGt-xUy_N`V)m zKC^E%Xje5r`}5zzw_$S(G^pk-=((7a{z1Yv$b<w{?eEh}@P52{z5yYGk`eH>d&_4W zH{FsL{J;A}8XZI;R`b?p$PpW4PbnGbI#-s_2S%5Jxy@o!xAS<f3*|o8TTJ4NdPMn_ z`k<Cs{Tyib2E#(O>Wf0>k3csi@$~|!f;DL)@J|2uXwK-H1a=Q<g4aj#wbo?iRq-N* z?H~ccfM^w|euLJb*Hu6|V6NblQ0ElBNFdfy3a!A;7zLX}P`=!tIAuvr7@+l|Bkfw` zz0!eq!Ua~B+*iZP;R&@-kKzPI5Y7MEe86E%bt?!!{WbJG8grB!RY;%;${;eFPi5;- zS!K~3l}GSiltk~>Jt^udl#mwcSb(i^f@)z1mehdB=N|Gx1t3hEJU4V|8e9sa$J>Rg z!z`w0?L&R(ja|VxAE4v34P?ACa%o=k+E(30c*13*Nh)XM;+G`_;R_(#8cu~W-eS$` zv`-x8Oa(EnI^TXhZIjyHpnPub3dZvS-!E1;i%2>mf?XiOQ>ZskvT#x?nD`W!;67O^ zcrQESb1bl*9quxhs|6;MToTjl&xjNlgfpjB{Fn&?t4h@5Hz9Vzk4>qj=Prlp?28KK z&kGAi)S?$~(*uFRbKViqEGVU6tJZ6+a-oQ{$*htpT|hf<O^KiC1{G%9CHd7yi{u1F zMH5D)B|Z@?U)6Qdze>aD^*3fz!46t6BrrHMko~2#?E8psZpM*b#mJMCfZ4c_omY>= z<aJ=_B`=Kind>A~n-8T|<9<1~K%in{isI37VQLTfm5_a`DIcs_f<f#xB(7Fo2a6gf zv%Lor3Kr#o2;4=xXUc~xhb9i^mv&wEgCRK7oNyu@Q^Jo>7Nd!>i~-~L1^pKsG;f}N z)NKKAFbeX_$Ei4<rR>%TAeVRIu_UU*EZL%qGANY+@v+MnlI<}2`E$=H_m_e|+-hgx zmd+Kc<{!C{ZASeKw$|ZOv~`&v3;W8a#MYPEU>1>+eP_M;H*HSsmO1QT)oOhp6OzJq zyPNH3Kpm~i@rkv#Lts4+p%CZ7Uy$QdE}<TkXkL><v%o-RGxC}!jAkyl<r@mV4{_x% zX-LTs>*3UE?fKC@;P+8!KRG!#I1X|0IYsqm6;+q(C+iiy5%EG<sm>XK2tdcm2h4CS z^QF;utoKcprgY*7rSRtbj?|t@cO3<K4WGR>#E&IBWyw4W&V6hiASoIdx=&aZC>dz{ z#3G7NS@)gle4H=iXB-wG%(Y}5(pX5Ol{!=M6s;)0_6rnC+|6&QNkQEpPn2B>3~08G zZ*;Hv>+enS2ODxp^hsSbzZC5kWv6Gn5h~5Kh-?4Dc||9ya;KM^VCMXW%cc|!gv2<h z(YTPT!+C7b`Tc2>B*a$|)2^Y>#puZ{G23&i+$VYln%*4}?hCCU7;!xgwEngiY|#1) zn-CfyN<}6ZsEMt<s?h#JhcswBfU{5w$Ivv;X*wJRf}`le8TdN73O}`K0dF})Rw>B& z7e+;62i`@9<Tkrlo}7a%(598h_8mZE`bzy7%KeJi1pdr{MkQNBRT`XE*Arz*_~^>4 zaPGQ1pb2eZ4Y$=1&8nZ;)R4EHV6(Slu*Xb@AlsAuOv#m#zONu(mo!`TCGI?vwIs(^ z!rM!qb@XYZ*;`p(X<#JaAc3~Sc0)VUGcI`zs>QxmaJ4t*A2e3$>oXW9A+p84FKf{S z+&;SNHhdrxi~MMgGtVXKObxYfUG>TETRQl8ZV7J&NCYCeBtfjE1m)2mDaPF&=_(_U za`>Cd!w2eumQVQ%QyrZ^Q`q_;$QvqvL-mmyj@Kdpj27~0kh9W#{!MP_XU?8asyW0u z0%$|O8#S#Xn2z<$2!gHLi*){a7fF9=ZHBeBa~3kS#GUvIlqN}7mJkEPIM~h48>x1y zuX)j}`X=Q)Yd)v_gLOL}mA3JD(z11)Ep06(p$oo3HC@aJ-n*C#E0q>C{ef{7n5y!# zMKDLPEFcL-ARs#HVoG0Vg$}y=jxfXw>7+|9vzYBR4cqhp(>b(=`Os)@x6xs${l+4k zE)N5?47z%GXs4#;Ta^4!I3qR%e+};oNB;Wc7cR>C)%%O@2@WeC_19tqkXC|X9Y%*5 zj)^lgZlV{CFWN{ut?*X|wZJcu@pr4g(m!Xxu$A5Nzxr+f5%~*OQeG#Z@~}4%W;ac- z1GiQa6^UrYe<+5k46+vdf{q%vi#Rx%(2OAiIvX125%hBprT9LK$OV1h=zX8q&Q1eJ zCl9O#YklEwP$1^cU~A|A?qd7*AhNYh7FlV4wENe!Z898ZCHVU>477^>t=E<;6gbM? zTi&Zsl}oZ#tv>777d!&G6timg@=r1xkC55*-_A;FHigoq^kRm^oF%EJCveyociifc z#7dKys$A}b1y{cS^N86fYm!1|CD3U0_xBn<(hzxKAL?@wwsYlB2JKW%POj(AU7e1+ zZp#ZsBdT9zBIkr5MSA}I5l6NZCaeS|m2-nirbn<z-nIH`2X5-k_c_<MoILk-1Oz7E zQAbfiKJ71ma^3l;-xc_K(8sx<f~Q_5WMQGcJEUN^JgiMY%SlBC76oS26#^EXnKlU< z2f<JLu9+%+5OEUccb@`GLU!U`h7Ik<M|d)ETuC!I9$s%^NdkTm)k#*2y|u3qe0ihv z%gJ#Y+qj{!-9=lo2P7OV_Bf0D>`)oOa$>tl-#0dH5aNbw9IluKOR;f`CX{KPlYR(( z70#fqtqyU@L$>wU<*&Mg?O7T94!duqC7QF{Co$h}Se^$tSXQ?2vS@>`d)yaA7Mq>x z$>HeriGZP^T;9K_Mo9)3)cP>P5&c^#L+r7YZisfpVlV$29IXa;nYP9k90bAgX&wo9 zWVMD86#tDXl0mqEKj%e)o2IeC`qq1)wH``8e6~J^6Rz|Ro(z`+F}<C;4wPX45F~ms z7kt~)I%Gr=4Ct%9M8LU*9+C<#kv94pt)uO`DW%cWdis?kFnUsjOG|X)^=&k$#^mSN zm;M1YdHWZR)3fxT8W^9vmVIJ^Q>{quwdaVt!&G^qnul-EH@V1k)=(vI&4=+HVf9s6 zl$^+eg9GwPB!5sfHSR-#nmi7gBo^m;SmU+0u>&kw8s5IXmTQAL^3t099jQznoWg^} zhKp>!nJFfim&oB#Lu_{yR@qy_H&1?o5>p~>bnr{CRO)nkDhl3GP_2<wjX|#5Xw`(@ z-1I$bgJ5RyE7$S^gNWp}Lh?GeJBBOMLwUYLs4{|Kv`RjI97*YTIzyN;9R)WXnHZ(u zOu49aVPN!NTR*0)Tc*{9%`aln<$FudK*1r+4~sFoG&W^^*c^RwWu!_<!)5g1s<Otl z-ADZq3r4F2?RZ4qiVTBd`e1CrlnH|}J04U0_+ePi+1Z3K@E7I!QDw@pg+&L;xOgLY zm<0oqeb@#kH!ds^lxjJ+_iM^dtu68TsV?tb@BZI}lX`1h#&172o~37;cp*LzfBEv! z&CM;D*MrUZWHG3vg(ni9Th*TLaD(%vxov~%#)*M}!D_kbgUi`!Z@E?@qub?n_)!2f zQr9^DTV!tT=jGo{2&HP3!D(r>a~H(I!RvE+K3@$Ci0O4(LNB)ZkAAY4PY@ZKndMbg zp(fGmbd^@NY2GbKasLa&rOLWzeOgll08CJHri|CBRKY47E~V>0nz2b9Mn=eP{eDUs zmHVzKeAYP}aGzsMh>R~w1K5YOR#85NYLK*1QTbU+QiBbdewy2W#OYNmS5T9QRWaZV zjX8zBRyD3(Pwdj$grb?hU0Y!9{F;Bj0S`E=pE2!SAIUmz$PrHCv=0n1QFwj{i9i}0 zsS24>c8*0)wDB5TnF={Kct4J1z|p837K(|Y-JX#2^q}J5!3qinp0yc0lv<RP!&%Ov zKHi#KBx7SXHel}78$uD&M(SHi**cL)r-`aJRb9F}v(Yf{q-VGs_1!Pld=<Z1aS8l^ zO0E`yOiS>oc=!*oM(<Glw~q!R*#05FULU@`E4n`wGDuv2jC8Tw`ls$Ob|{AU!Q+<n zc)ruPzL5eF5_Q#Q%~t1A{IIe|SgaJ{_`*Wq%@NI0Z6mwEsdm@%Lt;C_=BE0S<MDvG zkPz&ekKF#;IOF%e$JF9B%Ah_WztEEFwbz#?C248I4<CAadli(GF*11EY8G9IKTAqU z<;9YS#iga;K0H27)|d=aSDdZ<Ny^R38yp*p=HcbF7>pzPnVPC;=QWWn=y)(m79JHv zCMG8KZK;8-T(e$MUi9tt<=}MX&vh39!;jip7N>*BAbWdzN;b9z`gVjK8bKz9hIhPL zkI(3bAqn#h>kS7$tO{vhZ*lp_fsw8;=`Wf9d>0;z(o)zy%6fn41MiGl5$%BSw2>sU zAbB2eH;1Rx>L_a9XZeKWn%R(Zs}Tm&8Jg1;Lq0GNU+O7q+MP0e`yyC@I^h;6O<qLs z9TjAM$QipV=1n$Yra&cVV-g1=>_;O=L`qhj6nBfzF%jUrBY6uxB`YUO9*IpXeYBc! zzF^kH`u+RuB?6L(7z4u;4;Ke2GjkvV7%na*>o^KN+N9%235}X!TwPK)b~7_G>}Xm< zrGv1OdFbA@vBeEZ0-^9_rLIh9cuk~s;i6QewqZi{y1qf`A8vzjg5fo+qgke2SuG3Q z#<Az8>P#v@$%43_k_GE6+1c5e3E6gAePLr$3kxZyYwda;_#O9Ad9OxTMBg0F*9B8K z>~e{$*E{^`9QMYzo(SZ{nLZ^XVRi#J0n6tVxgaRU7QhOuNVu?B+2Y&gNF<*e++VlS z9zN~?aIo{DT<Qa#!H3j4Pq4Y@Qv;I(jLsoZxRhmh7|f`UWl4qD3M3<w2j~5;be+=k z`_(Awzv^foqyNHd%{yU(-)+zs#8+eVszs|#04GWm%o8RU2!1@jyLe8ktAWxTwmAx7 z2!Sw^IzkvlvjH+1AHDG9Cdtt!roq}T5Yk|=+UU2i4*PfTt6iqOF*tNzt;WE)jEsdJ z5-|k6Nm%+uc?}K-2jLM;<JQ(etUj;BG-?r;lZRrF+Ei3lO~?0kL=-Sh_CX2dl>{;m zBl}yNjPjZ<;v4<gi*;b$PcnGrRL#=$N%PKF0qJ-KJPa{NA2c7^&hN~e%2vEzU!R+E zg$xXG#+oxSbm|kEE$8T44{U5~-Z#F@t*wo{J(vPT4W__C(IVN5AF;6ptZx$&@`!|d z+CQB4Cx|^YLMR}_75&2rb~{&FKZFyk7~MI%>VSNsTBQ<_U0t_6g9Hu^brviLmV*P# z(AAeXb2;7!%1+X$Ckt|A-jd$=ynh`Kx_+0W!F`)sKMKB5a-_lsX(=@!CI@IqjKBzO z?4ksDfN)xAJgF#`pB3Db9z+wg`H_!APZS(CP<<AsA*Dwj7mCeNLND!C>elrO5uu>K z#A4tpM^hk{+fk%bA+=kFbdzsyJNzILV>{Cq$O^Y5CBeP#!S<)&%qJmX5g^EAA=_Rs z)mzjx@ef@bf2i^+-WM0Q8Ner6-Azs|ItDVy*=<!}zrH?wZ#}S_tLV+(c0na1j6uMn z&jxny=;&zI`}3S_<_hiR+`U-&RmPv$Pf2p`^I?Urt#H52W`(B%CQu3W_2d_=XqfG} z`3MGHl;^1q7c$H^x$X70@Rnx}+jGO{&O3WKacU`U8Nzbx)We?c$nkZ&3=j<#|Id|n z=q1%wh4ZJzrq<mcc${&&G=n8(_yVz6Akd-<yNIpIqS3Zd*`R@gct;L`iNgbPe?FEo zw&ZV4z%|1QI)$&xs)620-$VtzLnuCHTx(fvt)Eg6b*0Ne7oOr5LTNdE>r5+rZsvY{ znVlp5%mT9T@Z=rADNSOPic&QVc@iRDP7F(Gd_z;&gRO^U&Vw70U_vI$gb8{5wYCxs zzn+e`6J4dduQv3SS!J}uqdUXT&5B5rbaX*NIReEgk~Y9*`uy@@cedIZUdQM42y5>B z_TqAVynwFNX!9j`yt4f@+@L#nV|O&|rqG6L6#0**D@-UX*h*%A(1EY-sa4^?j$Q#> zA~rJ**jSXNKt)w>UL*fv?;9@2)?4q}4sT)tG&RlFsdHCKtCI;<9s*_E;N_7z_qopE zI#?(lZ<LTRD`x;beaFa@z?#6we1IELZKc_K;P-(`>m#;3;Kx;!<@>S3)mglkW=oja zlZ9<q?f%7MFeDh<+4(r9f+<btI>}oR?R+ET_)U^*eY?jLvs_(4!sz>WaM$iA1Obo! zHKF&w<P3)syz9l+TOSGvA}*X{t{I+%LKz4lA?h9XCu{vt9G%}&MGLgF&C5K^aq%gJ zdq)WB8eo~3$3fnYb&i%{RGGcgG3wqu*HMjY(4Rl6<9@O1GtJOggf~8LP68KZY3NzT zDlU#J^zsm$%7G}YM8eHa=p}~7qSx-2$PqR$F)^8aiy`0*Z(MapsHmv0b#m$j`m5EC z^7K3Xq11mnQW+W<ZS3!d&X#K#JzVa9r}p%SSj|^~85kH;H8zHnmeK?xe)4bixSK_h z`f<zZU>z~g3gAGiDWST3UU&rqJIWRx1T*K#-W^(t@WGipkBQ%Fu1&1g5tnhFd0On? z7A)8LGaM4SAy6vyI?jp_Cb&##bJ5r~FIJB3Nu0n4bouodxF7OJsB8%zKM_1%>&-Vr zb_KK|1Q8yaO>Qjjok;c;mtnKFhx$pqp{%p)FqWm`0yINo+ZvnZJ}XBhuelO6d4`xO zOh)JK3Zg>KY^r!~EaA2wE1@?ylw8JemY^B$ehWpvJou~4qoe-Yt7LnUQUCn)NgyPf z3W5IAevypPRFt*#!m!;e?Rsft{&0gSQhawmOp|leMeg^Ox2+hz9+AEfX>#oV(Mav# zM6m7<2&F>CuLrYqs?obr+GX{moXv52rD_Yq>Qgwxh2A~qd7~kw+M|}D&`P=Fvc_%7 zZf?I3ZZy8>5WU0AX7aNLd~Og53LDhgQX0~Q_Z5<U2Ssl_bD>uST|739l-JL1hzG^v zmL54>7E^@=0F0QgGJx2&Z#MQ8jUk94lS*8Fez=mSPPjj5Tw^pH!N!}wwqI%U;>Li7 z!lYIAy**jl>WjinW-*H<%Hs97&2DMIBlNod@Z0eKyjeS1I0SiPD~7*fDHxW(bzSfy z4!fz6kId+!TbwY`Shk>wsqD;+yxtC)gWh?EFfSbQ3>=JDch6+ONR8bk>H6W2^rO#n zj?ezDitM%%y57z+1R(wF@2>_X7SOjlYDM{(2z3ASosBd$uInf$U=8cJZQUHSo=EgB z5*rQuzh<=S*yUC$SQP=79fcNH0Y?J^3G~42h~SK$6_5}?DEU33w-uk|{C@l`j9&S8 z@r!fkg)M#^D*SjNWvdhPT|;X?KZQ#wU0FgNyC?c<U_xG_;6u*@wh-I=<HsP%o{!p{ za`$jYRmd?H>LH?pTzR#~GECtY?5};Y$32>5Uzx&b%%`sxdCUvByFOH|e-t6XIkoNo zsx87CcR}L4-MXgjcshbPn8ui6b6MHCD{VbOI#toVnEKcBz}_<V`*h=i&&Eav?)R#4 z<LkkX1jv!tU_3V%T7Lil*g&qJc|)5n<=*hhSVxcYVP*(NNO8EFj_(MbdUyD#r8?#( zT^`~o^E(<pTM`?zp5MzqH<x9m!L7MH64!lOG>yfd{Sp8W*J;;PB*lhPDP~JDs-+(J zEjRXoMfQQ?8xT)_e%uku+ZW9?Y#d=?Tq`e3t$9V7y4=PKwgRFcEB!oS5^_S2F_PtF z2>)omr#tTVv=OnV_M@t3-M-;%WEXp1h^P+OAt6jXLjOt>r9YPN7IOyH7Y6@~jmP3h zK%-;~aWElc)I8HY9Dwhzh@_quP#Zf*mR?v7CC99KD=oZmp0lw;x)OG$ya_zIkH3e4 z!W9^o_3q=+J>)(n622e<3}d;B`D77=yj=rJ!gNc&%9DxJFagUcIr`ulO_x~<P7wyH zX~O0>F&`56FsXi@xL7Yj_wd)2Cz@G2h~}`|zHJ4SR3aaBN3^!xL{Stl$Yx6a7!0)F z;|pB*(~Q=WkWCFE!6)cUEF9}&+njH}AS|p`sK1m8Ly(0*-}!pqBRk))Pt{D@JPCC= z&d|RyS{V>dm?C3@++cwFm@SuZRUJh4Q(p2>j@Gamf5~ZbO8)Iuj|JDxuES*wEG4C5 zw!Fg^tglg!u})2SJhS8Rrh}oqiVi9m30*gfGu~P_J4~b2_Y;fbm4vM6^YIG8NG1{o zH$sRICOzcj)F*~4pRq9*B(%w%eik=omK4tmQyXY2NqTnn2C{($YpXv&k%$ewLX9?) zN4DqsiE^r#TW;t2FVEPegw@Z#?rNB4XB8Bzwr2Fa4TKrSd5l^rt_R5qTYCn`g7=QC z8rJ4YRIL8Qwt8qRoSx1&=tUCfEa)yZfaQsPBJ5&u@rWgpa&#$Tpa#c~J7sne37no* z-rm_UxIJE&ueZdyyu4&|K2{%ei^Au|<mBX}q^9m_cGzRIS?0h`6%2qT=H|u?3JPj+ zJV4X+x>3PT1@QOAa<c;^J-w)`Y_u%jV=&lF0dU~p0N7ASLE*z#CT|3mp6B0npQB~l zWGX3{_@KLiwyoOf{S~9>YyOzxzaB*cREKo_(l!&Dc?=A1WFk@Ml?qdG;RD}ip)T<n zQ>;=0;muRM)8&|PJ=mn#56mvzu0VrUc)t$BP{<OXe3!*YWA~Dk^De`3nEL&<Kro9T zUMe`q2qHvueTJzq4{@}DPt{p?>mBu8!o;8btDI<vS%2!AiJ7luR=L$~FenP^J;ufc zdOg81F+sw>2+5-^84`WYjq6)XtujT*`L2f<6J}s%X=$KKql((qmAtSvlfY<=W3VB# zF=uZ~O8nnZR;p1nQqc;PQdpxtR308!RaHoKcA+djX=JK*>T|kMFcYKfjX1bgOJUHD zOkUc`OHAZ@{`xdoE@1c%3vwMBBQMj_TgYl{g>%?L+Z}Iw_WFR;zgT1>CW?+GbpPrh z)b1VZ#$s|3Z;0f1qaq~Kg>GW~_w_qKE2+rIgF{0%H#dRx3zyC0p`yyVzjx(wI>h)Y zBJv|30K(~LHVWXHkS#Z7YgwnOtx^mv=ir>&+)6;+fs%qE1ONq4&)eJE@{Kkt1D&0I zpFe-zpDtEnwOtp8zx-C%-`6*}P-|9fHlDe?zAmt_vEjJc6ZYH20<98Ymh>cRjm(2= zME=HXx5g{KAReUoL}XjZrLIOlz2OfF8%U`}uNo6_#o>&%Nju|be)w6STH(1iM4BZ5 z1INrMl_Z~7qw@V*%{sjX=M&CPImD=D$sc(3T>d2BIKrLSqij|rE=^L3{?Y5OgT!-b z3~K%Y;*y38WG7g@IU&`=J~7+IU7;Vk>P}bSvb@NpuWn5l+9%|luP>QL^8z4<Nrdln ztEvqIubwA}iDl+0e%q6gNqAg@#?p`kOtiSoc$p$zq^HxCd*@#oiNDU2!YL>u#{MgX zP=<zqM=R~%LUFuc^zdZ3!c{nLK{I+ZtMWEsrHo;)#O5C{j9v~&l_04|o#21v?+-5V zfXCzd!_d$W(&FXm4(r_c-?Y@%^k1}87L5O;4r6+LUY*PJJe!ov99TS7{SHuu=V1*R z>0qWfS<t`|^M~GMF%XE%=Pj&7rn1Z7n4D+1UBr>EF+Qu5gJHNm%zuq7m*)+0Ir9l4 z=54uz`iRMRR#M&$tb!q0pWu-VIeQaa!j%4QL!v2(4c`Q%LM^OMd%hDH3iYz=yJ`~K zH0x}Ys1j>0sdU$oE4~Ahn&U#u1-2w5&CneCQ<-3%iBv<{AM)47VSxbb1*R5jtp<cY z<k9$3_=msU(39C?PDJ?(z?U|((Z|ND2J*#FI))Ldsuh;<f*gB$fA2Lk2;tn=+@#vq zn-iCN_Y5S&bp;Pc6T;Zr`_ibXFFYRpovt`~bVWw|`A)K!g4wKn*SyiiEG6lcPRJTo zdWk5+u*ZjugaZ@X7@l7=@GTp&+I?<TYg^r`U+*4|I$oaSuD1%Rs^s^U$Hrt834ruE zhv$725giMQ5-JK3Qt$ajH<U#PGJaQ*rf}`z+wjnkki7g4Qt!pa?=gDb4__&=ej`dq z$}haoP&U&a-xoBF32dm|MC&<Hp~F`uCOoW;26geu%V&0xpcc3|m|bl)|HlhZ0JpyY z4jdsNPgg>E<ZookOi;Q&w8DxI(QoE1yfFyEjcxJp^@NCj{T76#?2m@8`N{aB(mvSw zXZl>u)GdZ*sA%f0AA}J&+&8o<^12mg#eF|>vWeFB6*lTQ9p(ePCIP^ua@$qc2!o7Q z6^Xbj9s7k$4d5KzC;~;Y0`cSm>e!5SpU+PkJ2rbK59Qm1{ed)Cmz>NEl2VoNpQOau zLXt?g@HF+FKJc@);l-=#1L%u+s<|t~zk5CoJ3}88-V!8@tgUs<j@0AOlpQy))SsZ$ z)crvM8#C}Gcl2s0A8^~FDTn_kYs@|b$Tyr&$on7rZ^}E;3oEug{=~N45e0^e9VmDY z$FIUkD6<0%I$cLjUk?m%Rgc|;q}V2|{G1u>h}a`g0r{zGp;n+jdL&Fa3K>7&=OBv% ztmO*%>5whh`6OBRcp&!JBqIYUolC{7RSIkO$75BE%*FN8?%-@Si38%SavQz&go6?m z)3C5z^@F`m>ySSV7}!XTy3zroN=UFPpNp*fOX!AJ<X19QjQPgOZ>mI0zzobyd&Q;= zF9O2PL=J@QgZ<6<^>J;-PpXdgx6wxvh)y8u`T-L&c;%0aTE5fCqKd%PQDwU!0Jodm zt_uIQ{B}MG*ZD(D@qXlOGzEV-8_VE6zrDrWp3<;fDQtgzM9}%;+$$RulNTBq%B44+ z>*a6toJGE7v0%JKD9UX42R@5vZ{LNClg6XHCjO`OQ>^xZw7nL^J9P7Au^(XaY{_); z&y^^wA~QK^6P<%&-o>U<<tt`oT#qq=!2K4Mc+Iw2c%v@YQ1xYrNfQj}iy-<VD&eH| zNV#~HKNTy=6(tDF7y|b)fY2)x#R9%id1Aghv#tM*m0)WS|I`>kD_n&14sP<=V8RiE zgiM}ac=$-3tocO7lV0V?`P8l`VQX*bjgUIlbbC93@=F*7^K3r0_v9p~4ZE^!==E${ zBsAKz4JGwCly}aN85!9$x}4YJ@UqPm$zYz*U)v^AdvGvNFaWl#ZREqkRQ&mw&(Y&$ za*41okL6=wXfc3S#GN8-W+NHBeqTHJ_0%O{H}^b3O32K)$c%U~*%BSKpDZEZFFf5f zwisO}GX-{s!122C{GFOWdYPMOPDaJT5~Gk!2NEibfH;;tFd&ZKzu)HdG?~fkK}ky+ zd3<s*I5U#~@KYg=yVDuF$mqyOQov6EkARSeP9Y2X?7?QeC_+U=wY|3|c6)m}ohOF! zcr&NxlwS1(Kd-y1Yk$7l=%$}S+#$UAQF{tUG2H|5?(I80kEnMqt-xL7ro!wu9`QGk zxY>lPhmYEi<H0gpsPYoTk`;vgD`!RP7h(7b-2(5sa@1Skl7m#vxgm|{UO8bz+>zX^ zngCmkLf~iZ&X4&d_-|e9@`0c6aasuzaN2~vrK0^@C$}*qyfuJQRn~q(%rZdi(}zp! zfZ=QM!xb0CnKiVAk^zHf1Vd+pi?4#x%Jv1vvIS#d4AAlenK}W7ozmRPv+vQ|g5zPc zLxI<UnMpNqu0(uty%;^r>pg_J)&gcSAO3uM`{dcqJQJH2H?f~g0?a(?qs7#`qmh=D zDOu_lg!@C9gPL-U?(OpnunHZc7UTWuT<>S5AISsv0GOt^4Ue^4VAj94y-lc4X67%7 zMASc2KA4T$-j>X))P+*5#MC6|nU2Bsu6vk>EOi?l&@V-oOCRtozPwCkNGbqO%nn+& zgUl)xw=;-<zzV*tksWvQWfxa}j-G`eb>a73Ds$@tIXC^^Ef*Yoq~$+m8w$LWoR#G> zi9YumF!%TOL}X-8etv#Uo)64u=;+m^qp9$z|1F!v-2US8>Y1OPpAAsvCff~gfCv*+ z?YBJaroHDlqVc(*Jv=;~Z<oF&Gn>HQo~`K#)&hCWkqmCEQq^)H0RfP`g9DRMA0qG; z(+pCmC_Jq56HQD{x#h#9!u%EpD6>T$8*u%#4NnmWT;+p0Is}FW2aENTw%yiqIs*%& z79vJgGuQXT)LW7nooV%;QenLHrW>F9VIl(Yxt-;KTo)%7mm=_Itd|<1&`R7!$txf) zI)t5qGI`-}+0ncog1io*@rOMnn$UV6+8GY#ygCEEc4Z3&?BA{V6!pgtD#^+slaZ4C z5X$*gdpR(jiu!IG0-Bhxf4Umjzpi1_{Qps&{}G>i-gRc6{T2901Z*zn8SWxgx<AGU zf709HUcx<_>IeWBdxCO<<CqIER{7T(+9YnB0Ty12D4b8ufe*sp{S|(LIU9k5z<T>@ zQGj4Z4p9X6QP$i*o*Z2vJ&&ssJYF6m>9hDs&oG6%?BfXTjs3Rln<g_hL+Fl|52^3{ zm&O~bGk*JufMVv+_9?DZiDJDQ#jn+4;Za7<XH-?UvasGGRGb1kubfJ~q|6TjW)sM3 zP%<!7D!gVHE4xbkhY?pK(*Adhn0yddYvkKV0*&Y$SxSA}Piw=-3T!%Z*Juf{IkQ*G zI)GW`3N^%D6AGAH1@dW$yjrU~1p4Yj2vMlCe93B+Kgr=MM^VyZ8LT_1YPhd*Z2t0> z{c!1+-zno$+)-&IECe)aODo*$Y~b!F+;HLtU61lvwaALWgg82t*%THtN&shXKdOd( zPZn&6+g$dbc5AtIN<jFSr{C0mPR4ncNlnZDh;Q%X-K=4<SWhVJT}vM~($}f~0BA6| zkgbqi*VNR4gudtLs*8-Mt9u#0HHG)aj&pSMwu_^%O4_)}P#A6>XW28i+xAan?hlHf z3m`S9e<mizNt18A$b2MyfLsVd{QBCt6Bp7t;%6N};OeQ^1o^au&TX)iTeMxXEs52{ z-;U?P-i}P|ZOj(cTLmS+06J9}Ac5?t)U*%-Ic^rpNQ6c}v^^mYj6gQnKtUri@-6F| z_n&9-`rRD)0VGok9ub$kh0lR}DOdo#))b7zbbmKKedK=O4^}cSuB|gBa?pP#(Qb{F z5-Qm@H&@dMHdq@i(HR?8(P92}iq{PZfT{JYslgr(fH~UhSAPlJ5gW19SH{3~f7rny zqC;}s{j}v&AV<%1LMBSj#A9YwE2F1YZnzY6yfQrG>{6NeWO%(lbi3Gqg#Bgc8nuip zN1mrT=Hq9fZ{MijDXhn>)$w9I0-)Anb30ol1n(j0oGsK+Ff%is@Bbxv*I|o`i-D7T zHZ3M0L8Vtd**R0GP`dNsYEMC1JMwC8+~{(95Xq8b<Yz(QV3&vS+J(lqYd|V{%<7-s zZ&ljHxWN=8PpT^}enZRc3!D3OK=E~({RrGGdP$m1MhJ>khJTDA1!+lp(rj{k`)U^~ zZh=F7DuzIERba+T1kEj4;tO>aHco_wKd7seNV?3QY~Kvks($h(5#Dxc>ptoS;$_Mj zFOLR`qMZMNo@(jS|BIelt1dP&MD+JmHPzQMR(_;`H86nG((*5*F<4~n>I&+r+!+vW zXtr=>Thgy{Fl$ID$Qc!%Nz)P)m3(@{Bzeyh1W2KvG$d!H;pWH@ZjhH69!{W+ul$iJ zB`kgpT@m>5e<Y;rB0BADHT)hP=(}TNBU#@co<7q@*UR-sN0O5Up1<4$dcV-N`<0l= zQ^J;OR!4c=SerjVT4yh|`}l;1g%N+wZEE5O4-e0cr;yW3C;Xgye0&@(BZJFsBMltU zb#_~#5)Y9Cys5GoTweiLRX$&KbA2$yYS;tIho>6b))e_p5tn>n;}+)Cjz6DGTh_3y zrC+R7^I$X>@9fLm=8zO$91k1MZF~~c__i~2S1x^-;`oCozSa@Wgi7nC@Lj=9sI7cY z2C8er*@GESz#>EcBoY>sae#zOQC+oH;Zn2h3Cbtkpx-(C->IbkZ9uMvOP5*JLF##< zl>tK%offRFZlRl_Es?P?tR4m%8?AXJAs1=>!J>*<MLwwo0|Ar0i7_K#RLSEA_U6LG z=~?ih7&U+Jwq9#0>PM4L@5&p1gQx{NJG)q2T)HxO0Udg_+$cPwVY0<W=LRXH_+#<0 zRaY>Q^n<&90#SjYgk*uDt**ShJe{Pxx_UCvXn%i*&1wrk>bpZw0ChT&sNCo6^(PR? zm1_`j$6?Bfp)GXi3ILk%{Z@4Mf0r?WKm%5I0=-aiBig6k@wN=sTtfufm1t4Dc7z=^ zfI%-RYK_L=o6)`@h|O0&!2N_H#IDY2(Ai<GN6+V==u3l<>r#Uima_~VcOmz*(-k@6 zcY-ut*8hqiR@X1KsoyQns*2~Wmg_22VAAE!#9%ioD$d(3Tx<!*BHQl3(`f1OrY<_^ z5RUu#0RksHf8RtQ()rT&O>>z+lakh+hCkTb+pt@1ZdRcalXpSw{G~=Gw^w(SZBO+M zW*v(-=Bs$gY)GzKNbCG>Zia*m0Fvk0b9Q!~QJnpoCkAx^gkQ(-u#_SJAjx-abcaA$ zq@<*nul#mu^+p0j%%M{~!9gd3eg+`54BuGd@|-J`BJWyXHgab}k8$efe~CfhN7<T2 zBO@@5Y3t+7xtxXd$P8%f+p>vag~gbjNJO7HL|I-vAbe3kqlf1T1rF*2!O!Z`^UX@^ z<t^ImbR5Z4!h(XnvjGSWyP&%>h<I`^waOZ-!d70}bzdNi%p|L+n&aYp3BC2FlG9kh zy1IPB(EYx*Lt!!`s)jt`697|&;r*@Td$K>-QfpluCO*voPp=HTq-1g~y94?8D7#!8 znsPiP6;*K|d4W5Bl<xmiq9;?oPVP$!+PyC$fIuxNfaFD5cX<^+jjA>Ci^fkuFUG;= z5`UZIw*z<G!@r%eMm$+$3Ym{3Ss3Qx#^rD-xpYsWA0fWk5RPK=TI5;aayE|cOdXmF zLU6Y^{A}trQKu@NaCE4GISmV|kKCIo8B)x}+H=+HFnJ_~$ZtqXos-ki=A}{#9_9y( zv+y)xS$mdGLqjNaILR_tEaf=NIkF;x!(kV(tE;ODU<2WGp`ozpoDPM$!*mwT^W6c% z>#tq#^Y<Zwrq(b=qWJHRw#~?o3fNhVhMy8L0CEchSeXEFMyYid)c<S7waU!EMB`Id zXY<(~`G)9VX#)fRM%f<nendg>Brh(bAg~0BWZUvd13e>HB_`J&a_A<E5hItX)h2nG zQ|g=b6C6I83MW5K%1IhVG(*8a{QpZMB!eDKs`cJG9>KT;EC)RzY+AA1hWE#{<5i9a zih&^^-JP9aA3l7zzn+r2I4H_u!;|_^h?c`QR~L-2N6`85mWB`$tH*>e@lxvgvmOU! zl0R12+<RB;T{mTm5*8o}qHOlYb7{}=@28;Vb{bss`TTv0f8%ypk+MZI_j>lz_CGX< zBJ&t$bk@OUq@4n*!vZu)n&<%DVF)4wnIo>l`@Vq&HrQ*;@wj?)ug}_1?jOMBDr*m> z9rh%jCdY>ig+=1YnJi<pk)JPMs#LodEdL96kNoxDl;_qy{lBF=9yz3>Rh36$83lv& zR-YI>IT%ggm44c+819(2_4H~=#l_ROwYev>Mt&*(V0Z|G<D#c|-%N|CF(cWxO_5!x zgruTBXmw;|{}ak{^^@tuK_*4D0`m0&h0V&`r1!C}!Md#FoA2&<%%e7W{LB!Eqz9!W zi;YF5qN3vZ(NP4Dm}j+F##XD;?KR8t3PuXXSaOHtlM00)n9i{?V!LUiuS9;yr{hu2 zQk}PfwGV4%a9z*IgiJXM49GJuJWw=U;BZ5;buuA;;eVarcT`sUkzwt21cCwB#iLhe zXAaDAZDgK-(UmD1#s^f;^9wsmZBhQY`^NemR67F)4yfrrF4H_gp|MimfBdEa0W^aD zsYwCqP~N?;d%wa|qB+O$@Z@MAqyGYq^}j81wyt%EP@rcHDHkduu`EzsG(JqDX(uHO zeNXfCO_Qf_QNEB7`qXuyWzyaZ8(z6#U&rbS3Y6QNt?8ZSGFO60Llq$Ne?9VkW2H<} z$MJGK_buN)-N<>v>6m>~G&)jk5M6nDh2eQBJ7tlL+B9t7IO>bC%HX}}YWtQ7h2VR) zie5M~8Hb4kqo5$*&ZQ;O<Z|}=>2gj)#s%kutBfI|k?%Sx70^<x_<wu9NZ<JtEBU>> zHZDGf6R%9lD?F!Y-4Rzo)<=57VIg~3{!l+S4lC+s2y6`@tcfe!n5dcC*k4*c?(#|h z$N-yadx<1cv@xY%`$T<9hZp3(G&f;!@5u20ovM<Uk%ppq{Yl3JM;I{UoG6)_kV!W- zm_~Hy{vnq}K{4yE&_UXxim!Isnw(nrZIWu4P|W1Xan|!CdZ9L`|2J$(nRC|iO%5_{ zoc2suv%^AeL?J5n0OoC3=TdINcl2l+RsU#G3cwMa1s#_571^&ogJkSfM({N%g3{ZO z5b)oZV)i|EZxPoj60tjQ1643T((3V<X`q0<(IE!&30z7BsuJcXV(qpO8%!4$gWrqH z`Nfb>(9Ao~`u)D3?uXSsYQ@iyc*P#AZVnAMsA5Ro2X}|PZP#~adp8PmM-y@1n^WUT z+gelda;4AyLRXz=!o%OcbSrrMpG>6z-MWVBi?rCFA3hN$sE_-m6+}9c8bIO6#@|b- z^u-iqG8`jdj_`ST7y98pF#7OCSkef7JCgHmW3+)~SLW`1dOT!E(h4X!XVz#!ZSqL6 zt~{SnD}13t^g4*a?Ppt|r8Vxim<lxQ98J?`<A3SdJUF0zEl=EWnx<T@Y@cu1E7!8Z zn_l{J`8&0p*CRQ&#g1gE<Lc5E4n2_d?S)~<aD79#p*^9#{+f%K3~-g69~4>TP4&lU z=oA)!Raft7NMX_$;=jIn-A+#JE-1e<79Fv^MQ&Qe`L>K1YlRQC+pvs|zgV09mE}4w zlYM)3Xo%|F>W?%lPOA=YW$24C@~HWURlAkU^mtVph%%MTRED(XUMkC@*~9jSNxL0c zyXDuLrVYJT+hF?XRWFtm!_K6lL9Kep)AZMUS`z%UWKqD*$#vjm>L~?WU~sv!-MBF% zxKmhVuM>ZdONdf*BuJeDY<`9BPEgM-itQOTZ2|Ou7rKl{3i1|`0);&a7lc$M3mi@I zXMs`E4}@XR7QGY6@D97ap#r?_zTWqK8D|R+hcgiwKF@Y!CzA!VClkcZ&(}%@x+1i{ zwq9Rpy&r1mM{~bsM_}E&#lWB&EOV$DrLlczX_;>T9coUC5q|8gC@4ahf<ZPukV-;J z&w#5ntG%zYNMHp7+NDN~N6X6Utqg8j9hOR&G+1I{fU|TZGey#WsefOb0r8b9hrK}7 zHBaI5Yf`J_fz5b|qakByT_*dJ)zL|4WYYP0RBatNJG(%gKlw8`#F<6Xv4C>$z(neE zcN(~92;`XqZB}3<$#R5Yx@OCF2TjWU5l79O9&^7!Qc!fwSJQeQC-0mgIIXF->(1-G zJV_lH8SVq0zctTBxcWhbSouby<kiPG|Ma2RVe|67{S6`^Dd6}d=pZ_p)@!a}s7@wL zfS8y_OKSpH!}Mw87oLKm0B{IFS=r;(g0qaxZAcvM#NHVE(z`S83rYEr^b-tV@vLE_ ziGn8m7JJ*@*Kyjkqn(tBoS0;l#H>9Ls6qPSu%(Le@VNK>Qg6AN87c(kPdCYNfU->q zR3#biS|ur~_V2Cb0E;^~Hq%d3j*X)P2=5vpZnqi}QMlQ;pC?*9vU7wr9`hv<>OxRz z>loVf`^#v%*|Q@M%y%R)v$)lg$a&K7Nj^8Bk#ZWFRO5IYQemD=_TED{ukksTt1%e3 zi$Y7?-I&;^sbP)}ewd6R7@Zs*n!hMWio7y2>D{+koApxoRcVol^%2fONJza!i2@Ta zZCNl-GTHNb4om`en{fYPE_P)gBmcUE@^5oz=|f}$`dpIqzZc>woV|;got73R16}>I zm)$xj!eyVxs`BNDt`gFES$tp|aPCfXk_`+=-nIM^*CrtJ8QB*W7GyE2xw>0}2@0yd z3PQMflhYYHS$cGXhi4wE{lguxv{>V6L8azTUCwg$JqIukDsp+CffRqczL&q<r2qac zDc!_sA@e@(UXzloi9{e#I>A06;K?r$c!tVsOss`MZ?9$DzvzVC9#FWwFX6cP-gxqq zs0Dj_X-^W==Bt~M3oKnkN2{Fa#OddJ;&q!qnk~sRf^pp|f6DrfPc)W0JI^6zCzAL& zXt^FW%kxE&oagABt?z7BEJstBqz39Ok9!NoidwYaBD$uVHR(M(Fx!3f77-*PwTp`r z4xpd{34KUgF5v}peyD~Rx?(E5i(%w%d1ACHGc%6-Xe3G14ovnE3jQMs0{N?0Zf>+T zW)xPH+%6;Sgi(Vxvsx<g#fd+OjP?q<eknxW_F@SxHTX$N&MR2weBzAz`^6IaaTj-@ z-cs5?AxS~EB8wtOsAU9cBjfWR#jkw>0&c$FFd)jYb_7sWwM+4&>vA`))w<GwCTFMy z;8p~6ERHESIilrD38uX=9Ni;XJfVi=eAq&tZs*5M%3zO)f<nP2x`sPkZk`-9=!JK# zYk(FKzTvPM^lReCE{lu;e6rc?$1-WY2Hi~&F~*dnRvBg^F}<sq_!${A8LB4CIzE_M zTG=L2&a1gl*~;*hMfr>{mAw%uVyziE1u>%50+HHzVi1+B(8r6t&!&ck>ixQ{nwt3G ze#wB~6{EfvU2=^iHFyKe%$K0A5sqFFhYy+(KF^)e01atR4}^3^gf~2Bf3wlOqoUi1 z@vimq=R(XVF@d|x2ZH60&8|70nEGUW8~0ZYq?bl4=JSZidnx3dfT@iW%CR^QHyAwI zqtppx!LtAojzE}72JVYw8qi`>wPHLnqOpZiQO$j40BvSM@1{~A_H3J4rRl}V(#=$0 zFns$=bAp&Lhr2RhfT(8h^0mFUEvO8szBC;*bY!=w+B#n7I(m5Ms<ga84It-Nq!ly_ zP9)$#O|*#CPVMF(5v_XTaV088?nT@PdzVx~@sX$YwhW`S`^E}}OyHz`R6qAFV=Z<Y z5EIX^<C)Uy;5R~QX!sHEL%%%I>~BjXIv-*HS!6*dsADeB(72h~;zG4+k?gL9Qxlmu zBt79O*k>Vu#=UHLE~0F17Jltll|{oa;%@Zy<zG<S@Rl6zPkB1e?O>q2y8>1BcC!M% zA<4ghof2M)n-wVrCLxKKo#iBKn)GbVEZ%n8UjNP}vB6qv$Elu7oEQDL1I$@@JpT)u z@NqXv$`?vLg3!>3*4L%)9Vsl@X-SbPrSo==jvd1hUf)u#3f}&T9p4X9j7)BAb`?rm zI{S7AsLE=5I$w4WaN|5b{bLmc@g*AHs9!K(zOKvds)T&)`hYgeWzFQG-qOipIxC)` zCHv`sQnVt=$CRazhev&{-6yNy?V-qR7R@?yt_(OP3?G<+Qdkxai=>jkV`E3Y%~jx6 z*<_fM3(WjI{bHy0YwpHv4_|fe@K&?RmtT!Gu!ed4-j2;Zo6WdF7b!5XDn;MKM9%cC zcq);o9!iAUeDWUBC2xQ|QDF_`RcwWVLP0-fPl7y2s;1BtsGZg6^A`UL>_<SM#;@Tf zsO`U-RQOz#4I9(eoA!rKKr!u78qL5T9gze&_8Aj6Z~+Qg#&S;D$X*?tl=krq?gUn~ z3dYnX4opIhiSrSL(U!R~0}GG4!=e=S7%hKN7#f<c&EAo-?J@kW!<pZ0*oAG^GY0$e zyYi3sOji^VauhxNYPxG}89TK)JM-;MrHsg^i*>|63Y8XOuHr)?ZE-4@`QOi7qiG}X zHHJ`~i<(JiKTw5C$+xuDuo|eEb93iub8*?{tx8JO;PiZC%omk4@k@qvTatGYvgFj8 z6$fgQA3t=*=vH!1j?(a?|48ifG!BnQ2{P`1z1n7WrY~5Dy0D^>`jPwuP83Nf$Ken> zGkP#(#g@vMh^urWACO2S{6!lV*o*7FeZ0E5xG}j9jZ){KDvm3Z!M)WT7&r44luERf z`q9&&7tC`G@?GEPw0Rg#k{SQUtB8mt4)0Wrj9c?BQD$8d5N)Od0Lu<BW$608crt$$ z?{R$GVS}_>>OYzaP^U{H$a8)U8NAUA2b6+z39&iWIn#BHM!k1G<+iP0@tkK<{9n~p z6vhq0rY-EY|KkO~AA2W3PMH2Te^*kW^4uyn&dmpJZSU<=TgC{1QfZ*n9d8+UqO1vZ zZ*p$y@`FVL8O~y~&>tQkAk06qK;NEvQx5zIX8AL>Ia^Fy8-%ofORIVJR3y02Gl}iV z_NkeCN>~Yz2&+RBbfs)p%?d(A(I@sz1dV}Qu{uzo@0k)&LPSKqf*l+Hi4uXcRj0ch zhW+fC#d6^<{Pp!JkY~8{Aq2dDFU{Bc<@ydx7+&wo^+)E5XEqUrt#Wm<|Bo3D(~kqV zM{`e5K7=b_hjth%KFAY>2*wx7cM8-7gKBK5frq9ars8jjd+62Sif`Zi4cB2$wL*Zd za9q`BZN^)7xXFL2>Sy*prE~hOZV&%2O6Me&r{u*&CG*`Ne82dPgLoj%IYGD}^ip}u zkO77l-PZY}HurJ#=-*l)iJm#LKeg-2J5<Gd<{M+yu<+_DAyfQ4B4k0nf0Clp@@H0K zb*Qz|pddh(-*>=41S=yS^QEYUE0tJzH2H#*xZ_Jil<=E!xE>|*4|2FNr@3y+3^kD8 znLj;&w|ZbTIlYUnQ?Ho8ZP)!#5P$)uOUOB$4XLW8q@~S`W%#ZrOPz-|qqlvgrX?Du zmkpYl-jv6B8P?T9O;_!z(G11*jNp&=1M`n080lo9{D(6iKfrZd=&a{m{HL@PJ2`H6 z6zTq2X?>Y<{lZ8!$-+Xws?2RR?rVfEa2IFl(WvfUT9tVBT;^4f7@go_LR+nk9X9-e z<**Mtks|;4AF-u$ivJC-$t`}+XB&3Oy@l&E!fwlVs_4^rksO3k-~M<d*dt>xR?b4+ zBWMM7o!OTMgr2|ZuaEgAG-HPYqJh})0$T_7Roq8D3CsBe!&V|+#ud%<Ij!3B@S8`< zGI!~C<oEY7dm*v$LcX&C#j`*p;AoYpsZo$z^pWzS11i|UGn-SoC_II9t-GOE|FW>Z zS2hinVZ0YL4VGhke2Y~~j0!*i%J{|K|2e@ARm7;|Y;PWkoC~#H2C4i(wE~S&6Zu|3 z$&n(#5WB7UT>pRA3GAAenP-lmu*X*<yn)FidNK~~+Letk*r`I5$@_a$n>Eve%GSPU zm(wc8(H1sq!zZ_eMYO(11IOax-w4E_qKBDT+!Xl_ySV;E6b4(Om{~j;i(TP{+l#Gf z1xR?}Rn^2zztJ`~VgEQwlmZS2xs=cUwve5!EM%&ijidc`BB4yM>c1}68jT-Te=kWJ z^45>Q{E(hLud6E(Xw*;Zqxb8n@A0PV_Hb?O@=tf^6d|86F-tt7tL@F{XNFA;`rWr! z_pxz_0kiBwekm|}X!8bYzEJ_U0}vGWHsl0e80%rpEW|e4gs4hO`zMo}ib`y2ak$Ww z+6+VVsb43)aQX6F@_+8<-U-Db;(ZcnFR5{l$M*4D+%`O}z0Gp?XT7&{;H3j+#cf<B zKmi$nQXCxfr}wHefWyQM9o|24V*q?|q4^Oz|D!NT!ImYAFnbb$0FBB;Gn&PavPI4R zsO_tR;_ALF8+Qoq9^8UkaJS&@!5u=7Mw^7-8r<F8U4sP=?k>Sy8=2;N?>F_P=1tAK zntJz-u2ZMGy6!#ao^#jQYwvZ3HQ7Qn4%9AfCMlW1g$%OP9M+Z#!Y>dSb2@T4ICNU8 z*uvXdYdt?j#W-GDCmLxDM6q?4dwtiYD*R~E^=@XKYa%=>kc*O%d94IH{Pm@+9zUL- zg-qDo1`_L&>REYiM7?+#B!?&gZ;Fcc6(PQMgKytIoI9T$<@A)<(Qag`pa7z%pp%$f zppyokH28PzCS*fIn+(Ca+vBMp3~rJ^y!O7|;whMf_NA~cf2%wXYU6rn_Pe6S<G=q# zC&7iFF)vuWm7#I*Y#FcVl#u=Ru1N)Q2Qp*`ApsZ++usJy>yx1&4Xr_Hec>B=6t*ca zQg{c*OQc9%!0goBd6!oknp0CxBg<J1C(9Zu9Y!;xBa9}n(lJ6-czeryx?yrJW^X@u zF6eQ6CS<6VtI%eL-`42eblPA!mQ1s=#C^M^wx8GH-4t)QGy7$6x$gcMJY}Tvc}HHU zLXnN0;_04xGeH{>`A59~&M(L_7y^LVAIOD1A5>Nrf@29<A~M2bM^-X6#}>t<Mtx(G z2DjYZdv9A^iyoW2kx<OO7AcEd$j3nF#AZ~$zGrB_B@UG*hh$t)t7B2va@m&0D18|# z93+8S3gc?w;*StO)a760TLar<Yt4uNl~%2&0DR$QG(dHus|INX?19=Oq-smRPhv?} z5+ZG%MBpN1qju9*FB+*?f0^~u(;GD49I=g2q3@d}x-zS2vXZf~+C0W}_}@T308(5L zjt@gd2Kvuoe=^&|;VdN64Hc4lg5xL2kD@aB7*w$1rFIs+)SXrOTW~CO7AzBgh#trp zSQm)~yh{ihs+$pSPngT|!gD}6{P49jk!C3FZ8<FW?fwiZuKynAls$}fZ6T$1&WZiD zF|EL)w9E=sQ@`Ey=P|rx8i@o;sn<w)6=6<EvUy}nVQT%FOcj$~LLa#PI$swzZ+<W{ zegtfuZ^|2EnC*_GLTK`e$si<xH-B~Y!+8FX5?;wKU*}sNDvOXO1@kmX3s<m<bcD$( z@LUwaUkH1#)gh=9Q;?)^Vz8eCGIt6IBUp(PW)I;lZ1usv#KlXU_!I?;N2bUeD}xiW ze-XV%Ci>kaLlT_X*-3(etdUy(*Se@*I*(OTcnYY5nSgz177A^hUw@X#Pqtps0DN6+ z4O3IG|5;fS*9@IcaqT3;H6%v#iV%cVU2^%U)U1ZFgVBPUzFe<AYPtx<$VgQD8_@WX z+_x_(%cqxFh?Uj8^t#a@fh!=OJRJg*TlPVhUp7`f0``cGAcbQCQQzSqg-qS;K+QO( z$FGSKZD+OjOAW1DU9aO&5TtGgd`CS$AyP-E4w-F(aZ5KFzY2whMC+?|%gB02$#yiu zXgX4SJmCM1)VnXA?3Z8zgE$myoj;uS<1=?O9+kjnx58W?E#x+{0=%FWw9qU{v~9f* zKnM$4ZGdXP4Y>f`yOV6WZS0jus&yS{Uy*xqx2$x@0HI8}6a&`ZsauP!C~kycN~x}{ zA8!#h)@{5Ph>gkDzwJvw>P?{|C1(h)d5%t%6ld<3nvE+nfiy$OuJyt!UXhFrRj@<= z9E?eqguGQ3(3Yh2@#CdUHKby>+LQfCu*EgF+N+_GEvSUe*Ns3Ro<CmLZ}drSY8vU{ zB4NJC$?CygoB!5nl`#S)kjDYh`;KFzyTLAyMxoRaNv}S{`HHsgTe*%{b>rNtW=6{I z`?)(BNBPQPdY<sV186*HhliTI^TybzJPBIChqd@@mcZS8Y^_S1OXhzHlO`tQIExQ@ ze<9h}jLH-?C+o^eM|@CbHQQHPS|ylBtc8Wh2!P)Ei$G2*oz-+<hXvKe_#cBBf_?op zkHG5?=Oetbv*cvk1^{8&idq~5x^v-VGlR%ru4TEIm^z7=#Q@eHMXdmg@PD~P&B}V@ zZ(-qIICcUM0I(Psx91%`i`V5@bo|NNsQMW>taGLki3+2>Juny$Eg>M->)l*AB`h2! z2`SRmeqFGyn%ZjOft>m`PlzIc@eyKrfk2ko4N+$(1=Cb?hJvEzDruTqTp->5o@zyQ z4NG|V5;p%Yf#PS*hNcOj`Mg-B;Faa}o0W`pcgz*zTjTAJe@mf~kq|dr*=&b89UfQx zWr&J4s4V?~WN(g{V9XmWSY|{8&>da3<@U1i7aKHJv%LZN!lM5NUs5MoQnai-^Pfp~ zoc~8t4X)s%V*nS_2h?tr>Vk3Z8klZoz!d;>GEP|paCMV!MNF@Zc4FEB4Uhxe0-6i9 z4lDrA55A7Vxw)Y0uO{ol+5eI-oc?4R2HX1C+La-$@!Dbtc>y>r0nd*IXE0h?_Ur=? ztX8NLz-a}-5C(LDEA@<C9w|7*{yPx9`jFO-RX`#10)S!`U`PQnM%%d(1eH;ZObKh} z;XpjT763YE8+3q)(s;Hg#%`=K*m<5AFz7;H=gTb5-gt#UfF3!mGQ99p%n8E&(MbF# zMAW8Y?mF#IRLF^Sfh#g)5R>_d9plk+et9`Y6%2_$VOrf4QoIgGK}@`&<Cc>&QOsU8 zFJg2VV$xbjA-*v~V@v2M3DA%}%Uyh~zi9DEIGQQa^;2*gHV{Q|p?v?biZMKblE(Ty z$W3#{6a|C_FoM}YY9w5LZSvUL)WkX1@~it<{hrb^@)$~72X!=CRTQcANm7iEkdlhg zxx<rGMds_f_6Vatgf6D4d0WWHVN`2bsi=I8*&+Cj<~owPxTsi&`r@*PNOFfS7dM;7 z{Hy!vqKRHvMOgxdhDD91hcAz1RgZ1B_hp@@Fy7PTA9dEQyI%C}WDL)KnIM11FEzy1 z2UUa~nXU?)4W6~D_ZDRZ^@>B1p<F^a98$>?xZOgzDK;m5DyjIW83U00p8r_sX-6Mx zg&r-SfVRxG@H=*_E7jW*YO%oRG&y!6?iE0mY_69{QoduXB#d|fHR!Y1dO}V2eD`m_ z@C#~lkHnL;(7*{s9PlbT8xTeMop<fr!D;hE$^X)Pp@VolGvT}kK`PS8Y?kr&U0Id6 z|B2q>Yq!*ufGPCx0@UuVS`jW&wk8wUMgO_;UYrb(Nvpf(yYuCH#f-!By+y0dNlHFn zA|qh`YFP)NPeU2d)$^49{=tf#C82Y4JP4EeX*!Wv2k`K)b!B()`Az_QNM3j2;uf(H zI>HuQ&U~<3%Q5sDv&&p-$zsnZ#U?35V0nv^bMvpNjsGWf19#oAi16QW5R-tCt4ty1 zLDI}Cl$oI4dn_+QnA`BSE9}!#wkH++mg-k<Dv0F(bfUYf62F}*W)4ngB2PFEwo7af zX~^r4nKZEC<4znB37mWY$+pz0I&gLo))3vC(1C&Tl5kliF#B)w9N@ZjldKYW?;AAg zm1JagO2f=CT-6&quG>G!UnZL-kd-Ku&i1!B84r-o#IjdP==7!Xx?a6qmnyCAr_V`7 z`obL>x|9Bq2a*3GOubv^h}bbuJYXI82c8>#0B{DYayt=3E4%$eF0OBG<7y(uN*M@x zyejm6zB%7ZJD>0${%+Tg4Ak#<_47`(ncnC_s=;mnJN`b}kxLd{ZHZtv+nCeO(dESC z<KWnU!*FyV2TGEpTAFv?U#NMcVJi@yEQ#5cB0{Mb>G`|zOjjl_ZLWD+gh%4a)Ub8H za$4ROvB)Xn(4~}V|1$LG5xUbkg3QB3ff6AXV&}6~dSMh93s5Nqx@rB?xXmYnjdOps z9KN`n<mb;FfunWfz+{tXl;wulIO=`-D@zx5ZwE9TVloj{(=;BeMn{J(E!&oX9n8K1 z8~6`o)={hMCAdpaC8CX#k}Xj?>>-I=gy-3+nRHf5y9-tbk1$R;_7fBv`V{@1DN%5R zfTsBinE)Gv++XA)YSep{Wn|PvrRT-8j21JiwtXx12_G-lS@<cH#yoZU-@9w(Y{oL~ z{dBbLu2<y#?AR!O%sX1aEG|By$+@Nx7+8$yS~q(>Sj(K?b}+^{3z<2MuLgEiHe>l0 z4G!*zyx$-3W=66FK&hMWx(H{`vMq_aUZD@AleQauI-zHgXL!jj@8Z|oP~Z}_cNZ+5 z3shWCOXG91Hrt#0Uk|$)kH@rUc-Lip(s*jg@#(;A9)d+_e5zYaOf>B$JnQI232G!F zr!U;r%j|>e78c_+YU&nUPR5Jtt+Pw>1!MI`*EXSTXTnk%@vkq9?X$pT9=m6=2H~|O zr?P#wdAL29(a{HvX;!9Bs@vNZU8>ZJRmF%e%@6_W7JTg@Y;5d*@`^v&QQ-Xo4E5iH zld>=OUAJv}`U)Z%dj0kBiS>#)OT(<Is-~+U^>tyG|CBPz)2u7D#@Mvx`6%N4=<ttg z_fOj5(p(Y{4Dm}^SRKu=G20w#g*Uo$R@jBfvAx-{w|^166S*etE)MC^NHn<!hG<gR z;Nl2}y{owRFP$zE<eVJSPZyRWw$uBzx4sSOQ@uV_CmeAD%w4>VrrkagR9*cvV|PI~ zQ8`i9miRa*sDpJ%v4p7vw#t!BEyJf+r)w;m;~8@eq7<nppkKkec&aKCU_%2uG-hK~ zJ&3J93Yl)>sNu=$nl~i=fs0!U)i>BSUsOBw>|vhon%d!w=C(tIB&ctoVNz&VrmfIy z9c$ev3|8dg+uWRMpvgR3DT!-%sZq;1tX87*y~{YOw_MU(eW?AiHs(B)EXl@snh-Ue z)I)^dXlJ%Ayni*@*0g`nAZnldawTH=8|zOL=|}4-V>!8su6_-#d(s0LVQ*4PJW;&a zbaK3IZ&9*Zf`MkQ^RG7xqfGY7s^QuL4+nK;#UeUb--bUa;3p>FgxOZ;IEKYWn!%Lz z9X!Es%;H*Q^?%fV&o~+Kw@`Xvlwl3|_x##{CGU={ggI>_p?z6B4@Ft;K-<?#%<a#l zR)`AQF)eG<Mwe-bJ|@NN6;p5vMN*_^I=~NFR)bT`HG%Bxx5R$3A#FkmdD4>&Wlx{v zztJbz>{yJLmzr;i%gTcOT7xBaK0}5Fn{K#%q$q1x!sFh#W>>eiPmescNAXpsB$`2} z1^IXhQLD}NsJZ!Fx-g4+EQ|hdgEeRT%Pzhz223L1M9L3Q=vsON+qvo%VPA=%pYOgN zZm_l_@rGh=7L^2Ma?xv{=B2$ipn{H)5dIN#;WnLkLKBIJxA$UR!t6A1Zs-q|$7b&2 zt(QzAZOoaq{;mgQGh|S$DNO-yUuk{>4!Y8}|56*s!0^&>@M=<Cd^}zBcuD3Z8<>?R zBgMpNmw0ut{`;<FXcXty2AL4FopF=nxYI2Hx~E?^=()$P!Ek>(G=}}l`+94rCIYVs zVyF5_mJ5yjXK=+$^y1?^6`f2kQx&QK%1*dRmPcK01~1gaX!HFa9TGF_Lx+8bL3BHd zhhN<RSbi_S?=6~cbqog)lP>RxwJ}n<8M0}s$jmgHEhKQip}(AosL21Z*-#3U;m(=P z7Lk9tn-fk<7VyJkcZfqoi_W$wL(h+Rj6=LVIyRp9y&4}`TAuB@MBhs+H7)FbQ(F3S zCDILydHS2GtCfKrBnaB|i|58u&FcJCEH*)5J3ZKNPu>2~8dzsFqF-31^7&TjwWR2M zx`;6ua!t*p$<q$DcPb=fDScSJ`2ezTv2uo7Y;C~qNHWoh2=~~^uydV@bu{E@P^bD% zEk%p1n!PUDE8G~COAV&q%ai40V{AIri_+of%a*X_1=tL2EBr_22Jv0@LPT$#u0EK6 ztWO|WNGDC-%iu~wuly(new?%kb6Uw8FOSd1DbFcpaB${0=%)mEKe?n_>Ni*Stdv?( zXYtn%Y6?b~Zy%c0#}?97W%76PZvagI?|u--br}wV=f}Di+*}o>Tjxc&O&-H-7xKtU z#Qgn~+&T{}aj}SOf9teJ-My5)=699k_&=+lrQB2=iaf|A#LP^v7><zH*lq~1m6=BS z<-@PF=`_f<^qTo;p{9)GqXn7PH&w6{V;F8}1;}5U{{6Tj(ca|6=eQ0^MJz=tc2>y{ zdsZTrUPe>FXVpj-DByDuuQ3lLFwoLmoX#&&SXpYA-RE{MCxB$uGs?@qe=b(N-PYCp zshnuK@Om*g4$hYSq~-HaklU;in^dGzKeVbd<FY<~28V(p6U`VFh7*p@L`Ai7l#yDx z(5!lR^83TAcH7i6E|WIn<rVJkZkR+c&PWo|Qd84haAPe#YkYfHIBr$vp@9|Wvss~V z<E!Vg{lU}}&f;R&H|XDXBY0BMLH;MDr%ef0Mur(e86w8gGcQpnDvBw&3vJqumJ?+C z`EqlpnZ6BU>|^<IVbn5x=e}b^QfF)2w(m|_F+rvcP3u~hx`0FaVk(tzF)6-$Irtlz z;?F9;Y&;<SpnA*N)cxUiE|tY>WYL80OVEsY=pqQ>)_knuwm2tJon$dF6eBMFU?t%R z4305&&uT^QnS^NSIUal*w;BxMFKwd{C}VKbDxeozHzlmfHqq&9-ByiG$+R>SjE@v9 zS$?)6nVFSfdX+;v^0|GxU-QkA*7fi5|IEP5mB-HVcX)}Z#xD4brk8-F@&<p9;itlb zGSN}6yaW{U{#bLRwn`PBLPtu!we=9EthtEZ+Tt;gj~Ul*&y*sDR*{9DHq8lE+s)Wo zQOT6WwIARMir8p*9ack6scEMn-Ham>msd+3e92}fW}&mbtBbLTLQ{Wvp3sQ~>Avil zlX;8yhnuzWJghE!f_W9ad%bfqTDIhg<SnhMacLlYMA$ODM=~)-+pE(x-tM6jBAu&D zpqY{gnpq9*qQ>{)?|@uaqs24Y!%}k$DglImb#u>$MAr#<@4zHP`Q41>Bh6KxW07xB z`zjeX@Iom=Wss09;hW{t$33ehIZwg5k$Mq>=lwUhT{IL?SkpM72arPTy-vhBy<Lcu zmcL%KIXj&)0#X|e6xT26_+6jg9qlP?j9z?vjLK4~<H>ktWNHQ4{j5wOa3(UgzpVwz z&l64<hq*szbv;<yhM4%!+<(R{R##XJMk_Pq?*9e{@u=By&oh%*sF%~q<@YOCQcN{L zLrFsLmSq7>vO%{(`@)pRQB^0XG!%%~Dk2U8UGeDdykFaW2BFMCLL7%X*^*S#{Xv&M z)sIKLYNQ$GC>?MpO*eNOM{{$JQCre#5s^@eBvSof+P$JOPyfJl%yRW?d2ftUAhPug z%b0B{iKrN>wqn>Rlf$bMw5y!7E<oFVXxT#6se%5K4iP~-?@dFy_Q~vQ4*5?a&SiY> zighW6@Gs<iq3G{t?@Fq-L}#&GNWGy{e3<b;Kl55XU1$x<9}C6@Rz5E@>@|R<V8eZ~ zA@-Ph_Q%GfK19rvlv^+*|7Swu_MZ@%Z+tn-Y)JwYI#3mQ{O!YpH{dN4AVs+j6aq#V zTS19>#`H%pGl{_aPin^hRX&6KANY(*sepTVgL?|UvE`CQ;dtZysG`f1z8<4n=W%T+ zA$}a)$czTCCD3DKQ|j5IC#VGIx*e4M*C#_)$u+jd#-I~`9Dv&`))&03A##c2vgmO# zhSZIoO~PjxKVM3O7Sr{><w;2|P{|GGaBL2?BlF9mtXnIXPxeL%kGL#5&vDga|2ob% zRXAQ`5zSR(rpnF&;M3L{h2Y~Ig9Do)&pJt-P@0D&LH?REW0JMTxihYw_XsufNKzjG z{{FF7Hr0x$@1w{e`jFRc{klO#=Yg@mQ2PVz(^b~xhF%SHCJ_F#YdzC)i3=D<$^m=Y zsedT|#41$wU^N>hXui?1o>PR4ia_<;gu83~cp1XSH8upg*e*Ebp-bF1CSU${k|Ix9 z4#6l)+Pxij!+69@QJ;;y<m~yL{v^Jq9Y%Q6stRg5{o=oTH!EU!w5^cFVg1erT*0SA zDx`Or$^qxtwc6$WAYg1c-lmJD0_1;B^V@B%s|%66hYW)3sOe<J7x%_46AtXE(CihL zDl772`WLIaY*=T!ab}e<grNJN3A;VB`Q7P?Uv|j13P#zxD?~Xr#PZtlZ7H%I!~WZ; zNKZbDrXn9t2h@z>_MNfls!rrD%~Jk7CUPG>*Mc0UG@j7B0l%QDwU_5IkK1O)3=-mx z3;Zu>PVYOFh!>;7<DOUBGNzT%=`Ruzu-4quoDizy8KTHNJa}vb_wL)uNBNa(OONkP zn85l?dajN(g@#4S3M;;M47s^JcP)^-Sgn1B<?@^8*+);iu8PcgL#tE0%h}4q@uU=Y zU6(K-ayD=z(QiK~sq?}9$D7*qqUbA#{h{3vx`xAYwdrlmMN-#&7HvqB2F$a6a`3tZ zw*k36|Dc_maD#7MK2m8ZJ;FwJ&}-qAJra1n3Od_u0?N@wh){5O;dX7EVR%_aQ;J_I z`1W#pZ~|s>_t53G7Iis2X7a-vTe7&db+UT<V(rp(ORBFiOHutK*gQ6c%aYxU;8|#L z{oYp>K$LE>J8g2XX4t#hMzhi~-HL}O=?dk1U%f(vjBMT&K9U=-J0ewvMZ`EwU0J3t z;2wCl_PzaMad8Y9h45O3aFkPb<9clDxXtZpg7d_GkxcBx_nSaoG!Xpuj)4D3EH3i{ zEe1NK4&!4}Tuj?|Zcki=jXS)(GmWkadgSH5-K{6p)O>-|Qk@y6>PZ&_ug8k9=24%M z#UN-95Q{!Z4Hp?H2Pb4C_GoIU(d*5BZeft-i9##JD!RfL($G%#y}hvi;{u?{O(Qbp zEb?S}Z|q%^wi;801{s&0jS!dENY29A0jS`J`|w!h?*qf%YXk%nA%3<Ip*8F065=Z- zx<uUHDh*F~um1y2xL6@2b?^@{Kpm~O+mcLif4Ei${zWHeZTzT^sB<L2nS4Obbi-ai zryXEO++(ZlK#Jc(K`U)vwY6=5yHL?2u9<Mdg%)oyps_4Y0Ttq&eA!CyFk?sgcc#bi z3!4)bU9Yk_#7$bIoIsjau2~Y6B-jTTZTqN@Wm$oUntAm3x0>!+;%3{+Z33;14+g61 zA1t&RiE!+4A0jS@mGX``lDgWH_w;Lzj_P8O^3AT$bqu12OmvvmfLrL<*$&vi+%nA6 zIhrh>p-P{3pBD^+@UcB0q+;~}p=#DWLy%5<U?_Gn7jETCc;C8bo|{8xk-*uy)4zdV zets+?pv8tBg)uC+Jq`D?9m&&jpg($Giy%$KNzh5qU5AN@S+U-PfgyMI_fWN6Z+X5= zH^ILVgVwSlM%f1f542q3)OTOc{a*vr!al(`QGF~$%7A}X-Rf$(t?8S&s0*=4leG4P zRnm8(u$ajL+*_=I_osIphov>OCLyd~GcwmEiw9X#Q|@%&SYUONe`qFw`bE(KjwuU% z?5IkC&zq;-{@}Tdx^wM1%S*oZ;c7SM9WfKefU<B+(ZP!Da7lS!n&Z!=g<!HTnR-i| zhP{9CcA;MSumc*LZtZ^$T7tlH`lmLHjtR~yd>&)pQ`{XED3}Vdu*_4pW*DrXhD#g! z8paip^!|we^{4YwsR%(}Ksg(uJXx<(7pVb@ic<O=3OnoGSe)~o;(^`rgV&{;orMs% z9I>29JIsAB&e@Ds2?j!i3DD|Ah0~AFmhC1t09Wj%L=k0lsZ_i$X7gk0N=HU8v!DaE z(tp7G^8@$nLus0(taUMs*)HBHxa=kFr7-B_MuOXXuC4TShfY&mO{D27i+6rWz+HQJ zkkDf+k>}axS;k%D=m%YPbDlV!cfbCQ2{$%o3x5sOhhzMcYg(V;gV-I@CT4GH8ukMP zx9AhYr*su&T`Kq_P0d@bg9EH4cZVB@%MlZNK|w*-Pb@hR+xTZst;C%;3xZq!r<yBa z`k!&Qkjx5tR;`^~20WH8yo_!ucQ@WW(EWe%!g8tlxBA0E5bwN-3K@AE<Gs8&Om1c? zufO&WCxkuuNC8{6CMo+bcf)Q^DsFNrj(?!gRBe6kFRK!mUsQZeE{Q%7S>w@ft>=<* zZ_LdWy@VLv#>Q?Mx0Qk&cH6bJt(5mCk}w;(wxMy<3+W--5roXiu-p9PmT)vaLB`<C zq8)<&Q%MX(z~K#6ib2hb6Z1tXCD0%%mYU5chqI+C{(@msz7vOROI<wWW%8a>+=M)4 zhG0hO4yS9rXe=cVmd}sG4~(`na?Nx!7kW!A)N$%VQq$OyT^#Pa5VLGyX<*HD6X?7O zmkK{NRd9Yi9rOPS?MDUWQ@Z-Z#l^4t^C7^Vhy~W>5J8?ny*G04>puV=_Pfd|+&`^1 zu22%E^YEeI9}Ym||0A0iL>|CF-M$GuH`iF(MT;ojR{tUQ?QfKPalferXm&eh(^L;G zD0hUg5JdaXKA@hXoEz&HUuh997rgx}vJekRY&rmO11@_Aks7ie_IwXnUbYY=-Z0xx zHEHbkvDI&5-a5QuPX0P&Ci%uZZg9YdAC|eM!$TxuEW6P+ltc0uK^Y<14LqWqm}Kzo zP*K9S_P`F*2-qbUQ$9h$6u?K+uQKfozECR&B-~NUfj^N#60P{pK@t^l0puXJZba%% zmMy(!e2U)%tUcCA820L>U4D0%4(iiLXwf@Ew^fj&3S5nX)pez1h3NyI8@|-{@6}Y@ zgRn)MEanfj8Q2)&3uSm|Y=&U<XpKMRSzc&prsq-I(S70d>kakQUm14A2{H(En9pGS z&KYtv8CN|-9~OOV_4=r}^IG4dk%o-6c<Ex2m4%;TL|O>Bz|^G>aGz=mrDz0PBESid zL^Nn`tSA!d`T6J+>r5Wm8O@pG&k`R8eDmx(E)GyZh>>l(%ahRt>xQ8O-|*LmSHqy} z>j28`a-Kj2r^9fQ#u0?b&sYoRy;-s?FCx|+i?Z^cNVewBga!QDHHUGZst*a}qh6)c z*0iU=g<#6}fhSD;rn?2(ma#E2Nh~Ae+kF%Ih>_Nk2EjN2X!qaa-kD>2wJ%ckyB+_w zh<o{TP-12ev|^P4g00hIWSerDQt-a@1}sOa-+Th~zEMMKt_GyLgK9d^bT_hDSJAH; zYwCIi?(vqsHV(7}r=7dvks6n7p1ya$7EIom&HEE+zKM6ado54?A()lChY*|kRlBlp z%dF(bua-3X<2W_`&x`;pFq*4C=gBiLUAQ)@G|ZJ`trHIv$m)C2s{kfb^AXoaL@IzF znZY}siM=NB8jWa22`9Su%n(0d<D3t7bft{L4C5l*i5}!lD}^7n<By@&pj!`X{^7U+ zQEjw;^Dz_oKR(;XLn}r2yFpWtZVA;4D)`83Fl^XnCrA)ppxX!#Zwj*k7Yo~>puR_} zGr7zY%u2TTIPXbjVv=E*(pDxIu7%l2HDSittkvMhDs3Sm;fAtMwH`ch4c_id7T#%I z6YwXT{-RZl0aHJS_zvcbW#yDID$P?vqT~Ray;IaBI5X^^dP~{2lX4@q3;Kg#7?|Lh z<f+Zr-p3|U*ntO)w7|`(H7Z6#Y?>n>g#2_2S9XF7S~DZhRyr%YzwsBgJZaaz|9q+> zy?he+y7}t?!VqJ(y?NC&fl-0^e%B;Ik!$|<t`#lLy`YhR^#k^|)t?Ga3F~VY$iTV@ zA6~GOnVu3ts*HhQb4#4#uvXAEaxsnG8>2Kby)t10iA36K%FA-~DgfwNhD7|C3oDAN zzwlb9x-<sTvMjYc8*6Ggf3QM()w`v)+h6Uy#mI!uwuok8p3VC^Y1A#;fye9)g&klN za;fysxIePNT2S3`Ovh?!O=CJJ7xt?)5pP;&!+oyW9$uE_8<FK4*}Zq9KHj1zUpcm7 zgDo?J&!{4kk=!N_FusuiTsHccCaqp#045pvBSQw*zmmGAEx)pLT@mWtk;qDJTLvjj z5(2^^UsEm4lAQ7wnf|)08uq!#QgVI#Nz1Z4?R^{p`jO=UVifXw3u~wcyBJfQ@zLxu zoWl3X@+0Yn2@~HBX(nuL`bWKoVS@xlJ%CzNOx+}}*rCjJU2ybbTA|O2lw<ys19KPv zJCHwx!hv_o4)&<~!^RWV!|OwGV-h+oGga6x5udT~<D?0;Sf{C6Qii-!+D1bTTnnqA z^$Ql#%J>QOWi9W1k5dWoNL3NAXiZX*yWmL?lkU#R>TF+u-}|sxU3aZ|7k8O8h4p}t z>kP7+gh=C%k61u<6OxBbVs!^bX-l{)QTyR%OrL8k;9G!Z#*wnP^3MPSAHaGML&wnm zjevU*39#{f3;ew8HnOX3*<P@^g)`{)?`lZH;4)#P53q@ug(a1}ZQjNLMXVuOIfkKu zvs-${Zh|*EiTR)IybHP24D{(4!t1ZeZ_C`4db1UU3t#>nBrud}QkOE;iVeMU_hf`3 lMx>;a(;)cv1SyGpBBv&B?lOnr`vQO*a#EipE5%K|{SUmqIivsp diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go deleted file mode 100644 index e6ba1cc..0000000 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/advanced/main.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "github.com/n0rad/go-erlog/log" - _ "github.com/n0rad/go-erlog/register" - "github.com/n0rad/go-erlog/with" - "os" -) - -func main() { - logger := log.GetLog("newlog") // another logger - - // logger.(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout - - path := "/toto/config" - if err := os.Mkdir(path, 0777); err != nil { - log.WithEF(err, with.WithField("dir", path)).Info("Failed to create config directory") - - logger.LogEntry(&log.Entry{ - Fields: with.WithField("dir", path), - Level: log.INFO, - Err: err, - Message: "Salut !1", - }) - } - - logger.Info("Salut !2") - logger.Info("Salut !3") - -} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go deleted file mode 100644 index 9bd4d15..0000000 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/basic/main.go +++ /dev/null @@ -1,23 +0,0 @@ -package main - -import ( - "github.com/n0rad/go-erlog/log" // the api - _ "github.com/n0rad/go-erlog/register" // use erlog implementation, with default appender (colored to stderr) -) - -func main() { - log.SetLevel(log.TRACE) // default is INFO - - log.Trace("I'm trace") - log.Debug("I'm debug") - log.Info("I'm info") - log.Warn("I'm warn") - log.Error("I'm error") - - func() { - defer func() { recover() }() - func() { log.Panic("I'm panic") }() - }() - - log.Fatal("I'm fatal") -} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go deleted file mode 100644 index 66b943d..0000000 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/dedicated_logger/main.go +++ /dev/null @@ -1,8 +0,0 @@ -package dedicated_logger - -func main() { - // log.GetLevel() - // log := erlog.NewLog() - // - // log.SetLevel() -} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go deleted file mode 100644 index 47fb52e..0000000 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/erlog/main.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import "github.com/n0rad/go-erlog/log" -import _ "github.com/n0rad/go-erlog" - -func main() { - log.SetLevel(log.TRACE) - - log.Trace("I'm trace") - log.Debug("I'm debug") - log.Info("I'm info") - log.Warn("I'm warn") - log.Error("I'm error") - - func() { - defer func() { recover() }() - func() { log.Panic("I'm panic") }() - }() - - log.Fatal("I'm fatal") -} diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go b/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go deleted file mode 100644 index ab0f81c..0000000 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/examples/fields/fields.go +++ /dev/null @@ -1,16 +0,0 @@ -package main - -func main() { - // log.With("dir", "/src/my/path").Info("Cannot open directory") - // - // log.WithAll(log.Fields{ - // "dir": "/src/my/path", - // "count": 42, - // }).Warn("Cannot process") - // - // - // path := "/toto/titi/tata" - // if err := os.Mkdir(path, 0777); err != nil { - // log.WithErr(err).WithField("dir", path).Warn("Cannot create dir") - // } -} diff --git a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE b/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE deleted file mode 100644 index 22bf08c..0000000 --- a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013, Peter Bourgon, SoundCloud Ltd. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/ugorji/go/LICENSE b/Godeps/_workspace/src/github.com/ugorji/go/LICENSE deleted file mode 100644 index 95a0f05..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2012-2015 Ugorji Nwoke. -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md deleted file mode 100644 index 3ae8a05..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# codecgen tool - -Generate is given a list of *.go files to parse, and an output file (fout), -codecgen will create an output file __file.go__ which -contains `codec.Selfer` implementations for the named types found -in the files parsed. - -Using codecgen is very straightforward. - -**Download and install the tool** - -`go get -u github.com/ugorji/go/codec/codecgen` - -**Run the tool on your files** - -The command line format is: - -`codecgen [options] (-o outfile) (infile ...)` - -```sh -% codecgen -? -Usage of codecgen: - -c="github.com/ugorji/go/codec": codec path - -o="": out file - -r=".*": regex for type name to match - -rt="": tags for go run - -t="": build tag to put in file - -u=false: Use unsafe, e.g. to avoid unnecessary allocation on []byte->string - -x=false: keep temp file - -% codecgen -o values_codecgen.go values.go values2.go moretypedefs.go -``` - -Please see the [blog article](http://ugorji.net/blog/go-codecgen) -for more information on how to use the tool. - diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go deleted file mode 100644 index f370b4c..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/gen.go +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. -// Use of this source code is governed by a MIT license found in the LICENSE file. - -// codecgen generates codec.Selfer implementations for a set of types. -package main - -import ( - "bufio" - "bytes" - "errors" - "flag" - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "math/rand" - "os" - "os/exec" - "path/filepath" - "regexp" - "strconv" - "text/template" - "time" -) - -const genCodecPkg = "codec1978" // keep this in sync with codec.genCodecPkg - -const genFrunMainTmpl = `//+build ignore - -package main -{{ if .Types }}import "{{ .ImportPath }}"{{ end }} -func main() { - {{ $.PackageName }}.CodecGenTempWrite{{ .RandString }}() -} -` - -// const genFrunPkgTmpl = `//+build codecgen -const genFrunPkgTmpl = ` -package {{ $.PackageName }} - -import ( - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }} "{{ .CodecImportPath }}"{{ end }} - "os" - "reflect" - "bytes" - "strings" - "go/format" -) - -func CodecGenTempWrite{{ .RandString }}() { - fout, err := os.Create("{{ .OutFile }}") - if err != nil { - panic(err) - } - defer fout.Close() - var out bytes.Buffer - - var typs []reflect.Type -{{ range $index, $element := .Types }} - var t{{ $index }} {{ . }} - typs = append(typs, reflect.TypeOf(t{{ $index }})) -{{ end }} - {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .UseUnsafe }}, {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...) - bout, err := format.Source(out.Bytes()) - if err != nil { - fout.Write(out.Bytes()) - panic(err) - } - fout.Write(bout) -} - -` - -// Generate is given a list of *.go files to parse, and an output file (fout). -// -// It finds all types T in the files, and it creates 2 tmp files (frun). -// - main package file passed to 'go run' -// - package level file which calls *genRunner.Selfer to write Selfer impls for each T. -// We use a package level file so that it can reference unexported types in the package being worked on. -// Tool then executes: "go run __frun__" which creates fout. -// fout contains Codec(En|De)codeSelf implementations for every type T. -// -func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, goRunTag string, - st string, regexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) { - // For each file, grab AST, find each type, and write a call to it. - if len(infiles) == 0 { - return - } - if outfile == "" || codecPkgPath == "" { - err = errors.New("outfile and codec package path cannot be blank") - return - } - if uid < 0 { - uid = -uid - } - if uid == 0 { - rr := rand.New(rand.NewSource(time.Now().UnixNano())) - uid = 101 + rr.Int63n(9777) - } - // We have to parse dir for package, before opening the temp file for writing (else ImportDir fails). - // Also, ImportDir(...) must take an absolute path. - lastdir := filepath.Dir(outfile) - absdir, err := filepath.Abs(lastdir) - if err != nil { - return - } - pkg, err := build.Default.ImportDir(absdir, build.AllowBinary) - if err != nil { - return - } - type tmplT struct { - CodecPkgName string - CodecImportPath string - ImportPath string - OutFile string - PackageName string - RandString string - BuildTag string - StructTags string - Types []string - CodecPkgFiles bool - UseUnsafe bool - } - tv := tmplT{ - CodecPkgName: genCodecPkg, - OutFile: outfile, - CodecImportPath: codecPkgPath, - BuildTag: buildTag, - UseUnsafe: useUnsafe, - RandString: strconv.FormatInt(uid, 10), - StructTags: st, - } - tv.ImportPath = pkg.ImportPath - if tv.ImportPath == tv.CodecImportPath { - tv.CodecPkgFiles = true - tv.CodecPkgName = "codec" - } - astfiles := make([]*ast.File, len(infiles)) - for i, infile := range infiles { - if filepath.Dir(infile) != lastdir { - err = errors.New("in files must all be in same directory as outfile") - return - } - fset := token.NewFileSet() - astfiles[i], err = parser.ParseFile(fset, infile, nil, 0) - if err != nil { - return - } - if i == 0 { - tv.PackageName = astfiles[i].Name.Name - if tv.PackageName == "main" { - // codecgen cannot be run on types in the 'main' package. - // A temporary 'main' package must be created, and should reference the fully built - // package containing the types. - // Also, the temporary main package will conflict with the main package which already has a main method. - err = errors.New("codecgen cannot be run on types in the 'main' package") - return - } - } - } - - for _, f := range astfiles { - for _, d := range f.Decls { - if gd, ok := d.(*ast.GenDecl); ok { - for _, dd := range gd.Specs { - if td, ok := dd.(*ast.TypeSpec); ok { - // if len(td.Name.Name) == 0 || td.Name.Name[0] > 'Z' || td.Name.Name[0] < 'A' { - if len(td.Name.Name) == 0 { - continue - } - - // only generate for: - // struct: StructType - // primitives (numbers, bool, string): Ident - // map: MapType - // slice, array: ArrayType - // chan: ChanType - // do not generate: - // FuncType, InterfaceType, StarExpr (ptr), etc - switch td.Type.(type) { - case *ast.StructType, *ast.Ident, *ast.MapType, *ast.ArrayType, *ast.ChanType: - if regexName.FindStringIndex(td.Name.Name) != nil { - tv.Types = append(tv.Types, td.Name.Name) - } - } - } - } - } - } - } - - if len(tv.Types) == 0 { - return - } - - // we cannot use ioutil.TempFile, because we cannot guarantee the file suffix (.go). - // Also, we cannot create file in temp directory, - // because go run will not work (as it needs to see the types here). - // Consequently, create the temp file in the current directory, and remove when done. - - // frun, err = ioutil.TempFile("", "codecgen-") - // frunName := filepath.Join(os.TempDir(), "codecgen-"+strconv.FormatInt(time.Now().UnixNano(), 10)+".go") - - frunMainName := "codecgen-main-" + tv.RandString + ".generated.go" - frunPkgName := "codecgen-pkg-" + tv.RandString + ".generated.go" - if deleteTempFile { - defer os.Remove(frunMainName) - defer os.Remove(frunPkgName) - } - // var frunMain, frunPkg *os.File - if _, err = gen1(frunMainName, genFrunMainTmpl, &tv); err != nil { - return - } - if _, err = gen1(frunPkgName, genFrunPkgTmpl, &tv); err != nil { - return - } - - // remove outfile, so "go run ..." will not think that types in outfile already exist. - os.Remove(outfile) - - // execute go run frun - cmd := exec.Command("go", "run", "-tags="+goRunTag, frunMainName) //, frunPkg.Name()) - var buf bytes.Buffer - cmd.Stdout = &buf - cmd.Stderr = &buf - if err = cmd.Run(); err != nil { - err = fmt.Errorf("error running 'go run %s': %v, console: %s", - frunMainName, err, buf.Bytes()) - return - } - os.Stdout.Write(buf.Bytes()) - return -} - -func gen1(frunName, tmplStr string, tv interface{}) (frun *os.File, err error) { - os.Remove(frunName) - if frun, err = os.Create(frunName); err != nil { - return - } - defer frun.Close() - - t := template.New("") - if t, err = t.Parse(tmplStr); err != nil { - return - } - bw := bufio.NewWriter(frun) - if err = t.Execute(bw, tv); err != nil { - return - } - if err = bw.Flush(); err != nil { - return - } - return -} - -func main() { - o := flag.String("o", "", "out file") - c := flag.String("c", genCodecPath, "codec path") - t := flag.String("t", "", "build tag to put in file") - r := flag.String("r", ".*", "regex for type name to match") - rt := flag.String("rt", "", "tags for go run") - st := flag.String("st", "codec,json", "struct tag keys to introspect") - x := flag.Bool("x", false, "keep temp file") - u := flag.Bool("u", false, "Use unsafe, e.g. to avoid unnecessary allocation on []byte->string") - d := flag.Int64("d", 0, "random identifier for use in generated code") - flag.Parse() - if err := Generate(*o, *t, *c, *d, *u, *rt, *st, - regexp.MustCompile(*r), !*x, flag.Args()...); err != nil { - fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err) - os.Exit(1) - } -} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go deleted file mode 100644 index e120a4e..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/codecgen/z.go +++ /dev/null @@ -1,3 +0,0 @@ -package main - -const genCodecPath = "github.com/ugorji/go/codec" diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go b/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go deleted file mode 100644 index d6f5f0c..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.not.go +++ /dev/null @@ -1,32 +0,0 @@ -// +build notfastpath - -package codec - -import "reflect" - -// The generated fast-path code is very large, and adds a few seconds to the build time. -// This causes test execution, execution of small tools which use codec, etc -// to take a long time. -// -// To mitigate, we now support the notfastpath tag. -// This tag disables fastpath during build, allowing for faster build, test execution, -// short-program runs, etc. - -func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } -func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } -func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } -func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } - -type fastpathT struct{} -type fastpathE struct { - rtid uintptr - rt reflect.Type - encfn func(*encFnInfo, reflect.Value) - decfn func(*decFnInfo, reflect.Value) -} -type fastpathA [0]fastpathE - -func (x fastpathA) index(rtid uintptr) int { return -1 } - -var fastpathAV fastpathA -var fastpathTV fastpathT diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh b/Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh deleted file mode 100644 index 00857b6..0000000 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/tests.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash - -# Run all the different permutations of all the tests. -# This helps ensure that nothing gets broken. - -_run() { - # 1. VARIATIONS: regular (t), canonical (c), IO R/W (i), - # binc-nosymbols (n), struct2array (s), intern string (e), - # json-indent (d), circular (l) - # 2. MODE: reflection (r), external (x), codecgen (g), unsafe (u), notfastpath (f) - # 3. OPTIONS: verbose (v), reset (z), must (m), - # - # Use combinations of mode to get exactly what you want, - # and then pass the variations you need. - - ztags="" - zargs="" - local OPTIND - OPTIND=1 - while getopts "_xurtcinsvgzmefdl" flag - do - case "x$flag" in - 'xr') ;; - 'xf') ztags="$ztags notfastpath" ;; - 'xg') ztags="$ztags codecgen" ;; - 'xx') ztags="$ztags x" ;; - 'xu') ztags="$ztags unsafe" ;; - 'xv') zargs="$zargs -tv" ;; - 'xz') zargs="$zargs -tr" ;; - 'xm') zargs="$zargs -tm" ;; - 'xl') zargs="$zargs -tl" ;; - *) ;; - esac - done - # shift $((OPTIND-1)) - printf '............. TAGS: %s .............\n' "$ztags" - # echo ">>>>>>> TAGS: $ztags" - - OPTIND=1 - while getopts "_xurtcinsvgzmefdl" flag - do - case "x$flag" in - 'xt') printf ">>>>>>> REGULAR : "; go test "-tags=$ztags" $zargs ; sleep 2 ;; - 'xc') printf ">>>>>>> CANONICAL : "; go test "-tags=$ztags" $zargs -tc; sleep 2 ;; - 'xi') printf ">>>>>>> I/O : "; go test "-tags=$ztags" $zargs -ti; sleep 2 ;; - 'xn') printf ">>>>>>> NO_SYMBOLS : "; go test "-tags=$ztags" -run=Binc $zargs -tn; sleep 2 ;; - 'xs') printf ">>>>>>> TO_ARRAY : "; go test "-tags=$ztags" $zargs -ts; sleep 2 ;; - 'xe') printf ">>>>>>> INTERN : "; go test "-tags=$ztags" $zargs -te; sleep 2 ;; - 'xd') printf ">>>>>>> INDENT : "; - go test "-tags=$ztags" -run=JsonCodecsTable -td=-1 $zargs; - go test "-tags=$ztags" -run=JsonCodecsTable -td=8 $zargs; - sleep 2 ;; - *) ;; - esac - done - shift $((OPTIND-1)) - - OPTIND=1 -} - -# echo ">>>>>>> RUNNING VARIATIONS OF TESTS" -if [[ "x$@" = "x" ]]; then - # All: r, x, g, gu - _run "-_tcinsed_ml" # regular - _run "-_tcinsed_ml_z" # regular with reset - _run "-_tcinsed_ml_f" # regular with no fastpath (notfastpath) - _run "-x_tcinsed_ml" # external - _run "-gx_tcinsed_ml" # codecgen: requires external - _run "-gxu_tcinsed_ml" # codecgen + unsafe -elif [[ "x$@" = "x-Z" ]]; then - # Regular - _run "-_tcinsed_ml" # regular - _run "-_tcinsed_ml_z" # regular with reset -elif [[ "x$@" = "x-F" ]]; then - # regular with notfastpath - _run "-_tcinsed_ml_f" # regular - _run "-_tcinsed_ml_zf" # regular with reset -else - _run "$@" -fi diff --git a/Godeps/_workspace/src/golang.org/x/net/LICENSE b/Godeps/_workspace/src/golang.org/x/net/LICENSE deleted file mode 100644 index 6a66aea..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/golang.org/x/net/PATENTS b/Godeps/_workspace/src/golang.org/x/net/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go deleted file mode 100644 index 48610e3..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build go1.5 - -package ctxhttp - -import "net/http" - -func canceler(client *http.Client, req *http.Request) func() { - ch := make(chan struct{}) - req.Cancel = ch - - return func() { - close(ch) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go deleted file mode 100644 index 56bcbad..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/cancelreq_go14.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build !go1.5 - -package ctxhttp - -import "net/http" - -type requestCanceler interface { - CancelRequest(*http.Request) -} - -func canceler(client *http.Client, req *http.Request) func() { - rc, ok := client.Transport.(requestCanceler) - if !ok { - return func() {} - } - return func() { - rc.CancelRequest(req) - } -} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go b/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go deleted file mode 100644 index 9f34888..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/context/ctxhttp/ctxhttp.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ctxhttp provides helper functions for performing context-aware HTTP requests. -package ctxhttp - -import ( - "io" - "net/http" - "net/url" - "strings" - - "golang.org/x/net/context" -) - -// Do sends an HTTP request with the provided http.Client and returns an HTTP response. -// If the client is nil, http.DefaultClient is used. -// If the context is canceled or times out, ctx.Err() will be returned. -func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - - // Request cancelation changed in Go 1.5, see cancelreq.go and cancelreq_go14.go. - cancel := canceler(client, req) - - type responseAndError struct { - resp *http.Response - err error - } - result := make(chan responseAndError, 1) - - go func() { - resp, err := client.Do(req) - result <- responseAndError{resp, err} - }() - - select { - case <-ctx.Done(): - cancel() - return nil, ctx.Err() - case r := <-result: - return r.resp, r.err - } -} - -// Get issues a GET request via the Do function. -func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("GET", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Head issues a HEAD request via the Do function. -func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { - req, err := http.NewRequest("HEAD", url, nil) - if err != nil { - return nil, err - } - return Do(ctx, client, req) -} - -// Post issues a POST request via the Do function. -func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { - req, err := http.NewRequest("POST", url, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", bodyType) - return Do(ctx, client, req) -} - -// PostForm issues a POST request via the Do function. -func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { - return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go b/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go deleted file mode 100644 index 2605ba3..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go +++ /dev/null @@ -1,713 +0,0 @@ -// generated by go run gen.go; DO NOT EDIT - -package atom - -const ( - A Atom = 0x1 - Abbr Atom = 0x4 - Accept Atom = 0x2106 - AcceptCharset Atom = 0x210e - Accesskey Atom = 0x3309 - Action Atom = 0x1f606 - Address Atom = 0x4f307 - Align Atom = 0x1105 - Alt Atom = 0x4503 - Annotation Atom = 0x1670a - AnnotationXml Atom = 0x1670e - Applet Atom = 0x2b306 - Area Atom = 0x2fa04 - Article Atom = 0x38807 - Aside Atom = 0x8305 - Async Atom = 0x7b05 - Audio Atom = 0xa605 - Autocomplete Atom = 0x1fc0c - Autofocus Atom = 0xb309 - Autoplay Atom = 0xce08 - B Atom = 0x101 - Base Atom = 0xd604 - Basefont Atom = 0xd608 - Bdi Atom = 0x1a03 - Bdo Atom = 0xe703 - Bgsound Atom = 0x11807 - Big Atom = 0x12403 - Blink Atom = 0x12705 - Blockquote Atom = 0x12c0a - Body Atom = 0x2f04 - Br Atom = 0x202 - Button Atom = 0x13606 - Canvas Atom = 0x7f06 - Caption Atom = 0x1bb07 - Center Atom = 0x5b506 - Challenge Atom = 0x21f09 - Charset Atom = 0x2807 - Checked Atom = 0x32807 - Cite Atom = 0x3c804 - Class Atom = 0x4de05 - Code Atom = 0x14904 - Col Atom = 0x15003 - Colgroup Atom = 0x15008 - Color Atom = 0x15d05 - Cols Atom = 0x16204 - Colspan Atom = 0x16207 - Command Atom = 0x17507 - Content Atom = 0x42307 - Contenteditable Atom = 0x4230f - Contextmenu Atom = 0x3310b - Controls Atom = 0x18808 - Coords Atom = 0x19406 - Crossorigin Atom = 0x19f0b - Data Atom = 0x44a04 - Datalist Atom = 0x44a08 - Datetime Atom = 0x23c08 - Dd Atom = 0x26702 - Default Atom = 0x8607 - Defer Atom = 0x14b05 - Del Atom = 0x3ef03 - Desc Atom = 0x4db04 - Details Atom = 0x4807 - Dfn Atom = 0x6103 - Dialog Atom = 0x1b06 - Dir Atom = 0x6903 - Dirname Atom = 0x6907 - Disabled Atom = 0x10c08 - Div Atom = 0x11303 - Dl Atom = 0x11e02 - Download Atom = 0x40008 - Draggable Atom = 0x17b09 - Dropzone Atom = 0x39108 - Dt Atom = 0x50902 - Em Atom = 0x6502 - Embed Atom = 0x6505 - Enctype Atom = 0x21107 - Face Atom = 0x5b304 - Fieldset Atom = 0x1b008 - Figcaption Atom = 0x1b80a - Figure Atom = 0x1cc06 - Font Atom = 0xda04 - Footer Atom = 0x8d06 - For Atom = 0x1d803 - ForeignObject Atom = 0x1d80d - Foreignobject Atom = 0x1e50d - Form Atom = 0x1f204 - Formaction Atom = 0x1f20a - Formenctype Atom = 0x20d0b - Formmethod Atom = 0x2280a - Formnovalidate Atom = 0x2320e - Formtarget Atom = 0x2470a - Frame Atom = 0x9a05 - Frameset Atom = 0x9a08 - H1 Atom = 0x26e02 - H2 Atom = 0x29402 - H3 Atom = 0x2a702 - H4 Atom = 0x2e902 - H5 Atom = 0x2f302 - H6 Atom = 0x50b02 - Head Atom = 0x2d504 - Header Atom = 0x2d506 - Headers Atom = 0x2d507 - Height Atom = 0x25106 - Hgroup Atom = 0x25906 - Hidden Atom = 0x26506 - High Atom = 0x26b04 - Hr Atom = 0x27002 - Href Atom = 0x27004 - Hreflang Atom = 0x27008 - Html Atom = 0x25504 - HttpEquiv Atom = 0x2780a - I Atom = 0x601 - Icon Atom = 0x42204 - Id Atom = 0x8502 - Iframe Atom = 0x29606 - Image Atom = 0x29c05 - Img Atom = 0x2a103 - Input Atom = 0x3e805 - Inputmode Atom = 0x3e809 - Ins Atom = 0x1a803 - Isindex Atom = 0x2a907 - Ismap Atom = 0x2b005 - Itemid Atom = 0x33c06 - Itemprop Atom = 0x3c908 - Itemref Atom = 0x5ad07 - Itemscope Atom = 0x2b909 - Itemtype Atom = 0x2c308 - Kbd Atom = 0x1903 - Keygen Atom = 0x3906 - Keytype Atom = 0x53707 - Kind Atom = 0x10904 - Label Atom = 0xf005 - Lang Atom = 0x27404 - Legend Atom = 0x18206 - Li Atom = 0x1202 - Link Atom = 0x12804 - List Atom = 0x44e04 - Listing Atom = 0x44e07 - Loop Atom = 0xf404 - Low Atom = 0x11f03 - Malignmark Atom = 0x100a - Manifest Atom = 0x5f108 - Map Atom = 0x2b203 - Mark Atom = 0x1604 - Marquee Atom = 0x2cb07 - Math Atom = 0x2d204 - Max Atom = 0x2e103 - Maxlength Atom = 0x2e109 - Media Atom = 0x6e05 - Mediagroup Atom = 0x6e0a - Menu Atom = 0x33804 - Menuitem Atom = 0x33808 - Meta Atom = 0x45d04 - Meter Atom = 0x24205 - Method Atom = 0x22c06 - Mglyph Atom = 0x2a206 - Mi Atom = 0x2eb02 - Min Atom = 0x2eb03 - Minlength Atom = 0x2eb09 - Mn Atom = 0x23502 - Mo Atom = 0x3ed02 - Ms Atom = 0x2bc02 - Mtext Atom = 0x2f505 - Multiple Atom = 0x30308 - Muted Atom = 0x30b05 - Name Atom = 0x6c04 - Nav Atom = 0x3e03 - Nobr Atom = 0x5704 - Noembed Atom = 0x6307 - Noframes Atom = 0x9808 - Noscript Atom = 0x3d208 - Novalidate Atom = 0x2360a - Object Atom = 0x1ec06 - Ol Atom = 0xc902 - Onabort Atom = 0x13a07 - Onafterprint Atom = 0x1c00c - Onautocomplete Atom = 0x1fa0e - Onautocompleteerror Atom = 0x1fa13 - Onbeforeprint Atom = 0x6040d - Onbeforeunload Atom = 0x4e70e - Onblur Atom = 0xaa06 - Oncancel Atom = 0xe908 - Oncanplay Atom = 0x28509 - Oncanplaythrough Atom = 0x28510 - Onchange Atom = 0x3a708 - Onclick Atom = 0x31007 - Onclose Atom = 0x31707 - Oncontextmenu Atom = 0x32f0d - Oncuechange Atom = 0x3420b - Ondblclick Atom = 0x34d0a - Ondrag Atom = 0x35706 - Ondragend Atom = 0x35709 - Ondragenter Atom = 0x3600b - Ondragleave Atom = 0x36b0b - Ondragover Atom = 0x3760a - Ondragstart Atom = 0x3800b - Ondrop Atom = 0x38f06 - Ondurationchange Atom = 0x39f10 - Onemptied Atom = 0x39609 - Onended Atom = 0x3af07 - Onerror Atom = 0x3b607 - Onfocus Atom = 0x3bd07 - Onhashchange Atom = 0x3da0c - Oninput Atom = 0x3e607 - Oninvalid Atom = 0x3f209 - Onkeydown Atom = 0x3fb09 - Onkeypress Atom = 0x4080a - Onkeyup Atom = 0x41807 - Onlanguagechange Atom = 0x43210 - Onload Atom = 0x44206 - Onloadeddata Atom = 0x4420c - Onloadedmetadata Atom = 0x45510 - Onloadstart Atom = 0x46b0b - Onmessage Atom = 0x47609 - Onmousedown Atom = 0x47f0b - Onmousemove Atom = 0x48a0b - Onmouseout Atom = 0x4950a - Onmouseover Atom = 0x4a20b - Onmouseup Atom = 0x4ad09 - Onmousewheel Atom = 0x4b60c - Onoffline Atom = 0x4c209 - Ononline Atom = 0x4cb08 - Onpagehide Atom = 0x4d30a - Onpageshow Atom = 0x4fe0a - Onpause Atom = 0x50d07 - Onplay Atom = 0x51706 - Onplaying Atom = 0x51709 - Onpopstate Atom = 0x5200a - Onprogress Atom = 0x52a0a - Onratechange Atom = 0x53e0c - Onreset Atom = 0x54a07 - Onresize Atom = 0x55108 - Onscroll Atom = 0x55f08 - Onseeked Atom = 0x56708 - Onseeking Atom = 0x56f09 - Onselect Atom = 0x57808 - Onshow Atom = 0x58206 - Onsort Atom = 0x58b06 - Onstalled Atom = 0x59509 - Onstorage Atom = 0x59e09 - Onsubmit Atom = 0x5a708 - Onsuspend Atom = 0x5bb09 - Ontimeupdate Atom = 0xdb0c - Ontoggle Atom = 0x5c408 - Onunload Atom = 0x5cc08 - Onvolumechange Atom = 0x5d40e - Onwaiting Atom = 0x5e209 - Open Atom = 0x3cf04 - Optgroup Atom = 0xf608 - Optimum Atom = 0x5eb07 - Option Atom = 0x60006 - Output Atom = 0x49c06 - P Atom = 0xc01 - Param Atom = 0xc05 - Pattern Atom = 0x5107 - Ping Atom = 0x7704 - Placeholder Atom = 0xc30b - Plaintext Atom = 0xfd09 - Poster Atom = 0x15706 - Pre Atom = 0x25e03 - Preload Atom = 0x25e07 - Progress Atom = 0x52c08 - Prompt Atom = 0x5fa06 - Public Atom = 0x41e06 - Q Atom = 0x13101 - Radiogroup Atom = 0x30a - Readonly Atom = 0x2fb08 - Rel Atom = 0x25f03 - Required Atom = 0x1d008 - Reversed Atom = 0x5a08 - Rows Atom = 0x9204 - Rowspan Atom = 0x9207 - Rp Atom = 0x1c602 - Rt Atom = 0x13f02 - Ruby Atom = 0xaf04 - S Atom = 0x2c01 - Samp Atom = 0x4e04 - Sandbox Atom = 0xbb07 - Scope Atom = 0x2bd05 - Scoped Atom = 0x2bd06 - Script Atom = 0x3d406 - Seamless Atom = 0x31c08 - Section Atom = 0x4e207 - Select Atom = 0x57a06 - Selected Atom = 0x57a08 - Shape Atom = 0x4f905 - Size Atom = 0x55504 - Sizes Atom = 0x55505 - Small Atom = 0x18f05 - Sortable Atom = 0x58d08 - Sorted Atom = 0x19906 - Source Atom = 0x1aa06 - Spacer Atom = 0x2db06 - Span Atom = 0x9504 - Spellcheck Atom = 0x3230a - Src Atom = 0x3c303 - Srcdoc Atom = 0x3c306 - Srclang Atom = 0x41107 - Start Atom = 0x38605 - Step Atom = 0x5f704 - Strike Atom = 0x53306 - Strong Atom = 0x55906 - Style Atom = 0x61105 - Sub Atom = 0x5a903 - Summary Atom = 0x61607 - Sup Atom = 0x61d03 - Svg Atom = 0x62003 - System Atom = 0x62306 - Tabindex Atom = 0x46308 - Table Atom = 0x42d05 - Target Atom = 0x24b06 - Tbody Atom = 0x2e05 - Td Atom = 0x4702 - Template Atom = 0x62608 - Textarea Atom = 0x2f608 - Tfoot Atom = 0x8c05 - Th Atom = 0x22e02 - Thead Atom = 0x2d405 - Time Atom = 0xdd04 - Title Atom = 0xa105 - Tr Atom = 0x10502 - Track Atom = 0x10505 - Translate Atom = 0x14009 - Tt Atom = 0x5302 - Type Atom = 0x21404 - Typemustmatch Atom = 0x2140d - U Atom = 0xb01 - Ul Atom = 0x8a02 - Usemap Atom = 0x51106 - Value Atom = 0x4005 - Var Atom = 0x11503 - Video Atom = 0x28105 - Wbr Atom = 0x12103 - Width Atom = 0x50705 - Wrap Atom = 0x58704 - Xmp Atom = 0xc103 -) - -const hash0 = 0xc17da63e - -const maxAtomLen = 19 - -var table = [1 << 9]Atom{ - 0x1: 0x48a0b, // onmousemove - 0x2: 0x5e209, // onwaiting - 0x3: 0x1fa13, // onautocompleteerror - 0x4: 0x5fa06, // prompt - 0x7: 0x5eb07, // optimum - 0x8: 0x1604, // mark - 0xa: 0x5ad07, // itemref - 0xb: 0x4fe0a, // onpageshow - 0xc: 0x57a06, // select - 0xd: 0x17b09, // draggable - 0xe: 0x3e03, // nav - 0xf: 0x17507, // command - 0x11: 0xb01, // u - 0x14: 0x2d507, // headers - 0x15: 0x44a08, // datalist - 0x17: 0x4e04, // samp - 0x1a: 0x3fb09, // onkeydown - 0x1b: 0x55f08, // onscroll - 0x1c: 0x15003, // col - 0x20: 0x3c908, // itemprop - 0x21: 0x2780a, // http-equiv - 0x22: 0x61d03, // sup - 0x24: 0x1d008, // required - 0x2b: 0x25e07, // preload - 0x2c: 0x6040d, // onbeforeprint - 0x2d: 0x3600b, // ondragenter - 0x2e: 0x50902, // dt - 0x2f: 0x5a708, // onsubmit - 0x30: 0x27002, // hr - 0x31: 0x32f0d, // oncontextmenu - 0x33: 0x29c05, // image - 0x34: 0x50d07, // onpause - 0x35: 0x25906, // hgroup - 0x36: 0x7704, // ping - 0x37: 0x57808, // onselect - 0x3a: 0x11303, // div - 0x3b: 0x1fa0e, // onautocomplete - 0x40: 0x2eb02, // mi - 0x41: 0x31c08, // seamless - 0x42: 0x2807, // charset - 0x43: 0x8502, // id - 0x44: 0x5200a, // onpopstate - 0x45: 0x3ef03, // del - 0x46: 0x2cb07, // marquee - 0x47: 0x3309, // accesskey - 0x49: 0x8d06, // footer - 0x4a: 0x44e04, // list - 0x4b: 0x2b005, // ismap - 0x51: 0x33804, // menu - 0x52: 0x2f04, // body - 0x55: 0x9a08, // frameset - 0x56: 0x54a07, // onreset - 0x57: 0x12705, // blink - 0x58: 0xa105, // title - 0x59: 0x38807, // article - 0x5b: 0x22e02, // th - 0x5d: 0x13101, // q - 0x5e: 0x3cf04, // open - 0x5f: 0x2fa04, // area - 0x61: 0x44206, // onload - 0x62: 0xda04, // font - 0x63: 0xd604, // base - 0x64: 0x16207, // colspan - 0x65: 0x53707, // keytype - 0x66: 0x11e02, // dl - 0x68: 0x1b008, // fieldset - 0x6a: 0x2eb03, // min - 0x6b: 0x11503, // var - 0x6f: 0x2d506, // header - 0x70: 0x13f02, // rt - 0x71: 0x15008, // colgroup - 0x72: 0x23502, // mn - 0x74: 0x13a07, // onabort - 0x75: 0x3906, // keygen - 0x76: 0x4c209, // onoffline - 0x77: 0x21f09, // challenge - 0x78: 0x2b203, // map - 0x7a: 0x2e902, // h4 - 0x7b: 0x3b607, // onerror - 0x7c: 0x2e109, // maxlength - 0x7d: 0x2f505, // mtext - 0x7e: 0xbb07, // sandbox - 0x7f: 0x58b06, // onsort - 0x80: 0x100a, // malignmark - 0x81: 0x45d04, // meta - 0x82: 0x7b05, // async - 0x83: 0x2a702, // h3 - 0x84: 0x26702, // dd - 0x85: 0x27004, // href - 0x86: 0x6e0a, // mediagroup - 0x87: 0x19406, // coords - 0x88: 0x41107, // srclang - 0x89: 0x34d0a, // ondblclick - 0x8a: 0x4005, // value - 0x8c: 0xe908, // oncancel - 0x8e: 0x3230a, // spellcheck - 0x8f: 0x9a05, // frame - 0x91: 0x12403, // big - 0x94: 0x1f606, // action - 0x95: 0x6903, // dir - 0x97: 0x2fb08, // readonly - 0x99: 0x42d05, // table - 0x9a: 0x61607, // summary - 0x9b: 0x12103, // wbr - 0x9c: 0x30a, // radiogroup - 0x9d: 0x6c04, // name - 0x9f: 0x62306, // system - 0xa1: 0x15d05, // color - 0xa2: 0x7f06, // canvas - 0xa3: 0x25504, // html - 0xa5: 0x56f09, // onseeking - 0xac: 0x4f905, // shape - 0xad: 0x25f03, // rel - 0xae: 0x28510, // oncanplaythrough - 0xaf: 0x3760a, // ondragover - 0xb0: 0x62608, // template - 0xb1: 0x1d80d, // foreignObject - 0xb3: 0x9204, // rows - 0xb6: 0x44e07, // listing - 0xb7: 0x49c06, // output - 0xb9: 0x3310b, // contextmenu - 0xbb: 0x11f03, // low - 0xbc: 0x1c602, // rp - 0xbd: 0x5bb09, // onsuspend - 0xbe: 0x13606, // button - 0xbf: 0x4db04, // desc - 0xc1: 0x4e207, // section - 0xc2: 0x52a0a, // onprogress - 0xc3: 0x59e09, // onstorage - 0xc4: 0x2d204, // math - 0xc5: 0x4503, // alt - 0xc7: 0x8a02, // ul - 0xc8: 0x5107, // pattern - 0xc9: 0x4b60c, // onmousewheel - 0xca: 0x35709, // ondragend - 0xcb: 0xaf04, // ruby - 0xcc: 0xc01, // p - 0xcd: 0x31707, // onclose - 0xce: 0x24205, // meter - 0xcf: 0x11807, // bgsound - 0xd2: 0x25106, // height - 0xd4: 0x101, // b - 0xd5: 0x2c308, // itemtype - 0xd8: 0x1bb07, // caption - 0xd9: 0x10c08, // disabled - 0xdb: 0x33808, // menuitem - 0xdc: 0x62003, // svg - 0xdd: 0x18f05, // small - 0xde: 0x44a04, // data - 0xe0: 0x4cb08, // ononline - 0xe1: 0x2a206, // mglyph - 0xe3: 0x6505, // embed - 0xe4: 0x10502, // tr - 0xe5: 0x46b0b, // onloadstart - 0xe7: 0x3c306, // srcdoc - 0xeb: 0x5c408, // ontoggle - 0xed: 0xe703, // bdo - 0xee: 0x4702, // td - 0xef: 0x8305, // aside - 0xf0: 0x29402, // h2 - 0xf1: 0x52c08, // progress - 0xf2: 0x12c0a, // blockquote - 0xf4: 0xf005, // label - 0xf5: 0x601, // i - 0xf7: 0x9207, // rowspan - 0xfb: 0x51709, // onplaying - 0xfd: 0x2a103, // img - 0xfe: 0xf608, // optgroup - 0xff: 0x42307, // content - 0x101: 0x53e0c, // onratechange - 0x103: 0x3da0c, // onhashchange - 0x104: 0x4807, // details - 0x106: 0x40008, // download - 0x109: 0x14009, // translate - 0x10b: 0x4230f, // contenteditable - 0x10d: 0x36b0b, // ondragleave - 0x10e: 0x2106, // accept - 0x10f: 0x57a08, // selected - 0x112: 0x1f20a, // formaction - 0x113: 0x5b506, // center - 0x115: 0x45510, // onloadedmetadata - 0x116: 0x12804, // link - 0x117: 0xdd04, // time - 0x118: 0x19f0b, // crossorigin - 0x119: 0x3bd07, // onfocus - 0x11a: 0x58704, // wrap - 0x11b: 0x42204, // icon - 0x11d: 0x28105, // video - 0x11e: 0x4de05, // class - 0x121: 0x5d40e, // onvolumechange - 0x122: 0xaa06, // onblur - 0x123: 0x2b909, // itemscope - 0x124: 0x61105, // style - 0x127: 0x41e06, // public - 0x129: 0x2320e, // formnovalidate - 0x12a: 0x58206, // onshow - 0x12c: 0x51706, // onplay - 0x12d: 0x3c804, // cite - 0x12e: 0x2bc02, // ms - 0x12f: 0xdb0c, // ontimeupdate - 0x130: 0x10904, // kind - 0x131: 0x2470a, // formtarget - 0x135: 0x3af07, // onended - 0x136: 0x26506, // hidden - 0x137: 0x2c01, // s - 0x139: 0x2280a, // formmethod - 0x13a: 0x3e805, // input - 0x13c: 0x50b02, // h6 - 0x13d: 0xc902, // ol - 0x13e: 0x3420b, // oncuechange - 0x13f: 0x1e50d, // foreignobject - 0x143: 0x4e70e, // onbeforeunload - 0x144: 0x2bd05, // scope - 0x145: 0x39609, // onemptied - 0x146: 0x14b05, // defer - 0x147: 0xc103, // xmp - 0x148: 0x39f10, // ondurationchange - 0x149: 0x1903, // kbd - 0x14c: 0x47609, // onmessage - 0x14d: 0x60006, // option - 0x14e: 0x2eb09, // minlength - 0x14f: 0x32807, // checked - 0x150: 0xce08, // autoplay - 0x152: 0x202, // br - 0x153: 0x2360a, // novalidate - 0x156: 0x6307, // noembed - 0x159: 0x31007, // onclick - 0x15a: 0x47f0b, // onmousedown - 0x15b: 0x3a708, // onchange - 0x15e: 0x3f209, // oninvalid - 0x15f: 0x2bd06, // scoped - 0x160: 0x18808, // controls - 0x161: 0x30b05, // muted - 0x162: 0x58d08, // sortable - 0x163: 0x51106, // usemap - 0x164: 0x1b80a, // figcaption - 0x165: 0x35706, // ondrag - 0x166: 0x26b04, // high - 0x168: 0x3c303, // src - 0x169: 0x15706, // poster - 0x16b: 0x1670e, // annotation-xml - 0x16c: 0x5f704, // step - 0x16d: 0x4, // abbr - 0x16e: 0x1b06, // dialog - 0x170: 0x1202, // li - 0x172: 0x3ed02, // mo - 0x175: 0x1d803, // for - 0x176: 0x1a803, // ins - 0x178: 0x55504, // size - 0x179: 0x43210, // onlanguagechange - 0x17a: 0x8607, // default - 0x17b: 0x1a03, // bdi - 0x17c: 0x4d30a, // onpagehide - 0x17d: 0x6907, // dirname - 0x17e: 0x21404, // type - 0x17f: 0x1f204, // form - 0x181: 0x28509, // oncanplay - 0x182: 0x6103, // dfn - 0x183: 0x46308, // tabindex - 0x186: 0x6502, // em - 0x187: 0x27404, // lang - 0x189: 0x39108, // dropzone - 0x18a: 0x4080a, // onkeypress - 0x18b: 0x23c08, // datetime - 0x18c: 0x16204, // cols - 0x18d: 0x1, // a - 0x18e: 0x4420c, // onloadeddata - 0x190: 0xa605, // audio - 0x192: 0x2e05, // tbody - 0x193: 0x22c06, // method - 0x195: 0xf404, // loop - 0x196: 0x29606, // iframe - 0x198: 0x2d504, // head - 0x19e: 0x5f108, // manifest - 0x19f: 0xb309, // autofocus - 0x1a0: 0x14904, // code - 0x1a1: 0x55906, // strong - 0x1a2: 0x30308, // multiple - 0x1a3: 0xc05, // param - 0x1a6: 0x21107, // enctype - 0x1a7: 0x5b304, // face - 0x1a8: 0xfd09, // plaintext - 0x1a9: 0x26e02, // h1 - 0x1aa: 0x59509, // onstalled - 0x1ad: 0x3d406, // script - 0x1ae: 0x2db06, // spacer - 0x1af: 0x55108, // onresize - 0x1b0: 0x4a20b, // onmouseover - 0x1b1: 0x5cc08, // onunload - 0x1b2: 0x56708, // onseeked - 0x1b4: 0x2140d, // typemustmatch - 0x1b5: 0x1cc06, // figure - 0x1b6: 0x4950a, // onmouseout - 0x1b7: 0x25e03, // pre - 0x1b8: 0x50705, // width - 0x1b9: 0x19906, // sorted - 0x1bb: 0x5704, // nobr - 0x1be: 0x5302, // tt - 0x1bf: 0x1105, // align - 0x1c0: 0x3e607, // oninput - 0x1c3: 0x41807, // onkeyup - 0x1c6: 0x1c00c, // onafterprint - 0x1c7: 0x210e, // accept-charset - 0x1c8: 0x33c06, // itemid - 0x1c9: 0x3e809, // inputmode - 0x1cb: 0x53306, // strike - 0x1cc: 0x5a903, // sub - 0x1cd: 0x10505, // track - 0x1ce: 0x38605, // start - 0x1d0: 0xd608, // basefont - 0x1d6: 0x1aa06, // source - 0x1d7: 0x18206, // legend - 0x1d8: 0x2d405, // thead - 0x1da: 0x8c05, // tfoot - 0x1dd: 0x1ec06, // object - 0x1de: 0x6e05, // media - 0x1df: 0x1670a, // annotation - 0x1e0: 0x20d0b, // formenctype - 0x1e2: 0x3d208, // noscript - 0x1e4: 0x55505, // sizes - 0x1e5: 0x1fc0c, // autocomplete - 0x1e6: 0x9504, // span - 0x1e7: 0x9808, // noframes - 0x1e8: 0x24b06, // target - 0x1e9: 0x38f06, // ondrop - 0x1ea: 0x2b306, // applet - 0x1ec: 0x5a08, // reversed - 0x1f0: 0x2a907, // isindex - 0x1f3: 0x27008, // hreflang - 0x1f5: 0x2f302, // h5 - 0x1f6: 0x4f307, // address - 0x1fa: 0x2e103, // max - 0x1fb: 0xc30b, // placeholder - 0x1fc: 0x2f608, // textarea - 0x1fe: 0x4ad09, // onmouseup - 0x1ff: 0x3800b, // ondragstart -} - -const atomText = "abbradiogrouparamalignmarkbdialogaccept-charsetbodyaccesskey" + - "genavaluealtdetailsampatternobreversedfnoembedirnamediagroup" + - "ingasyncanvasidefaultfooterowspanoframesetitleaudionblurubya" + - "utofocusandboxmplaceholderautoplaybasefontimeupdatebdoncance" + - "labelooptgrouplaintextrackindisabledivarbgsoundlowbrbigblink" + - "blockquotebuttonabortranslatecodefercolgroupostercolorcolspa" + - "nnotation-xmlcommandraggablegendcontrolsmallcoordsortedcross" + - "originsourcefieldsetfigcaptionafterprintfigurequiredforeignO" + - "bjectforeignobjectformactionautocompleteerrorformenctypemust" + - "matchallengeformmethodformnovalidatetimeterformtargetheightm" + - "lhgroupreloadhiddenhigh1hreflanghttp-equivideoncanplaythroug" + - "h2iframeimageimglyph3isindexismappletitemscopeditemtypemarqu" + - "eematheaderspacermaxlength4minlength5mtextareadonlymultiplem" + - "utedonclickoncloseamlesspellcheckedoncontextmenuitemidoncuec" + - "hangeondblclickondragendondragenterondragleaveondragoverondr" + - "agstarticleondropzonemptiedondurationchangeonendedonerroronf" + - "ocusrcdocitempropenoscriptonhashchangeoninputmodeloninvalido" + - "nkeydownloadonkeypressrclangonkeyupublicontenteditableonlang" + - "uagechangeonloadeddatalistingonloadedmetadatabindexonloadsta" + - "rtonmessageonmousedownonmousemoveonmouseoutputonmouseoveronm" + - "ouseuponmousewheelonofflineononlineonpagehidesclassectionbef" + - "oreunloaddresshapeonpageshowidth6onpausemaponplayingonpopsta" + - "teonprogresstrikeytypeonratechangeonresetonresizestrongonscr" + - "ollonseekedonseekingonselectedonshowraponsortableonstalledon" + - "storageonsubmitemrefacenteronsuspendontoggleonunloadonvolume" + - "changeonwaitingoptimumanifestepromptoptionbeforeprintstylesu" + - "mmarysupsvgsystemplate" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go b/Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go deleted file mode 100644 index fd7eb58..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/charset.go +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package charset provides common text encodings for HTML documents. -// -// The mapping from encoding labels to encodings is defined at -// https://encoding.spec.whatwg.org/. -package charset - -import ( - "bytes" - "fmt" - "io" - "mime" - "strings" - "unicode/utf8" - - "golang.org/x/net/html" - "golang.org/x/text/encoding" - "golang.org/x/text/encoding/charmap" - "golang.org/x/text/transform" -) - -// Lookup returns the encoding with the specified label, and its canonical -// name. It returns nil and the empty string if label is not one of the -// standard encodings for HTML. Matching is case-insensitive and ignores -// leading and trailing whitespace. -func Lookup(label string) (e encoding.Encoding, name string) { - label = strings.ToLower(strings.Trim(label, "\t\n\r\f ")) - enc := encodings[label] - return enc.e, enc.name -} - -// DetermineEncoding determines the encoding of an HTML document by examining -// up to the first 1024 bytes of content and the declared Content-Type. -// -// See http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#determining-the-character-encoding -func DetermineEncoding(content []byte, contentType string) (e encoding.Encoding, name string, certain bool) { - if len(content) > 1024 { - content = content[:1024] - } - - for _, b := range boms { - if bytes.HasPrefix(content, b.bom) { - e, name = Lookup(b.enc) - return e, name, true - } - } - - if _, params, err := mime.ParseMediaType(contentType); err == nil { - if cs, ok := params["charset"]; ok { - if e, name = Lookup(cs); e != nil { - return e, name, true - } - } - } - - if len(content) > 0 { - e, name = prescan(content) - if e != nil { - return e, name, false - } - } - - // Try to detect UTF-8. - // First eliminate any partial rune at the end. - for i := len(content) - 1; i >= 0 && i > len(content)-4; i-- { - b := content[i] - if b < 0x80 { - break - } - if utf8.RuneStart(b) { - content = content[:i] - break - } - } - hasHighBit := false - for _, c := range content { - if c >= 0x80 { - hasHighBit = true - break - } - } - if hasHighBit && utf8.Valid(content) { - return encoding.Nop, "utf-8", false - } - - // TODO: change default depending on user's locale? - return charmap.Windows1252, "windows-1252", false -} - -// NewReader returns an io.Reader that converts the content of r to UTF-8. -// It calls DetermineEncoding to find out what r's encoding is. -func NewReader(r io.Reader, contentType string) (io.Reader, error) { - preview := make([]byte, 1024) - n, err := io.ReadFull(r, preview) - switch { - case err == io.ErrUnexpectedEOF: - preview = preview[:n] - r = bytes.NewReader(preview) - case err != nil: - return nil, err - default: - r = io.MultiReader(bytes.NewReader(preview), r) - } - - if e, _, _ := DetermineEncoding(preview, contentType); e != encoding.Nop { - r = transform.NewReader(r, e.NewDecoder()) - } - return r, nil -} - -// NewReaderLabel returns a reader that converts from the specified charset to -// UTF-8. It uses Lookup to find the encoding that corresponds to label, and -// returns an error if Lookup returns nil. It is suitable for use as -// encoding/xml.Decoder's CharsetReader function. -func NewReaderLabel(label string, input io.Reader) (io.Reader, error) { - e, _ := Lookup(label) - if e == nil { - return nil, fmt.Errorf("unsupported charset: %q", label) - } - return transform.NewReader(input, e.NewDecoder()), nil -} - -func prescan(content []byte) (e encoding.Encoding, name string) { - z := html.NewTokenizer(bytes.NewReader(content)) - for { - switch z.Next() { - case html.ErrorToken: - return nil, "" - - case html.StartTagToken, html.SelfClosingTagToken: - tagName, hasAttr := z.TagName() - if !bytes.Equal(tagName, []byte("meta")) { - continue - } - attrList := make(map[string]bool) - gotPragma := false - - const ( - dontKnow = iota - doNeedPragma - doNotNeedPragma - ) - needPragma := dontKnow - - name = "" - e = nil - for hasAttr { - var key, val []byte - key, val, hasAttr = z.TagAttr() - ks := string(key) - if attrList[ks] { - continue - } - attrList[ks] = true - for i, c := range val { - if 'A' <= c && c <= 'Z' { - val[i] = c + 0x20 - } - } - - switch ks { - case "http-equiv": - if bytes.Equal(val, []byte("content-type")) { - gotPragma = true - } - - case "content": - if e == nil { - name = fromMetaElement(string(val)) - if name != "" { - e, name = Lookup(name) - if e != nil { - needPragma = doNeedPragma - } - } - } - - case "charset": - e, name = Lookup(string(val)) - needPragma = doNotNeedPragma - } - } - - if needPragma == dontKnow || needPragma == doNeedPragma && !gotPragma { - continue - } - - if strings.HasPrefix(name, "utf-16") { - name = "utf-8" - e = encoding.Nop - } - - if e != nil { - return e, name - } - } - } -} - -func fromMetaElement(s string) string { - for s != "" { - csLoc := strings.Index(s, "charset") - if csLoc == -1 { - return "" - } - s = s[csLoc+len("charset"):] - s = strings.TrimLeft(s, " \t\n\f\r") - if !strings.HasPrefix(s, "=") { - continue - } - s = s[1:] - s = strings.TrimLeft(s, " \t\n\f\r") - if s == "" { - return "" - } - if q := s[0]; q == '"' || q == '\'' { - s = s[1:] - closeQuote := strings.IndexRune(s, rune(q)) - if closeQuote == -1 { - return "" - } - return s[:closeQuote] - } - - end := strings.IndexAny(s, "; \t\n\f\r") - if end == -1 { - end = len(s) - } - return s[:end] - } - return "" -} - -var boms = []struct { - bom []byte - enc string -}{ - {[]byte{0xfe, 0xff}, "utf-16be"}, - {[]byte{0xff, 0xfe}, "utf-16le"}, - {[]byte{0xef, 0xbb, 0xbf}, "utf-8"}, -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/gen.go b/Godeps/_workspace/src/golang.org/x/net/html/charset/gen.go deleted file mode 100644 index 828347f..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/gen.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -// Download https://encoding.spec.whatwg.org/encodings.json and use it to -// generate table.go. - -import ( - "encoding/json" - "fmt" - "log" - "net/http" - "strings" -) - -type enc struct { - Name string - Labels []string -} - -type group struct { - Encodings []enc - Heading string -} - -const specURL = "https://encoding.spec.whatwg.org/encodings.json" - -func main() { - resp, err := http.Get(specURL) - if err != nil { - log.Fatalf("error fetching %s: %s", specURL, err) - } - if resp.StatusCode != 200 { - log.Fatalf("error fetching %s: HTTP status %s", specURL, resp.Status) - } - defer resp.Body.Close() - - var groups []group - d := json.NewDecoder(resp.Body) - err = d.Decode(&groups) - if err != nil { - log.Fatalf("error reading encodings.json: %s", err) - } - - fmt.Println("// generated by go run gen.go; DO NOT EDIT") - fmt.Println() - fmt.Println("package charset") - fmt.Println() - - fmt.Println("import (") - fmt.Println(`"golang.org/x/text/encoding"`) - for _, pkg := range []string{"charmap", "japanese", "korean", "simplifiedchinese", "traditionalchinese", "unicode"} { - fmt.Printf("\"golang.org/x/text/encoding/%s\"\n", pkg) - } - fmt.Println(")") - fmt.Println() - - fmt.Println("var encodings = map[string]struct{e encoding.Encoding; name string} {") - for _, g := range groups { - for _, e := range g.Encodings { - goName, ok := miscNames[e.Name] - if !ok { - for k, v := range prefixes { - if strings.HasPrefix(e.Name, k) { - goName = v + e.Name[len(k):] - break - } - } - if goName == "" { - log.Fatalf("unrecognized encoding name: %s", e.Name) - } - } - - for _, label := range e.Labels { - fmt.Printf("%q: {%s, %q},\n", label, goName, e.Name) - } - } - } - fmt.Println("}") -} - -var prefixes = map[string]string{ - "iso-8859-": "charmap.ISO8859_", - "windows-": "charmap.Windows", -} - -var miscNames = map[string]string{ - "utf-8": "encoding.Nop", - "ibm866": "charmap.CodePage866", - "iso-8859-8-i": "charmap.ISO8859_8", - "koi8-r": "charmap.KOI8R", - "koi8-u": "charmap.KOI8U", - "macintosh": "charmap.Macintosh", - "x-mac-cyrillic": "charmap.MacintoshCyrillic", - "gbk": "simplifiedchinese.GBK", - "gb18030": "simplifiedchinese.GB18030", - "hz-gb-2312": "simplifiedchinese.HZGB2312", - "big5": "traditionalchinese.Big5", - "euc-jp": "japanese.EUCJP", - "iso-2022-jp": "japanese.ISO2022JP", - "shift_jis": "japanese.ShiftJIS", - "euc-kr": "korean.EUCKR", - "replacement": "encoding.Replacement", - "utf-16be": "unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM)", - "utf-16le": "unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)", - "x-user-defined": "charmap.XUserDefined", -} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/charset/table.go b/Godeps/_workspace/src/golang.org/x/net/html/charset/table.go deleted file mode 100644 index aa0d948..0000000 --- a/Godeps/_workspace/src/golang.org/x/net/html/charset/table.go +++ /dev/null @@ -1,235 +0,0 @@ -// generated by go run gen.go; DO NOT EDIT - -package charset - -import ( - "golang.org/x/text/encoding" - "golang.org/x/text/encoding/charmap" - "golang.org/x/text/encoding/japanese" - "golang.org/x/text/encoding/korean" - "golang.org/x/text/encoding/simplifiedchinese" - "golang.org/x/text/encoding/traditionalchinese" - "golang.org/x/text/encoding/unicode" -) - -var encodings = map[string]struct { - e encoding.Encoding - name string -}{ - "unicode-1-1-utf-8": {encoding.Nop, "utf-8"}, - "utf-8": {encoding.Nop, "utf-8"}, - "utf8": {encoding.Nop, "utf-8"}, - "866": {charmap.CodePage866, "ibm866"}, - "cp866": {charmap.CodePage866, "ibm866"}, - "csibm866": {charmap.CodePage866, "ibm866"}, - "ibm866": {charmap.CodePage866, "ibm866"}, - "csisolatin2": {charmap.ISO8859_2, "iso-8859-2"}, - "iso-8859-2": {charmap.ISO8859_2, "iso-8859-2"}, - "iso-ir-101": {charmap.ISO8859_2, "iso-8859-2"}, - "iso8859-2": {charmap.ISO8859_2, "iso-8859-2"}, - "iso88592": {charmap.ISO8859_2, "iso-8859-2"}, - "iso_8859-2": {charmap.ISO8859_2, "iso-8859-2"}, - "iso_8859-2:1987": {charmap.ISO8859_2, "iso-8859-2"}, - "l2": {charmap.ISO8859_2, "iso-8859-2"}, - "latin2": {charmap.ISO8859_2, "iso-8859-2"}, - "csisolatin3": {charmap.ISO8859_3, "iso-8859-3"}, - "iso-8859-3": {charmap.ISO8859_3, "iso-8859-3"}, - "iso-ir-109": {charmap.ISO8859_3, "iso-8859-3"}, - "iso8859-3": {charmap.ISO8859_3, "iso-8859-3"}, - "iso88593": {charmap.ISO8859_3, "iso-8859-3"}, - "iso_8859-3": {charmap.ISO8859_3, "iso-8859-3"}, - "iso_8859-3:1988": {charmap.ISO8859_3, "iso-8859-3"}, - "l3": {charmap.ISO8859_3, "iso-8859-3"}, - "latin3": {charmap.ISO8859_3, "iso-8859-3"}, - "csisolatin4": {charmap.ISO8859_4, "iso-8859-4"}, - "iso-8859-4": {charmap.ISO8859_4, "iso-8859-4"}, - "iso-ir-110": {charmap.ISO8859_4, "iso-8859-4"}, - "iso8859-4": {charmap.ISO8859_4, "iso-8859-4"}, - "iso88594": {charmap.ISO8859_4, "iso-8859-4"}, - "iso_8859-4": {charmap.ISO8859_4, "iso-8859-4"}, - "iso_8859-4:1988": {charmap.ISO8859_4, "iso-8859-4"}, - "l4": {charmap.ISO8859_4, "iso-8859-4"}, - "latin4": {charmap.ISO8859_4, "iso-8859-4"}, - "csisolatincyrillic": {charmap.ISO8859_5, "iso-8859-5"}, - "cyrillic": {charmap.ISO8859_5, "iso-8859-5"}, - "iso-8859-5": {charmap.ISO8859_5, "iso-8859-5"}, - "iso-ir-144": {charmap.ISO8859_5, "iso-8859-5"}, - "iso8859-5": {charmap.ISO8859_5, "iso-8859-5"}, - "iso88595": {charmap.ISO8859_5, "iso-8859-5"}, - "iso_8859-5": {charmap.ISO8859_5, "iso-8859-5"}, - "iso_8859-5:1988": {charmap.ISO8859_5, "iso-8859-5"}, - "arabic": {charmap.ISO8859_6, "iso-8859-6"}, - "asmo-708": {charmap.ISO8859_6, "iso-8859-6"}, - "csiso88596e": {charmap.ISO8859_6, "iso-8859-6"}, - "csiso88596i": {charmap.ISO8859_6, "iso-8859-6"}, - "csisolatinarabic": {charmap.ISO8859_6, "iso-8859-6"}, - "ecma-114": {charmap.ISO8859_6, "iso-8859-6"}, - "iso-8859-6": {charmap.ISO8859_6, "iso-8859-6"}, - "iso-8859-6-e": {charmap.ISO8859_6, "iso-8859-6"}, - "iso-8859-6-i": {charmap.ISO8859_6, "iso-8859-6"}, - "iso-ir-127": {charmap.ISO8859_6, "iso-8859-6"}, - "iso8859-6": {charmap.ISO8859_6, "iso-8859-6"}, - "iso88596": {charmap.ISO8859_6, "iso-8859-6"}, - "iso_8859-6": {charmap.ISO8859_6, "iso-8859-6"}, - "iso_8859-6:1987": {charmap.ISO8859_6, "iso-8859-6"}, - "csisolatingreek": {charmap.ISO8859_7, "iso-8859-7"}, - "ecma-118": {charmap.ISO8859_7, "iso-8859-7"}, - "elot_928": {charmap.ISO8859_7, "iso-8859-7"}, - "greek": {charmap.ISO8859_7, "iso-8859-7"}, - "greek8": {charmap.ISO8859_7, "iso-8859-7"}, - "iso-8859-7": {charmap.ISO8859_7, "iso-8859-7"}, - "iso-ir-126": {charmap.ISO8859_7, "iso-8859-7"}, - "iso8859-7": {charmap.ISO8859_7, "iso-8859-7"}, - "iso88597": {charmap.ISO8859_7, "iso-8859-7"}, - "iso_8859-7": {charmap.ISO8859_7, "iso-8859-7"}, - "iso_8859-7:1987": {charmap.ISO8859_7, "iso-8859-7"}, - "sun_eu_greek": {charmap.ISO8859_7, "iso-8859-7"}, - "csiso88598e": {charmap.ISO8859_8, "iso-8859-8"}, - "csisolatinhebrew": {charmap.ISO8859_8, "iso-8859-8"}, - "hebrew": {charmap.ISO8859_8, "iso-8859-8"}, - "iso-8859-8": {charmap.ISO8859_8, "iso-8859-8"}, - "iso-8859-8-e": {charmap.ISO8859_8, "iso-8859-8"}, - "iso-ir-138": {charmap.ISO8859_8, "iso-8859-8"}, - "iso8859-8": {charmap.ISO8859_8, "iso-8859-8"}, - "iso88598": {charmap.ISO8859_8, "iso-8859-8"}, - "iso_8859-8": {charmap.ISO8859_8, "iso-8859-8"}, - "iso_8859-8:1988": {charmap.ISO8859_8, "iso-8859-8"}, - "visual": {charmap.ISO8859_8, "iso-8859-8"}, - "csiso88598i": {charmap.ISO8859_8, "iso-8859-8-i"}, - "iso-8859-8-i": {charmap.ISO8859_8, "iso-8859-8-i"}, - "logical": {charmap.ISO8859_8, "iso-8859-8-i"}, - "csisolatin6": {charmap.ISO8859_10, "iso-8859-10"}, - "iso-8859-10": {charmap.ISO8859_10, "iso-8859-10"}, - "iso-ir-157": {charmap.ISO8859_10, "iso-8859-10"}, - "iso8859-10": {charmap.ISO8859_10, "iso-8859-10"}, - "iso885910": {charmap.ISO8859_10, "iso-8859-10"}, - "l6": {charmap.ISO8859_10, "iso-8859-10"}, - "latin6": {charmap.ISO8859_10, "iso-8859-10"}, - "iso-8859-13": {charmap.ISO8859_13, "iso-8859-13"}, - "iso8859-13": {charmap.ISO8859_13, "iso-8859-13"}, - "iso885913": {charmap.ISO8859_13, "iso-8859-13"}, - "iso-8859-14": {charmap.ISO8859_14, "iso-8859-14"}, - "iso8859-14": {charmap.ISO8859_14, "iso-8859-14"}, - "iso885914": {charmap.ISO8859_14, "iso-8859-14"}, - "csisolatin9": {charmap.ISO8859_15, "iso-8859-15"}, - "iso-8859-15": {charmap.ISO8859_15, "iso-8859-15"}, - "iso8859-15": {charmap.ISO8859_15, "iso-8859-15"}, - "iso885915": {charmap.ISO8859_15, "iso-8859-15"}, - "iso_8859-15": {charmap.ISO8859_15, "iso-8859-15"}, - "l9": {charmap.ISO8859_15, "iso-8859-15"}, - "iso-8859-16": {charmap.ISO8859_16, "iso-8859-16"}, - "cskoi8r": {charmap.KOI8R, "koi8-r"}, - "koi": {charmap.KOI8R, "koi8-r"}, - "koi8": {charmap.KOI8R, "koi8-r"}, - "koi8-r": {charmap.KOI8R, "koi8-r"}, - "koi8_r": {charmap.KOI8R, "koi8-r"}, - "koi8-u": {charmap.KOI8U, "koi8-u"}, - "csmacintosh": {charmap.Macintosh, "macintosh"}, - "mac": {charmap.Macintosh, "macintosh"}, - "macintosh": {charmap.Macintosh, "macintosh"}, - "x-mac-roman": {charmap.Macintosh, "macintosh"}, - "dos-874": {charmap.Windows874, "windows-874"}, - "iso-8859-11": {charmap.Windows874, "windows-874"}, - "iso8859-11": {charmap.Windows874, "windows-874"}, - "iso885911": {charmap.Windows874, "windows-874"}, - "tis-620": {charmap.Windows874, "windows-874"}, - "windows-874": {charmap.Windows874, "windows-874"}, - "cp1250": {charmap.Windows1250, "windows-1250"}, - "windows-1250": {charmap.Windows1250, "windows-1250"}, - "x-cp1250": {charmap.Windows1250, "windows-1250"}, - "cp1251": {charmap.Windows1251, "windows-1251"}, - "windows-1251": {charmap.Windows1251, "windows-1251"}, - "x-cp1251": {charmap.Windows1251, "windows-1251"}, - "ansi_x3.4-1968": {charmap.Windows1252, "windows-1252"}, - "ascii": {charmap.Windows1252, "windows-1252"}, - "cp1252": {charmap.Windows1252, "windows-1252"}, - "cp819": {charmap.Windows1252, "windows-1252"}, - "csisolatin1": {charmap.Windows1252, "windows-1252"}, - "ibm819": {charmap.Windows1252, "windows-1252"}, - "iso-8859-1": {charmap.Windows1252, "windows-1252"}, - "iso-ir-100": {charmap.Windows1252, "windows-1252"}, - "iso8859-1": {charmap.Windows1252, "windows-1252"}, - "iso88591": {charmap.Windows1252, "windows-1252"}, - "iso_8859-1": {charmap.Windows1252, "windows-1252"}, - "iso_8859-1:1987": {charmap.Windows1252, "windows-1252"}, - "l1": {charmap.Windows1252, "windows-1252"}, - "latin1": {charmap.Windows1252, "windows-1252"}, - "us-ascii": {charmap.Windows1252, "windows-1252"}, - "windows-1252": {charmap.Windows1252, "windows-1252"}, - "x-cp1252": {charmap.Windows1252, "windows-1252"}, - "cp1253": {charmap.Windows1253, "windows-1253"}, - "windows-1253": {charmap.Windows1253, "windows-1253"}, - "x-cp1253": {charmap.Windows1253, "windows-1253"}, - "cp1254": {charmap.Windows1254, "windows-1254"}, - "csisolatin5": {charmap.Windows1254, "windows-1254"}, - "iso-8859-9": {charmap.Windows1254, "windows-1254"}, - "iso-ir-148": {charmap.Windows1254, "windows-1254"}, - "iso8859-9": {charmap.Windows1254, "windows-1254"}, - "iso88599": {charmap.Windows1254, "windows-1254"}, - "iso_8859-9": {charmap.Windows1254, "windows-1254"}, - "iso_8859-9:1989": {charmap.Windows1254, "windows-1254"}, - "l5": {charmap.Windows1254, "windows-1254"}, - "latin5": {charmap.Windows1254, "windows-1254"}, - "windows-1254": {charmap.Windows1254, "windows-1254"}, - "x-cp1254": {charmap.Windows1254, "windows-1254"}, - "cp1255": {charmap.Windows1255, "windows-1255"}, - "windows-1255": {charmap.Windows1255, "windows-1255"}, - "x-cp1255": {charmap.Windows1255, "windows-1255"}, - "cp1256": {charmap.Windows1256, "windows-1256"}, - "windows-1256": {charmap.Windows1256, "windows-1256"}, - "x-cp1256": {charmap.Windows1256, "windows-1256"}, - "cp1257": {charmap.Windows1257, "windows-1257"}, - "windows-1257": {charmap.Windows1257, "windows-1257"}, - "x-cp1257": {charmap.Windows1257, "windows-1257"}, - "cp1258": {charmap.Windows1258, "windows-1258"}, - "windows-1258": {charmap.Windows1258, "windows-1258"}, - "x-cp1258": {charmap.Windows1258, "windows-1258"}, - "x-mac-cyrillic": {charmap.MacintoshCyrillic, "x-mac-cyrillic"}, - "x-mac-ukrainian": {charmap.MacintoshCyrillic, "x-mac-cyrillic"}, - "chinese": {simplifiedchinese.GBK, "gbk"}, - "csgb2312": {simplifiedchinese.GBK, "gbk"}, - "csiso58gb231280": {simplifiedchinese.GBK, "gbk"}, - "gb2312": {simplifiedchinese.GBK, "gbk"}, - "gb_2312": {simplifiedchinese.GBK, "gbk"}, - "gb_2312-80": {simplifiedchinese.GBK, "gbk"}, - "gbk": {simplifiedchinese.GBK, "gbk"}, - "iso-ir-58": {simplifiedchinese.GBK, "gbk"}, - "x-gbk": {simplifiedchinese.GBK, "gbk"}, - "gb18030": {simplifiedchinese.GB18030, "gb18030"}, - "hz-gb-2312": {simplifiedchinese.HZGB2312, "hz-gb-2312"}, - "big5": {traditionalchinese.Big5, "big5"}, - "big5-hkscs": {traditionalchinese.Big5, "big5"}, - "cn-big5": {traditionalchinese.Big5, "big5"}, - "csbig5": {traditionalchinese.Big5, "big5"}, - "x-x-big5": {traditionalchinese.Big5, "big5"}, - "cseucpkdfmtjapanese": {japanese.EUCJP, "euc-jp"}, - "euc-jp": {japanese.EUCJP, "euc-jp"}, - "x-euc-jp": {japanese.EUCJP, "euc-jp"}, - "csiso2022jp": {japanese.ISO2022JP, "iso-2022-jp"}, - "iso-2022-jp": {japanese.ISO2022JP, "iso-2022-jp"}, - "csshiftjis": {japanese.ShiftJIS, "shift_jis"}, - "ms_kanji": {japanese.ShiftJIS, "shift_jis"}, - "shift-jis": {japanese.ShiftJIS, "shift_jis"}, - "shift_jis": {japanese.ShiftJIS, "shift_jis"}, - "sjis": {japanese.ShiftJIS, "shift_jis"}, - "windows-31j": {japanese.ShiftJIS, "shift_jis"}, - "x-sjis": {japanese.ShiftJIS, "shift_jis"}, - "cseuckr": {korean.EUCKR, "euc-kr"}, - "csksc56011987": {korean.EUCKR, "euc-kr"}, - "euc-kr": {korean.EUCKR, "euc-kr"}, - "iso-ir-149": {korean.EUCKR, "euc-kr"}, - "korean": {korean.EUCKR, "euc-kr"}, - "ks_c_5601-1987": {korean.EUCKR, "euc-kr"}, - "ks_c_5601-1989": {korean.EUCKR, "euc-kr"}, - "ksc5601": {korean.EUCKR, "euc-kr"}, - "ksc_5601": {korean.EUCKR, "euc-kr"}, - "windows-949": {korean.EUCKR, "euc-kr"}, - "csiso2022kr": {encoding.Replacement, "replacement"}, - "iso-2022-kr": {encoding.Replacement, "replacement"}, - "iso-2022-cn": {encoding.Replacement, "replacement"}, - "iso-2022-cn-ext": {encoding.Replacement, "replacement"}, - "utf-16be": {unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM), "utf-16be"}, - "utf-16": {unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), "utf-16le"}, - "utf-16le": {unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), "utf-16le"}, - "x-user-defined": {charmap.XUserDefined, "x-user-defined"}, -} diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE deleted file mode 100644 index 8bff971..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/bitbucket.org/bertimus9/systemstat/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Phillip Bond - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE deleted file mode 100644 index e454a52..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/abbot/go-http-auth/LICENSE +++ /dev/null @@ -1,178 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE deleted file mode 100644 index 08b5e20..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Jeremy Saenz - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE deleted file mode 100644 index df83a9c..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/dgrijalva/jwt-go/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2012 Dave Grijalva - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE deleted file mode 100644 index dc91298..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/NOTICE +++ /dev/null @@ -1,16 +0,0 @@ -libcontainer -Copyright 2012-2015 Docker, Inc. - -This product includes software developed at Docker, Inc. (http://www.docker.com). - -The following is courtesy of our legal counsel: - - -Use and transfer of Docker may be subject to certain restrictions by the -United States and other governments. -It is your responsibility to ensure that your use and/or transfer does not -violate applicable laws. - -For more information, please see http://www.bis.doc.gov - -See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE deleted file mode 100644 index 5515ccf..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/codegangsta/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2013 Jeremy Saenz -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/coreos/go-systemd/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE deleted file mode 100644 index 80dd96d..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/libcontainer/vendor/src/github.com/syndtr/gocapability/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright 2013 Suryandaru Triandana <syndtr@gmail.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE deleted file mode 100644 index 2744858..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/docker/spdystream/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014 Docker, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE deleted file mode 100644 index 5782c72..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/elazarl/go-bindata-assetfs/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2014, Elazar Leibovich -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE deleted file mode 100644 index ece7ec6..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/emicklei/go-restful/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2012,2013 Ernest Micklei - -MIT License - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE deleted file mode 100644 index 0eb9b72..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/evanphx/json-patch/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2014, Evan Phoenix -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the Evan Phoenix nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE deleted file mode 100644 index 4e11de1..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015, go-dockerclient authors -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb4..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE deleted file mode 100644 index ac74d8f..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/pkg/mflag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2015 The Docker & Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE deleted file mode 100644 index 7805d36..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE +++ /dev/null @@ -1,50 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Sam Ghods - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE deleted file mode 100644 index 06b252b..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/godbus/dbus/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE deleted file mode 100644 index 37ec93a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/golang/glog/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, -publicly display, publicly perform, sublicense, and distribute the Work and such -Derivative Works in Source or Object form. - -3. Grant of Patent License. - -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was -submitted. If You institute patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Work or a -Contribution incorporated within the Work constitutes direct or contributory -patent infringement, then any patent licenses granted to You under this License -for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. - -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source form -of the Work, excluding those notices that do not pertain to any part of the -Derivative Works; and -If the Work includes a "NOTICE" text file as part of its distribution, then any -Derivative Works that You distribute must include a readable copy of the -attribution notices contained within such NOTICE file, excluding those notices -that do not pertain to any part of the Derivative Works, in at least one of the -following places: within a NOTICE text file distributed as part of the -Derivative Works; within the Source form or documentation, if provided along -with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents of -the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works that -You distribute, alongside or as an addendum to the NOTICE text from the Work, -provided that such additional attribution notices cannot be construed as -modifying the License. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms and -conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms of -any separate license agreement you may have executed with Licensor regarding -such Contributions. - -6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for -reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides the -Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, -including, without limitation, any warranties or conditions of TITLE, -NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are -solely responsible for determining the appropriateness of using or -redistributing the Work and assume any risks associated with Your exercise of -permissions under this License. - -8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor be -liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License or -out of the use or inability to use the Work (including but not limited to -damages for loss of goodwill, work stoppage, computer failure or malfunction, or -any and all other commercial damages or losses), even if such Contributor has -been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose to -offer, and charge a fee for, acceptance of support, warranty, indemnity, or -other liability obligations and/or rights consistent with this License. However, -in accepting such obligations, You may act only on Your own behalf and on Your -sole responsibility, not on behalf of any other Contributor, and only if You -agree to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work - -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own -identifying information. (Don't include the brackets!) The text should be -enclosed in the appropriate comment syntax for the file format. We also -recommend that a file or class name and description of purpose be included on -the same "printed page" as the copyright notice for easier identification within -third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/context/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE deleted file mode 100644 index 0e5fb87..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 Rodrigo Moraes. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE deleted file mode 100644 index 6866802..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2013 Dario Castañé. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml deleted file mode 100644 index 62fdb61..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/imdario/mergo/testdata/license.yml +++ /dev/null @@ -1,3 +0,0 @@ -import: ../../../../fossene/db/schema/thing.yml -fields: - site: string diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE deleted file mode 100644 index 5f0d1fb..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2014 Alan Shreve - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE deleted file mode 100644 index 5c304d1..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE deleted file mode 100644 index ade9307..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/juju/ratelimit/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -All files in this repository are licensed as follows. If you contribute -to this repository, it is assumed that you license your contribution -under the same license unless you state otherwise. - -All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kardianos/osext/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License deleted file mode 100644 index 6b7558b..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/kr/pty/License +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2011 Keith Rarick - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, -sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall -be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT deleted file mode 100644 index 35702b1..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/COPYRIGHT +++ /dev/null @@ -1,9 +0,0 @@ -Copyright 2009 The Go Authors. All rights reserved. Use of this source code -is governed by a BSD-style license that can be found in the LICENSE file. -Extensions of the original work are copyright (c) 2011 Miek Gieben - -Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is -governed by a BSD-style license that can be found in the LICENSE file. - -Copyright 2014 CloudFlare. All rights reserved. Use of this source code is -governed by a BSD-style license that can be found in the LICENSE file. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE deleted file mode 100644 index 5763fa7..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/miekg/dns/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Extensions of the original work are copyright (c) 2011 Miek Gieben - -As this is fork of the official Go code the same license applies: - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE deleted file mode 100644 index f9c841a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/mitchellh/mapstructure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/ginkgo/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE deleted file mode 100644 index 9415ee7..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/onsi/gomega/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE deleted file mode 100644 index 5dc6826..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/pborman/uuid/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009,2014 Google Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE deleted file mode 100644 index fbbbc9e..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/rackspace/gophercloud/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -Copyright 2012-2013 Rackspace, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - ------- - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt deleted file mode 100644 index 2885af3..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/russross/blackfriday/LICENSE.txt +++ /dev/null @@ -1,29 +0,0 @@ -Blackfriday is distributed under the Simplified BSD License: - -> Copyright © 2011 Russ Ross -> All rights reserved. -> -> Redistribution and use in source and binary forms, with or without -> modification, are permitted provided that the following conditions -> are met: -> -> 1. Redistributions of source code must retain the above copyright -> notice, this list of conditions and the following disclaimer. -> -> 2. Redistributions in binary form must reproduce the above -> copyright notice, this list of conditions and the following -> disclaimer in the documentation and/or other materials provided with -> the distribution. -> -> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -> "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -> LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -> FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -> COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -> INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -> BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -> LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -> LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -> ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -> POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE deleted file mode 100644 index b0a9e76..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/scalingdata/gcfg/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of gcfg's source code have been derived from Go, and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt deleted file mode 100644 index 298f0e2..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt +++ /dev/null @@ -1,174 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE deleted file mode 100644 index 968b453..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/vaughan0/go-ini/LICENSE +++ /dev/null @@ -1,14 +0,0 @@ -Copyright (c) 2013 Vaughan Newton - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit -persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE deleted file mode 100644 index 145d387..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/xyproto/simpleredis/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Alexander F Rødseth - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE deleted file mode 100644 index d02f24f..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/golang.org/x/oauth2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2009 The oauth2 Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE deleted file mode 100644 index de9c88c..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/google.golang.org/api/googleapi/internal/uritemplates/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE deleted file mode 100644 index c3d4cc3..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/natefinch/lumberjack.v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Nate Finch - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE deleted file mode 100644 index d645695..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright b/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright deleted file mode 100644 index a0b409a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes-master/copyright +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright b/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright deleted file mode 100644 index a0b409a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/cluster/juju/charms/trusty/kubernetes/copyright +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Google Inc. All rights reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular b/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular deleted file mode 100644 index 020f87a..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/docs/user-guide/update-demo/local/LICENSE.angular +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2010-2014 Google, Inc. http://angularjs.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/json/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/forked/reflect/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE deleted file mode 100644 index 7448756..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS deleted file mode 100644 index 7330990..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/golang/PATENTS +++ /dev/null @@ -1,22 +0,0 @@ -Additional IP Rights Grant (Patents) - -"This implementation" means the copyrightable works distributed by -Google as part of the Go project. - -Google hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) -patent license to make, have made, use, offer to sell, sell, import, -transfer and otherwise run, modify and propagate the contents of this -implementation of Go, where such license applies only to those patent -claims, both currently owned or controlled by Google and acquired in -the future, licensable by Google that are necessarily infringed by this -implementation of Go. This grant does not include claims that would be -infringed only as a consequence of further modification of this -implementation. If you or your agent or exclusive licensee institute or -order or agree to the institution of patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging -that this implementation of Go or any code incorporated within this -implementation of Go constitutes direct or contributory patent -infringement, or inducement of patent infringement, then any patent -rights granted to you under this License for this implementation of Go -shall terminate as of the date such litigation is filed. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING deleted file mode 100644 index c6b097c..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/htpasswd/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (C) 2003-2013 Edgewall Software -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - 3. The name of the author may not be used to endorse or promote - products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE deleted file mode 100644 index 2b5e5ff..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/pause/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The Expat/MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE b/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE deleted file mode 100644 index 9f93e06..0000000 --- a/Godeps/_workspace/src/k8s.io/kubernetes/third_party/swagger-ui/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -Copyright 2014 Reverb Technologies, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at [apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE deleted file mode 100644 index efa1aa1..0000000 --- a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE +++ /dev/null @@ -1,57 +0,0 @@ -Copyright (c) 2012 Péter Surányi. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ----------------------------------------------------------------------- -Portions of inf.Dec's source code have been derived from Go and are -covered by the following license: ----------------------------------------------------------------------- - -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go similarity index 100% rename from Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go new file mode 100644 index 0000000..46c329e --- /dev/null +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go @@ -0,0 +1,203 @@ +package semver + +import ( + "bytes" + "errors" + "fmt" + "strconv" + "strings" +) + +type Version struct { + Major int64 + Minor int64 + Patch int64 + PreRelease PreRelease + Metadata string +} + +type PreRelease string + +func splitOff(input *string, delim string) (val string) { + parts := strings.SplitN(*input, delim, 2) + + if len(parts) == 2 { + *input = parts[0] + val = parts[1] + } + + return val +} + +func NewVersion(version string) (*Version, error) { + v := Version{} + + dotParts := strings.SplitN(version, ".", 3) + + if len(dotParts) != 3 { + return nil, errors.New(fmt.Sprintf("%s is not in dotted-tri format", version)) + } + + v.Metadata = splitOff(&dotParts[2], "+") + v.PreRelease = PreRelease(splitOff(&dotParts[2], "-")) + + parsed := make([]int64, 3, 3) + + for i, v := range dotParts[:3] { + val, err := strconv.ParseInt(v, 10, 64) + parsed[i] = val + if err != nil { + return nil, err + } + } + + v.Major = parsed[0] + v.Minor = parsed[1] + v.Patch = parsed[2] + + return &v, nil +} + +func (v *Version) String() string { + var buffer bytes.Buffer + + base := fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) + buffer.WriteString(base) + + if v.PreRelease != "" { + buffer.WriteString(fmt.Sprintf("-%s", v.PreRelease)) + } + + if v.Metadata != "" { + buffer.WriteString(fmt.Sprintf("+%s", v.Metadata)) + } + + return buffer.String() +} + +func (v *Version) LessThan(versionB Version) bool { + versionA := *v + cmp := recursiveCompare(versionA.Slice(), versionB.Slice()) + + if cmp == 0 { + cmp = preReleaseCompare(versionA, versionB) + } + + if cmp == -1 { + return true + } + + return false +} + +/* Slice converts the comparable parts of the semver into a slice of strings */ +func (v *Version) Slice() []int64 { + return []int64{v.Major, v.Minor, v.Patch} +} + +func (p *PreRelease) Slice() []string { + preRelease := string(*p) + return strings.Split(preRelease, ".") +} + +func preReleaseCompare(versionA Version, versionB Version) int { + a := versionA.PreRelease + b := versionB.PreRelease + + /* Handle the case where if two versions are otherwise equal it is the + * one without a PreRelease that is greater */ + if len(a) == 0 && (len(b) > 0) { + return 1 + } else if len(b) == 0 && (len(a) > 0) { + return -1 + } + + // If there is a prelease, check and compare each part. + return recursivePreReleaseCompare(a.Slice(), b.Slice()) +} + +func recursiveCompare(versionA []int64, versionB []int64) int { + if len(versionA) == 0 { + return 0 + } + + a := versionA[0] + b := versionB[0] + + if a > b { + return 1 + } else if a < b { + return -1 + } + + return recursiveCompare(versionA[1:], versionB[1:]) +} + +func recursivePreReleaseCompare(versionA []string, versionB []string) int { + // Handle slice length disparity. + if len(versionA) == 0 { + // Nothing to compare too, so we return 0 + return 0 + } else if len(versionB) == 0 { + // We're longer than versionB so return 1. + return 1 + } + + a := versionA[0] + b := versionB[0] + + aInt := false + bInt := false + + aI, err := strconv.Atoi(versionA[0]) + if err == nil { + aInt = true + } + + bI, err := strconv.Atoi(versionB[0]) + if err == nil { + bInt = true + } + + // Handle Integer Comparison + if aInt && bInt { + if aI > bI { + return 1 + } else if aI < bI { + return -1 + } + } + + // Handle String Comparison + if a > b { + return 1 + } else if a < b { + return -1 + } + + return recursivePreReleaseCompare(versionA[1:], versionB[1:]) +} + +// BumpMajor increments the Major field by 1 and resets all other fields to their default values +func (v *Version) BumpMajor() { + v.Major += 1 + v.Minor = 0 + v.Patch = 0 + v.PreRelease = PreRelease("") + v.Metadata = "" +} + +// BumpMinor increments the Minor field by 1 and resets all other fields to their default values +func (v *Version) BumpMinor() { + v.Minor += 1 + v.Patch = 0 + v.PreRelease = PreRelease("") + v.Metadata = "" +} + +// BumpPatch increments the Patch field by 1 and resets all other fields to their default values +func (v *Version) BumpPatch() { + v.Patch += 1 + v.PreRelease = PreRelease("") + v.Metadata = "" +} diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go new file mode 100644 index 0000000..8620300 --- /dev/null +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go @@ -0,0 +1,24 @@ +package semver + +import ( + "sort" +) + +type Versions []*Version + +func (s Versions) Len() int { + return len(s) +} + +func (s Versions) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} + +func (s Versions) Less(i, j int) bool { + return s[i].LessThan(*s[j]) +} + +// Sort sorts the given slice of Version +func Sort(versions []*Version) { + sort.Sort(Versions(versions)) +} diff --git a/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE rename to vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md new file mode 100644 index 0000000..a12d94d --- /dev/null +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md @@ -0,0 +1,155 @@ +## Description + +pflag is a drop-in replacement for Go's flag package, implementing +POSIX/GNU-style --flags. + +pflag is compatible with the [GNU extensions to the POSIX recommendations +for command-line options][1]. For a more precise description, see the +"Command-line flag syntax" section below. + +[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + +pflag is available under the same style of BSD license as the Go language, +which can be found in the LICENSE file. + +## Installation + +pflag is available using the standard `go get` command. + +Install by running: + + go get github.com/ogier/pflag + +Run tests by running: + + go test github.com/ogier/pflag + +## Usage + +pflag is a drop-in replacement of Go's native flag package. If you import +pflag under the name "flag" then all code should continue to function +with no changes. + +``` go +import flag "github.com/ogier/pflag" +``` + +There is one exception to this: if you directly instantiate the Flag struct +there is one more field "Shorthand" that you will need to set. +Most code never instantiates this struct directly, and instead uses +functions such as String(), BoolVar(), and Var(), and is therefore +unaffected. + +Define flags using flag.String(), Bool(), Int(), etc. + +This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + +``` go +var ip *int = flag.Int("flagname", 1234, "help message for flagname") +``` + +If you like, you can bind the flag to a variable using the Var() functions. + +``` go +var flagvar int +func init() { + flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") +} +``` + +Or you can create custom flags that satisfy the Value interface (with +pointer receivers) and couple them to flag parsing by + +``` go +flag.Var(&flagVal, "name", "help message for flagname") +``` + +For such flags, the default value is just the initial value of the variable. + +After all flags are defined, call + +``` go +flag.Parse() +``` + +to parse the command line into the defined flags. + +Flags may then be used directly. If you're using the flags themselves, +they are all pointers; if you bind to variables, they're values. + +``` go +fmt.Println("ip has value ", *ip) +fmt.Println("flagvar has value ", flagvar) +``` + +After parsing, the arguments after the flag are available as the +slice flag.Args() or individually as flag.Arg(i). +The arguments are indexed from 0 through flag.NArg()-1. + +The pflag package also defines some new functions that are not in flag, +that give one-letter shorthands for flags. You can use these by appending +'P' to the name of any function that defines a flag. + +``` go +var ip = flag.IntP("flagname", "f", 1234, "help message") +var flagvar bool +func init() { + flag.BoolVarP("boolname", "b", true, "help message") +} +flag.VarP(&flagVar, "varname", "v", 1234, "help message") +``` + +Shorthand letters can be used with single dashes on the command line. +Boolean shorthand flags can be combined with other shorthand flags. + +The default set of command-line flags is controlled by +top-level functions. The FlagSet type allows one to define +independent sets of flags, such as to implement subcommands +in a command-line interface. The methods of FlagSet are +analogous to the top-level functions for the command-line +flag set. + +## Command line flag syntax + +``` +--flag // boolean flags only +--flag=x +``` + +Unlike the flag package, a single dash before an option means something +different than a double dash. Single dashes signify a series of shorthand +letters for flags. All but the last shorthand letter must be boolean flags. + +``` +// boolean flags +-f +-abc + +// non-boolean flags +-n 1234 +-Ifile + +// mixed +-abcs "hello" +-abcn1234 +``` + +Flag parsing stops after the terminator "--". Unlike the flag package, +flags can be interspersed with arguments anywhere on the command line +before this terminator. + +Integer flags accept 1234, 0664, 0x1234 and may be negative. +Boolean flags (in their long form) accept 1, 0, t, f, true, false, +TRUE, FALSE, True, False. +Duration flags accept any input valid for time.ParseDuration. + +## More info + +You can see the full reference documentation of the pflag package +[at godoc.org][3], or through go's standard documentation system by +running `godoc -http=:6060` and browsing to +[http://localhost:6060/pkg/github.com/ogier/pflag][2] after +installation. + +[2]: http://localhost:6060/pkg/github.com/ogier/pflag +[3]: http://godoc.org/github.com/ogier/pflag diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go new file mode 100644 index 0000000..b741e7b --- /dev/null +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go @@ -0,0 +1,1133 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* + pflag is a drop-in replacement for Go's flag package, implementing + POSIX/GNU-style --flags. + + pflag is compatible with the GNU extensions to the POSIX recommendations + for command-line options. See + http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + + Usage: + + pflag is a drop-in replacement of Go's native flag package. If you import + pflag under the name "flag" then all code should continue to function + with no changes. + + import flag "github.com/ogier/pflag" + + There is one exception to this: if you directly instantiate the Flag struct + there is one more field "Shorthand" that you will need to set. + Most code never instantiates this struct directly, and instead uses + functions such as String(), BoolVar(), and Var(), and is therefore + unaffected. + + Define flags using flag.String(), Bool(), Int(), etc. + + This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + var ip = flag.Int("flagname", 1234, "help message for flagname") + If you like, you can bind the flag to a variable using the Var() functions. + var flagvar int + func init() { + flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") + } + Or you can create custom flags that satisfy the Value interface (with + pointer receivers) and couple them to flag parsing by + flag.Var(&flagVal, "name", "help message for flagname") + For such flags, the default value is just the initial value of the variable. + + After all flags are defined, call + flag.Parse() + to parse the command line into the defined flags. + + Flags may then be used directly. If you're using the flags themselves, + they are all pointers; if you bind to variables, they're values. + fmt.Println("ip has value ", *ip) + fmt.Println("flagvar has value ", flagvar) + + After parsing, the arguments after the flag are available as the + slice flag.Args() or individually as flag.Arg(i). + The arguments are indexed from 0 through flag.NArg()-1. + + The pflag package also defines some new functions that are not in flag, + that give one-letter shorthands for flags. You can use these by appending + 'P' to the name of any function that defines a flag. + var ip = flag.IntP("flagname", "f", 1234, "help message") + var flagvar bool + func init() { + flag.BoolVarP("boolname", "b", true, "help message") + } + flag.VarP(&flagVar, "varname", "v", 1234, "help message") + Shorthand letters can be used with single dashes on the command line. + Boolean shorthand flags can be combined with other shorthand flags. + + Command line flag syntax: + --flag // boolean flags only + --flag=x + + Unlike the flag package, a single dash before an option means something + different than a double dash. Single dashes signify a series of shorthand + letters for flags. All but the last shorthand letter must be boolean flags. + // boolean flags + -f + -abc + // non-boolean flags + -n 1234 + -Ifile + // mixed + -abcs "hello" + -abcn1234 + + Flag parsing stops after the terminator "--". Unlike the flag package, + flags can be interspersed with arguments anywhere on the command line + before this terminator. + + Integer flags accept 1234, 0664, 0x1234 and may be negative. + Boolean flags (in their long form) accept 1, 0, t, f, true, false, + TRUE, FALSE, True, False. + Duration flags accept any input valid for time.ParseDuration. + + The default set of command-line flags is controlled by + top-level functions. The FlagSet type allows one to define + independent sets of flags, such as to implement subcommands + in a command-line interface. The methods of FlagSet are + analogous to the top-level functions for the command-line + flag set. +*/ +package pflag + +import ( + "bytes" + "errors" + "fmt" + "io" + "os" + "sort" + "strconv" + "strings" + "time" +) + +// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined. +var ErrHelp = errors.New("pflag: help requested") + +// -- bool Value +type boolValue bool + +func newBoolValue(val bool, p *bool) *boolValue { + *p = val + return (*boolValue)(p) +} + +func (b *boolValue) Set(s string) error { + v, err := strconv.ParseBool(s) + *b = boolValue(v) + return err +} + +func (b *boolValue) String() string { return fmt.Sprintf("%v", *b) } + +// -- int Value +type intValue int + +func newIntValue(val int, p *int) *intValue { + *p = val + return (*intValue)(p) +} + +func (i *intValue) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 64) + *i = intValue(v) + return err +} + +func (i *intValue) String() string { return fmt.Sprintf("%v", *i) } + +// -- int64 Value +type int64Value int64 + +func newInt64Value(val int64, p *int64) *int64Value { + *p = val + return (*int64Value)(p) +} + +func (i *int64Value) Set(s string) error { + v, err := strconv.ParseInt(s, 0, 64) + *i = int64Value(v) + return err +} + +func (i *int64Value) String() string { return fmt.Sprintf("%v", *i) } + +// -- uint Value +type uintValue uint + +func newUintValue(val uint, p *uint) *uintValue { + *p = val + return (*uintValue)(p) +} + +func (i *uintValue) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 64) + *i = uintValue(v) + return err +} + +func (i *uintValue) String() string { return fmt.Sprintf("%v", *i) } + +// -- uint64 Value +type uint64Value uint64 + +func newUint64Value(val uint64, p *uint64) *uint64Value { + *p = val + return (*uint64Value)(p) +} + +func (i *uint64Value) Set(s string) error { + v, err := strconv.ParseUint(s, 0, 64) + *i = uint64Value(v) + return err +} + +func (i *uint64Value) String() string { return fmt.Sprintf("%v", *i) } + +// -- string Value +type stringValue string + +func newStringValue(val string, p *string) *stringValue { + *p = val + return (*stringValue)(p) +} + +func (s *stringValue) Set(val string) error { + *s = stringValue(val) + return nil +} + +func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) } + +// -- float64 Value +type float64Value float64 + +func newFloat64Value(val float64, p *float64) *float64Value { + *p = val + return (*float64Value)(p) +} + +func (f *float64Value) Set(s string) error { + v, err := strconv.ParseFloat(s, 64) + *f = float64Value(v) + return err +} + +func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) } + +// -- time.Duration Value +type durationValue time.Duration + +func newDurationValue(val time.Duration, p *time.Duration) *durationValue { + *p = val + return (*durationValue)(p) +} + +func (d *durationValue) Set(s string) error { + v, err := time.ParseDuration(s) + *d = durationValue(v) + return err +} + +func (d *durationValue) String() string { return (*time.Duration)(d).String() } + +// Value is the interface to the dynamic value stored in a flag. +// (The default value is represented as a string.) +type Value interface { + String() string + Set(string) error +} + +// ErrorHandling defines how to handle flag parsing errors. +type ErrorHandling int + +const ( + ContinueOnError ErrorHandling = iota + ExitOnError + PanicOnError +) + +// A FlagSet represents a set of defined flags. +type FlagSet struct { + // Usage is the function called when an error occurs while parsing flags. + // The field is a function (not a method) that may be changed to point to + // a custom error handler. + Usage func() + + name string + parsed bool + actual map[string]*Flag + formal map[string]*Flag + shorthands map[byte]*Flag + args []string // arguments after flags + exitOnError bool // does the program exit if there's an error? + errorHandling ErrorHandling + output io.Writer // nil means stderr; use out() accessor + interspersed bool // allow interspersed option/non-option args +} + +// A Flag represents the state of a flag. +type Flag struct { + Name string // name as it appears on command line + Shorthand string // one-letter abbreviated flag + Usage string // help message + Value Value // value as set + DefValue string // default value (as text); for usage message + Changed bool // If the user set the value (or if left to default) +} + +// sortFlags returns the flags as a slice in lexicographical sorted order. +func sortFlags(flags map[string]*Flag) []*Flag { + list := make(sort.StringSlice, len(flags)) + i := 0 + for _, f := range flags { + list[i] = f.Name + i++ + } + list.Sort() + result := make([]*Flag, len(list)) + for i, name := range list { + result[i] = flags[name] + } + return result +} + +func (f *FlagSet) out() io.Writer { + if f.output == nil { + return os.Stderr + } + return f.output +} + +// SetOutput sets the destination for usage and error messages. +// If output is nil, os.Stderr is used. +func (f *FlagSet) SetOutput(output io.Writer) { + f.output = output +} + +// VisitAll visits the flags in lexicographical order, calling fn for each. +// It visits all flags, even those not set. +func (f *FlagSet) VisitAll(fn func(*Flag)) { + for _, flag := range sortFlags(f.formal) { + fn(flag) + } +} + +func (f *FlagSet) HasFlags() bool { + return len(f.formal) > 0 +} + +// VisitAll visits the command-line flags in lexicographical order, calling +// fn for each. It visits all flags, even those not set. +func VisitAll(fn func(*Flag)) { + commandLine.VisitAll(fn) +} + +// Visit visits the flags in lexicographical order, calling fn for each. +// It visits only those flags that have been set. +func (f *FlagSet) Visit(fn func(*Flag)) { + for _, flag := range sortFlags(f.actual) { + fn(flag) + } +} + +// Visit visits the command-line flags in lexicographical order, calling fn +// for each. It visits only those flags that have been set. +func Visit(fn func(*Flag)) { + commandLine.Visit(fn) +} + +// Lookup returns the Flag structure of the named flag, returning nil if none exists. +func (f *FlagSet) Lookup(name string) *Flag { + return f.formal[name] +} + +// Lookup returns the Flag structure of the named command-line flag, +// returning nil if none exists. +func Lookup(name string) *Flag { + return commandLine.formal[name] +} + +// Set sets the value of the named flag. +func (f *FlagSet) Set(name, value string) error { + flag, ok := f.formal[name] + if !ok { + return fmt.Errorf("no such flag -%v", name) + } + err := flag.Value.Set(value) + if err != nil { + return err + } + if f.actual == nil { + f.actual = make(map[string]*Flag) + } + f.actual[name] = flag + f.Lookup(name).Changed = true + return nil +} + +// Set sets the value of the named command-line flag. +func Set(name, value string) error { + return commandLine.Set(name, value) +} + +// PrintDefaults prints, to standard error unless configured +// otherwise, the default values of all defined flags in the set. +func (f *FlagSet) PrintDefaults() { + f.VisitAll(func(flag *Flag) { + format := "--%s=%s: %s\n" + if _, ok := flag.Value.(*stringValue); ok { + // put quotes on the value + format = "--%s=%q: %s\n" + } + if len(flag.Shorthand) > 0 { + format = " -%s, " + format + } else { + format = " %s " + format + } + fmt.Fprintf(f.out(), format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage) + }) +} + +func (f *FlagSet) FlagUsages() string { + x := new(bytes.Buffer) + + f.VisitAll(func(flag *Flag) { + format := "--%s=%s: %s\n" + if _, ok := flag.Value.(*stringValue); ok { + // put quotes on the value + format = "--%s=%q: %s\n" + } + if len(flag.Shorthand) > 0 { + format = " -%s, " + format + } else { + format = " %s " + format + } + fmt.Fprintf(x, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage) + }) + + return x.String() +} + +// PrintDefaults prints to standard error the default values of all defined command-line flags. +func PrintDefaults() { + commandLine.PrintDefaults() +} + +// defaultUsage is the default function to print a usage message. +func defaultUsage(f *FlagSet) { + fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) + f.PrintDefaults() +} + +// NOTE: Usage is not just defaultUsage(commandLine) +// because it serves (via godoc flag Usage) as the example +// for how to write your own usage function. + +// Usage prints to standard error a usage message documenting all defined command-line flags. +// The function is a variable that may be changed to point to a custom function. +var Usage = func() { + fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) + PrintDefaults() +} + +// NFlag returns the number of flags that have been set. +func (f *FlagSet) NFlag() int { return len(f.actual) } + +// NFlag returns the number of command-line flags that have been set. +func NFlag() int { return len(commandLine.actual) } + +// Arg returns the i'th argument. Arg(0) is the first remaining argument +// after flags have been processed. +func (f *FlagSet) Arg(i int) string { + if i < 0 || i >= len(f.args) { + return "" + } + return f.args[i] +} + +// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument +// after flags have been processed. +func Arg(i int) string { + return commandLine.Arg(i) +} + +// NArg is the number of arguments remaining after flags have been processed. +func (f *FlagSet) NArg() int { return len(f.args) } + +// NArg is the number of arguments remaining after flags have been processed. +func NArg() int { return len(commandLine.args) } + +// Args returns the non-flag arguments. +func (f *FlagSet) Args() []string { return f.args } + +// Args returns the non-flag command-line arguments. +func Args() []string { return commandLine.args } + +// BoolVar defines a bool flag with specified name, default value, and usage string. +// The argument p points to a bool variable in which to store the value of the flag. +func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) { + f.VarP(newBoolValue(value, p), name, "", usage) +} + +// Like BoolVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) { + f.VarP(newBoolValue(value, p), name, shorthand, usage) +} + +// BoolVar defines a bool flag with specified name, default value, and usage string. +// The argument p points to a bool variable in which to store the value of the flag. +func BoolVar(p *bool, name string, value bool, usage string) { + commandLine.VarP(newBoolValue(value, p), name, "", usage) +} + +// Like BoolVar, but accepts a shorthand letter that can be used after a single dash. +func BoolVarP(p *bool, name, shorthand string, value bool, usage string) { + commandLine.VarP(newBoolValue(value, p), name, shorthand, usage) +} + +// Bool defines a bool flag with specified name, default value, and usage string. +// The return value is the address of a bool variable that stores the value of the flag. +func (f *FlagSet) Bool(name string, value bool, usage string) *bool { + p := new(bool) + f.BoolVarP(p, name, "", value, usage) + return p +} + +// Like Bool, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool { + p := new(bool) + f.BoolVarP(p, name, shorthand, value, usage) + return p +} + +// Bool defines a bool flag with specified name, default value, and usage string. +// The return value is the address of a bool variable that stores the value of the flag. +func Bool(name string, value bool, usage string) *bool { + return commandLine.BoolP(name, "", value, usage) +} + +// Like Bool, but accepts a shorthand letter that can be used after a single dash. +func BoolP(name, shorthand string, value bool, usage string) *bool { + return commandLine.BoolP(name, shorthand, value, usage) +} + +// IntVar defines an int flag with specified name, default value, and usage string. +// The argument p points to an int variable in which to store the value of the flag. +func (f *FlagSet) IntVar(p *int, name string, value int, usage string) { + f.VarP(newIntValue(value, p), name, "", usage) +} + +// Like IntVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) { + f.VarP(newIntValue(value, p), name, shorthand, usage) +} + +// IntVar defines an int flag with specified name, default value, and usage string. +// The argument p points to an int variable in which to store the value of the flag. +func IntVar(p *int, name string, value int, usage string) { + commandLine.VarP(newIntValue(value, p), name, "", usage) +} + +// Like IntVar, but accepts a shorthand letter that can be used after a single dash. +func IntVarP(p *int, name, shorthand string, value int, usage string) { + commandLine.VarP(newIntValue(value, p), name, shorthand, usage) +} + +// Int defines an int flag with specified name, default value, and usage string. +// The return value is the address of an int variable that stores the value of the flag. +func (f *FlagSet) Int(name string, value int, usage string) *int { + p := new(int) + f.IntVarP(p, name, "", value, usage) + return p +} + +// Like Int, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int { + p := new(int) + f.IntVarP(p, name, shorthand, value, usage) + return p +} + +// Int defines an int flag with specified name, default value, and usage string. +// The return value is the address of an int variable that stores the value of the flag. +func Int(name string, value int, usage string) *int { + return commandLine.IntP(name, "", value, usage) +} + +// Like Int, but accepts a shorthand letter that can be used after a single dash. +func IntP(name, shorthand string, value int, usage string) *int { + return commandLine.IntP(name, shorthand, value, usage) +} + +// Int64Var defines an int64 flag with specified name, default value, and usage string. +// The argument p points to an int64 variable in which to store the value of the flag. +func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) { + f.VarP(newInt64Value(value, p), name, "", usage) +} + +// Like Int64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) { + f.VarP(newInt64Value(value, p), name, shorthand, usage) +} + +// Int64Var defines an int64 flag with specified name, default value, and usage string. +// The argument p points to an int64 variable in which to store the value of the flag. +func Int64Var(p *int64, name string, value int64, usage string) { + commandLine.VarP(newInt64Value(value, p), name, "", usage) +} + +// Like Int64Var, but accepts a shorthand letter that can be used after a single dash. +func Int64VarP(p *int64, name, shorthand string, value int64, usage string) { + commandLine.VarP(newInt64Value(value, p), name, shorthand, usage) +} + +// Int64 defines an int64 flag with specified name, default value, and usage string. +// The return value is the address of an int64 variable that stores the value of the flag. +func (f *FlagSet) Int64(name string, value int64, usage string) *int64 { + p := new(int64) + f.Int64VarP(p, name, "", value, usage) + return p +} + +// Like Int64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 { + p := new(int64) + f.Int64VarP(p, name, shorthand, value, usage) + return p +} + +// Int64 defines an int64 flag with specified name, default value, and usage string. +// The return value is the address of an int64 variable that stores the value of the flag. +func Int64(name string, value int64, usage string) *int64 { + return commandLine.Int64P(name, "", value, usage) +} + +// Like Int64, but accepts a shorthand letter that can be used after a single dash. +func Int64P(name, shorthand string, value int64, usage string) *int64 { + return commandLine.Int64P(name, shorthand, value, usage) +} + +// UintVar defines a uint flag with specified name, default value, and usage string. +// The argument p points to a uint variable in which to store the value of the flag. +func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) { + f.VarP(newUintValue(value, p), name, "", usage) +} + +// Like UintVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) { + f.VarP(newUintValue(value, p), name, shorthand, usage) +} + +// UintVar defines a uint flag with specified name, default value, and usage string. +// The argument p points to a uint variable in which to store the value of the flag. +func UintVar(p *uint, name string, value uint, usage string) { + commandLine.VarP(newUintValue(value, p), name, "", usage) +} + +// Like UintVar, but accepts a shorthand letter that can be used after a single dash. +func UintVarP(p *uint, name, shorthand string, value uint, usage string) { + commandLine.VarP(newUintValue(value, p), name, shorthand, usage) +} + +// Uint defines a uint flag with specified name, default value, and usage string. +// The return value is the address of a uint variable that stores the value of the flag. +func (f *FlagSet) Uint(name string, value uint, usage string) *uint { + p := new(uint) + f.UintVarP(p, name, "", value, usage) + return p +} + +// Like Uint, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint { + p := new(uint) + f.UintVarP(p, name, shorthand, value, usage) + return p +} + +// Uint defines a uint flag with specified name, default value, and usage string. +// The return value is the address of a uint variable that stores the value of the flag. +func Uint(name string, value uint, usage string) *uint { + return commandLine.UintP(name, "", value, usage) +} + +// Like Uint, but accepts a shorthand letter that can be used after a single dash. +func UintP(name, shorthand string, value uint, usage string) *uint { + return commandLine.UintP(name, shorthand, value, usage) +} + +// Uint64Var defines a uint64 flag with specified name, default value, and usage string. +// The argument p points to a uint64 variable in which to store the value of the flag. +func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) { + f.VarP(newUint64Value(value, p), name, "", usage) +} + +// Like Uint64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { + f.VarP(newUint64Value(value, p), name, shorthand, usage) +} + +// Uint64Var defines a uint64 flag with specified name, default value, and usage string. +// The argument p points to a uint64 variable in which to store the value of the flag. +func Uint64Var(p *uint64, name string, value uint64, usage string) { + commandLine.VarP(newUint64Value(value, p), name, "", usage) +} + +// Like Uint64Var, but accepts a shorthand letter that can be used after a single dash. +func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { + commandLine.VarP(newUint64Value(value, p), name, shorthand, usage) +} + +// Uint64 defines a uint64 flag with specified name, default value, and usage string. +// The return value is the address of a uint64 variable that stores the value of the flag. +func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 { + p := new(uint64) + f.Uint64VarP(p, name, "", value, usage) + return p +} + +// Like Uint64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 { + p := new(uint64) + f.Uint64VarP(p, name, shorthand, value, usage) + return p +} + +// Uint64 defines a uint64 flag with specified name, default value, and usage string. +// The return value is the address of a uint64 variable that stores the value of the flag. +func Uint64(name string, value uint64, usage string) *uint64 { + return commandLine.Uint64P(name, "", value, usage) +} + +// Like Uint64, but accepts a shorthand letter that can be used after a single dash. +func Uint64P(name, shorthand string, value uint64, usage string) *uint64 { + return commandLine.Uint64P(name, shorthand, value, usage) +} + +// StringVar defines a string flag with specified name, default value, and usage string. +// The argument p points to a string variable in which to store the value of the flag. +func (f *FlagSet) StringVar(p *string, name string, value string, usage string) { + f.VarP(newStringValue(value, p), name, "", usage) +} + +// Like StringVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) { + f.VarP(newStringValue(value, p), name, shorthand, usage) +} + +// StringVar defines a string flag with specified name, default value, and usage string. +// The argument p points to a string variable in which to store the value of the flag. +func StringVar(p *string, name string, value string, usage string) { + commandLine.VarP(newStringValue(value, p), name, "", usage) +} + +// Like StringVar, but accepts a shorthand letter that can be used after a single dash. +func StringVarP(p *string, name, shorthand string, value string, usage string) { + commandLine.VarP(newStringValue(value, p), name, shorthand, usage) +} + +// String defines a string flag with specified name, default value, and usage string. +// The return value is the address of a string variable that stores the value of the flag. +func (f *FlagSet) String(name string, value string, usage string) *string { + p := new(string) + f.StringVarP(p, name, "", value, usage) + return p +} + +// Like String, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string { + p := new(string) + f.StringVarP(p, name, shorthand, value, usage) + return p +} + +// String defines a string flag with specified name, default value, and usage string. +// The return value is the address of a string variable that stores the value of the flag. +func String(name string, value string, usage string) *string { + return commandLine.StringP(name, "", value, usage) +} + +// Like String, but accepts a shorthand letter that can be used after a single dash. +func StringP(name, shorthand string, value string, usage string) *string { + return commandLine.StringP(name, shorthand, value, usage) +} + +// Float64Var defines a float64 flag with specified name, default value, and usage string. +// The argument p points to a float64 variable in which to store the value of the flag. +func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) { + f.VarP(newFloat64Value(value, p), name, "", usage) +} + +// Like Float64Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) { + f.VarP(newFloat64Value(value, p), name, shorthand, usage) +} + +// Float64Var defines a float64 flag with specified name, default value, and usage string. +// The argument p points to a float64 variable in which to store the value of the flag. +func Float64Var(p *float64, name string, value float64, usage string) { + commandLine.VarP(newFloat64Value(value, p), name, "", usage) +} + +// Like Float64Var, but accepts a shorthand letter that can be used after a single dash. +func Float64VarP(p *float64, name, shorthand string, value float64, usage string) { + commandLine.VarP(newFloat64Value(value, p), name, shorthand, usage) +} + +// Float64 defines a float64 flag with specified name, default value, and usage string. +// The return value is the address of a float64 variable that stores the value of the flag. +func (f *FlagSet) Float64(name string, value float64, usage string) *float64 { + p := new(float64) + f.Float64VarP(p, name, "", value, usage) + return p +} + +// Like Float64, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 { + p := new(float64) + f.Float64VarP(p, name, shorthand, value, usage) + return p +} + +// Float64 defines a float64 flag with specified name, default value, and usage string. +// The return value is the address of a float64 variable that stores the value of the flag. +func Float64(name string, value float64, usage string) *float64 { + return commandLine.Float64P(name, "", value, usage) +} + +// Like Float64, but accepts a shorthand letter that can be used after a single dash. +func Float64P(name, shorthand string, value float64, usage string) *float64 { + return commandLine.Float64P(name, shorthand, value, usage) +} + +// DurationVar defines a time.Duration flag with specified name, default value, and usage string. +// The argument p points to a time.Duration variable in which to store the value of the flag. +func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) { + f.VarP(newDurationValue(value, p), name, "", usage) +} + +// Like DurationVar, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { + f.VarP(newDurationValue(value, p), name, shorthand, usage) +} + +// DurationVar defines a time.Duration flag with specified name, default value, and usage string. +// The argument p points to a time.Duration variable in which to store the value of the flag. +func DurationVar(p *time.Duration, name string, value time.Duration, usage string) { + commandLine.VarP(newDurationValue(value, p), name, "", usage) +} + +// Like DurationVar, but accepts a shorthand letter that can be used after a single dash. +func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { + commandLine.VarP(newDurationValue(value, p), name, shorthand, usage) +} + +// Duration defines a time.Duration flag with specified name, default value, and usage string. +// The return value is the address of a time.Duration variable that stores the value of the flag. +func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration { + p := new(time.Duration) + f.DurationVarP(p, name, "", value, usage) + return p +} + +// Like Duration, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { + p := new(time.Duration) + f.DurationVarP(p, name, shorthand, value, usage) + return p +} + +// Duration defines a time.Duration flag with specified name, default value, and usage string. +// The return value is the address of a time.Duration variable that stores the value of the flag. +func Duration(name string, value time.Duration, usage string) *time.Duration { + return commandLine.DurationP(name, "", value, usage) +} + +// Like Duration, but accepts a shorthand letter that can be used after a single dash. +func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { + return commandLine.DurationP(name, shorthand, value, usage) +} + +// Var defines a flag with the specified name and usage string. The type and +// value of the flag are represented by the first argument, of type Value, which +// typically holds a user-defined implementation of Value. For instance, the +// caller could create a flag that turns a comma-separated string into a slice +// of strings by giving the slice the methods of Value; in particular, Set would +// decompose the comma-separated string into the slice. +func (f *FlagSet) Var(value Value, name string, usage string) { + f.VarP(value, name, "", usage) +} + +// Like Var, but accepts a shorthand letter that can be used after a single dash. +func (f *FlagSet) VarP(value Value, name, shorthand, usage string) { + // Remember the default value as a string; it won't change. + flag := &Flag{name, shorthand, usage, value, value.String(), false} + f.AddFlag(flag) +} + +func (f *FlagSet) AddFlag(flag *Flag) { + _, alreadythere := f.formal[flag.Name] + if alreadythere { + msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) + fmt.Fprintln(f.out(), msg) + panic(msg) // Happens only if flags are declared with identical names + } + if f.formal == nil { + f.formal = make(map[string]*Flag) + } + f.formal[flag.Name] = flag + + if len(flag.Shorthand) == 0 { + return + } + if len(flag.Shorthand) > 1 { + fmt.Fprintf(f.out(), "%s shorthand more than ASCII character: %s\n", f.name, flag.Shorthand) + panic("shorthand is more than one character") + } + if f.shorthands == nil { + f.shorthands = make(map[byte]*Flag) + } + c := flag.Shorthand[0] + old, alreadythere := f.shorthands[c] + if alreadythere { + fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s and %s\n", f.name, c, flag.Name, old.Name) + panic("shorthand redefinition") + } + f.shorthands[c] = flag +} + +// Var defines a flag with the specified name and usage string. The type and +// value of the flag are represented by the first argument, of type Value, which +// typically holds a user-defined implementation of Value. For instance, the +// caller could create a flag that turns a comma-separated string into a slice +// of strings by giving the slice the methods of Value; in particular, Set would +// decompose the comma-separated string into the slice. +func Var(value Value, name string, usage string) { + commandLine.VarP(value, name, "", usage) +} + +// Like Var, but accepts a shorthand letter that can be used after a single dash. +func VarP(value Value, name, shorthand, usage string) { + commandLine.VarP(value, name, shorthand, usage) +} + +// failf prints to standard error a formatted error and usage message and +// returns the error. +func (f *FlagSet) failf(format string, a ...interface{}) error { + err := fmt.Errorf(format, a...) + fmt.Fprintln(f.out(), err) + f.usage() + return err +} + +// usage calls the Usage method for the flag set, or the usage function if +// the flag set is commandLine. +func (f *FlagSet) usage() { + if f == commandLine { + Usage() + } else if f.Usage == nil { + defaultUsage(f) + } else { + f.Usage() + } +} + +func (f *FlagSet) setFlag(flag *Flag, value string, origArg string) error { + if err := flag.Value.Set(value); err != nil { + return f.failf("invalid argument %q for %s: %v", value, origArg, err) + } + // mark as visited for Visit() + if f.actual == nil { + f.actual = make(map[string]*Flag) + } + f.actual[flag.Name] = flag + flag.Changed = true + return nil +} + +func (f *FlagSet) parseLongArg(s string, args []string) (a []string, err error) { + a = args + if len(s) == 2 { // "--" terminates the flags + f.args = append(f.args, args...) + return + } + name := s[2:] + if len(name) == 0 || name[0] == '-' || name[0] == '=' { + err = f.failf("bad flag syntax: %s", s) + return + } + split := strings.SplitN(name, "=", 2) + name = split[0] + m := f.formal + flag, alreadythere := m[name] // BUG + if !alreadythere { + if name == "help" { // special case for nice help message. + f.usage() + return args, ErrHelp + } + err = f.failf("unknown flag: --%s", name) + return + } + if len(split) == 1 { + if _, ok := flag.Value.(*boolValue); !ok { + err = f.failf("flag needs an argument: %s", s) + return + } + f.setFlag(flag, "true", s) + } else { + if e := f.setFlag(flag, split[1], s); e != nil { + err = e + return + } + } + return args, nil +} + +func (f *FlagSet) parseShortArg(s string, args []string) (a []string, err error) { + a = args + shorthands := s[1:] + + for i := 0; i < len(shorthands); i++ { + c := shorthands[i] + flag, alreadythere := f.shorthands[c] + if !alreadythere { + if c == 'h' { // special case for nice help message. + f.usage() + err = ErrHelp + return + } + //TODO continue on error + err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands) + if len(args) == 0 { + return + } + } + if alreadythere { + if _, ok := flag.Value.(*boolValue); ok { + f.setFlag(flag, "true", s) + continue + } + if i < len(shorthands)-1 { + if e := f.setFlag(flag, shorthands[i+1:], s); e != nil { + err = e + return + } + break + } + if len(args) == 0 { + err = f.failf("flag needs an argument: %q in -%s", c, shorthands) + return + } + if e := f.setFlag(flag, args[0], s); e != nil { + err = e + return + } + } + a = args[1:] + break // should be unnecessary + } + + return +} + +func (f *FlagSet) parseArgs(args []string) (err error) { + for len(args) > 0 { + s := args[0] + args = args[1:] + if len(s) == 0 || s[0] != '-' || len(s) == 1 { + if !f.interspersed { + f.args = append(f.args, s) + f.args = append(f.args, args...) + return nil + } + f.args = append(f.args, s) + continue + } + + if s[1] == '-' { + args, err = f.parseLongArg(s, args) + } else { + args, err = f.parseShortArg(s, args) + } + } + return +} + +// Parse parses flag definitions from the argument list, which should not +// include the command name. Must be called after all flags in the FlagSet +// are defined and before flags are accessed by the program. +// The return value will be ErrHelp if -help was set but not defined. +func (f *FlagSet) Parse(arguments []string) error { + f.parsed = true + f.args = make([]string, 0, len(arguments)) + err := f.parseArgs(arguments) + if err != nil { + switch f.errorHandling { + case ContinueOnError: + return err + case ExitOnError: + os.Exit(2) + case PanicOnError: + panic(err) + } + } + return nil +} + +// Parsed reports whether f.Parse has been called. +func (f *FlagSet) Parsed() bool { + return f.parsed +} + +// Parse parses the command-line flags from os.Args[1:]. Must be called +// after all flags are defined and before flags are accessed by the program. +func Parse() { + // Ignore errors; commandLine is set for ExitOnError. + commandLine.Parse(os.Args[1:]) +} + +// Whether to support interspersed option/non-option arguments. +func SetInterspersed(interspersed bool) { + commandLine.SetInterspersed(interspersed) +} + +// Parsed returns true if the command-line flags have been parsed. +func Parsed() bool { + return commandLine.Parsed() +} + +// The default set of command-line flags, parsed from os.Args. +var commandLine = NewFlagSet(os.Args[0], ExitOnError) + +// NewFlagSet returns a new, empty flag set with the specified name and +// error handling property. +func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { + f := &FlagSet{ + name: name, + errorHandling: errorHandling, + interspersed: true, + } + return f +} + +// Whether to support interspersed option/non-option arguments. +func (f *FlagSet) SetInterspersed(interspersed bool) { + f.interspersed = interspersed +} + +// Init sets the name and error handling property for a flag set. +// By default, the zero FlagSet uses an empty name and the +// ContinueOnError error handling policy. +func (f *FlagSet) Init(name string, errorHandling ErrorHandling) { + f.name = name + f.errorHandling = errorHandling +} diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go diff --git a/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go similarity index 96% rename from Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go index 6bfa866..9958a71 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go @@ -284,8 +284,8 @@ func (t *table) push(i uint32, depth int) bool { } // The lists of element names and attribute keys were taken from -// https://html.spec.whatwg.org/multipage/indices.html#index -// as of the "HTML Living Standard - Last Updated 21 February 2015" version. +// http://www.whatwg.org/specs/web-apps/current-work/multipage/section-index.html +// as of the "HTML Living Standard - Last Updated 30 May 2012" version. var elements = []string{ "a", @@ -352,7 +352,6 @@ var elements = []string{ "map", "mark", "menu", - "menuitem", "meta", "meter", "nav", @@ -386,7 +385,6 @@ var elements = []string{ "table", "tbody", "td", - "template", "textarea", "tfoot", "th", @@ -402,10 +400,7 @@ var elements = []string{ "wbr", } -// https://html.spec.whatwg.org/multipage/indices.html#attributes-3 - var attributes = []string{ - "abbr", "accept", "accept-charset", "accesskey", @@ -415,6 +410,7 @@ var attributes = []string{ "autocomplete", "autofocus", "autoplay", + "border", "challenge", "charset", "checked", @@ -456,7 +452,7 @@ var attributes = []string{ "http-equiv", "icon", "id", - "inputmode", + "inert", "ismap", "itemid", "itemprop", @@ -477,7 +473,6 @@ var attributes = []string{ "mediagroup", "method", "min", - "minlength", "multiple", "muted", "name", @@ -505,8 +500,6 @@ var attributes = []string{ "shape", "size", "sizes", - "sortable", - "sorted", "span", "src", "srcdoc", @@ -528,8 +521,6 @@ var attributes = []string{ var eventHandlers = []string{ "onabort", - "onautocomplete", - "onautocompleteerror", "onafterprint", "onbeforeprint", "onbeforeunload", @@ -561,7 +552,6 @@ var eventHandlers = []string{ "onkeydown", "onkeypress", "onkeyup", - "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", @@ -590,13 +580,11 @@ var eventHandlers = []string{ "onseeking", "onselect", "onshow", - "onsort", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", - "ontoggle", "onunload", "onvolumechange", "onwaiting", diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go new file mode 100644 index 0000000..20b8b8a --- /dev/null +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go @@ -0,0 +1,694 @@ +// generated by go run gen.go; DO NOT EDIT + +package atom + +const ( + A Atom = 0x1 + Abbr Atom = 0x4 + Accept Atom = 0x2106 + AcceptCharset Atom = 0x210e + Accesskey Atom = 0x3309 + Action Atom = 0x21b06 + Address Atom = 0x5d507 + Align Atom = 0x1105 + Alt Atom = 0x4503 + Annotation Atom = 0x18d0a + AnnotationXml Atom = 0x18d0e + Applet Atom = 0x2d106 + Area Atom = 0x31804 + Article Atom = 0x39907 + Aside Atom = 0x4f05 + Async Atom = 0x9305 + Audio Atom = 0xaf05 + Autocomplete Atom = 0xd50c + Autofocus Atom = 0xe109 + Autoplay Atom = 0x10c08 + B Atom = 0x101 + Base Atom = 0x11404 + Basefont Atom = 0x11408 + Bdi Atom = 0x1a03 + Bdo Atom = 0x12503 + Bgsound Atom = 0x13807 + Big Atom = 0x14403 + Blink Atom = 0x14705 + Blockquote Atom = 0x14c0a + Body Atom = 0x2f04 + Border Atom = 0x15606 + Br Atom = 0x202 + Button Atom = 0x15c06 + Canvas Atom = 0x4b06 + Caption Atom = 0x1e007 + Center Atom = 0x2df06 + Challenge Atom = 0x23e09 + Charset Atom = 0x2807 + Checked Atom = 0x33f07 + Cite Atom = 0x9704 + Class Atom = 0x3d905 + Code Atom = 0x16f04 + Col Atom = 0x17603 + Colgroup Atom = 0x17608 + Color Atom = 0x18305 + Cols Atom = 0x18804 + Colspan Atom = 0x18807 + Command Atom = 0x19b07 + Content Atom = 0x42c07 + Contenteditable Atom = 0x42c0f + Contextmenu Atom = 0x3480b + Controls Atom = 0x1ae08 + Coords Atom = 0x1ba06 + Crossorigin Atom = 0x1c40b + Data Atom = 0x44304 + Datalist Atom = 0x44308 + Datetime Atom = 0x25b08 + Dd Atom = 0x28802 + Default Atom = 0x5207 + Defer Atom = 0x17105 + Del Atom = 0x4d603 + Desc Atom = 0x4804 + Details Atom = 0x6507 + Dfn Atom = 0x8303 + Dialog Atom = 0x1b06 + Dir Atom = 0x9d03 + Dirname Atom = 0x9d07 + Disabled Atom = 0x10008 + Div Atom = 0x10703 + Dl Atom = 0x13e02 + Download Atom = 0x40908 + Draggable Atom = 0x1a109 + Dropzone Atom = 0x3a208 + Dt Atom = 0x4e402 + Em Atom = 0x7f02 + Embed Atom = 0x7f05 + Enctype Atom = 0x23007 + Face Atom = 0x2dd04 + Fieldset Atom = 0x1d508 + Figcaption Atom = 0x1dd0a + Figure Atom = 0x1f106 + Font Atom = 0x11804 + Footer Atom = 0x5906 + For Atom = 0x1fd03 + ForeignObject Atom = 0x1fd0d + Foreignobject Atom = 0x20a0d + Form Atom = 0x21704 + Formaction Atom = 0x2170a + Formenctype Atom = 0x22c0b + Formmethod Atom = 0x2470a + Formnovalidate Atom = 0x2510e + Formtarget Atom = 0x2660a + Frame Atom = 0x8705 + Frameset Atom = 0x8708 + H1 Atom = 0x13602 + H2 Atom = 0x29602 + H3 Atom = 0x2c502 + H4 Atom = 0x30e02 + H5 Atom = 0x4e602 + H6 Atom = 0x27002 + Head Atom = 0x2fa04 + Header Atom = 0x2fa06 + Headers Atom = 0x2fa07 + Height Atom = 0x27206 + Hgroup Atom = 0x27a06 + Hidden Atom = 0x28606 + High Atom = 0x29304 + Hr Atom = 0x13102 + Href Atom = 0x29804 + Hreflang Atom = 0x29808 + Html Atom = 0x27604 + HttpEquiv Atom = 0x2a00a + I Atom = 0x601 + Icon Atom = 0x42b04 + Id Atom = 0x5102 + Iframe Atom = 0x2b406 + Image Atom = 0x2ba05 + Img Atom = 0x2bf03 + Inert Atom = 0x4c105 + Input Atom = 0x3f605 + Ins Atom = 0x1cd03 + Isindex Atom = 0x2c707 + Ismap Atom = 0x2ce05 + Itemid Atom = 0x9806 + Itemprop Atom = 0x57e08 + Itemref Atom = 0x2d707 + Itemscope Atom = 0x2e509 + Itemtype Atom = 0x2ef08 + Kbd Atom = 0x1903 + Keygen Atom = 0x3906 + Keytype Atom = 0x51207 + Kind Atom = 0xfd04 + Label Atom = 0xba05 + Lang Atom = 0x29c04 + Legend Atom = 0x1a806 + Li Atom = 0x1202 + Link Atom = 0x14804 + List Atom = 0x44704 + Listing Atom = 0x44707 + Loop Atom = 0xbe04 + Low Atom = 0x13f03 + Malignmark Atom = 0x100a + Manifest Atom = 0x5b608 + Map Atom = 0x2d003 + Mark Atom = 0x1604 + Marquee Atom = 0x5f207 + Math Atom = 0x2f704 + Max Atom = 0x30603 + Maxlength Atom = 0x30609 + Media Atom = 0xa205 + Mediagroup Atom = 0xa20a + Menu Atom = 0x34f04 + Meta Atom = 0x45604 + Meter Atom = 0x26105 + Method Atom = 0x24b06 + Mglyph Atom = 0x2c006 + Mi Atom = 0x9b02 + Min Atom = 0x31003 + Mn Atom = 0x25402 + Mo Atom = 0x47a02 + Ms Atom = 0x2e802 + Mtext Atom = 0x31305 + Multiple Atom = 0x32108 + Muted Atom = 0x32905 + Name Atom = 0xa004 + Nav Atom = 0x3e03 + Nobr Atom = 0x7404 + Noembed Atom = 0x7d07 + Noframes Atom = 0x8508 + Noscript Atom = 0x28b08 + Novalidate Atom = 0x2550a + Object Atom = 0x21106 + Ol Atom = 0xcd02 + Onabort Atom = 0x16007 + Onafterprint Atom = 0x1e50c + Onbeforeprint Atom = 0x21f0d + Onbeforeunload Atom = 0x5c90e + Onblur Atom = 0x3e206 + Oncancel Atom = 0xb308 + Oncanplay Atom = 0x12709 + Oncanplaythrough Atom = 0x12710 + Onchange Atom = 0x3b808 + Onclick Atom = 0x2ad07 + Onclose Atom = 0x32e07 + Oncontextmenu Atom = 0x3460d + Oncuechange Atom = 0x3530b + Ondblclick Atom = 0x35e0a + Ondrag Atom = 0x36806 + Ondragend Atom = 0x36809 + Ondragenter Atom = 0x3710b + Ondragleave Atom = 0x37c0b + Ondragover Atom = 0x3870a + Ondragstart Atom = 0x3910b + Ondrop Atom = 0x3a006 + Ondurationchange Atom = 0x3b010 + Onemptied Atom = 0x3a709 + Onended Atom = 0x3c007 + Onerror Atom = 0x3c707 + Onfocus Atom = 0x3ce07 + Onhashchange Atom = 0x3e80c + Oninput Atom = 0x3f407 + Oninvalid Atom = 0x3fb09 + Onkeydown Atom = 0x40409 + Onkeypress Atom = 0x4110a + Onkeyup Atom = 0x42107 + Onload Atom = 0x43b06 + Onloadeddata Atom = 0x43b0c + Onloadedmetadata Atom = 0x44e10 + Onloadstart Atom = 0x4640b + Onmessage Atom = 0x46f09 + Onmousedown Atom = 0x4780b + Onmousemove Atom = 0x4830b + Onmouseout Atom = 0x48e0a + Onmouseover Atom = 0x49b0b + Onmouseup Atom = 0x4a609 + Onmousewheel Atom = 0x4af0c + Onoffline Atom = 0x4bb09 + Ononline Atom = 0x4c608 + Onpagehide Atom = 0x4ce0a + Onpageshow Atom = 0x4d90a + Onpause Atom = 0x4e807 + Onplay Atom = 0x4f206 + Onplaying Atom = 0x4f209 + Onpopstate Atom = 0x4fb0a + Onprogress Atom = 0x5050a + Onratechange Atom = 0x5190c + Onreset Atom = 0x52507 + Onresize Atom = 0x52c08 + Onscroll Atom = 0x53a08 + Onseeked Atom = 0x54208 + Onseeking Atom = 0x54a09 + Onselect Atom = 0x55308 + Onshow Atom = 0x55d06 + Onstalled Atom = 0x56609 + Onstorage Atom = 0x56f09 + Onsubmit Atom = 0x57808 + Onsuspend Atom = 0x58809 + Ontimeupdate Atom = 0x1190c + Onunload Atom = 0x59108 + Onvolumechange Atom = 0x5990e + Onwaiting Atom = 0x5a709 + Open Atom = 0x58404 + Optgroup Atom = 0xc008 + Optimum Atom = 0x5b007 + Option Atom = 0x5c506 + Output Atom = 0x49506 + P Atom = 0xc01 + Param Atom = 0xc05 + Pattern Atom = 0x6e07 + Ping Atom = 0xab04 + Placeholder Atom = 0xc70b + Plaintext Atom = 0xf109 + Poster Atom = 0x17d06 + Pre Atom = 0x27f03 + Preload Atom = 0x27f07 + Progress Atom = 0x50708 + Prompt Atom = 0x5bf06 + Public Atom = 0x42706 + Q Atom = 0x15101 + Radiogroup Atom = 0x30a + Readonly Atom = 0x31908 + Rel Atom = 0x28003 + Required Atom = 0x1f508 + Reversed Atom = 0x5e08 + Rows Atom = 0x7704 + Rowspan Atom = 0x7707 + Rp Atom = 0x1eb02 + Rt Atom = 0x16502 + Ruby Atom = 0xd104 + S Atom = 0x2c01 + Samp Atom = 0x6b04 + Sandbox Atom = 0xe907 + Scope Atom = 0x2e905 + Scoped Atom = 0x2e906 + Script Atom = 0x28d06 + Seamless Atom = 0x33308 + Section Atom = 0x3dd07 + Select Atom = 0x55506 + Selected Atom = 0x55508 + Shape Atom = 0x1b505 + Size Atom = 0x53004 + Sizes Atom = 0x53005 + Small Atom = 0x1bf05 + Source Atom = 0x1cf06 + Spacer Atom = 0x30006 + Span Atom = 0x7a04 + Spellcheck Atom = 0x33a0a + Src Atom = 0x3d403 + Srcdoc Atom = 0x3d406 + Srclang Atom = 0x41a07 + Start Atom = 0x39705 + Step Atom = 0x5bc04 + Strike Atom = 0x50e06 + Strong Atom = 0x53406 + Style Atom = 0x5db05 + Sub Atom = 0x57a03 + Summary Atom = 0x5e007 + Sup Atom = 0x5e703 + Svg Atom = 0x5ea03 + System Atom = 0x5ed06 + Tabindex Atom = 0x45c08 + Table Atom = 0x43605 + Target Atom = 0x26a06 + Tbody Atom = 0x2e05 + Td Atom = 0x4702 + Textarea Atom = 0x31408 + Tfoot Atom = 0x5805 + Th Atom = 0x13002 + Thead Atom = 0x2f905 + Time Atom = 0x11b04 + Title Atom = 0x8e05 + Tr Atom = 0xf902 + Track Atom = 0xf905 + Translate Atom = 0x16609 + Tt Atom = 0x7002 + Type Atom = 0x23304 + Typemustmatch Atom = 0x2330d + U Atom = 0xb01 + Ul Atom = 0x5602 + Usemap Atom = 0x4ec06 + Value Atom = 0x4005 + Var Atom = 0x10903 + Video Atom = 0x2a905 + Wbr Atom = 0x14103 + Width Atom = 0x4e205 + Wrap Atom = 0x56204 + Xmp Atom = 0xef03 +) + +const hash0 = 0xc17da63e + +const maxAtomLen = 16 + +var table = [1 << 9]Atom{ + 0x1: 0x4830b, // onmousemove + 0x2: 0x5a709, // onwaiting + 0x4: 0x5bf06, // prompt + 0x7: 0x5b007, // optimum + 0x8: 0x1604, // mark + 0xa: 0x2d707, // itemref + 0xb: 0x4d90a, // onpageshow + 0xc: 0x55506, // select + 0xd: 0x1a109, // draggable + 0xe: 0x3e03, // nav + 0xf: 0x19b07, // command + 0x11: 0xb01, // u + 0x14: 0x2fa07, // headers + 0x15: 0x44308, // datalist + 0x17: 0x6b04, // samp + 0x1a: 0x40409, // onkeydown + 0x1b: 0x53a08, // onscroll + 0x1c: 0x17603, // col + 0x20: 0x57e08, // itemprop + 0x21: 0x2a00a, // http-equiv + 0x22: 0x5e703, // sup + 0x24: 0x1f508, // required + 0x2b: 0x27f07, // preload + 0x2c: 0x21f0d, // onbeforeprint + 0x2d: 0x3710b, // ondragenter + 0x2e: 0x4e402, // dt + 0x2f: 0x57808, // onsubmit + 0x30: 0x13102, // hr + 0x31: 0x3460d, // oncontextmenu + 0x33: 0x2ba05, // image + 0x34: 0x4e807, // onpause + 0x35: 0x27a06, // hgroup + 0x36: 0xab04, // ping + 0x37: 0x55308, // onselect + 0x3a: 0x10703, // div + 0x40: 0x9b02, // mi + 0x41: 0x33308, // seamless + 0x42: 0x2807, // charset + 0x43: 0x5102, // id + 0x44: 0x4fb0a, // onpopstate + 0x45: 0x4d603, // del + 0x46: 0x5f207, // marquee + 0x47: 0x3309, // accesskey + 0x49: 0x5906, // footer + 0x4a: 0x2d106, // applet + 0x4b: 0x2ce05, // ismap + 0x51: 0x34f04, // menu + 0x52: 0x2f04, // body + 0x55: 0x8708, // frameset + 0x56: 0x52507, // onreset + 0x57: 0x14705, // blink + 0x58: 0x8e05, // title + 0x59: 0x39907, // article + 0x5b: 0x13002, // th + 0x5d: 0x15101, // q + 0x5e: 0x58404, // open + 0x5f: 0x31804, // area + 0x61: 0x43b06, // onload + 0x62: 0x3f605, // input + 0x63: 0x11404, // base + 0x64: 0x18807, // colspan + 0x65: 0x51207, // keytype + 0x66: 0x13e02, // dl + 0x68: 0x1d508, // fieldset + 0x6a: 0x31003, // min + 0x6b: 0x10903, // var + 0x6f: 0x2fa06, // header + 0x70: 0x16502, // rt + 0x71: 0x17608, // colgroup + 0x72: 0x25402, // mn + 0x74: 0x16007, // onabort + 0x75: 0x3906, // keygen + 0x76: 0x4bb09, // onoffline + 0x77: 0x23e09, // challenge + 0x78: 0x2d003, // map + 0x7a: 0x30e02, // h4 + 0x7b: 0x3c707, // onerror + 0x7c: 0x30609, // maxlength + 0x7d: 0x31305, // mtext + 0x7e: 0x5805, // tfoot + 0x7f: 0x11804, // font + 0x80: 0x100a, // malignmark + 0x81: 0x45604, // meta + 0x82: 0x9305, // async + 0x83: 0x2c502, // h3 + 0x84: 0x28802, // dd + 0x85: 0x29804, // href + 0x86: 0xa20a, // mediagroup + 0x87: 0x1ba06, // coords + 0x88: 0x41a07, // srclang + 0x89: 0x35e0a, // ondblclick + 0x8a: 0x4005, // value + 0x8c: 0xb308, // oncancel + 0x8e: 0x33a0a, // spellcheck + 0x8f: 0x8705, // frame + 0x91: 0x14403, // big + 0x94: 0x21b06, // action + 0x95: 0x9d03, // dir + 0x97: 0x31908, // readonly + 0x99: 0x43605, // table + 0x9a: 0x5e007, // summary + 0x9b: 0x14103, // wbr + 0x9c: 0x30a, // radiogroup + 0x9d: 0xa004, // name + 0x9f: 0x5ed06, // system + 0xa1: 0x18305, // color + 0xa2: 0x4b06, // canvas + 0xa3: 0x27604, // html + 0xa5: 0x54a09, // onseeking + 0xac: 0x1b505, // shape + 0xad: 0x28003, // rel + 0xae: 0x12710, // oncanplaythrough + 0xaf: 0x3870a, // ondragover + 0xb1: 0x1fd0d, // foreignObject + 0xb3: 0x7704, // rows + 0xb6: 0x44707, // listing + 0xb7: 0x49506, // output + 0xb9: 0x3480b, // contextmenu + 0xbb: 0x13f03, // low + 0xbc: 0x1eb02, // rp + 0xbd: 0x58809, // onsuspend + 0xbe: 0x15c06, // button + 0xbf: 0x4804, // desc + 0xc1: 0x3dd07, // section + 0xc2: 0x5050a, // onprogress + 0xc3: 0x56f09, // onstorage + 0xc4: 0x2f704, // math + 0xc5: 0x4f206, // onplay + 0xc7: 0x5602, // ul + 0xc8: 0x6e07, // pattern + 0xc9: 0x4af0c, // onmousewheel + 0xca: 0x36809, // ondragend + 0xcb: 0xd104, // ruby + 0xcc: 0xc01, // p + 0xcd: 0x32e07, // onclose + 0xce: 0x26105, // meter + 0xcf: 0x13807, // bgsound + 0xd2: 0x27206, // height + 0xd4: 0x101, // b + 0xd5: 0x2ef08, // itemtype + 0xd8: 0x1e007, // caption + 0xd9: 0x10008, // disabled + 0xdc: 0x5ea03, // svg + 0xdd: 0x1bf05, // small + 0xde: 0x44304, // data + 0xe0: 0x4c608, // ononline + 0xe1: 0x2c006, // mglyph + 0xe3: 0x7f05, // embed + 0xe4: 0xf902, // tr + 0xe5: 0x4640b, // onloadstart + 0xe7: 0x3b010, // ondurationchange + 0xed: 0x12503, // bdo + 0xee: 0x4702, // td + 0xef: 0x4f05, // aside + 0xf0: 0x29602, // h2 + 0xf1: 0x50708, // progress + 0xf2: 0x14c0a, // blockquote + 0xf4: 0xba05, // label + 0xf5: 0x601, // i + 0xf7: 0x7707, // rowspan + 0xfb: 0x4f209, // onplaying + 0xfd: 0x2bf03, // img + 0xfe: 0xc008, // optgroup + 0xff: 0x42c07, // content + 0x101: 0x5190c, // onratechange + 0x103: 0x3e80c, // onhashchange + 0x104: 0x6507, // details + 0x106: 0x40908, // download + 0x109: 0xe907, // sandbox + 0x10b: 0x42c0f, // contenteditable + 0x10d: 0x37c0b, // ondragleave + 0x10e: 0x2106, // accept + 0x10f: 0x55508, // selected + 0x112: 0x2170a, // formaction + 0x113: 0x2df06, // center + 0x115: 0x44e10, // onloadedmetadata + 0x116: 0x14804, // link + 0x117: 0x11b04, // time + 0x118: 0x1c40b, // crossorigin + 0x119: 0x3ce07, // onfocus + 0x11a: 0x56204, // wrap + 0x11b: 0x42b04, // icon + 0x11d: 0x2a905, // video + 0x11e: 0x3d905, // class + 0x121: 0x5990e, // onvolumechange + 0x122: 0x3e206, // onblur + 0x123: 0x2e509, // itemscope + 0x124: 0x5db05, // style + 0x127: 0x42706, // public + 0x129: 0x2510e, // formnovalidate + 0x12a: 0x55d06, // onshow + 0x12c: 0x16609, // translate + 0x12d: 0x9704, // cite + 0x12e: 0x2e802, // ms + 0x12f: 0x1190c, // ontimeupdate + 0x130: 0xfd04, // kind + 0x131: 0x2660a, // formtarget + 0x135: 0x3c007, // onended + 0x136: 0x28606, // hidden + 0x137: 0x2c01, // s + 0x139: 0x2470a, // formmethod + 0x13a: 0x44704, // list + 0x13c: 0x27002, // h6 + 0x13d: 0xcd02, // ol + 0x13e: 0x3530b, // oncuechange + 0x13f: 0x20a0d, // foreignobject + 0x143: 0x5c90e, // onbeforeunload + 0x145: 0x3a709, // onemptied + 0x146: 0x17105, // defer + 0x147: 0xef03, // xmp + 0x148: 0xaf05, // audio + 0x149: 0x1903, // kbd + 0x14c: 0x46f09, // onmessage + 0x14d: 0x5c506, // option + 0x14e: 0x4503, // alt + 0x14f: 0x33f07, // checked + 0x150: 0x10c08, // autoplay + 0x152: 0x202, // br + 0x153: 0x2550a, // novalidate + 0x156: 0x7d07, // noembed + 0x159: 0x2ad07, // onclick + 0x15a: 0x4780b, // onmousedown + 0x15b: 0x3b808, // onchange + 0x15e: 0x3fb09, // oninvalid + 0x15f: 0x2e906, // scoped + 0x160: 0x1ae08, // controls + 0x161: 0x32905, // muted + 0x163: 0x4ec06, // usemap + 0x164: 0x1dd0a, // figcaption + 0x165: 0x36806, // ondrag + 0x166: 0x29304, // high + 0x168: 0x3d403, // src + 0x169: 0x17d06, // poster + 0x16b: 0x18d0e, // annotation-xml + 0x16c: 0x5bc04, // step + 0x16d: 0x4, // abbr + 0x16e: 0x1b06, // dialog + 0x170: 0x1202, // li + 0x172: 0x47a02, // mo + 0x175: 0x1fd03, // for + 0x176: 0x1cd03, // ins + 0x178: 0x53004, // size + 0x17a: 0x5207, // default + 0x17b: 0x1a03, // bdi + 0x17c: 0x4ce0a, // onpagehide + 0x17d: 0x9d07, // dirname + 0x17e: 0x23304, // type + 0x17f: 0x21704, // form + 0x180: 0x4c105, // inert + 0x181: 0x12709, // oncanplay + 0x182: 0x8303, // dfn + 0x183: 0x45c08, // tabindex + 0x186: 0x7f02, // em + 0x187: 0x29c04, // lang + 0x189: 0x3a208, // dropzone + 0x18a: 0x4110a, // onkeypress + 0x18b: 0x25b08, // datetime + 0x18c: 0x18804, // cols + 0x18d: 0x1, // a + 0x18e: 0x43b0c, // onloadeddata + 0x191: 0x15606, // border + 0x192: 0x2e05, // tbody + 0x193: 0x24b06, // method + 0x195: 0xbe04, // loop + 0x196: 0x2b406, // iframe + 0x198: 0x2fa04, // head + 0x19e: 0x5b608, // manifest + 0x19f: 0xe109, // autofocus + 0x1a0: 0x16f04, // code + 0x1a1: 0x53406, // strong + 0x1a2: 0x32108, // multiple + 0x1a3: 0xc05, // param + 0x1a6: 0x23007, // enctype + 0x1a7: 0x2dd04, // face + 0x1a8: 0xf109, // plaintext + 0x1a9: 0x13602, // h1 + 0x1aa: 0x56609, // onstalled + 0x1ad: 0x28d06, // script + 0x1ae: 0x30006, // spacer + 0x1af: 0x52c08, // onresize + 0x1b0: 0x49b0b, // onmouseover + 0x1b1: 0x59108, // onunload + 0x1b2: 0x54208, // onseeked + 0x1b4: 0x2330d, // typemustmatch + 0x1b5: 0x1f106, // figure + 0x1b6: 0x48e0a, // onmouseout + 0x1b7: 0x27f03, // pre + 0x1b8: 0x4e205, // width + 0x1bb: 0x7404, // nobr + 0x1be: 0x7002, // tt + 0x1bf: 0x1105, // align + 0x1c0: 0x3f407, // oninput + 0x1c3: 0x42107, // onkeyup + 0x1c6: 0x1e50c, // onafterprint + 0x1c7: 0x210e, // accept-charset + 0x1c8: 0x9806, // itemid + 0x1cb: 0x50e06, // strike + 0x1cc: 0x57a03, // sub + 0x1cd: 0xf905, // track + 0x1ce: 0x39705, // start + 0x1d0: 0x11408, // basefont + 0x1d6: 0x1cf06, // source + 0x1d7: 0x1a806, // legend + 0x1d8: 0x2f905, // thead + 0x1da: 0x2e905, // scope + 0x1dd: 0x21106, // object + 0x1de: 0xa205, // media + 0x1df: 0x18d0a, // annotation + 0x1e0: 0x22c0b, // formenctype + 0x1e2: 0x28b08, // noscript + 0x1e4: 0x53005, // sizes + 0x1e5: 0xd50c, // autocomplete + 0x1e6: 0x7a04, // span + 0x1e7: 0x8508, // noframes + 0x1e8: 0x26a06, // target + 0x1e9: 0x3a006, // ondrop + 0x1ea: 0x3d406, // srcdoc + 0x1ec: 0x5e08, // reversed + 0x1f0: 0x2c707, // isindex + 0x1f3: 0x29808, // hreflang + 0x1f5: 0x4e602, // h5 + 0x1f6: 0x5d507, // address + 0x1fa: 0x30603, // max + 0x1fb: 0xc70b, // placeholder + 0x1fc: 0x31408, // textarea + 0x1fe: 0x4a609, // onmouseup + 0x1ff: 0x3910b, // ondragstart +} + +const atomText = "abbradiogrouparamalignmarkbdialogaccept-charsetbodyaccesskey" + + "genavaluealtdescanvasidefaultfootereversedetailsampatternobr" + + "owspanoembedfnoframesetitleasyncitemidirnamediagroupingaudio" + + "ncancelabelooptgrouplaceholderubyautocompleteautofocusandbox" + + "mplaintextrackindisabledivarautoplaybasefontimeupdatebdoncan" + + "playthrough1bgsoundlowbrbigblinkblockquoteborderbuttonabortr" + + "anslatecodefercolgroupostercolorcolspannotation-xmlcommandra" + + "ggablegendcontrolshapecoordsmallcrossoriginsourcefieldsetfig" + + "captionafterprintfigurequiredforeignObjectforeignobjectforma" + + "ctionbeforeprintformenctypemustmatchallengeformmethodformnov" + + "alidatetimeterformtargeth6heightmlhgroupreloadhiddenoscripth" + + "igh2hreflanghttp-equivideonclickiframeimageimglyph3isindexis" + + "mappletitemrefacenteritemscopeditemtypematheaderspacermaxlen" + + "gth4minmtextareadonlymultiplemutedoncloseamlesspellcheckedon" + + "contextmenuoncuechangeondblclickondragendondragenterondragle" + + "aveondragoverondragstarticleondropzonemptiedondurationchange" + + "onendedonerroronfocusrcdoclassectionbluronhashchangeoninputo" + + "ninvalidonkeydownloadonkeypressrclangonkeyupublicontentedita" + + "bleonloadeddatalistingonloadedmetadatabindexonloadstartonmes" + + "sageonmousedownonmousemoveonmouseoutputonmouseoveronmouseupo" + + "nmousewheelonofflinertononlineonpagehidelonpageshowidth5onpa" + + "usemaponplayingonpopstateonprogresstrikeytypeonratechangeonr" + + "esetonresizestrongonscrollonseekedonseekingonselectedonshowr" + + "aponstalledonstorageonsubmitempropenonsuspendonunloadonvolum" + + "echangeonwaitingoptimumanifestepromptoptionbeforeunloaddress" + + "tylesummarysupsvgsystemarquee" diff --git a/Godeps/_workspace/src/golang.org/x/net/html/const.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/const.go similarity index 93% rename from Godeps/_workspace/src/golang.org/x/net/html/const.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/const.go index 52f651f..d7cc8bb 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/const.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/const.go @@ -6,7 +6,7 @@ package html // Section 12.2.3.2 of the HTML5 specification says "The following elements // have varying levels of special parsing rules". -// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements +// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#the-stack-of-open-elements var isSpecialElementMap = map[string]bool{ "address": true, "applet": true, @@ -24,6 +24,7 @@ var isSpecialElementMap = map[string]bool{ "center": true, "col": true, "colgroup": true, + "command": true, "dd": true, "details": true, "dir": true, @@ -72,20 +73,17 @@ var isSpecialElementMap = map[string]bool{ "script": true, "section": true, "select": true, - "source": true, "style": true, "summary": true, "table": true, "tbody": true, "td": true, - "template": true, "textarea": true, "tfoot": true, "th": true, "thead": true, "title": true, "tr": true, - "track": true, "ul": true, "wbr": true, "xmp": true, diff --git a/Godeps/_workspace/src/golang.org/x/net/html/doc.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doc.go similarity index 95% rename from Godeps/_workspace/src/golang.org/x/net/html/doc.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doc.go index b453fe1..fac0f54 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/doc.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doc.go @@ -90,8 +90,8 @@ example, to process each anchor node in depth-first order: f(doc) The relevant specifications include: -https://html.spec.whatwg.org/multipage/syntax.html and -https://html.spec.whatwg.org/multipage/syntax.html#tokenization +http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html and +http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html */ package html diff --git a/Godeps/_workspace/src/golang.org/x/net/html/doctype.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doctype.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/net/html/doctype.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doctype.go diff --git a/Godeps/_workspace/src/golang.org/x/net/html/entity.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/entity.go similarity index 99% rename from Godeps/_workspace/src/golang.org/x/net/html/entity.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/entity.go index a50c04c..af8a007 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/entity.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/entity.go @@ -8,7 +8,7 @@ package html const longestEntityWithoutSemicolon = 6 // entity is a map from HTML entity names to their values. The semicolon matters: -// https://html.spec.whatwg.org/multipage/syntax.html#named-character-references +// http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html // lists both "amp" and "amp;" as two separate entries. // // Note that the HTML5 list is larger than the HTML4 list at diff --git a/Godeps/_workspace/src/golang.org/x/net/html/escape.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/escape.go similarity index 96% rename from Godeps/_workspace/src/golang.org/x/net/html/escape.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/escape.go index d856139..75bddff 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/escape.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/escape.go @@ -12,7 +12,7 @@ import ( // These replacements permit compatibility with old numeric entities that // assumed Windows-1252 encoding. -// https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference +// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#consume-a-character-reference var replacementTable = [...]rune{ '\u20AC', // First entry is what 0x80 should be replaced with. '\u0081', @@ -55,7 +55,7 @@ var replacementTable = [...]rune{ // Precondition: b[src] == '&' && dst <= src. // attribute should be true if parsing an attribute value. func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) { - // https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference + // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#consume-a-character-reference // i starts at 1 because we already know that s[0] == '&'. i, s := 1, b[src:] diff --git a/Godeps/_workspace/src/golang.org/x/net/html/foreign.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/foreign.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/net/html/foreign.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/foreign.go diff --git a/Godeps/_workspace/src/golang.org/x/net/html/node.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/node.go similarity index 98% rename from Godeps/_workspace/src/golang.org/x/net/html/node.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/node.go index 26b657a..e4f0712 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/node.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/node.go @@ -5,7 +5,7 @@ package html import ( - "golang.org/x/net/html/atom" + "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" ) // A NodeType is the type of a Node. diff --git a/Godeps/_workspace/src/golang.org/x/net/html/parse.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/parse.go similarity index 97% rename from Godeps/_workspace/src/golang.org/x/net/html/parse.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/parse.go index be4b2bf..3320fbf 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/parse.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/parse.go @@ -10,11 +10,11 @@ import ( "io" "strings" - a "golang.org/x/net/html/atom" + a "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" ) // A parser implements the HTML5 parsing algorithm: -// https://html.spec.whatwg.org/multipage/syntax.html#tree-construction +// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tree-construction type parser struct { // tokenizer provides the tokens for the parser. tokenizer *Tokenizer @@ -59,7 +59,7 @@ func (p *parser) top() *Node { // Stop tags for use in popUntil. These come from section 12.2.3.2. var ( defaultScopeStopTags = map[string][]a.Atom{ - "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object, a.Template}, + "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object}, "math": {a.AnnotationXml, a.Mi, a.Mn, a.Mo, a.Ms, a.Mtext}, "svg": {a.Desc, a.ForeignObject, a.Title}, } @@ -1037,15 +1037,15 @@ func inBodyIM(p *parser) bool { func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { // This is the "adoption agency" algorithm, described at - // https://html.spec.whatwg.org/multipage/syntax.html#adoptionAgency + // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#adoptionAgency // TODO: this is a fairly literal line-by-line translation of that algorithm. // Once the code successfully parses the comprehensive test suite, we should // refactor this code to be more idiomatic. - // Steps 1-4. The outer loop. + // Steps 1-3. The outer loop. for i := 0; i < 8; i++ { - // Step 5. Find the formatting element. + // Step 4. Find the formatting element. var formattingElement *Node for j := len(p.afe) - 1; j >= 0; j-- { if p.afe[j].Type == scopeMarkerNode { @@ -1070,7 +1070,7 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { return } - // Steps 9-10. Find the furthest block. + // Steps 5-6. Find the furthest block. var furthestBlock *Node for _, e := range p.oe[feIndex:] { if isSpecialElement(e) { @@ -1087,47 +1087,47 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { return } - // Steps 11-12. Find the common ancestor and bookmark node. + // Steps 7-8. Find the common ancestor and bookmark node. commonAncestor := p.oe[feIndex-1] bookmark := p.afe.index(formattingElement) - // Step 13. The inner loop. Find the lastNode to reparent. + // Step 9. The inner loop. Find the lastNode to reparent. lastNode := furthestBlock node := furthestBlock x := p.oe.index(node) - // Steps 13.1-13.2 + // Steps 9.1-9.3. for j := 0; j < 3; j++ { - // Step 13.3. + // Step 9.4. x-- node = p.oe[x] - // Step 13.4 - 13.5. + // Step 9.5. if p.afe.index(node) == -1 { p.oe.remove(node) continue } - // Step 13.6. + // Step 9.6. if node == formattingElement { break } - // Step 13.7. + // Step 9.7. clone := node.clone() p.afe[p.afe.index(node)] = clone p.oe[p.oe.index(node)] = clone node = clone - // Step 13.8. + // Step 9.8. if lastNode == furthestBlock { bookmark = p.afe.index(node) + 1 } - // Step 13.9. + // Step 9.9. if lastNode.Parent != nil { lastNode.Parent.RemoveChild(lastNode) } node.AppendChild(lastNode) - // Step 13.10. + // Step 9.10. lastNode = node } - // Step 14. Reparent lastNode to the common ancestor, + // Step 10. Reparent lastNode to the common ancestor, // or for misnested table nodes, to the foster parent. if lastNode.Parent != nil { lastNode.Parent.RemoveChild(lastNode) @@ -1139,13 +1139,13 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { commonAncestor.AppendChild(lastNode) } - // Steps 15-17. Reparent nodes from the furthest block's children + // Steps 11-13. Reparent nodes from the furthest block's children // to a clone of the formatting element. clone := formattingElement.clone() reparentChildren(clone, furthestBlock) furthestBlock.AppendChild(clone) - // Step 18. Fix up the list of active formatting elements. + // Step 14. Fix up the list of active formatting elements. if oldLoc := p.afe.index(formattingElement); oldLoc != -1 && oldLoc < bookmark { // Move the bookmark with the rest of the list. bookmark-- @@ -1153,15 +1153,13 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { p.afe.remove(formattingElement) p.afe.insert(bookmark, clone) - // Step 19. Fix up the stack of open elements. + // Step 15. Fix up the stack of open elements. p.oe.remove(formattingElement) p.oe.insert(p.oe.index(furthestBlock)+1, clone) } } // inBodyEndTagOther performs the "any other end tag" algorithm for inBodyIM. -// "Any other end tag" handling from 12.2.5.5 The rules for parsing tokens in foreign content -// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inforeign func (p *parser) inBodyEndTagOther(tagAtom a.Atom) { for i := len(p.oe) - 1; i >= 0; i-- { if p.oe[i].DataAtom == tagAtom { diff --git a/Godeps/_workspace/src/golang.org/x/net/html/render.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/render.go similarity index 99% rename from Godeps/_workspace/src/golang.org/x/net/html/render.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/render.go index d34564f..4a833b4 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/render.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/render.go @@ -14,7 +14,7 @@ import ( type writer interface { io.Writer - io.ByteWriter + WriteByte(c byte) error // in Go 1.1, use io.ByteWriter WriteString(string) (int, error) } diff --git a/Godeps/_workspace/src/golang.org/x/net/html/token.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/token.go similarity index 99% rename from Godeps/_workspace/src/golang.org/x/net/html/token.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/token.go index 893e272..636ffcb 100644 --- a/Godeps/_workspace/src/golang.org/x/net/html/token.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/token.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "golang.org/x/net/html/atom" + "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" ) // A TokenType is the type of a Token. diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go similarity index 98% rename from Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go index 2b42e04..6c17cf3 100644 --- a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go +++ b/vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go @@ -23,8 +23,8 @@ import ( "regexp" "strings" - flag "github.com/spf13/pflag" - "speter.net/go/exp/math/dec/inf" + flag "github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag" + "github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf" ) // Quantity is a fixed-point representation of a number. @@ -301,14 +301,6 @@ func (q *Quantity) String() string { return number + string(suffix) } -func (q *Quantity) Add(y Quantity) error { - if q.Format != y.Format { - return fmt.Errorf("format mismatch: %v vs. %v", q.Format, y.Format) - } - q.Amount.Add(q.Amount, y.Amount) - return nil -} - // MarshalJSON implements the json.Marshaller interface. func (q Quantity) MarshalJSON() ([]byte, error) { return []byte(`"` + q.String() + `"`), nil diff --git a/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go similarity index 100% rename from Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE rename to vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go similarity index 100% rename from Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go diff --git a/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go similarity index 100% rename from Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go rename to vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/LICENSE b/vendor/github.com/appc/spec/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/LICENSE rename to vendor/github.com/appc/spec/LICENSE diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/build.go b/vendor/github.com/appc/spec/aci/build.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/aci/build.go rename to vendor/github.com/appc/spec/aci/build.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/doc.go b/vendor/github.com/appc/spec/aci/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/aci/doc.go rename to vendor/github.com/appc/spec/aci/doc.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/file.go b/vendor/github.com/appc/spec/aci/file.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/aci/file.go rename to vendor/github.com/appc/spec/aci/file.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/layout.go b/vendor/github.com/appc/spec/aci/layout.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/aci/layout.go rename to vendor/github.com/appc/spec/aci/layout.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/aci/writer.go b/vendor/github.com/appc/spec/aci/writer.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/aci/writer.go rename to vendor/github.com/appc/spec/aci/writer.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go b/vendor/github.com/appc/spec/discovery/discovery.go similarity index 97% rename from Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go rename to vendor/github.com/appc/spec/discovery/discovery.go index 6da2d85..bee5e96 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/discovery/discovery.go +++ b/vendor/github.com/appc/spec/discovery/discovery.go @@ -22,8 +22,8 @@ import ( "regexp" "strings" - "golang.org/x/net/html" - "golang.org/x/net/html/atom" + "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html" + "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" ) type acMeta struct { diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/doc.go b/vendor/github.com/appc/spec/discovery/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/discovery/doc.go rename to vendor/github.com/appc/spec/discovery/doc.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/http.go b/vendor/github.com/appc/spec/discovery/http.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/discovery/http.go rename to vendor/github.com/appc/spec/discovery/http.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/myapp.html b/vendor/github.com/appc/spec/discovery/myapp.html similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/discovery/myapp.html rename to vendor/github.com/appc/spec/discovery/myapp.html diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/myapp2.html b/vendor/github.com/appc/spec/discovery/myapp2.html similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/discovery/myapp2.html rename to vendor/github.com/appc/spec/discovery/myapp2.html diff --git a/Godeps/_workspace/src/github.com/appc/spec/discovery/parse.go b/vendor/github.com/appc/spec/discovery/parse.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/discovery/parse.go rename to vendor/github.com/appc/spec/discovery/parse.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/device/device_posix.go b/vendor/github.com/appc/spec/pkg/device/device_posix.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/pkg/device/device_posix.go rename to vendor/github.com/appc/spec/pkg/device/device_posix.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/doc.go b/vendor/github.com/appc/spec/pkg/tarheader/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/doc.go rename to vendor/github.com/appc/spec/pkg/tarheader/doc.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_darwin.go b/vendor/github.com/appc/spec/pkg/tarheader/pop_darwin.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_darwin.go rename to vendor/github.com/appc/spec/pkg/tarheader/pop_darwin.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_linux.go b/vendor/github.com/appc/spec/pkg/tarheader/pop_linux.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_linux.go rename to vendor/github.com/appc/spec/pkg/tarheader/pop_linux.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_posix.go b/vendor/github.com/appc/spec/pkg/tarheader/pop_posix.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/pop_posix.go rename to vendor/github.com/appc/spec/pkg/tarheader/pop_posix.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/tarheader.go b/vendor/github.com/appc/spec/pkg/tarheader/tarheader.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/pkg/tarheader/tarheader.go rename to vendor/github.com/appc/spec/pkg/tarheader/tarheader.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/common/common.go b/vendor/github.com/appc/spec/schema/common/common.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/common/common.go rename to vendor/github.com/appc/spec/schema/common/common.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/doc.go b/vendor/github.com/appc/spec/schema/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/doc.go rename to vendor/github.com/appc/spec/schema/doc.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/image.go b/vendor/github.com/appc/spec/schema/image.go similarity index 97% rename from Godeps/_workspace/src/github.com/appc/spec/schema/image.go rename to vendor/github.com/appc/spec/schema/image.go index 5aa536f..48f9232 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/image.go +++ b/vendor/github.com/appc/spec/schema/image.go @@ -22,7 +22,7 @@ import ( "github.com/appc/spec/schema/types" - "github.com/camlistore/camlistore/pkg/errorutil" + "github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil" ) const ( diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/kind.go b/vendor/github.com/appc/spec/schema/kind.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/kind.go rename to vendor/github.com/appc/spec/schema/kind.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/pod.go b/vendor/github.com/appc/spec/schema/pod.go similarity index 97% rename from Godeps/_workspace/src/github.com/appc/spec/schema/pod.go rename to vendor/github.com/appc/spec/schema/pod.go index 4046816..c42bbe2 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/pod.go +++ b/vendor/github.com/appc/spec/schema/pod.go @@ -22,7 +22,7 @@ import ( "github.com/appc/spec/schema/types" - "github.com/camlistore/camlistore/pkg/errorutil" + "github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil" ) const PodManifestKind = types.ACKind("PodManifest") diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/acidentifier.go b/vendor/github.com/appc/spec/schema/types/acidentifier.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/acidentifier.go rename to vendor/github.com/appc/spec/schema/types/acidentifier.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/ackind.go b/vendor/github.com/appc/spec/schema/types/ackind.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/ackind.go rename to vendor/github.com/appc/spec/schema/types/ackind.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/acname.go b/vendor/github.com/appc/spec/schema/types/acname.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/acname.go rename to vendor/github.com/appc/spec/schema/types/acname.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/annotations.go b/vendor/github.com/appc/spec/schema/types/annotations.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/annotations.go rename to vendor/github.com/appc/spec/schema/types/annotations.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/app.go b/vendor/github.com/appc/spec/schema/types/app.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/app.go rename to vendor/github.com/appc/spec/schema/types/app.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/date.go b/vendor/github.com/appc/spec/schema/types/date.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/date.go rename to vendor/github.com/appc/spec/schema/types/date.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/dependencies.go b/vendor/github.com/appc/spec/schema/types/dependencies.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/dependencies.go rename to vendor/github.com/appc/spec/schema/types/dependencies.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/doc.go b/vendor/github.com/appc/spec/schema/types/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/doc.go rename to vendor/github.com/appc/spec/schema/types/doc.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/environment.go b/vendor/github.com/appc/spec/schema/types/environment.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/environment.go rename to vendor/github.com/appc/spec/schema/types/environment.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/errors.go b/vendor/github.com/appc/spec/schema/types/errors.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/errors.go rename to vendor/github.com/appc/spec/schema/types/errors.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/event_handler.go b/vendor/github.com/appc/spec/schema/types/event_handler.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/event_handler.go rename to vendor/github.com/appc/spec/schema/types/event_handler.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/exec.go b/vendor/github.com/appc/spec/schema/types/exec.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/exec.go rename to vendor/github.com/appc/spec/schema/types/exec.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/hash.go b/vendor/github.com/appc/spec/schema/types/hash.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/hash.go rename to vendor/github.com/appc/spec/schema/types/hash.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator.go b/vendor/github.com/appc/spec/schema/types/isolator.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator.go rename to vendor/github.com/appc/spec/schema/types/isolator.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_linux_specific.go b/vendor/github.com/appc/spec/schema/types/isolator_linux_specific.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_linux_specific.go rename to vendor/github.com/appc/spec/schema/types/isolator_linux_specific.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go b/vendor/github.com/appc/spec/schema/types/isolator_resources.go similarity index 98% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go rename to vendor/github.com/appc/spec/schema/types/isolator_resources.go index eb791ef..d6d264a 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/isolator_resources.go +++ b/vendor/github.com/appc/spec/schema/types/isolator_resources.go @@ -19,7 +19,7 @@ import ( "errors" "fmt" - "k8s.io/kubernetes/pkg/api/resource" + "github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource" ) var ( diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/labels.go b/vendor/github.com/appc/spec/schema/types/labels.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/labels.go rename to vendor/github.com/appc/spec/schema/types/labels.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint.go b/vendor/github.com/appc/spec/schema/types/mountpoint.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/mountpoint.go rename to vendor/github.com/appc/spec/schema/types/mountpoint.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/port.go b/vendor/github.com/appc/spec/schema/types/port.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/port.go rename to vendor/github.com/appc/spec/schema/types/port.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/semver.go b/vendor/github.com/appc/spec/schema/types/semver.go similarity index 96% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/semver.go rename to vendor/github.com/appc/spec/schema/types/semver.go index 0008181..d7d741a 100644 --- a/Godeps/_workspace/src/github.com/appc/spec/schema/types/semver.go +++ b/vendor/github.com/appc/spec/schema/types/semver.go @@ -17,7 +17,7 @@ package types import ( "encoding/json" - "github.com/coreos/go-semver/semver" + "github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver" ) var ( diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/url.go b/vendor/github.com/appc/spec/schema/types/url.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/url.go rename to vendor/github.com/appc/spec/schema/types/url.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/uuid.go b/vendor/github.com/appc/spec/schema/types/uuid.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/uuid.go rename to vendor/github.com/appc/spec/schema/types/uuid.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/types/volume.go b/vendor/github.com/appc/spec/schema/types/volume.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/types/volume.go rename to vendor/github.com/appc/spec/schema/types/volume.go diff --git a/Godeps/_workspace/src/github.com/appc/spec/schema/version.go b/vendor/github.com/appc/spec/schema/version.go similarity index 100% rename from Godeps/_workspace/src/github.com/appc/spec/schema/version.go rename to vendor/github.com/appc/spec/schema/version.go diff --git a/Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/inputs.go b/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/inputs.go rename to vendor/github.com/blablacar/attributes-merger/attributes/inputs.go diff --git a/Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/merger.go b/vendor/github.com/blablacar/attributes-merger/attributes/merger.go similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/attributes-merger/attributes/merger.go rename to vendor/github.com/blablacar/attributes-merger/attributes/merger.go diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE b/vendor/github.com/blablacar/dgr/LICENSE.md similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE rename to vendor/github.com/blablacar/dgr/LICENSE.md diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/acfullname.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go similarity index 92% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/acfullname.go rename to vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go index ccf1d42..caca9f7 100644 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/acfullname.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go @@ -4,6 +4,8 @@ import ( "encoding/json" "github.com/appc/spec/discovery" "github.com/juju/errors" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "net/http" "regexp" @@ -38,6 +40,10 @@ func (n ACFullname) LatestVersion() (string, error) { r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)(\-[\dA-Za-z]+){0,1}$`) // TODO this is nexus specific + if len(endpoint.ACIEndpoints) == 0 { + return "", errs.WithF(data.WithField("aci", string(n)), "Discovery does not give an endpoint to check latest version") + } + url := getRedirectForLatest(endpoint.ACIEndpoints[0].ACI) logs.WithField("url", url).Debug("latest verion url") diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/aci-manifest.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/aci-manifest.go new file mode 100644 index 0000000..c75f8ba --- /dev/null +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/aci-manifest.go @@ -0,0 +1,146 @@ +package common + +import ( + "encoding/json" + "github.com/appc/spec/aci" + "github.com/appc/spec/schema" + "github.com/appc/spec/schema/types" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "io" + "io/ioutil" + "os" + "path/filepath" + "time" +) + +func ExtractManifestContentFromAci(aciPath string) ([]byte, error) { + fields := data.WithField("file", aciPath) + input, err := os.Open(aciPath) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot open file") + } + defer input.Close() + + tr, err := aci.NewCompressedTarReader(input) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot open file as tar") + } + +Tar: + for { + hdr, err := tr.Next() + switch err { + case io.EOF: + break Tar + case nil: + if filepath.Clean(hdr.Name) == aci.ManifestFile { + bytes, err := ioutil.ReadAll(tr) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot read manifest content in tar") + } + return bytes, nil + } + default: + return nil, errs.WithEF(err, fields, "error reading tarball file") + } + } + return nil, errs.WithEF(err, fields, "Cannot found manifest in file") +} + +func ExtractManifestFromAci(aciPath string) (*schema.ImageManifest, error) { + fields := data.WithField("file", aciPath) + content, err := ExtractManifestContentFromAci(aciPath) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot extract aci manifest content from file") + } + im := &schema.ImageManifest{} + + err = im.UnmarshalJSON(content) + if err != nil { + return nil, errs.WithEF(err, fields.WithField("content", string(content)), "Cannot unmarshall json content") + } + return im, nil +} + +func WriteAciManifest(m *AciManifest, targetFile string, projectName string, dgrVersion string) error { + fields := data.WithField("name", m.NameAndVersion.String()) + name, err := types.NewACIdentifier(projectName) + if err != nil { + return errs.WithEF(err, fields, "aci name is not a valid identifier for rkt") + } + + labels := types.Labels{} + if m.NameAndVersion.Version() != "" { + labels = append(labels, types.Label{Name: "version", Value: m.NameAndVersion.Version()}) + } + labels = append(labels, types.Label{Name: "os", Value: "linux"}) + labels = append(labels, types.Label{Name: "arch", Value: "amd64"}) + + if m.Aci.App.User == "" { + m.Aci.App.User = "0" + } + if m.Aci.App.Group == "" { + m.Aci.App.Group = "0" + } + + im := schema.BlankImageManifest() + im.Annotations = m.Aci.Annotations + + //dgrBuilderIdentifier, _ := types.NewACIdentifier(ManifestDrgBuilder) + dgrVersionIdentifier, _ := types.NewACIdentifier(ManifestDrgVersion) + buildDateIdentifier, _ := types.NewACIdentifier("build-date") + im.Annotations.Set(*dgrVersionIdentifier, dgrVersion) + //im.Annotations.Set(*dgrBuilderIdentifier, m.Builder.Image.String()) + im.Annotations.Set(*buildDateIdentifier, time.Now().Format(time.RFC3339)) + im.Dependencies, err = ToAppcDependencies(m.Aci.Dependencies) + if err != nil { + return errs.WithEF(err, fields, "Failed to prepare dependencies for manifest") + } + im.Name = *name + im.Labels = labels + + if len(m.Aci.App.Exec) == 0 { + m.Aci.App.Exec = []string{"/dgr/bin/busybox", "sh"} + } + + im.App = &types.App{ + Exec: m.Aci.App.Exec, + EventHandlers: []types.EventHandler{{Name: "pre-start", Exec: []string{"/dgr/bin/prestart"}}}, + User: m.Aci.App.User, + Group: m.Aci.App.Group, + WorkingDirectory: m.Aci.App.WorkingDirectory, + SupplementaryGIDs: m.Aci.App.SupplementaryGIDs, + Environment: m.Aci.App.Environment, + MountPoints: m.Aci.App.MountPoints, + Ports: m.Aci.App.Ports, + Isolators: m.Aci.App.Isolators, + } + buff, err := json.MarshalIndent(im, "", " ") + if err != nil { + return errs.WithEF(err, fields.WithField("object", im), "Failed to marshal manifest") + } + err = ioutil.WriteFile(targetFile, buff, 0644) + if err != nil { + return errs.WithEF(err, fields.WithField("file", targetFile), "Failed to write manifest file") + } + return nil +} + +func ToAppcDependencies(dependencies []ACFullname) (types.Dependencies, error) { + appcDependencies := types.Dependencies{} + for _, dep := range dependencies { + id, err := types.NewACIdentifier(dep.Name()) + if err != nil { + return nil, errs.WithEF(err, data.WithField("name", dep.Name()), "invalid identifer name for rkt") + } + t := types.Dependency{ImageName: *id} + if dep.Version() != "" { + t.Labels = types.Labels{} + t.Labels = append(t.Labels, types.Label{Name: "version", Value: dep.Version()}) + } + + appcDependencies = append(appcDependencies, t) + } + return appcDependencies, nil +} diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go new file mode 100644 index 0000000..1166429 --- /dev/null +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go @@ -0,0 +1,45 @@ +package common + +import ( + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" +) + +const PathImageAci = "/image.aci" +const PathManifest = "/manifest" +const PathRootfs = "/rootfs" +const PathAciManifest = "/aci-manifest.yml" +const PathManifestYmlTmpl = "/aci-manifest.yml.tmpl" + +const EnvDgrVersion = "DGR_VERSION" +const EnvAciPath = "ACI_PATH" +const EnvAciTarget = "ACI_TARGET" +const EnvLogLevel = "LOG_LEVEL" +const EnvCatchOnError = "CATCH_ON_ERROR" +const EnvCatchOnStep = "CATCH_ON_STEP" + +const EnvBuilderCommand = "BUILDER_COMMAND" +const PrefixBuilder = "builder/" + +const ManifestDrgVersion = "dgr-version" + +type BuilderCommand string + +const ( + CommandBuild BuilderCommand = "build" + CommandInit BuilderCommand = "init" + CommandTry BuilderCommand = "try" +) + +func (b BuilderCommand) CommandManifestKey() (string, error) { + switch b { + case CommandBuild: + return "dgrtool.com/dgr/stage1/build", nil + case CommandInit: + return "dgrtool.com/dgr/stage1/init", nil + case CommandTry: + return "dgrtool.com/dgr/stage1/try", nil + default: + return "", errs.WithF(data.WithField("command", b), "Unimplemented command manifest key") + } +} diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go new file mode 100644 index 0000000..ff6d7e8 --- /dev/null +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go @@ -0,0 +1,141 @@ +package common + +import ( + "bufio" + "bytes" + "github.com/appc/spec/schema" + "github.com/appc/spec/schema/types" + "github.com/blablacar/dgr/bin-templater/template" + "github.com/ghodss/yaml" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/logs" +) + +type PodManifest struct { + Name ACFullname `json:"name,omitempty" yaml:"name,omitempty"` + Pod *PodDefinition `json:"pod,omitempty" yaml:"pod,omitempty"` +} + +type PodDefinition struct { + Apps []RuntimeApp `json:"apps,omitempty" yaml:"apps,omitempty"` + Volumes []types.Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"` + Isolators []types.Isolator `json:"isolators,omitempty" yaml:"isolators,omitempty"` + Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Ports []types.ExposedPort `json:"ports,omitempty" yaml:"ports,omitempty"` +} + +type RuntimeApp struct { + Dependencies []ACFullname `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + App DgrApp `json:"app,omitempty" yaml:"app,omitempty"` + Mounts []schema.Mount `json:"mounts,omitempty" yaml:"mounts,omitempty"` + Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` +} + +type Env struct { + Name string `json:"name"` + Value string `json:"value"` +} + +type MountInfo struct { + From string `json:"from"` + To string `json:"to"` +} + +type BuildDefinition struct { + Image ACFullname `json:"image,omitempty" yaml:"image,omitempty"` + Dependencies []ACFullname `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` + MountPoints []MountInfo `json:"mountPoints,omitempty" yaml:"mountPoints,omitempty"` +} + +type AciManifest struct { + NameAndVersion ACFullname `json:"name,omitempty" yaml:"name,omitempty"` + From interface{} `json:"from,omitempty" yaml:"from,omitempty"` + Builder BuildDefinition `json:"builder,omitempty" yaml:"builder,omitempty"` + Aci AciDefinition `json:"aci,omitempty" yaml:"aci,omitempty"` + Tester TestManifest `json:"tester,omitempty" yaml:"tester,omitempty"` +} + +type TestManifest struct { + Builder BuildDefinition `json:"builder,omitempty" yaml:"builder,omitempty"` + Aci AciDefinition `json:"aci,omitempty" yaml:"aci,omitempty"` +} + +func (m *AciManifest) GetFroms() ([]ACFullname, error) { + var froms []ACFullname + switch v := m.From.(type) { + case string: + froms = []ACFullname{*NewACFullName(m.From.(string))} + case []interface{}: + for _, from := range m.From.([]interface{}) { + froms = append(froms, *NewACFullName(from.(string))) + } + case nil: + return froms, nil + default: + return nil, errs.WithF(data.WithField("type", v), "Invalid from type format") + } + return froms, nil +} + +type AciDefinition struct { + App DgrApp `json:"app,omitempty" yaml:"app,omitempty"` + Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Dependencies []ACFullname `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` + PathWhitelist []string `json:"pathWhitelist,omitempty" yaml:"pathWhitelist,omitempty"` +} + +type DgrApp struct { + Exec types.Exec `json:"exec,omitempty" yaml:"exec,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + SupplementaryGIDs []int `json:"supplementaryGIDs,omitempty" yaml:"supplementaryGIDs,omitempty"` + WorkingDirectory string `json:"workingDirectory,omitempty" yaml:"workingDirectory,omitempty"` + Environment types.Environment `json:"environment,omitempty" yaml:"environment,omitempty"` + MountPoints []types.MountPoint `json:"mountPoints,omitempty" yaml:"mountPoints,omitempty"` + Ports []types.Port `json:"ports,omitempty" yaml:"ports,omitempty"` + Isolators types.Isolators `json:"isolators,omitempty" yaml:"isolators,omitempty"` +} + +func ProcessManifestTemplate(manifestContent string, data2 interface{}, checkNoValue bool) (*AciManifest, error) { + manifest := AciManifest{Aci: AciDefinition{}} + fields := data.WithField("source", manifestContent) + + template, err := template.NewTemplating(nil, "", manifestContent) + if err != nil { + return nil, errs.WithEF(err, fields, "Failed to load templating of manifest") + } + + var b bytes.Buffer + writer := bufio.NewWriter(&b) + if err := template.Execute(writer, data2); err != nil { + return nil, errs.WithEF(err, fields, "Failed to template manifest") + } + if err := writer.Flush(); err != nil { + return nil, errs.WithEF(err, fields, "Failed to flush buffer") + } + + templated := b.Bytes() + if logs.IsDebugEnabled() { + logs.WithField("content", string(templated)).Debug("Templated manifest") + } + + if checkNoValue { + scanner := bufio.NewScanner(bytes.NewReader(templated)) + scanner.Split(bufio.ScanLines) + for i := 1; scanner.Scan(); i++ { + text := scanner.Text() + if bytes.Contains([]byte(text), []byte("<no value>")) { + return nil, errs.WithF(fields.WithField("line", i).WithField("text", text), "Templating result of manifest have <no value>") + } + } + } + + err = yaml.Unmarshal(templated, &manifest) + if err != nil { + return nil, errs.WithEF(err, fields, "Cannot unmarshall manifest") + } + + return &manifest, nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/exec.go similarity index 76% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go rename to vendor/github.com/blablacar/dgr/bin-dgr/common/exec.go index 6d66f16..a3493bf 100644 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/exec.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/exec.go @@ -37,6 +37,20 @@ func ExecCmdGetOutput(head string, parts ...string) (string, error) { return strings.TrimSpace(stdout.String()), err } +func ExecCmdGetStderr(head string, parts ...string) (string, error) { + var stderr bytes.Buffer + + if logs.IsDebugEnabled() { + logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") + } + cmd := exec.Command(head, parts...) + cmd.Stdout = os.Stdout + cmd.Stderr = &stderr + cmd.Start() + err := cmd.Wait() + return strings.TrimSpace(stderr.String()), err +} + func ExecCmd(head string, parts ...string) error { if logs.IsDebugEnabled() { logs.WithField("command", strings.Join([]string{head, " ", strings.Join(parts, " ")}, " ")).Debug("Running external command") diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/files.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/files.go similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/files.go rename to vendor/github.com/blablacar/dgr/bin-dgr/common/files.go diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go new file mode 100644 index 0000000..113dc18 --- /dev/null +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go @@ -0,0 +1,176 @@ +package common + +import ( + "bufio" + "fmt" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/logs" + "strings" +) + +const rktSupportedVersion Version = "1.4.0" + +type RktConfig struct { + Path string `yaml:"path"` + InsecureOptions []string `yaml:"insecureOptions"` + dir string `yaml:"dir"` + LocalConfig string `yaml:"localConfig"` + SystemConfig string `yaml:"systemConfig"` + UserConfig string `yaml:"userConfig"` + TrustKeysFromHttps bool `yaml:"trustKeysFromHttps"` + NoStore bool `yaml:"noStore"` + StoreOnly bool `yaml:"storeOnly"` +} + +type RktClient struct { + config RktConfig + globalArgs []string + fields data.Fields +} + +func NewRktClient(config RktConfig) (*RktClient, error) { + if len(config.InsecureOptions) == 0 { + config.InsecureOptions = []string{"ondisk", "image"} + } + + rkt := &RktClient{ + fields: data.WithField("config", config), + config: config, + globalArgs: config.prepareGlobalArgs(), + } + + v, err := rkt.Version() + if err != nil { + return nil, err + } + if v.LessThan(rktSupportedVersion) { + return nil, errs.WithF(rkt.fields.WithField("current", v).WithField("required", ">="+rktSupportedVersion), "Unsupported version of rkt") + } + + logs.WithField("version", v).WithField("args", rkt.globalArgs).Debug("New rkt client") + return rkt, nil +} + +func (rktCfg *RktConfig) prepareGlobalArgs() []string { + args := []string{} + + cmd := "rkt" + if rktCfg.Path != "" { + cmd = rktCfg.Path + } + args = append(args, cmd) + + if logs.IsDebugEnabled() { + args = append(args, "--debug") + } + if rktCfg.TrustKeysFromHttps { + args = append(args, "--trust-keys-from-https") + } + if rktCfg.UserConfig != "" { + args = append(args, "--user-config="+rktCfg.UserConfig) + } + if rktCfg.LocalConfig != "" { + args = append(args, "--local-config="+rktCfg.LocalConfig) + } + if rktCfg.SystemConfig != "" { + args = append(args, "--system-config="+rktCfg.SystemConfig) + } + if rktCfg.dir != "" { + args = append(args, "--rkt.dir="+rktCfg.dir) + } + args = append(args, "--insecure-options="+strings.Join(rktCfg.InsecureOptions, ",")) + return args +} + +func (rkt *RktClient) argsStore(cmd []string, cmdArgs ...string) []string { + args := rkt.globalArgs[1:] + args = append(args, cmd...) + if rkt.config.NoStore { + args = append(args, "--no-store") + } + if rkt.config.StoreOnly { + args = append(args, "--store-only") + } + args = append(args, cmdArgs...) + return args +} + +func (rkt *RktClient) GetPath() (string, error) { + if rkt.config.Path != "" { + return rkt.config.Path, nil + } + return ExecCmdGetOutput("/bin/bash", "-c", "command -v rkt") +} + +func (rkt *RktClient) Version() (Version, error) { + output, err := ExecCmdGetOutput(rkt.globalArgs[0], "version") + if err != nil { + return "", errs.WithEF(err, rkt.fields, "Failed to get rkt Version") + } + + scanner := bufio.NewScanner(strings.NewReader(output)) + for scanner.Scan() { + line := scanner.Text() + if strings.HasPrefix(line, "rkt Version:") { + var versionString string + if read, err := fmt.Sscanf(line, "rkt Version: %s", &versionString); read != 1 || err != nil { + return "", errs.WithEF(err, rkt.fields.WithField("cpntent", line), "Failed to read rkt version") + } + version := Version(versionString) + return version, nil + } + } + return "", errs.WithF(rkt.fields.WithField("content", output), "Cannot found rkt version from rkt call") +} + +func (rkt *RktClient) Fetch(image string) (string, error) { + hash, err := ExecCmdGetOutput(rkt.globalArgs[0], rkt.argsStore([]string{"fetch"}, "--full", image)...) + if err != nil { + return "", errs.WithEF(err, rkt.fields.WithField("image", image), "Failed to fetch image") + } + return hash, err +} + +func (rkt *RktClient) CatManifest(image string) (string, error) { + content, err := ExecCmdGetOutput(rkt.globalArgs[0], append(rkt.globalArgs[1:], "image", "cat-manifest", image)...) + if err != nil { + return "", errs.WithEF(err, rkt.fields.WithField("image", image), "Failed to cat manifest") + } + return content, err +} + +func (rkt *RktClient) ImageRm(images string) error { + stdout, stderr, err := ExecCmdGetStdoutAndStderr(rkt.globalArgs[0], append(rkt.globalArgs[1:], "image", "rm", images)...) + if err != nil { + return errs.WithEF(err, rkt.fields.WithField("images", images).WithField("stdout", stdout).WithField("stderr", stderr), "Failed to cat manifest") + } + return err +} + +func (rkt *RktClient) RmFromFile(path string) (string, string, error) { + out, stderr, err := ExecCmdGetStdoutAndStderr(rkt.globalArgs[0], append(rkt.globalArgs[1:], "rm", "--uuid-file", path)...) + if err != nil { + return "", "", errs.WithEF(err, rkt.fields.WithField("path", path). + WithField("stdout", out). + WithField("stderr", stderr), "Failed to remove containers") + } + return out, stderr, err +} + +func (rkt *RktClient) Rm(uuids string) (string, string, error) { + out, stderr, err := ExecCmdGetStdoutAndStderr(rkt.globalArgs[0], append(rkt.globalArgs[1:], "rm", uuids)...) + if err != nil { + return "", "", errs.WithEF(err, rkt.fields.WithField("uuids", uuids). + WithField("stdout", out). + WithField("stderr", stderr), "Failed to remove containers") + } + return out, stderr, err +} + +func (rkt *RktClient) Run(args []string) error { + if err := ExecCmd(rkt.globalArgs[0], append(append(rkt.globalArgs[1:], "run"), args...)...); err != nil { + return errs.WithEF(err, rkt.fields, "Run failed") + } + return nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/tar.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/tar.go similarity index 54% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/tar.go rename to vendor/github.com/blablacar/dgr/bin-dgr/common/tar.go index feaa23c..1da0af8 100644 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-dgr/common/tar.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/tar.go @@ -1,15 +1,10 @@ package common -func Tar(zip bool, destination string, source ...string) error { - zipFlag := "" - if zip { - zipFlag = "z" - } - +func Tar(destination string, source ...string) error { // remove zip source = append(source, "") source = append(source, "") copy(source[2:], source[0:]) - source[0] = "cpf" + zipFlag + source[0] = "cpf" source[1] = destination return ExecCmd("tar", source...) diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/version.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/version.go new file mode 100644 index 0000000..d7eb22e --- /dev/null +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/version.go @@ -0,0 +1,63 @@ +package common + +import ( + "strconv" + "strings" +) + +// Version provides utility methods for comparing versions. +type Version string + +func (v Version) compareTo(other Version) int { + var ( + currTab = strings.Split(string(v), ".") + otherTab = strings.Split(string(other), ".") + ) + + max := len(currTab) + if len(otherTab) > max { + max = len(otherTab) + } + for i := 0; i < max; i++ { + var currInt, otherInt int + + if len(currTab) > i { + currInt, _ = strconv.Atoi(currTab[i]) + } + if len(otherTab) > i { + otherInt, _ = strconv.Atoi(otherTab[i]) + } + if currInt > otherInt { + return 1 + } + if otherInt > currInt { + return -1 + } + } + return 0 +} + +// LessThan checks if a version is less than another +func (v Version) LessThan(other Version) bool { + return v.compareTo(other) == -1 +} + +// LessThanOrEqualTo checks if a version is less than or equal to another +func (v Version) LessThanOrEqualTo(other Version) bool { + return v.compareTo(other) <= 0 +} + +// GreaterThan checks if a version is greater than another +func (v Version) GreaterThan(other Version) bool { + return v.compareTo(other) == 1 +} + +// GreaterThanOrEqualTo checks if a version is greater than or equal to another +func (v Version) GreaterThanOrEqualTo(other Version) bool { + return v.compareTo(other) >= 0 +} + +// Equal checks if a version is equal to another +func (v Version) Equal(other Version) bool { + return v.compareTo(other) == 0 +} diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/version_generator.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/version_generator.go new file mode 100644 index 0000000..53ceea9 --- /dev/null +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/version_generator.go @@ -0,0 +1,28 @@ +package common + +import ( + "fmt" + "github.com/n0rad/go-erlog/logs" + "time" +) + +func GenerateVersion(aciHome string) string { + version := generateDate() + if hash, err := GitHash(aciHome); err == nil { + version += "-v" + hash + } + return version +} + +func generateDate() string { + return fmt.Sprintf("%s", time.Now().Format("20060102.150405")) +} + +func GitHash(path string) (string, error) { + out, _, err := ExecCmdGetStdoutAndStderr("git", "-C", path, "rev-parse", "--short", "HEAD") + if err != nil { + logs.WithE(err).WithField("path", path).Debug("Failed to get git hash from path") + return "", err + } + return out, nil +} diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go b/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go similarity index 81% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go rename to vendor/github.com/blablacar/dgr/bin-templater/template/directory.go index 463d170..6184154 100644 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/directory.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go @@ -1,6 +1,7 @@ package template import ( + "github.com/leekchan/gtf" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" @@ -14,7 +15,7 @@ type TemplateDir struct { fields data.Fields src string dst string - partials *txttmpl.Template + Partials *txttmpl.Template } func NewTemplateDir(path string, targetRoot string) (*TemplateDir, error) { @@ -51,9 +52,9 @@ func (t *TemplateDir) LoadPartial() error { var tmpl *txttmpl.Template for _, partial := range partials { if tmpl == nil { - tmpl = txttmpl.New(partial) + tmpl = txttmpl.New(partial).Funcs(TemplateFunctions).Funcs(map[string]interface{}(gtf.GtfFuncMap)) } else { - tmpl = tmpl.New(partial) + tmpl = tmpl.New(partial).Funcs(TemplateFunctions).Funcs(map[string]interface{}(gtf.GtfFuncMap)) } content, err := ioutil.ReadFile(partial) @@ -65,7 +66,7 @@ func (t *TemplateDir) LoadPartial() error { return errs.WithEF(err, t.fields.WithField("partial", partial), "Failed to parse partial") } } - t.partials = tmpl + t.Partials = tmpl return nil } @@ -101,9 +102,13 @@ func (t *TemplateDir) processSingleDir(src string, dst string, attributes map[st if err := t.processSingleDir(srcObj, dstObj, attributes); err != nil { return err } - } else if strings.HasSuffix(obj.Name(), ".tmpl") { - dstObj := dstObj[:len(dstObj)-5] - template, err := NewTemplateFile(t.partials, srcObj, obj.Mode()) + } else if strings.HasSuffix(obj.Name(), ".tmpl") || strings.Contains(obj.Name(), ".tmpl.") { + if strings.HasSuffix(obj.Name(), ".tmpl") { + dstObj = dstObj[:len(dstObj)-5] + } else { + dstObj = dst + "/" + strings.Replace(obj.Name(), ".tmpl.", ".", 1) + } + template, err := NewTemplateFile(t.Partials, srcObj, obj.Mode()) if err != nil { return err } diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go b/vendor/github.com/blablacar/dgr/bin-templater/template/file.go similarity index 93% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go rename to vendor/github.com/blablacar/dgr/bin-templater/template/file.go index 65cd200..481249d 100644 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/file.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/file.go @@ -3,13 +3,13 @@ package template import ( "bufio" "bytes" - "github.com/blablacar/dgr/bin-dgr/common" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "gopkg.in/yaml.v2" "io/ioutil" "os" + "os/exec" txttmpl "text/template" ) @@ -37,8 +37,8 @@ func NewTemplateFile(partials *txttmpl.Template, src string, mode os.FileMode) ( } t := &TemplateFile{ - Uid: 0, - Gid: 0, + Uid: os.Getuid(), + Gid: os.Getgid(), fields: fields, template: template, Mode: mode, @@ -65,8 +65,6 @@ func (t *TemplateFile) loadTemplateConfig(src string) error { return nil } -//template.ExecuteTemplate(os.Stdout, "login", data) - func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{}) error { if logs.IsTraceEnabled() { logs.WithF(f.fields).WithField("attributes", attributes).Trace("templating with attributes") @@ -122,7 +120,11 @@ func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{} } if f.CheckCmd != "" { - if err = common.ExecCmd("/dgr/bin/busybox", "sh", "-c", f.CheckCmd); err != nil { + cmd := exec.Command("/dgr/bin/busybox", "sh", "-c", f.CheckCmd) + cmd.Stdout = os.Stdout + cmd.Stdin = os.Stdin + cmd.Stderr = os.Stderr + if err = cmd.Run(); err != nil { return errs.WithEF(err, fields.WithField("file", dst), "Check command failed after templating") } } diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go similarity index 51% rename from Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go rename to vendor/github.com/blablacar/dgr/bin-templater/template/templating.go index 5a0ca1e..fe59b44 100644 --- a/Godeps/_workspace/src/github.com/blablacar/dgr/bin-templater/template/templating.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go @@ -7,6 +7,8 @@ import ( "io" "os" "path" + "reflect" + "sort" "strings" txttmpl "text/template" "time" @@ -115,6 +117,139 @@ func UnmarshalJsonArray(data string) ([]interface{}, error) { return ret, err } +func IsType(data interface{}, t string) bool { + dataType := reflect.TypeOf(data) + if dataType == nil { + return false + } + if dataType.String() == t { + return true + } + return false +} + +func IsKind(data interface{}, t string) bool { + dataType := reflect.TypeOf(data) + if dataType == nil { + return false + } + if dataType.Kind().String() == t { + return true + } + return false +} + +func IsMap(data interface{}) bool { + dataType := reflect.TypeOf(data) + if dataType == nil { + return false + } + if dataType.Kind() == reflect.Map { + return true + } + return false +} + +func IsArray(data interface{}) bool { + dataType := reflect.TypeOf(data) + if dataType == nil { + return false + } + if dataType.Kind() == reflect.Array || dataType.Kind() == reflect.Slice { + return true + } + return false +} + +func IsString(data interface{}) bool { + dataType := reflect.TypeOf(data) + if dataType == nil { + return false + } + if dataType.Kind() == reflect.String { + return true + } + return false +} + +func IsMapFirst(data interface{}, element interface{}) bool { + switch reflect.TypeOf(data).Kind() { + case reflect.Map: + mapItem := reflect.ValueOf(data).MapKeys() + + var keys []string + for _, k := range mapItem { + keys = append(keys, k.String()) + } + sort.Strings(keys) + mapItemType := keys[0] + return (mapItemType == element) + } + return false +} + +func IsMapLast(data interface{}, element interface{}) bool { + switch reflect.TypeOf(data).Kind() { + case reflect.Map: + mapItem := reflect.ValueOf(data).MapKeys() + + var keys []string + for _, k := range mapItem { + keys = append(keys, k.String()) + } + sort.Strings(keys) + mapItemType := keys[len(keys)-1] + return (mapItemType == element) + } + return false +} + +func HowDeep(data interface{}, element interface{}) int { + return HowDeepIsIt(data, element, 0) +} + +func HowDeepIsIt(data interface{}, element interface{}, deep int) int { + elemType := reflect.TypeOf(element).Kind() + mapItem := reflect.ValueOf(data) + elemItem := reflect.ValueOf(element) + switch elemType { + case reflect.Map: + for _, b := range reflect.ValueOf(data).MapKeys() { + if reflect.DeepEqual(mapItem.MapIndex(b).Interface(), elemItem.Interface()) { + return deep + 1 + } + if IsMap(mapItem.MapIndex(b).Interface()) { + index := HowDeepIsIt(mapItem.MapIndex(b).Interface(), element, deep+1) + if index == deep+2 { + return index + } + } + } + } + + return deep +} + +func add(x, y int) int { + return x + y +} + +func mul(x, y int) int { + return x * y +} + +func div(x, y int) int { + return x / y +} + +func mod(x, y int) int { + return x % y +} + +func sub(x, y int) int { + return x - y +} + func init() { TemplateFunctions = make(map[string]interface{}) TemplateFunctions["base"] = path.Base @@ -129,8 +264,21 @@ func init() { TemplateFunctions["toLower"] = strings.ToLower TemplateFunctions["contains"] = strings.Contains TemplateFunctions["replace"] = strings.Replace + TemplateFunctions["repeat"] = strings.Repeat TemplateFunctions["orDef"] = orDef TemplateFunctions["orDefs"] = orDefs TemplateFunctions["ifOrDef"] = ifOrDef - + TemplateFunctions["isType"] = IsType + TemplateFunctions["isMap"] = IsMap + TemplateFunctions["isArray"] = IsArray + TemplateFunctions["isKind"] = IsKind + TemplateFunctions["isString"] = IsString + TemplateFunctions["isMapFirst"] = IsMapFirst + TemplateFunctions["isMapLast"] = IsMapLast + TemplateFunctions["howDeep"] = HowDeep + TemplateFunctions["add"] = add + TemplateFunctions["mul"] = mul + TemplateFunctions["div"] = div + TemplateFunctions["sub"] = sub + TemplateFunctions["mod"] = mod } diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go similarity index 94% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go index 14ea964..fd1385b 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go @@ -64,7 +64,6 @@ Rich Feature Set includes: - Never silently skip data when decoding. User decides whether to return an error or silently skip data when keys or indexes in the data stream do not map to fields in the struct. - - Detect and error when encoding a cyclic reference (instead of stack overflow shutdown) - Encode/Decode from/to chan types (for iterative streaming support) - Drop-in replacement for encoding/json. `json:` key in struct tag supported. - Provides a RPC Server and Client Codec for net/rpc communication protocol. @@ -172,8 +171,6 @@ package codec // TODO: // -// - optimization for codecgen: -// if len of entity is <= 3 words, then support a value receiver for encode. // - (En|De)coder should store an error when it occurs. // Until reset, subsequent calls return that error that was stored. // This means that free panics must go away. @@ -193,7 +190,4 @@ package codec // - Consider making Handle used AS-IS within the encoding/decoding session. // This means that we don't cache Handle information within the (En|De)coder, // except we really need it at Reset(...) -// - Consider adding math/big support -// - Consider reducing the size of the generated functions: -// Maybe use one loop, and put the conditionals in the loop. -// for ... { if cLen > 0 { if j == cLen { break } } else if dd.CheckBreak() { break } } +// - Handle recursive types during encoding/decoding? diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/README.md rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/README.md diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go similarity index 99% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go index 766d26c..c884d14 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/binc.go @@ -908,14 +908,10 @@ func (h *BincHandle) newDecDriver(d *Decoder) decDriver { func (e *bincEncDriver) reset() { e.w = e.e.w - e.s = 0 - e.m = nil } func (d *bincDecDriver) reset() { d.r = d.d.r - d.s = nil - d.bd, d.bdRead, d.vd, d.vs = 0, false, 0, 0 } var _ decDriver = (*bincDecDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go similarity index 99% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go index cfd89b7..0e5d32b 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/cbor.go @@ -578,7 +578,6 @@ func (e *cborEncDriver) reset() { func (d *cborDecDriver) reset() { d.r = d.d.r - d.bd, d.bdRead = 0, false } var _ decDriver = (*cborDecDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go similarity index 99% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go index d842a24..b3b99f0 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/decode.go @@ -1862,7 +1862,6 @@ func (d *Decoder) intern(s string) { } } -// nextValueBytes returns the next value in the stream as a set of bytes. func (d *Decoder) nextValueBytes() []byte { d.d.uncacheRead() d.r.track() diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go similarity index 95% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go index d7ad330..99af6fa 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/encode.go @@ -110,15 +110,6 @@ type EncodeOptions struct { // Canonical bool - // CheckCircularRef controls whether we check for circular references - // and error fast during an encode. - // - // If enabled, an error is received if a pointer to a struct - // references itself either directly or through one of its fields (iteratively). - // - // This is opt-in, as there may be a performance hit to checking circular references. - CheckCircularRef bool - // AsSymbols defines what should be encoded as symbols. // // Encoding as symbols can reduce the encoded size significantly. @@ -512,7 +503,7 @@ func (f *encFnInfo) kStruct(rv reflect.Value) { newlen := len(fti.sfi) // Use sync.Pool to reduce allocating slices unnecessarily. - // The cost of sync.Pool is less than the cost of new allocation. + // The cost of the occasional locking is less than the cost of new allocation. pool, poolv, fkvs := encStructPoolGet(newlen) // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) @@ -523,6 +514,11 @@ func (f *encFnInfo) kStruct(rv reflect.Value) { var kv stringRv for _, si := range tisfi { kv.r = si.field(rv, false) + // if si.i != -1 { + // rvals[newlen] = rv.Field(int(si.i)) + // } else { + // rvals[newlen] = rv.FieldByIndex(si.is) + // } if toMap { if si.omitEmpty && isEmptyValue(kv.r) { continue @@ -600,15 +596,13 @@ func (f *encFnInfo) kStruct(rv reflect.Value) { // f.e.encodeValue(rv.Elem()) // } -// func (f *encFnInfo) kInterface(rv reflect.Value) { -// println("kInterface called") -// debug.PrintStack() -// if rv.IsNil() { -// f.e.e.EncodeNil() -// return -// } -// f.e.encodeValue(rv.Elem(), nil) -// } +func (f *encFnInfo) kInterface(rv reflect.Value) { + if rv.IsNil() { + f.e.e.EncodeNil() + return + } + f.e.encodeValue(rv.Elem(), nil) +} func (f *encFnInfo) kMap(rv reflect.Value) { ee := f.e.e @@ -883,7 +877,6 @@ type Encoder struct { // as the handler MAY need to do some coordination. w encWriter s []encRtidFn - ci set be bool // is binary encoding js bool // is json handle @@ -1140,23 +1133,20 @@ func (e *Encoder) encode(iv interface{}) { } } -func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, sptr uintptr, proceed bool) { +func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { + if rv, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn := e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer) + fn.f(&fn.i, rv) + } +} + +func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, proceed bool) { // use a goto statement instead of a recursive function for ptr/interface. TOP: switch rv.Kind() { - case reflect.Ptr: - if rv.IsNil() { - e.e.EncodeNil() - return - } - rv = rv.Elem() - if e.h.CheckCircularRef && rv.Kind() == reflect.Struct { - // TODO: Movable pointers will be an issue here. Future problem. - sptr = rv.UnsafeAddr() - break TOP - } - goto TOP - case reflect.Interface: + case reflect.Ptr, reflect.Interface: if rv.IsNil() { e.e.EncodeNil() return @@ -1173,39 +1163,18 @@ TOP: return } - proceed = true - rv2 = rv - return -} - -func (e *Encoder) doEncodeValue(rv reflect.Value, fn *encFn, sptr uintptr, - checkFastpath, checkCodecSelfer bool) { - if sptr != 0 { - if (&e.ci).add(sptr) { - e.errorf("circular reference found: # %d", sptr) - } - } - if fn == nil { - rt := rv.Type() - rtid := reflect.ValueOf(rt).Pointer() - fn = e.getEncFn(rtid, rt, true, true) - } - fn.f(&fn.i, rv) - if sptr != 0 { - (&e.ci).remove(sptr) - } -} - -func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { - if rv, sptr, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { - e.doEncodeValue(rv, nil, sptr, checkFastpath, checkCodecSelfer) - } + return rv, true } func (e *Encoder) encodeValue(rv reflect.Value, fn *encFn) { // if a valid fn is passed, it MUST BE for the dereferenced type of rv - if rv, sptr, proceed := e.preEncodeValue(rv); proceed { - e.doEncodeValue(rv, fn, sptr, true, true) + if rv, proceed := e.preEncodeValue(rv); proceed { + if fn == nil { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + fn = e.getEncFn(rtid, rt, true, true) + } + fn.f(&fn.i, rv) } } @@ -1315,11 +1284,10 @@ func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCo fn.f = (*encFnInfo).kSlice case reflect.Struct: fn.f = (*encFnInfo).kStruct - // reflect.Ptr and reflect.Interface are handled already by preEncodeValue // case reflect.Ptr: // fn.f = (*encFnInfo).kPtr - // case reflect.Interface: - // fn.f = (*encFnInfo).kInterface + case reflect.Interface: + fn.f = (*encFnInfo).kInterface case reflect.Map: fn.f = (*encFnInfo).kMap default: @@ -1385,6 +1353,25 @@ func encStructPoolGet(newlen int) (p *sync.Pool, v interface{}, s []stringRv) { // panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed // } // idxpool := newlen / 8 + + // if pool == nil { + // fkvs = make([]stringRv, newlen) + // } else { + // poolv = pool.Get() + // switch vv := poolv.(type) { + // case *[8]stringRv: + // fkvs = vv[:newlen] + // case *[16]stringRv: + // fkvs = vv[:newlen] + // case *[32]stringRv: + // fkvs = vv[:newlen] + // case *[64]stringRv: + // fkvs = vv[:newlen] + // case *[128]stringRv: + // fkvs = vv[:newlen] + // } + // } + if newlen <= 8 { p = &encStructPool[0] v = p.Get() diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.go.tmpl diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-array.go.tmpl diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-dec-map.go.tmpl diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.generated.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen-helper.go.tmpl diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go similarity index 88% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go index 40065a0..560014a 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper.go @@ -155,10 +155,8 @@ const ( resetSliceElemToZeroValue bool = false ) -var ( - oneByteArr = [1]byte{0} - zeroByteSlice = oneByteArr[:0:0] -) +var oneByteArr = [1]byte{0} +var zeroByteSlice = oneByteArr[:0:0] type charEncoding uint8 @@ -217,24 +215,6 @@ const ( containerArrayEnd ) -type rgetPoolT struct { - encNames [8]string - fNames [8]string - etypes [8]uintptr - sfis [8]*structFieldInfo -} - -var rgetPool = sync.Pool{ - New: func() interface{} { return new(rgetPoolT) }, -} - -type rgetT struct { - fNames []string - encNames []string - etypes []uintptr - sfis []*structFieldInfo -} - type containerStateRecv interface { sendContainerState(containerState) } @@ -853,17 +833,14 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { siInfo = parseStructFieldInfo(structInfoFieldName, x.structTag(f.Tag)) ti.toArray = siInfo.toArray } - pi := rgetPool.Get() - pv := pi.(*rgetPoolT) - pv.etypes[0] = ti.baseId - vv := rgetT{pv.fNames[:0], pv.encNames[:0], pv.etypes[:1], pv.sfis[:0]} - x.rget(rt, rtid, nil, &vv, siInfo) - ti.sfip = make([]*structFieldInfo, len(vv.sfis)) - ti.sfi = make([]*structFieldInfo, len(vv.sfis)) - copy(ti.sfip, vv.sfis) - sort.Sort(sfiSortedByEncName(vv.sfis)) - copy(ti.sfi, vv.sfis) - rgetPool.Put(pi) + sfip := make([]*structFieldInfo, 0, rt.NumField()) + x.rget(rt, nil, make(map[string]bool, 16), &sfip, siInfo) + + ti.sfip = make([]*structFieldInfo, len(sfip)) + ti.sfi = make([]*structFieldInfo, len(sfip)) + copy(ti.sfip, sfip) + sort.Sort(sfiSortedByEncName(sfip)) + copy(ti.sfi, sfip) } // sfi = sfip @@ -876,37 +853,16 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { return } -func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, - indexstack []int, pv *rgetT, siInfo *structFieldInfo, +func (x *TypeInfos) rget(rt reflect.Type, indexstack []int, fnameToHastag map[string]bool, + sfi *[]*structFieldInfo, siInfo *structFieldInfo, ) { - // This will read up the fields and store how to access the value. - // It uses the go language's rules for embedding, as below: - // - if a field has been seen while traversing, skip it - // - if an encName has been seen while traversing, skip it - // - if an embedded type has been seen, skip it - // - // Also, per Go's rules, embedded fields must be analyzed AFTER all top-level fields. - // - // Note: we consciously use slices, not a map, to simulate a set. - // Typically, types have < 16 fields, and iteration using equals is faster than maps there - - type anonField struct { - ft reflect.Type - idx int - } - - var anonFields []anonField - -LOOP: - for j, jlen := 0, rt.NumField(); j < jlen; j++ { + for j := 0; j < rt.NumField(); j++ { f := rt.Field(j) fkind := f.Type.Kind() // skip if a func type, or is unexported, or structTag value == "-" - switch fkind { - case reflect.Func, reflect.Complex64, reflect.Complex128, reflect.UnsafePointer: - continue LOOP + if fkind == reflect.Func { + continue } - // if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) { if f.PkgPath != "" && !f.Anonymous { // unexported, not embedded continue @@ -930,8 +886,11 @@ LOOP: ft = ft.Elem() } if ft.Kind() == reflect.Struct { - // handle anonymous fields after handling all the non-anon fields - anonFields = append(anonFields, anonField{ft, j}) + indexstack2 := make([]int, len(indexstack)+1, len(indexstack)+4) + copy(indexstack2, indexstack) + indexstack2[len(indexstack)] = j + // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + x.rget(ft, indexstack2, fnameToHastag, sfi, siInfo) continue } } @@ -942,39 +901,26 @@ LOOP: continue } + // do not let fields with same name in embedded structs override field at higher level. + // this must be done after anonymous check, to allow anonymous field + // still include their child fields + if _, ok := fnameToHastag[f.Name]; ok { + continue + } if f.Name == "" { panic(noFieldNameToStructFieldInfoErr) } - - for _, k := range pv.fNames { - if k == f.Name { - continue LOOP - } - } - pv.fNames = append(pv.fNames, f.Name) - if si == nil { si = parseStructFieldInfo(f.Name, stag) } else if si.encName == "" { si.encName = f.Name } - - for _, k := range pv.encNames { - if k == si.encName { - continue LOOP - } - } - pv.encNames = append(pv.encNames, si.encName) - // si.ikind = int(f.Type.Kind()) if len(indexstack) == 0 { si.i = int16(j) } else { si.i = -1 - si.is = make([]int, len(indexstack)+1) - copy(si.is, indexstack) - si.is[len(indexstack)] = j - // si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) } if siInfo != nil { @@ -982,26 +928,8 @@ LOOP: si.omitEmpty = true } } - pv.sfis = append(pv.sfis, si) - } - - // now handle anonymous fields -LOOP2: - for _, af := range anonFields { - // if etypes contains this, then do not call rget again (as the fields are already seen here) - ftid := reflect.ValueOf(af.ft).Pointer() - for _, k := range pv.etypes { - if k == ftid { - continue LOOP2 - } - } - pv.etypes = append(pv.etypes, ftid) - - indexstack2 := make([]int, len(indexstack)+1) - copy(indexstack2, indexstack) - indexstack2[len(indexstack)] = af.idx - // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) - x.rget(af.ft, ftid, indexstack2, pv, siInfo) + *sfi = append(*sfi, si) + fnameToHastag[f.Name] = stag != "" } } @@ -1199,73 +1127,3 @@ type bytesISlice []bytesI func (p bytesISlice) Len() int { return len(p) } func (p bytesISlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } func (p bytesISlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } - -// ----------------- - -type set []uintptr - -func (s *set) add(v uintptr) (exists bool) { - // e.ci is always nil, or len >= 1 - // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Add: %v, exists: %v\n", v, exists) }() - x := *s - if x == nil { - x = make([]uintptr, 1, 8) - x[0] = v - *s = x - return - } - // typically, length will be 1. make this perform. - if len(x) == 1 { - if j := x[0]; j == 0 { - x[0] = v - } else if j == v { - exists = true - } else { - x = append(x, v) - *s = x - } - return - } - // check if it exists - for _, j := range x { - if j == v { - exists = true - return - } - } - // try to replace a "deleted" slot - for i, j := range x { - if j == 0 { - x[i] = v - return - } - } - // if unable to replace deleted slot, just append it. - x = append(x, v) - *s = x - return -} - -func (s *set) remove(v uintptr) (exists bool) { - // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Rm: %v, exists: %v\n", v, exists) }() - x := *s - if len(x) == 0 { - return - } - if len(x) == 1 { - if x[0] == v { - x[0] = 0 - } - return - } - for i, j := range x { - if j == v { - exists = true - x[i] = 0 // set it to 0, as way to delete it. - // copy(x[i:], x[i+1:]) - // x = x[:len(x)-1] - return - } - } - return -} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_internal.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_not_unsafe.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/helper_unsafe.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go similarity index 91% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/json.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go index 142d5b5..a18a5f7 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/json.go @@ -43,23 +43,18 @@ import ( //-------------------------------- -var ( - jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} +var jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} - jsonFloat64Pow10 = [...]float64{ - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - 1e20, 1e21, 1e22, - } - - jsonUint64Pow10 = [...]uint64{ - 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, - 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, - } +var jsonFloat64Pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, +} - // jsonTabs and jsonSpaces are used as caches for indents - jsonTabs, jsonSpaces string -) +var jsonUint64Pow10 = [...]uint64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, +} const ( // jsonUnreadAfterDecNum controls whether we unread after decoding a number. @@ -90,23 +85,8 @@ const ( jsonNumUintMaxVal = 1<<uint64(64) - 1 // jsonNumDigitsUint64Largest = 19 - - jsonSpacesOrTabsLen = 128 ) -func init() { - var bs [jsonSpacesOrTabsLen]byte - for i := 0; i < jsonSpacesOrTabsLen; i++ { - bs[i] = ' ' - } - jsonSpaces = string(bs[:]) - - for i := 0; i < jsonSpacesOrTabsLen; i++ { - bs[i] = '\t' - } - jsonTabs = string(bs[:]) -} - type jsonEncDriver struct { e *Encoder w encWriter @@ -114,76 +94,30 @@ type jsonEncDriver struct { b [64]byte // scratch bs []byte // scratch se setExtWrapper - ds string // indent string - dl uint16 // indent level - dt bool // indent using tabs - d bool // indent c containerState noBuiltInTypes } -// indent is done as below: -// - newline and indent are added before each mapKey or arrayElem -// - newline and indent are added before each ending, -// except there was no entry (so we can have {} or []) - func (e *jsonEncDriver) sendContainerState(c containerState) { // determine whether to output separators if c == containerMapKey { if e.c != containerMapStart { e.w.writen1(',') } - if e.d { - e.writeIndent() - } } else if c == containerMapValue { - if e.d { - e.w.writen2(':', ' ') - } else { - e.w.writen1(':') - } + e.w.writen1(':') } else if c == containerMapEnd { - if e.d { - e.dl-- - if e.c != containerMapStart { - e.writeIndent() - } - } e.w.writen1('}') } else if c == containerArrayElem { if e.c != containerArrayStart { e.w.writen1(',') } - if e.d { - e.writeIndent() - } } else if c == containerArrayEnd { - if e.d { - e.dl-- - if e.c != containerArrayStart { - e.writeIndent() - } - } e.w.writen1(']') } e.c = c } -func (e *jsonEncDriver) writeIndent() { - e.w.writen1('\n') - if x := len(e.ds) * int(e.dl); x <= jsonSpacesOrTabsLen { - if e.dt { - e.w.writestr(jsonTabs[:x]) - } else { - e.w.writestr(jsonSpaces[:x]) - } - } else { - for i := uint16(0); i < e.dl; i++ { - e.w.writestr(e.ds) - } - } -} - func (e *jsonEncDriver) EncodeNil() { e.w.writeb(jsonLiterals[9:13]) // null } @@ -231,17 +165,11 @@ func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { } func (e *jsonEncDriver) EncodeArrayStart(length int) { - if e.d { - e.dl++ - } e.w.writen1('[') e.c = containerArrayStart } func (e *jsonEncDriver) EncodeMapStart(length int) { - if e.d { - e.dl++ - } e.w.writen1('{') e.c = containerMapStart } @@ -1105,11 +1033,6 @@ type JsonHandle struct { // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. // If not configured, raw bytes are encoded to/from base64 text. RawBytesExt InterfaceExt - - // Indent indicates how a value is encoded. - // - If positive, indent by that number of spaces. - // - If negative, indent by that number of tabs. - Indent int8 } func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { @@ -1117,48 +1040,26 @@ func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceE } func (h *JsonHandle) newEncDriver(e *Encoder) encDriver { - hd := jsonEncDriver{e: e, h: h} + hd := jsonEncDriver{e: e, w: e.w, h: h} hd.bs = hd.b[:0] - - hd.reset() - + hd.se.i = h.RawBytesExt return &hd } func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} - hd := jsonDecDriver{d: d, h: h} + hd := jsonDecDriver{d: d, r: d.r, h: h} hd.bs = hd.b[:0] - hd.reset() + hd.se.i = h.RawBytesExt return &hd } func (e *jsonEncDriver) reset() { e.w = e.e.w - e.se.i = e.h.RawBytesExt - if e.bs != nil { - e.bs = e.bs[:0] - } - e.d, e.dt, e.dl, e.ds = false, false, 0, "" - e.c = 0 - if e.h.Indent > 0 { - e.d = true - e.ds = jsonSpaces[:e.h.Indent] - } else if e.h.Indent < 0 { - e.d = true - e.dt = true - e.ds = jsonTabs[:-(e.h.Indent)] - } } func (d *jsonDecDriver) reset() { d.r = d.d.r - d.se.i = d.h.RawBytesExt - if d.bs != nil { - d.bs = d.bs[:0] - } - d.c, d.tok = 0, 0 - d.n.reset() } var jsonEncodeTerminate = []byte{' '} diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go similarity index 99% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go index afe5935..5eb4c96 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/msgpack.go @@ -729,7 +729,6 @@ func (e *msgpackEncDriver) reset() { func (d *msgpackDecDriver) reset() { d.r = d.d.r - d.bd, d.bdRead = 0, false } //-------------------------------------------------- diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/noop.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/prebuild.sh diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/rpc.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/rpc.go similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/rpc.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/rpc.go diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go similarity index 99% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go index 7c0ba7a..c150496 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/simple.go @@ -512,7 +512,6 @@ func (e *simpleEncDriver) reset() { func (d *simpleDecDriver) reset() { d.r = d.d.r - d.bd, d.bdRead = 0, false } var _ decDriver = (*simpleDecDriver)(nil) diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/test-cbor-goldens.json diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py similarity index 100% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/test.py rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/test.py diff --git a/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go similarity index 94% rename from Godeps/_workspace/src/github.com/ugorji/go/codec/time.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go index 718b731..fc4c63e 100644 --- a/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/time.go @@ -5,22 +5,11 @@ package codec import ( "fmt" - "reflect" "time" ) var ( - timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} - timeExtEncFn = func(rv reflect.Value) (bs []byte, err error) { - defer panicToErr(&err) - bs = timeExt{}.WriteExt(rv.Interface()) - return - } - timeExtDecFn = func(rv reflect.Value, bs []byte) (err error) { - defer panicToErr(&err) - timeExt{}.ReadExt(rv.Interface(), bs) - return - } + timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} ) type timeExt struct{} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context/context.go similarity index 100% rename from Godeps/_workspace/src/golang.org/x/net/context/context.go rename to vendor/github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context/context.go diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE b/vendor/github.com/coreos/etcd/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/coreos/go-semver/LICENSE rename to vendor/github.com/coreos/etcd/LICENSE diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/NOTICE b/vendor/github.com/coreos/etcd/NOTICE similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/NOTICE rename to vendor/github.com/coreos/etcd/NOTICE diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/README.md b/vendor/github.com/coreos/etcd/client/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/README.md rename to vendor/github.com/coreos/etcd/client/README.md diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go b/vendor/github.com/coreos/etcd/client/auth_role.go similarity index 98% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go rename to vendor/github.com/coreos/etcd/client/auth_role.go index 8de58af..e771db7 100644 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_role.go +++ b/vendor/github.com/coreos/etcd/client/auth_role.go @@ -20,7 +20,7 @@ import ( "net/http" "net/url" - "golang.org/x/net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) type Role struct { diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go b/vendor/github.com/coreos/etcd/client/auth_user.go similarity index 98% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go rename to vendor/github.com/coreos/etcd/client/auth_user.go index 6e0e4c5..9df1f29 100644 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/auth_user.go +++ b/vendor/github.com/coreos/etcd/client/auth_user.go @@ -21,7 +21,7 @@ import ( "net/url" "path" - "golang.org/x/net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) var ( diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go b/vendor/github.com/coreos/etcd/client/cancelreq.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq.go rename to vendor/github.com/coreos/etcd/client/cancelreq.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go b/vendor/github.com/coreos/etcd/client/cancelreq_go14.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/cancelreq_go14.go rename to vendor/github.com/coreos/etcd/client/cancelreq_go14.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go b/vendor/github.com/coreos/etcd/client/client.go similarity index 99% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/client.go rename to vendor/github.com/coreos/etcd/client/client.go index 34adb82..da86a0b 100644 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/client.go +++ b/vendor/github.com/coreos/etcd/client/client.go @@ -27,7 +27,7 @@ import ( "sync" "time" - "golang.org/x/net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" ) var ( diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go b/vendor/github.com/coreos/etcd/client/cluster_error.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/cluster_error.go rename to vendor/github.com/coreos/etcd/client/cluster_error.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go b/vendor/github.com/coreos/etcd/client/curl.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/curl.go rename to vendor/github.com/coreos/etcd/client/curl.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go b/vendor/github.com/coreos/etcd/client/discover.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/discover.go rename to vendor/github.com/coreos/etcd/client/discover.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go b/vendor/github.com/coreos/etcd/client/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/doc.go rename to vendor/github.com/coreos/etcd/client/doc.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go b/vendor/github.com/coreos/etcd/client/keys.generated.go similarity index 99% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go rename to vendor/github.com/coreos/etcd/client/keys.generated.go index 748283a..feac0d1 100644 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.generated.go +++ b/vendor/github.com/coreos/etcd/client/keys.generated.go @@ -8,7 +8,7 @@ package client import ( "errors" "fmt" - codec1978 "github.com/ugorji/go/codec" + codec1978 "github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec" "reflect" "runtime" time "time" diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go b/vendor/github.com/coreos/etcd/client/keys.go similarity index 99% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go rename to vendor/github.com/coreos/etcd/client/keys.go index 9dca46b..67fa02d 100644 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/keys.go +++ b/vendor/github.com/coreos/etcd/client/keys.go @@ -26,9 +26,9 @@ import ( "strings" "time" + "github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/pkg/pathutil" - "github.com/ugorji/go/codec" - "golang.org/x/net/context" ) const ( diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go b/vendor/github.com/coreos/etcd/client/members.go similarity index 98% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/members.go rename to vendor/github.com/coreos/etcd/client/members.go index c1c7840..b6f33ed 100644 --- a/Godeps/_workspace/src/github.com/coreos/etcd/client/members.go +++ b/vendor/github.com/coreos/etcd/client/members.go @@ -22,7 +22,7 @@ import ( "net/url" "path" - "golang.org/x/net/context" + "github.com/coreos/etcd/Godeps/_workspace/src/golang.org/x/net/context" "github.com/coreos/etcd/pkg/types" ) diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go b/vendor/github.com/coreos/etcd/client/srv.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/client/srv.go rename to vendor/github.com/coreos/etcd/client/srv.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go b/vendor/github.com/coreos/etcd/pkg/pathutil/path.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/pkg/pathutil/path.go rename to vendor/github.com/coreos/etcd/pkg/pathutil/path.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go b/vendor/github.com/coreos/etcd/pkg/types/id.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/id.go rename to vendor/github.com/coreos/etcd/pkg/types/id.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go b/vendor/github.com/coreos/etcd/pkg/types/set.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/set.go rename to vendor/github.com/coreos/etcd/pkg/types/set.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go b/vendor/github.com/coreos/etcd/pkg/types/slice.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/slice.go rename to vendor/github.com/coreos/etcd/pkg/types/slice.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go b/vendor/github.com/coreos/etcd/pkg/types/urls.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urls.go rename to vendor/github.com/coreos/etcd/pkg/types/urls.go diff --git a/Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go b/vendor/github.com/coreos/etcd/pkg/types/urlsmap.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/etcd/pkg/types/urlsmap.go rename to vendor/github.com/coreos/etcd/pkg/types/urlsmap.go diff --git a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go similarity index 59% rename from Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go rename to vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go index 8a88162..2b1522e 100644 --- a/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go +++ b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/deserialize.go @@ -1,17 +1,3 @@ -// Copyright 2015 CoreOS, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - package unit import ( @@ -24,23 +10,6 @@ import ( "unicode" ) -const ( - // SYSTEMD_LINE_MAX mimics the maximum line length that systemd can use. - // On typical systemd platforms (i.e. modern Linux), this will most - // commonly be 2048, so let's use that as a sanity check. - // Technically, we should probably pull this at runtime: - // SYSTEMD_LINE_MAX = int(C.sysconf(C.__SC_LINE_MAX)) - // but this would introduce an (unfortunate) dependency on cgo - SYSTEMD_LINE_MAX = 2048 - - // characters that systemd considers indicate a newline - SYSTEMD_NEWLINE = "\r\n" -) - -var ( - ErrLineTooLong = fmt.Errorf("line too long (max %d bytes)", SYSTEMD_LINE_MAX) -) - // Deserialize parses a systemd unit file into a list of UnitOption objects. func Deserialize(f io.Reader) (opts []*UnitOption, err error) { lexer, optchan, errchan := newLexer(f) @@ -71,34 +40,17 @@ type lexer struct { func (l *lexer) lex() { var err error - defer func() { - close(l.optchan) - close(l.errchan) - }() next := l.lexNextSection for next != nil { - if l.buf.Buffered() >= SYSTEMD_LINE_MAX { - // systemd truncates lines longer than LINE_MAX - // https://bugs.freedesktop.org/show_bug.cgi?id=85308 - // Rather than allowing this to pass silently, let's - // explicitly gate people from encountering this - line, err := l.buf.Peek(SYSTEMD_LINE_MAX) - if err != nil { - l.errchan <- err - return - } - if bytes.IndexAny(line, SYSTEMD_NEWLINE) == -1 { - l.errchan <- ErrLineTooLong - return - } - } - next, err = next() if err != nil { l.errchan <- err - return + break } } + + close(l.optchan) + close(l.errchan) } type lexStep func() (lexStep, error) @@ -114,7 +66,7 @@ func (l *lexer) lexSectionName() (lexStep, error) { func (l *lexer) lexSectionSuffixFunc(section string) lexStep { return func() (lexStep, error) { - garbage, _, err := l.toEOL() + garbage, err := l.toEOL() if err != nil { return nil, err } @@ -131,7 +83,7 @@ func (l *lexer) lexSectionSuffixFunc(section string) lexStep { func (l *lexer) ignoreLineFunc(next lexStep) lexStep { return func() (lexStep, error) { for { - line, _, err := l.toEOL() + line, err := l.toEOL() if err != nil { return nil, err } @@ -211,64 +163,49 @@ func (l *lexer) lexOptionNameFunc(section string) lexStep { } name := strings.TrimSpace(partial.String()) - return l.lexOptionValueFunc(section, name, bytes.Buffer{}), nil + return l.lexOptionValueFunc(section, name), nil } } -func (l *lexer) lexOptionValueFunc(section, name string, partial bytes.Buffer) lexStep { +func (l *lexer) lexOptionValueFunc(section, name string) lexStep { return func() (lexStep, error) { + var partial bytes.Buffer + for { - line, eof, err := l.toEOL() + line, err := l.toEOL() if err != nil { return nil, err } - if len(bytes.TrimSpace(line)) == 0 { - break - } - - partial.Write(line) - // lack of continuation means this value has been exhausted idx := bytes.LastIndex(line, []byte{'\\'}) if idx == -1 || idx != (len(line)-1) { + partial.Write(line) break } - if !eof { - partial.WriteRune('\n') - } - - return l.lexOptionValueFunc(section, name, partial), nil + partial.Write(line[0:idx]) + partial.WriteRune(' ') } - val := partial.String() - if strings.HasSuffix(val, "\n") { - // A newline was added to the end, so the file didn't end with a backslash. - // => Keep the newline - val = strings.TrimSpace(val) + "\n" - } else { - val = strings.TrimSpace(val) - } + val := strings.TrimSpace(partial.String()) l.optchan <- &UnitOption{Section: section, Name: name, Value: val} return l.lexNextSectionOrOptionFunc(section), nil } } -// toEOL reads until the end-of-line or end-of-file. -// Returns (data, EOFfound, error) -func (l *lexer) toEOL() ([]byte, bool, error) { +func (l *lexer) toEOL() ([]byte, error) { line, err := l.buf.ReadBytes('\n') // ignore EOF here since it's roughly equivalent to EOL if err != nil && err != io.EOF { - return nil, false, err + return nil, err } line = bytes.TrimSuffix(line, []byte{'\r'}) line = bytes.TrimSuffix(line, []byte{'\n'}) - return line, err == io.EOF, nil + return line, nil } func isComment(r rune) bool { diff --git a/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go new file mode 100644 index 0000000..2b70fca --- /dev/null +++ b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/option.go @@ -0,0 +1,36 @@ +package unit + +import ( + "fmt" +) + +type UnitOption struct { + Section string + Name string + Value string +} + +func (uo *UnitOption) String() string { + return fmt.Sprintf("{Section: %q, Name: %q, Value: %q}", uo.Section, uo.Name, uo.Value) +} + +func (uo *UnitOption) Match(other *UnitOption) bool { + return uo.Section == other.Section && + uo.Name == other.Name && + uo.Value == other.Value +} + +func AllMatch(u1 []*UnitOption, u2 []*UnitOption) bool { + length := len(u1) + if length != len(u2) { + return false + } + + for i := 0; i < length; i++ { + if !u1[i].Match(u2[i]) { + return false + } + } + + return true +} diff --git a/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go new file mode 100644 index 0000000..867ce60 --- /dev/null +++ b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit/serialize.go @@ -0,0 +1,51 @@ +package unit + +import ( + "bytes" + "io" +) + +// Serialize encodes all of the given UnitOption objects into a unit file +func Serialize(opts []*UnitOption) io.Reader { + var buf bytes.Buffer + + if len(opts) == 0 { + return &buf + } + + curSection := opts[0].Section + + writeSectionHeader(&buf, curSection) + writeNewline(&buf) + + for _, opt := range opts { + if opt.Section != curSection { + curSection = opt.Section + + writeNewline(&buf) + writeSectionHeader(&buf, curSection) + writeNewline(&buf) + } + + writeOption(&buf, opt) + writeNewline(&buf) + } + + return &buf +} + +func writeNewline(buf *bytes.Buffer) { + buf.WriteRune('\n') +} + +func writeSectionHeader(buf *bytes.Buffer, section string) { + buf.WriteRune('[') + buf.WriteString(section) + buf.WriteRune(']') +} + +func writeOption(buf *bytes.Buffer, opt *UnitOption) { + buf.WriteString(opt.Name) + buf.WriteRune('=') + buf.WriteString(opt.Value) +} diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore rename to vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/.gitignore diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml similarity index 65% rename from Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml rename to vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml index aefda90..6a363c7 100644 --- a/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml +++ b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/.travis.yml @@ -1,5 +1,3 @@ language: go go: - 1.3 - -sudo: false diff --git a/Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/LICENSE b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/dgr/Godeps/_workspace/src/github.com/coreos/rkt/LICENSE rename to vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/LICENSE diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md rename to vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/README.md diff --git a/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go similarity index 90% rename from Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go rename to vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go index cf4e327..4b6918b 100644 --- a/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go +++ b/vendor/github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork/clockwork.go @@ -32,18 +32,10 @@ func NewRealClock() Clock { } // NewFakeClock returns a FakeClock implementation which can be -// manually advanced through time for testing. The initial time of the -// FakeClock will be an arbitrary non-zero time. +// manually advanced through time for testing. func NewFakeClock() FakeClock { - // use a fixture that does not fulfill Time.IsZero() - return NewFakeClockAt(time.Date(1984, time.April, 4, 0, 0, 0, 0, time.UTC)) -} - -// NewFakeClock returns a FakeClock initialised at the given time.Time. -func NewFakeClockAt(t time.Time) FakeClock { return &fakeClock{ - l: sync.RWMutex{}, - time: t, + l: sync.RWMutex{}, } } diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE b/vendor/github.com/coreos/fleet/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/Godeps/_workspace/src/github.com/google/gofuzz/LICENSE rename to vendor/github.com/coreos/fleet/LICENSE diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/NOTICE b/vendor/github.com/coreos/fleet/NOTICE similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/NOTICE rename to vendor/github.com/coreos/fleet/NOTICE diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/log/log.go b/vendor/github.com/coreos/fleet/log/log.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/log/log.go rename to vendor/github.com/coreos/fleet/log/log.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/args.go b/vendor/github.com/coreos/fleet/pkg/args.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/args.go rename to vendor/github.com/coreos/fleet/pkg/args.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff.go b/vendor/github.com/coreos/fleet/pkg/backoff.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/backoff.go rename to vendor/github.com/coreos/fleet/pkg/backoff.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath.go b/vendor/github.com/coreos/fleet/pkg/filepath.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/filepath.go rename to vendor/github.com/coreos/fleet/pkg/filepath.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem.go b/vendor/github.com/coreos/fleet/pkg/filesystem.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/filesystem.go rename to vendor/github.com/coreos/fleet/pkg/filesystem.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag.go b/vendor/github.com/coreos/fleet/pkg/flag.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/flag.go rename to vendor/github.com/coreos/fleet/pkg/flag.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/http.go b/vendor/github.com/coreos/fleet/pkg/http.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/http.go rename to vendor/github.com/coreos/fleet/pkg/http.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go b/vendor/github.com/coreos/fleet/pkg/reconcile.go similarity index 96% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go rename to vendor/github.com/coreos/fleet/pkg/reconcile.go index 022031d..4019a39 100644 --- a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/reconcile.go +++ b/vendor/github.com/coreos/fleet/pkg/reconcile.go @@ -17,7 +17,7 @@ package pkg import ( "time" - "github.com/jonboulle/clockwork" + "github.com/coreos/fleet/Godeps/_workspace/src/github.com/jonboulle/clockwork" "github.com/coreos/fleet/log" ) diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go b/vendor/github.com/coreos/fleet/pkg/set.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/set.go rename to vendor/github.com/coreos/fleet/pkg/set.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls.go b/vendor/github.com/coreos/fleet/pkg/tls.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/pkg/tls.go rename to vendor/github.com/coreos/fleet/pkg/tls.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go b/vendor/github.com/coreos/fleet/unit/fake.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/unit/fake.go rename to vendor/github.com/coreos/fleet/unit/fake.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/generator.go b/vendor/github.com/coreos/fleet/unit/generator.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/unit/generator.go rename to vendor/github.com/coreos/fleet/unit/generator.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/manager.go b/vendor/github.com/coreos/fleet/unit/manager.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/fleet/unit/manager.go rename to vendor/github.com/coreos/fleet/unit/manager.go diff --git a/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go b/vendor/github.com/coreos/fleet/unit/unit.go similarity index 98% rename from Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go rename to vendor/github.com/coreos/fleet/unit/unit.go index aa15dd4..2da58a6 100644 --- a/Godeps/_workspace/src/github.com/coreos/fleet/unit/unit.go +++ b/vendor/github.com/coreos/fleet/unit/unit.go @@ -22,7 +22,7 @@ import ( "io/ioutil" "strings" - "github.com/coreos/go-systemd/unit" + "github.com/coreos/fleet/Godeps/_workspace/src/github.com/coreos/go-systemd/unit" ) func NewUnitFile(raw string) (*UnitFile, error) { diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE b/vendor/github.com/coreos/go-semver/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/k8s.io/kubernetes/LICENSE rename to vendor/github.com/coreos/go-semver/LICENSE diff --git a/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/coreos/go-semver/semver/semver.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go rename to vendor/github.com/coreos/go-semver/semver/semver.go diff --git a/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go b/vendor/github.com/coreos/go-semver/semver/sort.go similarity index 100% rename from Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go rename to vendor/github.com/coreos/go-semver/semver/sort.go diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/.gitignore b/vendor/github.com/ghodss/yaml/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/ghodss/yaml/.gitignore rename to vendor/github.com/ghodss/yaml/.gitignore diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE b/vendor/github.com/ghodss/yaml/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/ghodss/yaml/LICENSE rename to vendor/github.com/ghodss/yaml/LICENSE diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/README.md b/vendor/github.com/ghodss/yaml/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/ghodss/yaml/README.md rename to vendor/github.com/ghodss/yaml/README.md diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/fields.go b/vendor/github.com/ghodss/yaml/fields.go similarity index 100% rename from Godeps/_workspace/src/github.com/ghodss/yaml/fields.go rename to vendor/github.com/ghodss/yaml/fields.go diff --git a/Godeps/_workspace/src/github.com/ghodss/yaml/yaml.go b/vendor/github.com/ghodss/yaml/yaml.go similarity index 100% rename from Godeps/_workspace/src/github.com/ghodss/yaml/yaml.go rename to vendor/github.com/ghodss/yaml/yaml.go diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE b/vendor/github.com/google/cadvisor/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/google/cadvisor/LICENSE rename to vendor/github.com/google/cadvisor/LICENSE diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/path.go b/vendor/github.com/google/cadvisor/utils/path.go similarity index 100% rename from Godeps/_workspace/src/github.com/google/cadvisor/utils/path.go rename to vendor/github.com/google/cadvisor/utils/path.go diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store.go b/vendor/github.com/google/cadvisor/utils/timed_store.go similarity index 100% rename from Godeps/_workspace/src/github.com/google/cadvisor/utils/timed_store.go rename to vendor/github.com/google/cadvisor/utils/timed_store.go diff --git a/Godeps/_workspace/src/github.com/google/cadvisor/utils/utils.go b/vendor/github.com/google/cadvisor/utils/utils.go similarity index 100% rename from Godeps/_workspace/src/github.com/google/cadvisor/utils/utils.go rename to vendor/github.com/google/cadvisor/utils/utils.go diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE b/vendor/github.com/inconshreveable/mousetrap/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/LICENSE rename to vendor/github.com/inconshreveable/mousetrap/LICENSE diff --git a/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/README.md b/vendor/github.com/inconshreveable/mousetrap/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/inconshreveable/mousetrap/README.md rename to vendor/github.com/inconshreveable/mousetrap/README.md diff --git a/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/trap_others.go b/vendor/github.com/inconshreveable/mousetrap/trap_others.go similarity index 100% rename from Godeps/_workspace/src/github.com/inconshreveable/mousetrap/trap_others.go rename to vendor/github.com/inconshreveable/mousetrap/trap_others.go diff --git a/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/trap_windows.go b/vendor/github.com/inconshreveable/mousetrap/trap_windows.go similarity index 100% rename from Godeps/_workspace/src/github.com/inconshreveable/mousetrap/trap_windows.go rename to vendor/github.com/inconshreveable/mousetrap/trap_windows.go diff --git a/Godeps/_workspace/src/github.com/inconshreveable/mousetrap/trap_windows_1.4.go b/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go similarity index 100% rename from Godeps/_workspace/src/github.com/inconshreveable/mousetrap/trap_windows_1.4.go rename to vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go diff --git a/Godeps/_workspace/src/github.com/juju/errors/.gitignore b/vendor/github.com/juju/errors/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/.gitignore rename to vendor/github.com/juju/errors/.gitignore diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/juju/errors/LICENSE b/vendor/github.com/juju/errors/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/juju/errors/LICENSE rename to vendor/github.com/juju/errors/LICENSE diff --git a/Godeps/_workspace/src/github.com/juju/errors/Makefile b/vendor/github.com/juju/errors/Makefile similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/Makefile rename to vendor/github.com/juju/errors/Makefile diff --git a/Godeps/_workspace/src/github.com/juju/errors/README.md b/vendor/github.com/juju/errors/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/README.md rename to vendor/github.com/juju/errors/README.md diff --git a/Godeps/_workspace/src/github.com/juju/errors/doc.go b/vendor/github.com/juju/errors/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/doc.go rename to vendor/github.com/juju/errors/doc.go diff --git a/Godeps/_workspace/src/github.com/juju/errors/error.go b/vendor/github.com/juju/errors/error.go similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/error.go rename to vendor/github.com/juju/errors/error.go diff --git a/Godeps/_workspace/src/github.com/juju/errors/errortypes.go b/vendor/github.com/juju/errors/errortypes.go similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/errortypes.go rename to vendor/github.com/juju/errors/errortypes.go diff --git a/Godeps/_workspace/src/github.com/juju/errors/functions.go b/vendor/github.com/juju/errors/functions.go similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/functions.go rename to vendor/github.com/juju/errors/functions.go diff --git a/Godeps/_workspace/src/github.com/juju/errors/path.go b/vendor/github.com/juju/errors/path.go similarity index 100% rename from Godeps/_workspace/src/github.com/juju/errors/path.go rename to vendor/github.com/juju/errors/path.go diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/.gitignore b/vendor/github.com/leekchan/gtf/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/leekchan/gtf/.gitignore rename to vendor/github.com/leekchan/gtf/.gitignore diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/.travis.yml b/vendor/github.com/leekchan/gtf/.travis.yml similarity index 100% rename from Godeps/_workspace/src/github.com/leekchan/gtf/.travis.yml rename to vendor/github.com/leekchan/gtf/.travis.yml diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE b/vendor/github.com/leekchan/gtf/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/leekchan/gtf/LICENSE rename to vendor/github.com/leekchan/gtf/LICENSE diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/README.md b/vendor/github.com/leekchan/gtf/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/leekchan/gtf/README.md rename to vendor/github.com/leekchan/gtf/README.md diff --git a/Godeps/_workspace/src/github.com/leekchan/gtf/gtf.go b/vendor/github.com/leekchan/gtf/gtf.go similarity index 100% rename from Godeps/_workspace/src/github.com/leekchan/gtf/gtf.go rename to vendor/github.com/leekchan/gtf/gtf.go diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/.gitignore b/vendor/github.com/mgutz/ansi/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/mgutz/ansi/.gitignore rename to vendor/github.com/mgutz/ansi/.gitignore diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE b/vendor/github.com/mgutz/ansi/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mgutz/ansi/LICENSE rename to vendor/github.com/mgutz/ansi/LICENSE diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/README.md b/vendor/github.com/mgutz/ansi/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/mgutz/ansi/README.md rename to vendor/github.com/mgutz/ansi/README.md diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/ansi.go b/vendor/github.com/mgutz/ansi/ansi.go similarity index 100% rename from Godeps/_workspace/src/github.com/mgutz/ansi/ansi.go rename to vendor/github.com/mgutz/ansi/ansi.go diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/doc.go b/vendor/github.com/mgutz/ansi/doc.go similarity index 100% rename from Godeps/_workspace/src/github.com/mgutz/ansi/doc.go rename to vendor/github.com/mgutz/ansi/doc.go diff --git a/Godeps/_workspace/src/github.com/mgutz/ansi/print.go b/vendor/github.com/mgutz/ansi/print.go similarity index 100% rename from Godeps/_workspace/src/github.com/mgutz/ansi/print.go rename to vendor/github.com/mgutz/ansi/print.go diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/mitchellh/go-homedir/LICENSE rename to vendor/github.com/mitchellh/go-homedir/LICENSE diff --git a/Godeps/_workspace/src/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/mitchellh/go-homedir/README.md rename to vendor/github.com/mitchellh/go-homedir/README.md diff --git a/Godeps/_workspace/src/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go similarity index 100% rename from Godeps/_workspace/src/github.com/mitchellh/go-homedir/homedir.go rename to vendor/github.com/mitchellh/go-homedir/homedir.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/Makefile b/vendor/github.com/n0rad/go-erlog/Makefile similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/Makefile rename to vendor/github.com/n0rad/go-erlog/Makefile diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/appender.go b/vendor/github.com/n0rad/go-erlog/appender.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/appender.go rename to vendor/github.com/n0rad/go-erlog/appender.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/data/data.go b/vendor/github.com/n0rad/go-erlog/data/data.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/data/data.go rename to vendor/github.com/n0rad/go-erlog/data/data.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go b/vendor/github.com/n0rad/go-erlog/errs/entry.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/entry.go rename to vendor/github.com/n0rad/go-erlog/errs/entry.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/stackframe.go b/vendor/github.com/n0rad/go-erlog/errs/stackframe.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/errs/stackframe.go rename to vendor/github.com/n0rad/go-erlog/errs/stackframe.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/event.go b/vendor/github.com/n0rad/go-erlog/event.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/event.go rename to vendor/github.com/n0rad/go-erlog/event.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go b/vendor/github.com/n0rad/go-erlog/formatter.go similarity index 99% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go rename to vendor/github.com/n0rad/go-erlog/formatter.go index 72f3c40..31d2e43 100644 --- a/Godeps/_workspace/src/github.com/n0rad/go-erlog/formatter.go +++ b/vendor/github.com/n0rad/go-erlog/formatter.go @@ -92,9 +92,9 @@ func (f *ErlogWriterAppender) Fire(event *LogEvent) { f.logError(b, event) - // f.mu.Lock() //TODO + f.mu.Lock() + defer f.mu.Unlock() f.Out.Write(b.Bytes()) - // f.mu.Unlock() } func (f *ErlogWriterAppender) logError(b *bytes.Buffer, event *LogEvent) { diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go b/vendor/github.com/n0rad/go-erlog/logger.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/logger.go rename to vendor/github.com/n0rad/go-erlog/logger.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/default.go b/vendor/github.com/n0rad/go-erlog/logs/default.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/default.go rename to vendor/github.com/n0rad/go-erlog/logs/default.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/dummy.go b/vendor/github.com/n0rad/go-erlog/logs/dummy.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/dummy.go rename to vendor/github.com/n0rad/go-erlog/logs/dummy.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/entry.go b/vendor/github.com/n0rad/go-erlog/logs/entry.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/entry.go rename to vendor/github.com/n0rad/go-erlog/logs/entry.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/levels.go b/vendor/github.com/n0rad/go-erlog/logs/levels.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/levels.go rename to vendor/github.com/n0rad/go-erlog/logs/levels.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/logger.go b/vendor/github.com/n0rad/go-erlog/logs/logger.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/logs/logger.go rename to vendor/github.com/n0rad/go-erlog/logs/logger.go diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/readme.md b/vendor/github.com/n0rad/go-erlog/readme.md similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/readme.md rename to vendor/github.com/n0rad/go-erlog/readme.md diff --git a/Godeps/_workspace/src/github.com/n0rad/go-erlog/register/register.go b/vendor/github.com/n0rad/go-erlog/register/register.go similarity index 100% rename from Godeps/_workspace/src/github.com/n0rad/go-erlog/register/register.go rename to vendor/github.com/n0rad/go-erlog/register/register.go diff --git a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/.gitignore b/vendor/github.com/peterbourgon/mergemap/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/peterbourgon/mergemap/.gitignore rename to vendor/github.com/peterbourgon/mergemap/.gitignore diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE b/vendor/github.com/peterbourgon/mergemap/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/peterbourgon/mergemap/LICENSE rename to vendor/github.com/peterbourgon/mergemap/LICENSE diff --git a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/README.md b/vendor/github.com/peterbourgon/mergemap/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/peterbourgon/mergemap/README.md rename to vendor/github.com/peterbourgon/mergemap/README.md diff --git a/Godeps/_workspace/src/github.com/peterbourgon/mergemap/mergemap.go b/vendor/github.com/peterbourgon/mergemap/mergemap.go similarity index 100% rename from Godeps/_workspace/src/github.com/peterbourgon/mergemap/mergemap.go rename to vendor/github.com/peterbourgon/mergemap/mergemap.go diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/.gitignore b/vendor/github.com/spf13/cobra/.gitignore similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/.gitignore rename to vendor/github.com/spf13/cobra/.gitignore diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/.travis.yml b/vendor/github.com/spf13/cobra/.travis.yml similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/.travis.yml rename to vendor/github.com/spf13/cobra/.travis.yml diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt b/vendor/github.com/spf13/cobra/LICENSE.txt similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/spf13/cobra/LICENSE.txt rename to vendor/github.com/spf13/cobra/LICENSE.txt diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/README.md b/vendor/github.com/spf13/cobra/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/README.md rename to vendor/github.com/spf13/cobra/README.md diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/bash_completions.go rename to vendor/github.com/spf13/cobra/bash_completions.go diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/bash_completions.md b/vendor/github.com/spf13/cobra/bash_completions.md similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/bash_completions.md rename to vendor/github.com/spf13/cobra/bash_completions.md diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/cobra.go b/vendor/github.com/spf13/cobra/cobra.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/cobra.go rename to vendor/github.com/spf13/cobra/cobra.go diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/command.go rename to vendor/github.com/spf13/cobra/command.go diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/md_docs.go b/vendor/github.com/spf13/cobra/md_docs.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/md_docs.go rename to vendor/github.com/spf13/cobra/md_docs.go diff --git a/Godeps/_workspace/src/github.com/spf13/cobra/md_docs.md b/vendor/github.com/spf13/cobra/md_docs.md similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/cobra/md_docs.md rename to vendor/github.com/spf13/cobra/md_docs.md diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/.travis.yml b/vendor/github.com/spf13/pflag/.travis.yml similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/.travis.yml rename to vendor/github.com/spf13/pflag/.travis.yml diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/vendor/github.com/spf13/pflag/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE rename to vendor/github.com/spf13/pflag/LICENSE diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/README.md b/vendor/github.com/spf13/pflag/README.md similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/README.md rename to vendor/github.com/spf13/pflag/README.md diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/bool.go b/vendor/github.com/spf13/pflag/bool.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/bool.go rename to vendor/github.com/spf13/pflag/bool.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/duration.go b/vendor/github.com/spf13/pflag/duration.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/duration.go rename to vendor/github.com/spf13/pflag/duration.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/flag.go b/vendor/github.com/spf13/pflag/flag.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/flag.go rename to vendor/github.com/spf13/pflag/flag.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/float32.go b/vendor/github.com/spf13/pflag/float32.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/float32.go rename to vendor/github.com/spf13/pflag/float32.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/float64.go b/vendor/github.com/spf13/pflag/float64.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/float64.go rename to vendor/github.com/spf13/pflag/float64.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int.go b/vendor/github.com/spf13/pflag/int.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/int.go rename to vendor/github.com/spf13/pflag/int.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int32.go b/vendor/github.com/spf13/pflag/int32.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/int32.go rename to vendor/github.com/spf13/pflag/int32.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int64.go b/vendor/github.com/spf13/pflag/int64.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/int64.go rename to vendor/github.com/spf13/pflag/int64.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int8.go b/vendor/github.com/spf13/pflag/int8.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/int8.go rename to vendor/github.com/spf13/pflag/int8.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/int_slice.go b/vendor/github.com/spf13/pflag/int_slice.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/int_slice.go rename to vendor/github.com/spf13/pflag/int_slice.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/ip.go b/vendor/github.com/spf13/pflag/ip.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/ip.go rename to vendor/github.com/spf13/pflag/ip.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/ipmask.go b/vendor/github.com/spf13/pflag/ipmask.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/ipmask.go rename to vendor/github.com/spf13/pflag/ipmask.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/string.go b/vendor/github.com/spf13/pflag/string.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/string.go rename to vendor/github.com/spf13/pflag/string.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/string_slice.go rename to vendor/github.com/spf13/pflag/string_slice.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint.go b/vendor/github.com/spf13/pflag/uint.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/uint.go rename to vendor/github.com/spf13/pflag/uint.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint16.go b/vendor/github.com/spf13/pflag/uint16.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/uint16.go rename to vendor/github.com/spf13/pflag/uint16.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint32.go b/vendor/github.com/spf13/pflag/uint32.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/uint32.go rename to vendor/github.com/spf13/pflag/uint32.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint64.go b/vendor/github.com/spf13/pflag/uint64.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/uint64.go rename to vendor/github.com/spf13/pflag/uint64.go diff --git a/Godeps/_workspace/src/github.com/spf13/pflag/uint8.go b/vendor/github.com/spf13/pflag/uint8.go similarity index 100% rename from Godeps/_workspace/src/github.com/spf13/pflag/uint8.go rename to vendor/github.com/spf13/pflag/uint8.go diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE b/vendor/golang.org/x/net/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/github.com/cznic/sortutil/LICENSE rename to vendor/golang.org/x/net/LICENSE diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS b/vendor/golang.org/x/net/PATENTS similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/github.com/camlistore/camlistore/third_party/golang.org/x/image/PATENTS rename to vendor/golang.org/x/net/PATENTS diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go new file mode 100644 index 0000000..ef2f3e8 --- /dev/null +++ b/vendor/golang.org/x/net/context/context.go @@ -0,0 +1,447 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out <-chan Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it's is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, &c) + return &c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) cancelCtx { + return cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return &c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE rename to vendor/gopkg.in/yaml.v2/LICENSE diff --git a/Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml b/vendor/gopkg.in/yaml.v2/LICENSE.libyaml similarity index 100% rename from Godeps/_workspace/src/github.com/blablacar/cnt/Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE.libyaml rename to vendor/gopkg.in/yaml.v2/LICENSE.libyaml diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/README.md rename to vendor/gopkg.in/yaml.v2/README.md diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/apic.go b/vendor/gopkg.in/yaml.v2/apic.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/apic.go rename to vendor/gopkg.in/yaml.v2/apic.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/decode.go rename to vendor/gopkg.in/yaml.v2/decode.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/emitterc.go rename to vendor/gopkg.in/yaml.v2/emitterc.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/encode.go b/vendor/gopkg.in/yaml.v2/encode.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/encode.go rename to vendor/gopkg.in/yaml.v2/encode.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/parserc.go rename to vendor/gopkg.in/yaml.v2/parserc.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/readerc.go rename to vendor/gopkg.in/yaml.v2/readerc.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/resolve.go rename to vendor/gopkg.in/yaml.v2/resolve.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/scannerc.go rename to vendor/gopkg.in/yaml.v2/scannerc.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/sorter.go rename to vendor/gopkg.in/yaml.v2/sorter.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/writerc.go b/vendor/gopkg.in/yaml.v2/writerc.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/writerc.go rename to vendor/gopkg.in/yaml.v2/writerc.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/yaml.go rename to vendor/gopkg.in/yaml.v2/yaml.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/yamlh.go rename to vendor/gopkg.in/yaml.v2/yamlh.go diff --git a/Godeps/_workspace/src/gopkg.in/yaml.v2/yamlprivateh.go b/vendor/gopkg.in/yaml.v2/yamlprivateh.go similarity index 100% rename from Godeps/_workspace/src/gopkg.in/yaml.v2/yamlprivateh.go rename to vendor/gopkg.in/yaml.v2/yamlprivateh.go diff --git a/work/env.go b/work/env.go index 700b992..290bc5c 100644 --- a/work/env.go +++ b/work/env.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/dgr/bin-dgr/common" + "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/utils" "github.com/coreos/etcd/client" @@ -15,6 +16,7 @@ import ( "os" "strings" "sync" + txttmpl "text/template" "time" ) @@ -38,6 +40,7 @@ type Env struct { config Config services map[string]*Service servicesMutex *sync.Mutex + Partials *txttmpl.Template } func NewEnvironment(root string, name string) *Env { @@ -58,6 +61,7 @@ func NewEnvironment(root string, name string) *Env { } env.loadAttributes() env.loadConfig() + env.loadPartials() return env } @@ -123,6 +127,17 @@ func (e *Env) loadConfig() { } } +func (e *Env) loadPartials() { + if ok, err := common.IsDirEmpty(e.path + PATH_TEMPLATES); ok || err != nil { + return + } + tmplDir, err := template.NewTemplateDir(e.path+PATH_TEMPLATES, "") + if err != nil { + logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Failed to load partial templating") + } + e.Partials = tmplDir.Partials +} + func (e *Env) loadAttributes() { files, err := utils.AttributeFiles(e.path + PATH_ATTRIBUTES) if err != nil { diff --git a/work/service.go b/work/service.go index 60e8e61..905c59d 100644 --- a/work/service.go +++ b/work/service.go @@ -260,7 +260,7 @@ func (s *Service) loadUnitTemplate(filename string) (*template.Templating, error if err != nil { return nil, errors.Annotate(err, "Cannot read unit template file") } - template, err := template.NewTemplating(nil, path, string(source)) + template, err := template.NewTemplating(s.GetEnv().Partials, path, string(source)) if err != nil { return nil, errs.WithEF(err, s.fields, "Failed to load unit template") } diff --git a/work/spec.go b/work/spec.go index ac692d4..1d6c98b 100644 --- a/work/spec.go +++ b/work/spec.go @@ -5,6 +5,7 @@ import ( ) const PATH_ATTRIBUTES = "/attributes" +const PATH_TEMPLATES = "/templates" const ACTIVE_ACTIVE = "active" const SUB_RUNNING = "running" From a4b5638a0254a98a54da09b4016edd7ef20cc7dd Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 23 May 2016 14:58:29 +0200 Subject: [PATCH 124/163] update go version on travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c1d8aac..68a46c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.5 + - 1.6 install: - sudo apt-get install upx From 6807be54185159b68829655d61fa6e7a717125c8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 30 Jun 2016 13:09:52 +0200 Subject: [PATCH 125/163] random fleet endpoints at each run --- main.go | 3 +++ work/env.go | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index afd83ea..63bef57 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,8 @@ package main import ( "github.com/blablacar/ggn/commands" _ "github.com/n0rad/go-erlog/register" + "math/rand" + "time" ) var CommitHash string @@ -10,5 +12,6 @@ var GgnVersion string var BuildDate string func main() { + rand.Seed(time.Now().UTC().UnixNano()) commands.Execute(CommitHash, GgnVersion, BuildDate) } diff --git a/work/env.go b/work/env.go index 290bc5c..1b2aed8 100644 --- a/work/env.go +++ b/work/env.go @@ -13,6 +13,7 @@ import ( "github.com/n0rad/go-erlog/logs" "gopkg.in/yaml.v2" "io/ioutil" + "math/rand" "os" "strings" "sync" @@ -125,6 +126,14 @@ func (e *Env) loadConfig() { panic(err) } } + + src := strings.Split(e.config.Fleet.Endpoint, ",") + dest := make([]string, len(src)) + perm := rand.Perm(len(src)) + for i, v := range perm { + dest[v] = src[i] + } + e.config.Fleet.Endpoint = strings.Join(dest, ",") } func (e *Env) loadPartials() { @@ -194,7 +203,8 @@ func (e Env) ListMachineNames() ([]string, error) { metas := strings.Split(machine, ",") for _, meta := range metas { elem := strings.Split(meta, "=") - if elem[0] == "name" { // TODO this is specific to blablacar's metadata ?? + if elem[0] == "name" { + // TODO this is specific to blablacar's metadata ?? names = append(names, elem[1]) } } From 0faa5dc48a3a18879b2ff6dbda96064d5c71c57e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 11:29:03 +0200 Subject: [PATCH 126/163] update dependencies && add gomake --- Godeps/Godeps.json | 106 +- build.sh | 48 - clean.sh | 3 - gomake | 268 ++++ release.sh | 70 - .../coreos/go-semver/semver/semver.go | 203 --- .../coreos/go-semver/semver/sort.go | 24 - .../src/github.com/spf13/pflag/LICENSE | 28 - .../src/github.com/spf13/pflag/README.md | 155 --- .../src/github.com/spf13/pflag/flag.go | 1133 ----------------- .../src/golang.org/x/net/html/atom/table.go | 694 ---------- .../appc/spec/discovery/discovery.go | 77 +- vendor/github.com/appc/spec/discovery/http.go | 32 +- .../github.com/appc/spec/discovery/myapp.html | 15 - .../appc/spec/discovery/myapp2.html | 15 - .../appc/spec/pkg/device/device_linux.go | 33 + .../appc/spec/pkg/device/device_posix.go | 2 +- vendor/github.com/appc/spec/schema/image.go | 2 +- vendor/github.com/appc/spec/schema/pod.go | 13 +- .../schema/types/isolator_linux_specific.go | 4 +- .../spec/schema/types/isolator_resources.go | 32 +- .../appc/spec/schema/types/semver.go | 2 +- .../appc/spec/schema/types/volume.go | 109 +- vendor/github.com/appc/spec/schema/version.go | 2 +- .../dgr/bin-dgr/common/acfullname.go | 25 +- .../blablacar/dgr/bin-dgr/common/common.go | 6 +- .../dgr/bin-dgr/common/dgr-manifest.go | 18 - .../dgr/bin-dgr/common/rkt-client.go | 67 +- .../dgr/bin-templater/template/directory.go | 35 +- .../dgr/bin-templater/template/file.go | 17 +- .../dgr/bin-templater/template/templating.go | 26 + .../github.com/n0rad/go-erlog/errs/entry.go | 4 + vendor/github.com/n0rad/go-erlog/formatter.go | 15 +- vendor/go4.org/LICENSE | 202 +++ .../pkg => go4.org}/errorutil/highlight.go | 0 vendor/golang.org/x/net/context/context.go | 297 +---- vendor/golang.org/x/net/context/go17.go | 72 ++ vendor/golang.org/x/net/context/pre_go17.go | 300 +++++ .../golang.org/x/net/html/atom/atom.go | 0 .../golang.org/x/net/html/atom/gen.go | 20 +- vendor/golang.org/x/net/html/atom/table.go | 713 +++++++++++ .../src => }/golang.org/x/net/html/const.go | 6 +- .../src => }/golang.org/x/net/html/doc.go | 4 +- .../src => }/golang.org/x/net/html/doctype.go | 0 .../src => }/golang.org/x/net/html/entity.go | 2 +- .../src => }/golang.org/x/net/html/escape.go | 4 +- .../src => }/golang.org/x/net/html/foreign.go | 0 .../src => }/golang.org/x/net/html/node.go | 2 +- .../src => }/golang.org/x/net/html/parse.go | 44 +- .../src => }/golang.org/x/net/html/render.go | 2 +- .../src => }/golang.org/x/net/html/token.go | 2 +- vendor/k8s.io/kubernetes/LICENSE | 202 +++ .../kubernetes/pkg/api/resource/quantity.go | 12 +- .../kubernetes/pkg/api/resource/suffix.go | 0 .../speter.net/go/exp/math/dec/inf/LICENSE | 0 .../speter.net/go/exp/math/dec/inf/dec.go | 0 .../speter.net/go/exp/math/dec/inf/rounder.go | 0 work/env.go | 2 +- work/service-generate.go | 7 +- 59 files changed, 2238 insertions(+), 2938 deletions(-) delete mode 100755 build.sh delete mode 100755 clean.sh create mode 100755 gomake delete mode 100755 release.sh delete mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go delete mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go delete mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE delete mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md delete mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go delete mode 100644 vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go delete mode 100644 vendor/github.com/appc/spec/discovery/myapp.html delete mode 100644 vendor/github.com/appc/spec/discovery/myapp2.html create mode 100644 vendor/github.com/appc/spec/pkg/device/device_linux.go create mode 100644 vendor/go4.org/LICENSE rename vendor/{github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg => go4.org}/errorutil/highlight.go (100%) create mode 100644 vendor/golang.org/x/net/context/go17.go create mode 100644 vendor/golang.org/x/net/context/pre_go17.go rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/atom/atom.go (100%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/atom/gen.go (96%) create mode 100644 vendor/golang.org/x/net/html/atom/table.go rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/const.go (93%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/doc.go (95%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/doctype.go (100%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/entity.go (99%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/escape.go (96%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/foreign.go (100%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/node.go (98%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/parse.go (97%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/render.go (99%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/golang.org/x/net/html/token.go (99%) create mode 100644 vendor/k8s.io/kubernetes/LICENSE rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/k8s.io/kubernetes/pkg/api/resource/quantity.go (98%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/k8s.io/kubernetes/pkg/api/resource/suffix.go (100%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/speter.net/go/exp/math/dec/inf/LICENSE (100%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/speter.net/go/exp/math/dec/inf/dec.go (100%) rename vendor/{github.com/appc/spec/Godeps/_workspace/src => }/speter.net/go/exp/math/dec/inf/rounder.go (100%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 193f972..a2b560e 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -3,78 +3,43 @@ "GoVersion": "go1.6", "GodepVersion": "v65", "Packages": [ - "./..." + "././..." ], "Deps": [ - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, - { - "ImportPath": "github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" - }, { "ImportPath": "github.com/appc/spec/aci", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/appc/spec/discovery", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/appc/spec/pkg/device", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/appc/spec/pkg/tarheader", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/appc/spec/schema", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/appc/spec/schema/common", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/appc/spec/schema/types", - "Comment": "v0.7.1-30-g1e5ab3d", - "Rev": "1e5ab3d857c146e0834c5a14857728d6c04c6f85" + "Comment": "v0.8.1", + "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, { "ImportPath": "github.com/blablacar/attributes-merger/attributes", @@ -83,13 +48,13 @@ }, { "ImportPath": "github.com/blablacar/dgr/bin-dgr/common", - "Comment": "68-3-g9c108bb", - "Rev": "9c108bbb994fd002da65d0373b0dfcd6308f0a7c" + "Comment": "70-3-gf4a45eb", + "Rev": "f4a45ebcd77f9ac4b0c586812c82c33f9aef46b3" }, { "ImportPath": "github.com/blablacar/dgr/bin-templater/template", - "Comment": "68-3-g9c108bb", - "Rev": "9c108bbb994fd002da65d0373b0dfcd6308f0a7c" + "Comment": "70-3-gf4a45eb", + "Rev": "f4a45ebcd77f9ac4b0c586812c82c33f9aef46b3" }, { "ImportPath": "github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec", @@ -176,23 +141,23 @@ }, { "ImportPath": "github.com/n0rad/go-erlog", - "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + "Rev": "5d115df10702be00f951040b7d67a02f002f36b2" }, { "ImportPath": "github.com/n0rad/go-erlog/data", - "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + "Rev": "5d115df10702be00f951040b7d67a02f002f36b2" }, { "ImportPath": "github.com/n0rad/go-erlog/errs", - "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + "Rev": "5d115df10702be00f951040b7d67a02f002f36b2" }, { "ImportPath": "github.com/n0rad/go-erlog/logs", - "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + "Rev": "5d115df10702be00f951040b7d67a02f002f36b2" }, { "ImportPath": "github.com/n0rad/go-erlog/register", - "Rev": "7b72dfd0d87a75ac6e38ef77901e9114cb24be48" + "Rev": "5d115df10702be00f951040b7d67a02f002f36b2" }, { "ImportPath": "github.com/peterbourgon/mergemap", @@ -206,13 +171,34 @@ "ImportPath": "github.com/spf13/pflag", "Rev": "67cbc198fd11dab704b214c1e629a97af392c085" }, + { + "ImportPath": "go4.org/errorutil", + "Rev": "03efcb870d84809319ea509714dd6d19a1498483" + }, { "ImportPath": "golang.org/x/net/context", - "Rev": "ea47fc708ee3e20177f3ca3716217c4ab75942cb" + "Rev": "0c607074acd38c5f23d1344dfe74c977464d1257" + }, + { + "ImportPath": "golang.org/x/net/html", + "Rev": "0c607074acd38c5f23d1344dfe74c977464d1257" + }, + { + "ImportPath": "golang.org/x/net/html/atom", + "Rev": "0c607074acd38c5f23d1344dfe74c977464d1257" }, { "ImportPath": "gopkg.in/yaml.v2", "Rev": "7ad95dd0798a40da1ccdff6dff35fd177b5edf40" + }, + { + "ImportPath": "k8s.io/kubernetes/pkg/api/resource", + "Comment": "v1.1.0-alpha.1-152-g77e2d4f", + "Rev": "77e2d4f9185ecbedab327f228960d4ba33703025" + }, + { + "ImportPath": "speter.net/go/exp/math/dec/inf", + "Rev": "42ca6cd68aa922bc3f32f1e056e61b65945d9ad7" } ] } diff --git a/build.sh b/build.sh deleted file mode 100755 index 2fe98b1..0000000 --- a/build.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -set -x -set -e -start=`date +%s` -dir=$( dirname $0 ) - -ENVS="linux\ndarwin" -[ -z "$1" ] || ENVS="$1" - - -[ -f $GOPATH/bin/godep ] || go get github.com/tools/godep -[ -f /usr/bin/upx ] || (echo "upx is required to build dgr" && exit 1) - -# clean -rm -Rf $dir/dist/*-amd64 - -#save dep -godep save ./... || true - -# format && test -gofmt -w -s . -godep go test -cover $dir/... - -if [ -z ${VERSION} ]; then - VERSION=0 -fi - - -# build -#if `command -v parallel >/dev/null 2>&1`; then -# echo -e "$ENVS" | parallel --will-cite -j10 --workdir . "GOOS={} GOARCH=amd64 godep go build -o dist/{}-amd64/ggn" -#else - for e in `echo -e "$ENVS"`; do - GOOS="$e" GOARCH=amd64 godep go build --ldflags "-s -w -X main.BuildDate=`date -u '+%Y-%m-%d_%H:%M'` \ - -X main.GgnVersion=${VERSION} \ - -X main.CommitHash=`git rev-parse HEAD`" \ - -o "dist/${e}-amd64/ggn" ${dir}/ - - upx ${dir}/dist/${e}-amd64/ggn - - done -#fi - -# install -cp $dir/dist/`go env GOHOSTOS`-`go env GOHOSTARCH`/ggn $GOPATH/bin/ggn - -end=`date +%s` -echo "Duration : $((end-start))s" diff --git a/clean.sh b/clean.sh deleted file mode 100755 index 8b386b9..0000000 --- a/clean.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rm -Rf dist/ diff --git a/gomake b/gomake new file mode 100755 index 0000000..560c06b --- /dev/null +++ b/gomake @@ -0,0 +1,268 @@ +#!/bin/bash +set -e + + : ${target_name:=dist} + : ${work_path:=.} + : ${app:=$(basename $(cd "${work_path}"; pwd))} + : ${repo:=$(git config --get remote.origin.url | sed -n 's/.*@\(.*\)\.git/\1/p' | tr : /)} + : ${osarchi:="$(go env GOHOSTOS)-$(go env GOHOSTARCH)"} + : ${release_osarchi:="linux-amd64,darwin-amd64,windows-amd64"} + : ${version:=0} + : ${token:=} + : ${upx:=} + +read -d '' helper <<EOF || true +Usage: gomake [-v version][-t token] command... + gomake is a script to build go apps + + command + clean clean '${target_name}/' directory + build build (current platform only by default) + quality Format, Fix, check error handled, lint, vet, misspell, ineffassign, Gocyclo + test run go tests + release clean, build all platform, test, check git is clean, tag, push tag & build ZIPs + gomake_update self updating by downloading and replacing with latest version + + default is 'clean build test quality' + + -v, --version=version version of the app + -h, --help this helper + -t, --token=token token to push releases + -W, --work-path=path set working path, default is ./ +EOF + + +echo_red() { + echo -e "\e[0;31m${@}\e[0m" +} + +echo_purple() { + echo -e "\e[0;35m${@}\e[0m" +} + +echo_green() { + echo -e "\e[0;32m${@}\e[0m" +} + +echo_yellow() { + echo -e "\e[0;93m${@}\e[0m" +} + +gomake_update() { + echo_green "Downloading gomake" + wget -q -O ${work_path}/gomake.tmp https://raw.githubusercontent.com/n0rad/gomake/master/gomake + chmod +x ${work_path}/gomake.tmp + mv ${work_path}/gomake.tmp ${work_path}/$0 +} + +clean() { + echo_green "Cleaning" + rm -Rf ${work_path}/${target_name} +} + +build() { + start=`date +%s` + + [ -z "$1" ] || osarchi="$1" + [ ! -z ${version+x} ] || version="0" + + [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep + [ -f /usr/bin/upx ] || (echo "upx is required to build" && exit 1) + + echo_green "Save Dependencies" + godep save ./${work_path}/... || echo_yellow "Cannot save dependencies. Continuing" + + IFS=',' read -ra current <<< "$osarchi" + for e in "${current[@]}"; do + echo_green "Building $e" + + GOOS="${e%-*}" GOARCH="${e#*-}" \ + $(cd ${work_path} && godep go build -ldflags "-X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.Version=${version}-`git rev-parse --short HEAD`" \ + -o ${target_name}/${app}-v${version}-${e}/${app}) + + if [ ${upx} ]; then + if [ "${e%-*}" != "darwin" ]; then + echo_green "Compressing ${e}" + upx ${work_path}/${target_name}/${app}-v${version}-${e}/${app} &> /dev/null + fi + fi + + if [ "${e%-*}" == "windows" ]; then + mv ${work_path}/${target_name}/${app}-v${version}-${e}/${app} ${work_path}/${target_name}/${app}-v${version}-${e}/${app}.exe + fi + done + echo_purple "Build duration : $((`date +%s`-${start}))s" +} + + +install() { + echo_green "Installing" + cp ${work_path}/${target_name}/${app}-v${version}-$(go env GOHOSTOS)-$(go env GOHOSTARCH)/${app}* ${GOPATH}/bin/ +} + +quality() { + start=`date +%s` + cd ${work_path} + + go_files=`find . -name '*.go' 2> /dev/null | grep -v ${target_name}/ | grep -v vendor/ | grep -v .git` + + echo_green "Format" + gofmt -w -s ${go_files} + + echo_green "Fix" + go tool fix ${go_files} + + echo_green "Err check" + [ -f ${GOPATH}/bin/errcheck ] || go get -u github.com/kisielk/errcheck + errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go' + + echo_green "Lint" + [ -f ${GOPATH}/bin/golint ] || go get -u github.com/golang/lint/golint + for i in ${go_files}; do + golint ${i} | grep -v 'should have comment ' || true + done + + echo_green "Vet" + go tool vet ${go_files} || true + + echo_green "Misspell" + [ -f ${GOPATH}/bin/misspell ] || go get -u github.com/client9/misspell/cmd/misspell + misspell -source=text ${go_files} + + echo_green "Ineffassign" + [ -f ${GOPATH}/bin/ineffassign ] || go get -u github.com/gordonklaus/ineffassign + for i in ${go_files}; do + ineffassign -n ${i} || true + done + + echo_green "Gocyclo" + [ -f ${GOPATH}/bin/gocyclo ] || go get -u github.com/fzipp/gocyclo + gocyclo -over 15 ${go_files} || true + + cd - + echo_purple "Quality duration : $((`date +%s`-${start}))s" +} + +require_clean_work_tree() { + # Update the index + git update-index -q --ignore-submodules --refresh + err=0 + + # Disallow unstaged changes in the working tree + if ! git diff-files --quiet --ignore-submodules -- + then + echo_red "cannot release: you have unstaged changes." + git diff-files --name-status -r --ignore-submodules -- >&2 + err=1 + fi + + # Disallow uncommitted changes in the index + if ! git diff-index --cached --quiet HEAD --ignore-submodules -- + then + echo_red "cannot release: your index contains uncommitted changes." + git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2 + err=1 + fi + + if [ ${err} = 1 ] + then + echo_red "Please commit or stash them." + exit 1 + fi +} + +release() { + start=`date +%s` + if [ "${repo%%/*}" != "github.com" ]; then + echo "Push to '${repo%%/*}' not implemented" + exit 1 + fi + if [ -z "${version}" ] || [ "${version}" == "0" ]; then + echo_red "please set version to release" + exit 1 + fi + if [ -z "${token}" ]; then + echo_red "please set token to release" + exit 1 + fi + + github_repo=${repo#*/} + + clean + build ${release_osarchi} + test + quality + require_clean_work_tree + + echo_green "Compress release" + cd ${work_path}/${target_name} + for i in *-* ; do + if [ -d "$i" ]; then + tar czf ${i}.tar.gz ${i} + fi + done + cd - + + git tag v${version} -a -m "Version $version" + git push --tags + + sleep 5 + + posturl=$(curl --data "{\"tag_name\": \"v${version}\",\"target_commitish\": \"master\",\"name\": \"v${version}\",\"body\": \"Release of version ${version}\",\"draft\": false,\"prerelease\": false}" https://api.github.com/repos/${github_repo}/releases?access_token=${token} | grep "\"upload_url\"" | sed -ne 's/.*\(http[^"]*\).*/\1/p') + + for i in ${work_path}/${target_name}/*.tar.gz ; do + fullpath=$(ls ${i}) + filename=${fullpath##*/} + curl -i -X POST -H "Content-Type: application/x-gzip" --data-binary "@${fullpath}" "${posturl%\{?name,label\}}?name=${filename}&label=${filename}&access_token=${token}" + done + echo_purple "Release duration : $((`date +%s`-${start}))s" +} + +test() { + start=`date +%s` + echo_green "Testing" + godep go test -cover $(go list ${work_path}/... | grep -v vendor/) + + echo_purple "Test duration : $((`date +%s`-${start}))s" +} + +######################################### +######################################### + +global_start=`date +%s` + +commands=() +while [ $# -gt 0 ]; do + case "${1}" in + -h|--help) echo "${helper}"; exit 0;; + --version=*)version="${1#*=}"; shift;; + --token=*) token="${1#*=}"; shift;; + --work-path=*) work_path="${1#*=}"; shift;; + -v) version="${2}"; [ $# -gt 1 ] || (echo_red "Missing argument for ${1}"; exit 1); shift 2;; + -t) token="${2}"; [ $# -gt 1 ] || (echo_red "Missing argument for ${1}"; exit 1); shift 2;; + -W) work_path="${2}"; [ $# -gt 1 ] || (echo_red "Missing argument for ${1}"; exit 1); shift 2;; + --) shift; commands+=("${@}"); break;; + *) commands+=("${1}"); shift;; + esac +done + +if [ -f ${work_path}/gomake.cfg ]; then + . ${work_path}/gomake.cfg +fi + +if [ ${#commands[@]} -eq 0 ]; then + commands=(clean build test quality) +fi +command_count=0 +for i in "${commands[@]}"; do + case ${i} in + test|build|release|clean|quality|gomake_update) ${i}; ((++command_count));; + *) echo_red "Unknown command '${i}'"; echo ${helper}; exit 1;; + esac +done + +if [ ${command_count} -gt 1 ]; then + echo_purple "Global duration : $((`date +%s`-global_start))s" +fi + +exit 0 diff --git a/release.sh b/release.sh deleted file mode 100755 index c4ac6f0..0000000 --- a/release.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash -set -x -set -e -dir=$( dirname $0 ) - -if [ $# != 2 ]; then - echo "Usage: release.sh VERSION GITHUB_KEY" - exit 1 -fi - -version=$1 -access_token=$2 - -require_clean_work_tree () { - # Update the index - git update-index -q --ignore-submodules --refresh - err=0 - - # Disallow unstaged changes in the working tree - if ! git diff-files --quiet --ignore-submodules -- - then - echo >&2 "cannot $1: you have unstaged changes." - git diff-files --name-status -r --ignore-submodules -- >&2 - err=1 - fi - - # Disallow uncommitted changes in the index - if ! git diff-index --cached --quiet HEAD --ignore-submodules -- - then - echo >&2 "cannot $1: your index contains uncommitted changes." - git diff-index --cached --name-status -r --ignore-submodules HEAD -- >&2 - err=1 - fi - - if [ $err = 1 ] - then - echo >&2 "Please commit or stash them." - exit 1 - fi -} - -export VERSION=${version} -${dir}/clean.sh -${dir}/build.sh -require_clean_work_tree - - -for i in ${dir}/dist/*-amd64/ ; do - if [ -d "$i" ]; then - cd $i - platform=${PWD##*/} - tar cvzf ggn-${platform}-${version}.tar.gz ggn - cd - - fi -done - -git tag ${version} -a -m "Version $version" -git push --tags - -sleep 5 - -posturl=$(curl --data "{\"tag_name\": \"$1\",\"target_commitish\": \"master\",\"name\": \"$1\",\"body\": \"Release of version $1\",\"draft\": false,\"prerelease\": true}" https://api.github.com/repos/blablacar/ggn/releases?access_token=${access_token} | grep "\"upload_url\"" | sed -ne 's/.*\(http[^"]*\).*/\1/p') - -for i in ${dir}/dist/*-amd64/ ; do - if [ -d "$i" ]; then - fullpath=$(ls ${i}/*.tar.gz) - filename=${fullpath##*/} - curl -i -X POST -H "Content-Type: application/x-gzip" --data-binary "@${fullpath}" "${posturl%\{?name,label\}}?name=${filename}&label=${filename}&access_token=${access_token}" - fi -done diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go deleted file mode 100644 index 46c329e..0000000 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/semver.go +++ /dev/null @@ -1,203 +0,0 @@ -package semver - -import ( - "bytes" - "errors" - "fmt" - "strconv" - "strings" -) - -type Version struct { - Major int64 - Minor int64 - Patch int64 - PreRelease PreRelease - Metadata string -} - -type PreRelease string - -func splitOff(input *string, delim string) (val string) { - parts := strings.SplitN(*input, delim, 2) - - if len(parts) == 2 { - *input = parts[0] - val = parts[1] - } - - return val -} - -func NewVersion(version string) (*Version, error) { - v := Version{} - - dotParts := strings.SplitN(version, ".", 3) - - if len(dotParts) != 3 { - return nil, errors.New(fmt.Sprintf("%s is not in dotted-tri format", version)) - } - - v.Metadata = splitOff(&dotParts[2], "+") - v.PreRelease = PreRelease(splitOff(&dotParts[2], "-")) - - parsed := make([]int64, 3, 3) - - for i, v := range dotParts[:3] { - val, err := strconv.ParseInt(v, 10, 64) - parsed[i] = val - if err != nil { - return nil, err - } - } - - v.Major = parsed[0] - v.Minor = parsed[1] - v.Patch = parsed[2] - - return &v, nil -} - -func (v *Version) String() string { - var buffer bytes.Buffer - - base := fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) - buffer.WriteString(base) - - if v.PreRelease != "" { - buffer.WriteString(fmt.Sprintf("-%s", v.PreRelease)) - } - - if v.Metadata != "" { - buffer.WriteString(fmt.Sprintf("+%s", v.Metadata)) - } - - return buffer.String() -} - -func (v *Version) LessThan(versionB Version) bool { - versionA := *v - cmp := recursiveCompare(versionA.Slice(), versionB.Slice()) - - if cmp == 0 { - cmp = preReleaseCompare(versionA, versionB) - } - - if cmp == -1 { - return true - } - - return false -} - -/* Slice converts the comparable parts of the semver into a slice of strings */ -func (v *Version) Slice() []int64 { - return []int64{v.Major, v.Minor, v.Patch} -} - -func (p *PreRelease) Slice() []string { - preRelease := string(*p) - return strings.Split(preRelease, ".") -} - -func preReleaseCompare(versionA Version, versionB Version) int { - a := versionA.PreRelease - b := versionB.PreRelease - - /* Handle the case where if two versions are otherwise equal it is the - * one without a PreRelease that is greater */ - if len(a) == 0 && (len(b) > 0) { - return 1 - } else if len(b) == 0 && (len(a) > 0) { - return -1 - } - - // If there is a prelease, check and compare each part. - return recursivePreReleaseCompare(a.Slice(), b.Slice()) -} - -func recursiveCompare(versionA []int64, versionB []int64) int { - if len(versionA) == 0 { - return 0 - } - - a := versionA[0] - b := versionB[0] - - if a > b { - return 1 - } else if a < b { - return -1 - } - - return recursiveCompare(versionA[1:], versionB[1:]) -} - -func recursivePreReleaseCompare(versionA []string, versionB []string) int { - // Handle slice length disparity. - if len(versionA) == 0 { - // Nothing to compare too, so we return 0 - return 0 - } else if len(versionB) == 0 { - // We're longer than versionB so return 1. - return 1 - } - - a := versionA[0] - b := versionB[0] - - aInt := false - bInt := false - - aI, err := strconv.Atoi(versionA[0]) - if err == nil { - aInt = true - } - - bI, err := strconv.Atoi(versionB[0]) - if err == nil { - bInt = true - } - - // Handle Integer Comparison - if aInt && bInt { - if aI > bI { - return 1 - } else if aI < bI { - return -1 - } - } - - // Handle String Comparison - if a > b { - return 1 - } else if a < b { - return -1 - } - - return recursivePreReleaseCompare(versionA[1:], versionB[1:]) -} - -// BumpMajor increments the Major field by 1 and resets all other fields to their default values -func (v *Version) BumpMajor() { - v.Major += 1 - v.Minor = 0 - v.Patch = 0 - v.PreRelease = PreRelease("") - v.Metadata = "" -} - -// BumpMinor increments the Minor field by 1 and resets all other fields to their default values -func (v *Version) BumpMinor() { - v.Minor += 1 - v.Patch = 0 - v.PreRelease = PreRelease("") - v.Metadata = "" -} - -// BumpPatch increments the Patch field by 1 and resets all other fields to their default values -func (v *Version) BumpPatch() { - v.Patch += 1 - v.PreRelease = PreRelease("") - v.Metadata = "" -} diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go deleted file mode 100644 index 8620300..0000000 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver/sort.go +++ /dev/null @@ -1,24 +0,0 @@ -package semver - -import ( - "sort" -) - -type Versions []*Version - -func (s Versions) Len() int { - return len(s) -} - -func (s Versions) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s Versions) Less(i, j int) bool { - return s[i].LessThan(*s[j]) -} - -// Sort sorts the given slice of Version -func Sort(versions []*Version) { - sort.Sort(Versions(versions)) -} diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE deleted file mode 100644 index 63ed1cf..0000000 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2012 Alex Ogier. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md deleted file mode 100644 index a12d94d..0000000 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/README.md +++ /dev/null @@ -1,155 +0,0 @@ -## Description - -pflag is a drop-in replacement for Go's flag package, implementing -POSIX/GNU-style --flags. - -pflag is compatible with the [GNU extensions to the POSIX recommendations -for command-line options][1]. For a more precise description, see the -"Command-line flag syntax" section below. - -[1]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - -pflag is available under the same style of BSD license as the Go language, -which can be found in the LICENSE file. - -## Installation - -pflag is available using the standard `go get` command. - -Install by running: - - go get github.com/ogier/pflag - -Run tests by running: - - go test github.com/ogier/pflag - -## Usage - -pflag is a drop-in replacement of Go's native flag package. If you import -pflag under the name "flag" then all code should continue to function -with no changes. - -``` go -import flag "github.com/ogier/pflag" -``` - -There is one exception to this: if you directly instantiate the Flag struct -there is one more field "Shorthand" that you will need to set. -Most code never instantiates this struct directly, and instead uses -functions such as String(), BoolVar(), and Var(), and is therefore -unaffected. - -Define flags using flag.String(), Bool(), Int(), etc. - -This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - -``` go -var ip *int = flag.Int("flagname", 1234, "help message for flagname") -``` - -If you like, you can bind the flag to a variable using the Var() functions. - -``` go -var flagvar int -func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") -} -``` - -Or you can create custom flags that satisfy the Value interface (with -pointer receivers) and couple them to flag parsing by - -``` go -flag.Var(&flagVal, "name", "help message for flagname") -``` - -For such flags, the default value is just the initial value of the variable. - -After all flags are defined, call - -``` go -flag.Parse() -``` - -to parse the command line into the defined flags. - -Flags may then be used directly. If you're using the flags themselves, -they are all pointers; if you bind to variables, they're values. - -``` go -fmt.Println("ip has value ", *ip) -fmt.Println("flagvar has value ", flagvar) -``` - -After parsing, the arguments after the flag are available as the -slice flag.Args() or individually as flag.Arg(i). -The arguments are indexed from 0 through flag.NArg()-1. - -The pflag package also defines some new functions that are not in flag, -that give one-letter shorthands for flags. You can use these by appending -'P' to the name of any function that defines a flag. - -``` go -var ip = flag.IntP("flagname", "f", 1234, "help message") -var flagvar bool -func init() { - flag.BoolVarP("boolname", "b", true, "help message") -} -flag.VarP(&flagVar, "varname", "v", 1234, "help message") -``` - -Shorthand letters can be used with single dashes on the command line. -Boolean shorthand flags can be combined with other shorthand flags. - -The default set of command-line flags is controlled by -top-level functions. The FlagSet type allows one to define -independent sets of flags, such as to implement subcommands -in a command-line interface. The methods of FlagSet are -analogous to the top-level functions for the command-line -flag set. - -## Command line flag syntax - -``` ---flag // boolean flags only ---flag=x -``` - -Unlike the flag package, a single dash before an option means something -different than a double dash. Single dashes signify a series of shorthand -letters for flags. All but the last shorthand letter must be boolean flags. - -``` -// boolean flags --f --abc - -// non-boolean flags --n 1234 --Ifile - -// mixed --abcs "hello" --abcn1234 -``` - -Flag parsing stops after the terminator "--". Unlike the flag package, -flags can be interspersed with arguments anywhere on the command line -before this terminator. - -Integer flags accept 1234, 0664, 0x1234 and may be negative. -Boolean flags (in their long form) accept 1, 0, t, f, true, false, -TRUE, FALSE, True, False. -Duration flags accept any input valid for time.ParseDuration. - -## More info - -You can see the full reference documentation of the pflag package -[at godoc.org][3], or through go's standard documentation system by -running `godoc -http=:6060` and browsing to -[http://localhost:6060/pkg/github.com/ogier/pflag][2] after -installation. - -[2]: http://localhost:6060/pkg/github.com/ogier/pflag -[3]: http://godoc.org/github.com/ogier/pflag diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go deleted file mode 100644 index b741e7b..0000000 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag/flag.go +++ /dev/null @@ -1,1133 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* - pflag is a drop-in replacement for Go's flag package, implementing - POSIX/GNU-style --flags. - - pflag is compatible with the GNU extensions to the POSIX recommendations - for command-line options. See - http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html - - Usage: - - pflag is a drop-in replacement of Go's native flag package. If you import - pflag under the name "flag" then all code should continue to function - with no changes. - - import flag "github.com/ogier/pflag" - - There is one exception to this: if you directly instantiate the Flag struct - there is one more field "Shorthand" that you will need to set. - Most code never instantiates this struct directly, and instead uses - functions such as String(), BoolVar(), and Var(), and is therefore - unaffected. - - Define flags using flag.String(), Bool(), Int(), etc. - - This declares an integer flag, -flagname, stored in the pointer ip, with type *int. - var ip = flag.Int("flagname", 1234, "help message for flagname") - If you like, you can bind the flag to a variable using the Var() functions. - var flagvar int - func init() { - flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") - } - Or you can create custom flags that satisfy the Value interface (with - pointer receivers) and couple them to flag parsing by - flag.Var(&flagVal, "name", "help message for flagname") - For such flags, the default value is just the initial value of the variable. - - After all flags are defined, call - flag.Parse() - to parse the command line into the defined flags. - - Flags may then be used directly. If you're using the flags themselves, - they are all pointers; if you bind to variables, they're values. - fmt.Println("ip has value ", *ip) - fmt.Println("flagvar has value ", flagvar) - - After parsing, the arguments after the flag are available as the - slice flag.Args() or individually as flag.Arg(i). - The arguments are indexed from 0 through flag.NArg()-1. - - The pflag package also defines some new functions that are not in flag, - that give one-letter shorthands for flags. You can use these by appending - 'P' to the name of any function that defines a flag. - var ip = flag.IntP("flagname", "f", 1234, "help message") - var flagvar bool - func init() { - flag.BoolVarP("boolname", "b", true, "help message") - } - flag.VarP(&flagVar, "varname", "v", 1234, "help message") - Shorthand letters can be used with single dashes on the command line. - Boolean shorthand flags can be combined with other shorthand flags. - - Command line flag syntax: - --flag // boolean flags only - --flag=x - - Unlike the flag package, a single dash before an option means something - different than a double dash. Single dashes signify a series of shorthand - letters for flags. All but the last shorthand letter must be boolean flags. - // boolean flags - -f - -abc - // non-boolean flags - -n 1234 - -Ifile - // mixed - -abcs "hello" - -abcn1234 - - Flag parsing stops after the terminator "--". Unlike the flag package, - flags can be interspersed with arguments anywhere on the command line - before this terminator. - - Integer flags accept 1234, 0664, 0x1234 and may be negative. - Boolean flags (in their long form) accept 1, 0, t, f, true, false, - TRUE, FALSE, True, False. - Duration flags accept any input valid for time.ParseDuration. - - The default set of command-line flags is controlled by - top-level functions. The FlagSet type allows one to define - independent sets of flags, such as to implement subcommands - in a command-line interface. The methods of FlagSet are - analogous to the top-level functions for the command-line - flag set. -*/ -package pflag - -import ( - "bytes" - "errors" - "fmt" - "io" - "os" - "sort" - "strconv" - "strings" - "time" -) - -// ErrHelp is the error returned if the flag -help is invoked but no such flag is defined. -var ErrHelp = errors.New("pflag: help requested") - -// -- bool Value -type boolValue bool - -func newBoolValue(val bool, p *bool) *boolValue { - *p = val - return (*boolValue)(p) -} - -func (b *boolValue) Set(s string) error { - v, err := strconv.ParseBool(s) - *b = boolValue(v) - return err -} - -func (b *boolValue) String() string { return fmt.Sprintf("%v", *b) } - -// -- int Value -type intValue int - -func newIntValue(val int, p *int) *intValue { - *p = val - return (*intValue)(p) -} - -func (i *intValue) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *i = intValue(v) - return err -} - -func (i *intValue) String() string { return fmt.Sprintf("%v", *i) } - -// -- int64 Value -type int64Value int64 - -func newInt64Value(val int64, p *int64) *int64Value { - *p = val - return (*int64Value)(p) -} - -func (i *int64Value) Set(s string) error { - v, err := strconv.ParseInt(s, 0, 64) - *i = int64Value(v) - return err -} - -func (i *int64Value) String() string { return fmt.Sprintf("%v", *i) } - -// -- uint Value -type uintValue uint - -func newUintValue(val uint, p *uint) *uintValue { - *p = val - return (*uintValue)(p) -} - -func (i *uintValue) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 64) - *i = uintValue(v) - return err -} - -func (i *uintValue) String() string { return fmt.Sprintf("%v", *i) } - -// -- uint64 Value -type uint64Value uint64 - -func newUint64Value(val uint64, p *uint64) *uint64Value { - *p = val - return (*uint64Value)(p) -} - -func (i *uint64Value) Set(s string) error { - v, err := strconv.ParseUint(s, 0, 64) - *i = uint64Value(v) - return err -} - -func (i *uint64Value) String() string { return fmt.Sprintf("%v", *i) } - -// -- string Value -type stringValue string - -func newStringValue(val string, p *string) *stringValue { - *p = val - return (*stringValue)(p) -} - -func (s *stringValue) Set(val string) error { - *s = stringValue(val) - return nil -} - -func (s *stringValue) String() string { return fmt.Sprintf("%s", *s) } - -// -- float64 Value -type float64Value float64 - -func newFloat64Value(val float64, p *float64) *float64Value { - *p = val - return (*float64Value)(p) -} - -func (f *float64Value) Set(s string) error { - v, err := strconv.ParseFloat(s, 64) - *f = float64Value(v) - return err -} - -func (f *float64Value) String() string { return fmt.Sprintf("%v", *f) } - -// -- time.Duration Value -type durationValue time.Duration - -func newDurationValue(val time.Duration, p *time.Duration) *durationValue { - *p = val - return (*durationValue)(p) -} - -func (d *durationValue) Set(s string) error { - v, err := time.ParseDuration(s) - *d = durationValue(v) - return err -} - -func (d *durationValue) String() string { return (*time.Duration)(d).String() } - -// Value is the interface to the dynamic value stored in a flag. -// (The default value is represented as a string.) -type Value interface { - String() string - Set(string) error -} - -// ErrorHandling defines how to handle flag parsing errors. -type ErrorHandling int - -const ( - ContinueOnError ErrorHandling = iota - ExitOnError - PanicOnError -) - -// A FlagSet represents a set of defined flags. -type FlagSet struct { - // Usage is the function called when an error occurs while parsing flags. - // The field is a function (not a method) that may be changed to point to - // a custom error handler. - Usage func() - - name string - parsed bool - actual map[string]*Flag - formal map[string]*Flag - shorthands map[byte]*Flag - args []string // arguments after flags - exitOnError bool // does the program exit if there's an error? - errorHandling ErrorHandling - output io.Writer // nil means stderr; use out() accessor - interspersed bool // allow interspersed option/non-option args -} - -// A Flag represents the state of a flag. -type Flag struct { - Name string // name as it appears on command line - Shorthand string // one-letter abbreviated flag - Usage string // help message - Value Value // value as set - DefValue string // default value (as text); for usage message - Changed bool // If the user set the value (or if left to default) -} - -// sortFlags returns the flags as a slice in lexicographical sorted order. -func sortFlags(flags map[string]*Flag) []*Flag { - list := make(sort.StringSlice, len(flags)) - i := 0 - for _, f := range flags { - list[i] = f.Name - i++ - } - list.Sort() - result := make([]*Flag, len(list)) - for i, name := range list { - result[i] = flags[name] - } - return result -} - -func (f *FlagSet) out() io.Writer { - if f.output == nil { - return os.Stderr - } - return f.output -} - -// SetOutput sets the destination for usage and error messages. -// If output is nil, os.Stderr is used. -func (f *FlagSet) SetOutput(output io.Writer) { - f.output = output -} - -// VisitAll visits the flags in lexicographical order, calling fn for each. -// It visits all flags, even those not set. -func (f *FlagSet) VisitAll(fn func(*Flag)) { - for _, flag := range sortFlags(f.formal) { - fn(flag) - } -} - -func (f *FlagSet) HasFlags() bool { - return len(f.formal) > 0 -} - -// VisitAll visits the command-line flags in lexicographical order, calling -// fn for each. It visits all flags, even those not set. -func VisitAll(fn func(*Flag)) { - commandLine.VisitAll(fn) -} - -// Visit visits the flags in lexicographical order, calling fn for each. -// It visits only those flags that have been set. -func (f *FlagSet) Visit(fn func(*Flag)) { - for _, flag := range sortFlags(f.actual) { - fn(flag) - } -} - -// Visit visits the command-line flags in lexicographical order, calling fn -// for each. It visits only those flags that have been set. -func Visit(fn func(*Flag)) { - commandLine.Visit(fn) -} - -// Lookup returns the Flag structure of the named flag, returning nil if none exists. -func (f *FlagSet) Lookup(name string) *Flag { - return f.formal[name] -} - -// Lookup returns the Flag structure of the named command-line flag, -// returning nil if none exists. -func Lookup(name string) *Flag { - return commandLine.formal[name] -} - -// Set sets the value of the named flag. -func (f *FlagSet) Set(name, value string) error { - flag, ok := f.formal[name] - if !ok { - return fmt.Errorf("no such flag -%v", name) - } - err := flag.Value.Set(value) - if err != nil { - return err - } - if f.actual == nil { - f.actual = make(map[string]*Flag) - } - f.actual[name] = flag - f.Lookup(name).Changed = true - return nil -} - -// Set sets the value of the named command-line flag. -func Set(name, value string) error { - return commandLine.Set(name, value) -} - -// PrintDefaults prints, to standard error unless configured -// otherwise, the default values of all defined flags in the set. -func (f *FlagSet) PrintDefaults() { - f.VisitAll(func(flag *Flag) { - format := "--%s=%s: %s\n" - if _, ok := flag.Value.(*stringValue); ok { - // put quotes on the value - format = "--%s=%q: %s\n" - } - if len(flag.Shorthand) > 0 { - format = " -%s, " + format - } else { - format = " %s " + format - } - fmt.Fprintf(f.out(), format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage) - }) -} - -func (f *FlagSet) FlagUsages() string { - x := new(bytes.Buffer) - - f.VisitAll(func(flag *Flag) { - format := "--%s=%s: %s\n" - if _, ok := flag.Value.(*stringValue); ok { - // put quotes on the value - format = "--%s=%q: %s\n" - } - if len(flag.Shorthand) > 0 { - format = " -%s, " + format - } else { - format = " %s " + format - } - fmt.Fprintf(x, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage) - }) - - return x.String() -} - -// PrintDefaults prints to standard error the default values of all defined command-line flags. -func PrintDefaults() { - commandLine.PrintDefaults() -} - -// defaultUsage is the default function to print a usage message. -func defaultUsage(f *FlagSet) { - fmt.Fprintf(f.out(), "Usage of %s:\n", f.name) - f.PrintDefaults() -} - -// NOTE: Usage is not just defaultUsage(commandLine) -// because it serves (via godoc flag Usage) as the example -// for how to write your own usage function. - -// Usage prints to standard error a usage message documenting all defined command-line flags. -// The function is a variable that may be changed to point to a custom function. -var Usage = func() { - fmt.Fprintf(os.Stderr, "Usage of %s:\n", os.Args[0]) - PrintDefaults() -} - -// NFlag returns the number of flags that have been set. -func (f *FlagSet) NFlag() int { return len(f.actual) } - -// NFlag returns the number of command-line flags that have been set. -func NFlag() int { return len(commandLine.actual) } - -// Arg returns the i'th argument. Arg(0) is the first remaining argument -// after flags have been processed. -func (f *FlagSet) Arg(i int) string { - if i < 0 || i >= len(f.args) { - return "" - } - return f.args[i] -} - -// Arg returns the i'th command-line argument. Arg(0) is the first remaining argument -// after flags have been processed. -func Arg(i int) string { - return commandLine.Arg(i) -} - -// NArg is the number of arguments remaining after flags have been processed. -func (f *FlagSet) NArg() int { return len(f.args) } - -// NArg is the number of arguments remaining after flags have been processed. -func NArg() int { return len(commandLine.args) } - -// Args returns the non-flag arguments. -func (f *FlagSet) Args() []string { return f.args } - -// Args returns the non-flag command-line arguments. -func Args() []string { return commandLine.args } - -// BoolVar defines a bool flag with specified name, default value, and usage string. -// The argument p points to a bool variable in which to store the value of the flag. -func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string) { - f.VarP(newBoolValue(value, p), name, "", usage) -} - -// Like BoolVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolVarP(p *bool, name, shorthand string, value bool, usage string) { - f.VarP(newBoolValue(value, p), name, shorthand, usage) -} - -// BoolVar defines a bool flag with specified name, default value, and usage string. -// The argument p points to a bool variable in which to store the value of the flag. -func BoolVar(p *bool, name string, value bool, usage string) { - commandLine.VarP(newBoolValue(value, p), name, "", usage) -} - -// Like BoolVar, but accepts a shorthand letter that can be used after a single dash. -func BoolVarP(p *bool, name, shorthand string, value bool, usage string) { - commandLine.VarP(newBoolValue(value, p), name, shorthand, usage) -} - -// Bool defines a bool flag with specified name, default value, and usage string. -// The return value is the address of a bool variable that stores the value of the flag. -func (f *FlagSet) Bool(name string, value bool, usage string) *bool { - p := new(bool) - f.BoolVarP(p, name, "", value, usage) - return p -} - -// Like Bool, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) BoolP(name, shorthand string, value bool, usage string) *bool { - p := new(bool) - f.BoolVarP(p, name, shorthand, value, usage) - return p -} - -// Bool defines a bool flag with specified name, default value, and usage string. -// The return value is the address of a bool variable that stores the value of the flag. -func Bool(name string, value bool, usage string) *bool { - return commandLine.BoolP(name, "", value, usage) -} - -// Like Bool, but accepts a shorthand letter that can be used after a single dash. -func BoolP(name, shorthand string, value bool, usage string) *bool { - return commandLine.BoolP(name, shorthand, value, usage) -} - -// IntVar defines an int flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -func (f *FlagSet) IntVar(p *int, name string, value int, usage string) { - f.VarP(newIntValue(value, p), name, "", usage) -} - -// Like IntVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntVarP(p *int, name, shorthand string, value int, usage string) { - f.VarP(newIntValue(value, p), name, shorthand, usage) -} - -// IntVar defines an int flag with specified name, default value, and usage string. -// The argument p points to an int variable in which to store the value of the flag. -func IntVar(p *int, name string, value int, usage string) { - commandLine.VarP(newIntValue(value, p), name, "", usage) -} - -// Like IntVar, but accepts a shorthand letter that can be used after a single dash. -func IntVarP(p *int, name, shorthand string, value int, usage string) { - commandLine.VarP(newIntValue(value, p), name, shorthand, usage) -} - -// Int defines an int flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -func (f *FlagSet) Int(name string, value int, usage string) *int { - p := new(int) - f.IntVarP(p, name, "", value, usage) - return p -} - -// Like Int, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) IntP(name, shorthand string, value int, usage string) *int { - p := new(int) - f.IntVarP(p, name, shorthand, value, usage) - return p -} - -// Int defines an int flag with specified name, default value, and usage string. -// The return value is the address of an int variable that stores the value of the flag. -func Int(name string, value int, usage string) *int { - return commandLine.IntP(name, "", value, usage) -} - -// Like Int, but accepts a shorthand letter that can be used after a single dash. -func IntP(name, shorthand string, value int, usage string) *int { - return commandLine.IntP(name, shorthand, value, usage) -} - -// Int64Var defines an int64 flag with specified name, default value, and usage string. -// The argument p points to an int64 variable in which to store the value of the flag. -func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string) { - f.VarP(newInt64Value(value, p), name, "", usage) -} - -// Like Int64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64VarP(p *int64, name, shorthand string, value int64, usage string) { - f.VarP(newInt64Value(value, p), name, shorthand, usage) -} - -// Int64Var defines an int64 flag with specified name, default value, and usage string. -// The argument p points to an int64 variable in which to store the value of the flag. -func Int64Var(p *int64, name string, value int64, usage string) { - commandLine.VarP(newInt64Value(value, p), name, "", usage) -} - -// Like Int64Var, but accepts a shorthand letter that can be used after a single dash. -func Int64VarP(p *int64, name, shorthand string, value int64, usage string) { - commandLine.VarP(newInt64Value(value, p), name, shorthand, usage) -} - -// Int64 defines an int64 flag with specified name, default value, and usage string. -// The return value is the address of an int64 variable that stores the value of the flag. -func (f *FlagSet) Int64(name string, value int64, usage string) *int64 { - p := new(int64) - f.Int64VarP(p, name, "", value, usage) - return p -} - -// Like Int64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Int64P(name, shorthand string, value int64, usage string) *int64 { - p := new(int64) - f.Int64VarP(p, name, shorthand, value, usage) - return p -} - -// Int64 defines an int64 flag with specified name, default value, and usage string. -// The return value is the address of an int64 variable that stores the value of the flag. -func Int64(name string, value int64, usage string) *int64 { - return commandLine.Int64P(name, "", value, usage) -} - -// Like Int64, but accepts a shorthand letter that can be used after a single dash. -func Int64P(name, shorthand string, value int64, usage string) *int64 { - return commandLine.Int64P(name, shorthand, value, usage) -} - -// UintVar defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string) { - f.VarP(newUintValue(value, p), name, "", usage) -} - -// Like UintVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintVarP(p *uint, name, shorthand string, value uint, usage string) { - f.VarP(newUintValue(value, p), name, shorthand, usage) -} - -// UintVar defines a uint flag with specified name, default value, and usage string. -// The argument p points to a uint variable in which to store the value of the flag. -func UintVar(p *uint, name string, value uint, usage string) { - commandLine.VarP(newUintValue(value, p), name, "", usage) -} - -// Like UintVar, but accepts a shorthand letter that can be used after a single dash. -func UintVarP(p *uint, name, shorthand string, value uint, usage string) { - commandLine.VarP(newUintValue(value, p), name, shorthand, usage) -} - -// Uint defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func (f *FlagSet) Uint(name string, value uint, usage string) *uint { - p := new(uint) - f.UintVarP(p, name, "", value, usage) - return p -} - -// Like Uint, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) UintP(name, shorthand string, value uint, usage string) *uint { - p := new(uint) - f.UintVarP(p, name, shorthand, value, usage) - return p -} - -// Uint defines a uint flag with specified name, default value, and usage string. -// The return value is the address of a uint variable that stores the value of the flag. -func Uint(name string, value uint, usage string) *uint { - return commandLine.UintP(name, "", value, usage) -} - -// Like Uint, but accepts a shorthand letter that can be used after a single dash. -func UintP(name, shorthand string, value uint, usage string) *uint { - return commandLine.UintP(name, shorthand, value, usage) -} - -// Uint64Var defines a uint64 flag with specified name, default value, and usage string. -// The argument p points to a uint64 variable in which to store the value of the flag. -func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string) { - f.VarP(newUint64Value(value, p), name, "", usage) -} - -// Like Uint64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { - f.VarP(newUint64Value(value, p), name, shorthand, usage) -} - -// Uint64Var defines a uint64 flag with specified name, default value, and usage string. -// The argument p points to a uint64 variable in which to store the value of the flag. -func Uint64Var(p *uint64, name string, value uint64, usage string) { - commandLine.VarP(newUint64Value(value, p), name, "", usage) -} - -// Like Uint64Var, but accepts a shorthand letter that can be used after a single dash. -func Uint64VarP(p *uint64, name, shorthand string, value uint64, usage string) { - commandLine.VarP(newUint64Value(value, p), name, shorthand, usage) -} - -// Uint64 defines a uint64 flag with specified name, default value, and usage string. -// The return value is the address of a uint64 variable that stores the value of the flag. -func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64 { - p := new(uint64) - f.Uint64VarP(p, name, "", value, usage) - return p -} - -// Like Uint64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Uint64P(name, shorthand string, value uint64, usage string) *uint64 { - p := new(uint64) - f.Uint64VarP(p, name, shorthand, value, usage) - return p -} - -// Uint64 defines a uint64 flag with specified name, default value, and usage string. -// The return value is the address of a uint64 variable that stores the value of the flag. -func Uint64(name string, value uint64, usage string) *uint64 { - return commandLine.Uint64P(name, "", value, usage) -} - -// Like Uint64, but accepts a shorthand letter that can be used after a single dash. -func Uint64P(name, shorthand string, value uint64, usage string) *uint64 { - return commandLine.Uint64P(name, shorthand, value, usage) -} - -// StringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a string variable in which to store the value of the flag. -func (f *FlagSet) StringVar(p *string, name string, value string, usage string) { - f.VarP(newStringValue(value, p), name, "", usage) -} - -// Like StringVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringVarP(p *string, name, shorthand string, value string, usage string) { - f.VarP(newStringValue(value, p), name, shorthand, usage) -} - -// StringVar defines a string flag with specified name, default value, and usage string. -// The argument p points to a string variable in which to store the value of the flag. -func StringVar(p *string, name string, value string, usage string) { - commandLine.VarP(newStringValue(value, p), name, "", usage) -} - -// Like StringVar, but accepts a shorthand letter that can be used after a single dash. -func StringVarP(p *string, name, shorthand string, value string, usage string) { - commandLine.VarP(newStringValue(value, p), name, shorthand, usage) -} - -// String defines a string flag with specified name, default value, and usage string. -// The return value is the address of a string variable that stores the value of the flag. -func (f *FlagSet) String(name string, value string, usage string) *string { - p := new(string) - f.StringVarP(p, name, "", value, usage) - return p -} - -// Like String, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) StringP(name, shorthand string, value string, usage string) *string { - p := new(string) - f.StringVarP(p, name, shorthand, value, usage) - return p -} - -// String defines a string flag with specified name, default value, and usage string. -// The return value is the address of a string variable that stores the value of the flag. -func String(name string, value string, usage string) *string { - return commandLine.StringP(name, "", value, usage) -} - -// Like String, but accepts a shorthand letter that can be used after a single dash. -func StringP(name, shorthand string, value string, usage string) *string { - return commandLine.StringP(name, shorthand, value, usage) -} - -// Float64Var defines a float64 flag with specified name, default value, and usage string. -// The argument p points to a float64 variable in which to store the value of the flag. -func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string) { - f.VarP(newFloat64Value(value, p), name, "", usage) -} - -// Like Float64Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64VarP(p *float64, name, shorthand string, value float64, usage string) { - f.VarP(newFloat64Value(value, p), name, shorthand, usage) -} - -// Float64Var defines a float64 flag with specified name, default value, and usage string. -// The argument p points to a float64 variable in which to store the value of the flag. -func Float64Var(p *float64, name string, value float64, usage string) { - commandLine.VarP(newFloat64Value(value, p), name, "", usage) -} - -// Like Float64Var, but accepts a shorthand letter that can be used after a single dash. -func Float64VarP(p *float64, name, shorthand string, value float64, usage string) { - commandLine.VarP(newFloat64Value(value, p), name, shorthand, usage) -} - -// Float64 defines a float64 flag with specified name, default value, and usage string. -// The return value is the address of a float64 variable that stores the value of the flag. -func (f *FlagSet) Float64(name string, value float64, usage string) *float64 { - p := new(float64) - f.Float64VarP(p, name, "", value, usage) - return p -} - -// Like Float64, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) Float64P(name, shorthand string, value float64, usage string) *float64 { - p := new(float64) - f.Float64VarP(p, name, shorthand, value, usage) - return p -} - -// Float64 defines a float64 flag with specified name, default value, and usage string. -// The return value is the address of a float64 variable that stores the value of the flag. -func Float64(name string, value float64, usage string) *float64 { - return commandLine.Float64P(name, "", value, usage) -} - -// Like Float64, but accepts a shorthand letter that can be used after a single dash. -func Float64P(name, shorthand string, value float64, usage string) *float64 { - return commandLine.Float64P(name, shorthand, value, usage) -} - -// DurationVar defines a time.Duration flag with specified name, default value, and usage string. -// The argument p points to a time.Duration variable in which to store the value of the flag. -func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string) { - f.VarP(newDurationValue(value, p), name, "", usage) -} - -// Like DurationVar, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { - f.VarP(newDurationValue(value, p), name, shorthand, usage) -} - -// DurationVar defines a time.Duration flag with specified name, default value, and usage string. -// The argument p points to a time.Duration variable in which to store the value of the flag. -func DurationVar(p *time.Duration, name string, value time.Duration, usage string) { - commandLine.VarP(newDurationValue(value, p), name, "", usage) -} - -// Like DurationVar, but accepts a shorthand letter that can be used after a single dash. -func DurationVarP(p *time.Duration, name, shorthand string, value time.Duration, usage string) { - commandLine.VarP(newDurationValue(value, p), name, shorthand, usage) -} - -// Duration defines a time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a time.Duration variable that stores the value of the flag. -func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration { - p := new(time.Duration) - f.DurationVarP(p, name, "", value, usage) - return p -} - -// Like Duration, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { - p := new(time.Duration) - f.DurationVarP(p, name, shorthand, value, usage) - return p -} - -// Duration defines a time.Duration flag with specified name, default value, and usage string. -// The return value is the address of a time.Duration variable that stores the value of the flag. -func Duration(name string, value time.Duration, usage string) *time.Duration { - return commandLine.DurationP(name, "", value, usage) -} - -// Like Duration, but accepts a shorthand letter that can be used after a single dash. -func DurationP(name, shorthand string, value time.Duration, usage string) *time.Duration { - return commandLine.DurationP(name, shorthand, value, usage) -} - -// Var defines a flag with the specified name and usage string. The type and -// value of the flag are represented by the first argument, of type Value, which -// typically holds a user-defined implementation of Value. For instance, the -// caller could create a flag that turns a comma-separated string into a slice -// of strings by giving the slice the methods of Value; in particular, Set would -// decompose the comma-separated string into the slice. -func (f *FlagSet) Var(value Value, name string, usage string) { - f.VarP(value, name, "", usage) -} - -// Like Var, but accepts a shorthand letter that can be used after a single dash. -func (f *FlagSet) VarP(value Value, name, shorthand, usage string) { - // Remember the default value as a string; it won't change. - flag := &Flag{name, shorthand, usage, value, value.String(), false} - f.AddFlag(flag) -} - -func (f *FlagSet) AddFlag(flag *Flag) { - _, alreadythere := f.formal[flag.Name] - if alreadythere { - msg := fmt.Sprintf("%s flag redefined: %s", f.name, flag.Name) - fmt.Fprintln(f.out(), msg) - panic(msg) // Happens only if flags are declared with identical names - } - if f.formal == nil { - f.formal = make(map[string]*Flag) - } - f.formal[flag.Name] = flag - - if len(flag.Shorthand) == 0 { - return - } - if len(flag.Shorthand) > 1 { - fmt.Fprintf(f.out(), "%s shorthand more than ASCII character: %s\n", f.name, flag.Shorthand) - panic("shorthand is more than one character") - } - if f.shorthands == nil { - f.shorthands = make(map[byte]*Flag) - } - c := flag.Shorthand[0] - old, alreadythere := f.shorthands[c] - if alreadythere { - fmt.Fprintf(f.out(), "%s shorthand reused: %q for %s and %s\n", f.name, c, flag.Name, old.Name) - panic("shorthand redefinition") - } - f.shorthands[c] = flag -} - -// Var defines a flag with the specified name and usage string. The type and -// value of the flag are represented by the first argument, of type Value, which -// typically holds a user-defined implementation of Value. For instance, the -// caller could create a flag that turns a comma-separated string into a slice -// of strings by giving the slice the methods of Value; in particular, Set would -// decompose the comma-separated string into the slice. -func Var(value Value, name string, usage string) { - commandLine.VarP(value, name, "", usage) -} - -// Like Var, but accepts a shorthand letter that can be used after a single dash. -func VarP(value Value, name, shorthand, usage string) { - commandLine.VarP(value, name, shorthand, usage) -} - -// failf prints to standard error a formatted error and usage message and -// returns the error. -func (f *FlagSet) failf(format string, a ...interface{}) error { - err := fmt.Errorf(format, a...) - fmt.Fprintln(f.out(), err) - f.usage() - return err -} - -// usage calls the Usage method for the flag set, or the usage function if -// the flag set is commandLine. -func (f *FlagSet) usage() { - if f == commandLine { - Usage() - } else if f.Usage == nil { - defaultUsage(f) - } else { - f.Usage() - } -} - -func (f *FlagSet) setFlag(flag *Flag, value string, origArg string) error { - if err := flag.Value.Set(value); err != nil { - return f.failf("invalid argument %q for %s: %v", value, origArg, err) - } - // mark as visited for Visit() - if f.actual == nil { - f.actual = make(map[string]*Flag) - } - f.actual[flag.Name] = flag - flag.Changed = true - return nil -} - -func (f *FlagSet) parseLongArg(s string, args []string) (a []string, err error) { - a = args - if len(s) == 2 { // "--" terminates the flags - f.args = append(f.args, args...) - return - } - name := s[2:] - if len(name) == 0 || name[0] == '-' || name[0] == '=' { - err = f.failf("bad flag syntax: %s", s) - return - } - split := strings.SplitN(name, "=", 2) - name = split[0] - m := f.formal - flag, alreadythere := m[name] // BUG - if !alreadythere { - if name == "help" { // special case for nice help message. - f.usage() - return args, ErrHelp - } - err = f.failf("unknown flag: --%s", name) - return - } - if len(split) == 1 { - if _, ok := flag.Value.(*boolValue); !ok { - err = f.failf("flag needs an argument: %s", s) - return - } - f.setFlag(flag, "true", s) - } else { - if e := f.setFlag(flag, split[1], s); e != nil { - err = e - return - } - } - return args, nil -} - -func (f *FlagSet) parseShortArg(s string, args []string) (a []string, err error) { - a = args - shorthands := s[1:] - - for i := 0; i < len(shorthands); i++ { - c := shorthands[i] - flag, alreadythere := f.shorthands[c] - if !alreadythere { - if c == 'h' { // special case for nice help message. - f.usage() - err = ErrHelp - return - } - //TODO continue on error - err = f.failf("unknown shorthand flag: %q in -%s", c, shorthands) - if len(args) == 0 { - return - } - } - if alreadythere { - if _, ok := flag.Value.(*boolValue); ok { - f.setFlag(flag, "true", s) - continue - } - if i < len(shorthands)-1 { - if e := f.setFlag(flag, shorthands[i+1:], s); e != nil { - err = e - return - } - break - } - if len(args) == 0 { - err = f.failf("flag needs an argument: %q in -%s", c, shorthands) - return - } - if e := f.setFlag(flag, args[0], s); e != nil { - err = e - return - } - } - a = args[1:] - break // should be unnecessary - } - - return -} - -func (f *FlagSet) parseArgs(args []string) (err error) { - for len(args) > 0 { - s := args[0] - args = args[1:] - if len(s) == 0 || s[0] != '-' || len(s) == 1 { - if !f.interspersed { - f.args = append(f.args, s) - f.args = append(f.args, args...) - return nil - } - f.args = append(f.args, s) - continue - } - - if s[1] == '-' { - args, err = f.parseLongArg(s, args) - } else { - args, err = f.parseShortArg(s, args) - } - } - return -} - -// Parse parses flag definitions from the argument list, which should not -// include the command name. Must be called after all flags in the FlagSet -// are defined and before flags are accessed by the program. -// The return value will be ErrHelp if -help was set but not defined. -func (f *FlagSet) Parse(arguments []string) error { - f.parsed = true - f.args = make([]string, 0, len(arguments)) - err := f.parseArgs(arguments) - if err != nil { - switch f.errorHandling { - case ContinueOnError: - return err - case ExitOnError: - os.Exit(2) - case PanicOnError: - panic(err) - } - } - return nil -} - -// Parsed reports whether f.Parse has been called. -func (f *FlagSet) Parsed() bool { - return f.parsed -} - -// Parse parses the command-line flags from os.Args[1:]. Must be called -// after all flags are defined and before flags are accessed by the program. -func Parse() { - // Ignore errors; commandLine is set for ExitOnError. - commandLine.Parse(os.Args[1:]) -} - -// Whether to support interspersed option/non-option arguments. -func SetInterspersed(interspersed bool) { - commandLine.SetInterspersed(interspersed) -} - -// Parsed returns true if the command-line flags have been parsed. -func Parsed() bool { - return commandLine.Parsed() -} - -// The default set of command-line flags, parsed from os.Args. -var commandLine = NewFlagSet(os.Args[0], ExitOnError) - -// NewFlagSet returns a new, empty flag set with the specified name and -// error handling property. -func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet { - f := &FlagSet{ - name: name, - errorHandling: errorHandling, - interspersed: true, - } - return f -} - -// Whether to support interspersed option/non-option arguments. -func (f *FlagSet) SetInterspersed(interspersed bool) { - f.interspersed = interspersed -} - -// Init sets the name and error handling property for a flag set. -// By default, the zero FlagSet uses an empty name and the -// ContinueOnError error handling policy. -func (f *FlagSet) Init(name string, errorHandling ErrorHandling) { - f.name = name - f.errorHandling = errorHandling -} diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go b/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go deleted file mode 100644 index 20b8b8a..0000000 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/table.go +++ /dev/null @@ -1,694 +0,0 @@ -// generated by go run gen.go; DO NOT EDIT - -package atom - -const ( - A Atom = 0x1 - Abbr Atom = 0x4 - Accept Atom = 0x2106 - AcceptCharset Atom = 0x210e - Accesskey Atom = 0x3309 - Action Atom = 0x21b06 - Address Atom = 0x5d507 - Align Atom = 0x1105 - Alt Atom = 0x4503 - Annotation Atom = 0x18d0a - AnnotationXml Atom = 0x18d0e - Applet Atom = 0x2d106 - Area Atom = 0x31804 - Article Atom = 0x39907 - Aside Atom = 0x4f05 - Async Atom = 0x9305 - Audio Atom = 0xaf05 - Autocomplete Atom = 0xd50c - Autofocus Atom = 0xe109 - Autoplay Atom = 0x10c08 - B Atom = 0x101 - Base Atom = 0x11404 - Basefont Atom = 0x11408 - Bdi Atom = 0x1a03 - Bdo Atom = 0x12503 - Bgsound Atom = 0x13807 - Big Atom = 0x14403 - Blink Atom = 0x14705 - Blockquote Atom = 0x14c0a - Body Atom = 0x2f04 - Border Atom = 0x15606 - Br Atom = 0x202 - Button Atom = 0x15c06 - Canvas Atom = 0x4b06 - Caption Atom = 0x1e007 - Center Atom = 0x2df06 - Challenge Atom = 0x23e09 - Charset Atom = 0x2807 - Checked Atom = 0x33f07 - Cite Atom = 0x9704 - Class Atom = 0x3d905 - Code Atom = 0x16f04 - Col Atom = 0x17603 - Colgroup Atom = 0x17608 - Color Atom = 0x18305 - Cols Atom = 0x18804 - Colspan Atom = 0x18807 - Command Atom = 0x19b07 - Content Atom = 0x42c07 - Contenteditable Atom = 0x42c0f - Contextmenu Atom = 0x3480b - Controls Atom = 0x1ae08 - Coords Atom = 0x1ba06 - Crossorigin Atom = 0x1c40b - Data Atom = 0x44304 - Datalist Atom = 0x44308 - Datetime Atom = 0x25b08 - Dd Atom = 0x28802 - Default Atom = 0x5207 - Defer Atom = 0x17105 - Del Atom = 0x4d603 - Desc Atom = 0x4804 - Details Atom = 0x6507 - Dfn Atom = 0x8303 - Dialog Atom = 0x1b06 - Dir Atom = 0x9d03 - Dirname Atom = 0x9d07 - Disabled Atom = 0x10008 - Div Atom = 0x10703 - Dl Atom = 0x13e02 - Download Atom = 0x40908 - Draggable Atom = 0x1a109 - Dropzone Atom = 0x3a208 - Dt Atom = 0x4e402 - Em Atom = 0x7f02 - Embed Atom = 0x7f05 - Enctype Atom = 0x23007 - Face Atom = 0x2dd04 - Fieldset Atom = 0x1d508 - Figcaption Atom = 0x1dd0a - Figure Atom = 0x1f106 - Font Atom = 0x11804 - Footer Atom = 0x5906 - For Atom = 0x1fd03 - ForeignObject Atom = 0x1fd0d - Foreignobject Atom = 0x20a0d - Form Atom = 0x21704 - Formaction Atom = 0x2170a - Formenctype Atom = 0x22c0b - Formmethod Atom = 0x2470a - Formnovalidate Atom = 0x2510e - Formtarget Atom = 0x2660a - Frame Atom = 0x8705 - Frameset Atom = 0x8708 - H1 Atom = 0x13602 - H2 Atom = 0x29602 - H3 Atom = 0x2c502 - H4 Atom = 0x30e02 - H5 Atom = 0x4e602 - H6 Atom = 0x27002 - Head Atom = 0x2fa04 - Header Atom = 0x2fa06 - Headers Atom = 0x2fa07 - Height Atom = 0x27206 - Hgroup Atom = 0x27a06 - Hidden Atom = 0x28606 - High Atom = 0x29304 - Hr Atom = 0x13102 - Href Atom = 0x29804 - Hreflang Atom = 0x29808 - Html Atom = 0x27604 - HttpEquiv Atom = 0x2a00a - I Atom = 0x601 - Icon Atom = 0x42b04 - Id Atom = 0x5102 - Iframe Atom = 0x2b406 - Image Atom = 0x2ba05 - Img Atom = 0x2bf03 - Inert Atom = 0x4c105 - Input Atom = 0x3f605 - Ins Atom = 0x1cd03 - Isindex Atom = 0x2c707 - Ismap Atom = 0x2ce05 - Itemid Atom = 0x9806 - Itemprop Atom = 0x57e08 - Itemref Atom = 0x2d707 - Itemscope Atom = 0x2e509 - Itemtype Atom = 0x2ef08 - Kbd Atom = 0x1903 - Keygen Atom = 0x3906 - Keytype Atom = 0x51207 - Kind Atom = 0xfd04 - Label Atom = 0xba05 - Lang Atom = 0x29c04 - Legend Atom = 0x1a806 - Li Atom = 0x1202 - Link Atom = 0x14804 - List Atom = 0x44704 - Listing Atom = 0x44707 - Loop Atom = 0xbe04 - Low Atom = 0x13f03 - Malignmark Atom = 0x100a - Manifest Atom = 0x5b608 - Map Atom = 0x2d003 - Mark Atom = 0x1604 - Marquee Atom = 0x5f207 - Math Atom = 0x2f704 - Max Atom = 0x30603 - Maxlength Atom = 0x30609 - Media Atom = 0xa205 - Mediagroup Atom = 0xa20a - Menu Atom = 0x34f04 - Meta Atom = 0x45604 - Meter Atom = 0x26105 - Method Atom = 0x24b06 - Mglyph Atom = 0x2c006 - Mi Atom = 0x9b02 - Min Atom = 0x31003 - Mn Atom = 0x25402 - Mo Atom = 0x47a02 - Ms Atom = 0x2e802 - Mtext Atom = 0x31305 - Multiple Atom = 0x32108 - Muted Atom = 0x32905 - Name Atom = 0xa004 - Nav Atom = 0x3e03 - Nobr Atom = 0x7404 - Noembed Atom = 0x7d07 - Noframes Atom = 0x8508 - Noscript Atom = 0x28b08 - Novalidate Atom = 0x2550a - Object Atom = 0x21106 - Ol Atom = 0xcd02 - Onabort Atom = 0x16007 - Onafterprint Atom = 0x1e50c - Onbeforeprint Atom = 0x21f0d - Onbeforeunload Atom = 0x5c90e - Onblur Atom = 0x3e206 - Oncancel Atom = 0xb308 - Oncanplay Atom = 0x12709 - Oncanplaythrough Atom = 0x12710 - Onchange Atom = 0x3b808 - Onclick Atom = 0x2ad07 - Onclose Atom = 0x32e07 - Oncontextmenu Atom = 0x3460d - Oncuechange Atom = 0x3530b - Ondblclick Atom = 0x35e0a - Ondrag Atom = 0x36806 - Ondragend Atom = 0x36809 - Ondragenter Atom = 0x3710b - Ondragleave Atom = 0x37c0b - Ondragover Atom = 0x3870a - Ondragstart Atom = 0x3910b - Ondrop Atom = 0x3a006 - Ondurationchange Atom = 0x3b010 - Onemptied Atom = 0x3a709 - Onended Atom = 0x3c007 - Onerror Atom = 0x3c707 - Onfocus Atom = 0x3ce07 - Onhashchange Atom = 0x3e80c - Oninput Atom = 0x3f407 - Oninvalid Atom = 0x3fb09 - Onkeydown Atom = 0x40409 - Onkeypress Atom = 0x4110a - Onkeyup Atom = 0x42107 - Onload Atom = 0x43b06 - Onloadeddata Atom = 0x43b0c - Onloadedmetadata Atom = 0x44e10 - Onloadstart Atom = 0x4640b - Onmessage Atom = 0x46f09 - Onmousedown Atom = 0x4780b - Onmousemove Atom = 0x4830b - Onmouseout Atom = 0x48e0a - Onmouseover Atom = 0x49b0b - Onmouseup Atom = 0x4a609 - Onmousewheel Atom = 0x4af0c - Onoffline Atom = 0x4bb09 - Ononline Atom = 0x4c608 - Onpagehide Atom = 0x4ce0a - Onpageshow Atom = 0x4d90a - Onpause Atom = 0x4e807 - Onplay Atom = 0x4f206 - Onplaying Atom = 0x4f209 - Onpopstate Atom = 0x4fb0a - Onprogress Atom = 0x5050a - Onratechange Atom = 0x5190c - Onreset Atom = 0x52507 - Onresize Atom = 0x52c08 - Onscroll Atom = 0x53a08 - Onseeked Atom = 0x54208 - Onseeking Atom = 0x54a09 - Onselect Atom = 0x55308 - Onshow Atom = 0x55d06 - Onstalled Atom = 0x56609 - Onstorage Atom = 0x56f09 - Onsubmit Atom = 0x57808 - Onsuspend Atom = 0x58809 - Ontimeupdate Atom = 0x1190c - Onunload Atom = 0x59108 - Onvolumechange Atom = 0x5990e - Onwaiting Atom = 0x5a709 - Open Atom = 0x58404 - Optgroup Atom = 0xc008 - Optimum Atom = 0x5b007 - Option Atom = 0x5c506 - Output Atom = 0x49506 - P Atom = 0xc01 - Param Atom = 0xc05 - Pattern Atom = 0x6e07 - Ping Atom = 0xab04 - Placeholder Atom = 0xc70b - Plaintext Atom = 0xf109 - Poster Atom = 0x17d06 - Pre Atom = 0x27f03 - Preload Atom = 0x27f07 - Progress Atom = 0x50708 - Prompt Atom = 0x5bf06 - Public Atom = 0x42706 - Q Atom = 0x15101 - Radiogroup Atom = 0x30a - Readonly Atom = 0x31908 - Rel Atom = 0x28003 - Required Atom = 0x1f508 - Reversed Atom = 0x5e08 - Rows Atom = 0x7704 - Rowspan Atom = 0x7707 - Rp Atom = 0x1eb02 - Rt Atom = 0x16502 - Ruby Atom = 0xd104 - S Atom = 0x2c01 - Samp Atom = 0x6b04 - Sandbox Atom = 0xe907 - Scope Atom = 0x2e905 - Scoped Atom = 0x2e906 - Script Atom = 0x28d06 - Seamless Atom = 0x33308 - Section Atom = 0x3dd07 - Select Atom = 0x55506 - Selected Atom = 0x55508 - Shape Atom = 0x1b505 - Size Atom = 0x53004 - Sizes Atom = 0x53005 - Small Atom = 0x1bf05 - Source Atom = 0x1cf06 - Spacer Atom = 0x30006 - Span Atom = 0x7a04 - Spellcheck Atom = 0x33a0a - Src Atom = 0x3d403 - Srcdoc Atom = 0x3d406 - Srclang Atom = 0x41a07 - Start Atom = 0x39705 - Step Atom = 0x5bc04 - Strike Atom = 0x50e06 - Strong Atom = 0x53406 - Style Atom = 0x5db05 - Sub Atom = 0x57a03 - Summary Atom = 0x5e007 - Sup Atom = 0x5e703 - Svg Atom = 0x5ea03 - System Atom = 0x5ed06 - Tabindex Atom = 0x45c08 - Table Atom = 0x43605 - Target Atom = 0x26a06 - Tbody Atom = 0x2e05 - Td Atom = 0x4702 - Textarea Atom = 0x31408 - Tfoot Atom = 0x5805 - Th Atom = 0x13002 - Thead Atom = 0x2f905 - Time Atom = 0x11b04 - Title Atom = 0x8e05 - Tr Atom = 0xf902 - Track Atom = 0xf905 - Translate Atom = 0x16609 - Tt Atom = 0x7002 - Type Atom = 0x23304 - Typemustmatch Atom = 0x2330d - U Atom = 0xb01 - Ul Atom = 0x5602 - Usemap Atom = 0x4ec06 - Value Atom = 0x4005 - Var Atom = 0x10903 - Video Atom = 0x2a905 - Wbr Atom = 0x14103 - Width Atom = 0x4e205 - Wrap Atom = 0x56204 - Xmp Atom = 0xef03 -) - -const hash0 = 0xc17da63e - -const maxAtomLen = 16 - -var table = [1 << 9]Atom{ - 0x1: 0x4830b, // onmousemove - 0x2: 0x5a709, // onwaiting - 0x4: 0x5bf06, // prompt - 0x7: 0x5b007, // optimum - 0x8: 0x1604, // mark - 0xa: 0x2d707, // itemref - 0xb: 0x4d90a, // onpageshow - 0xc: 0x55506, // select - 0xd: 0x1a109, // draggable - 0xe: 0x3e03, // nav - 0xf: 0x19b07, // command - 0x11: 0xb01, // u - 0x14: 0x2fa07, // headers - 0x15: 0x44308, // datalist - 0x17: 0x6b04, // samp - 0x1a: 0x40409, // onkeydown - 0x1b: 0x53a08, // onscroll - 0x1c: 0x17603, // col - 0x20: 0x57e08, // itemprop - 0x21: 0x2a00a, // http-equiv - 0x22: 0x5e703, // sup - 0x24: 0x1f508, // required - 0x2b: 0x27f07, // preload - 0x2c: 0x21f0d, // onbeforeprint - 0x2d: 0x3710b, // ondragenter - 0x2e: 0x4e402, // dt - 0x2f: 0x57808, // onsubmit - 0x30: 0x13102, // hr - 0x31: 0x3460d, // oncontextmenu - 0x33: 0x2ba05, // image - 0x34: 0x4e807, // onpause - 0x35: 0x27a06, // hgroup - 0x36: 0xab04, // ping - 0x37: 0x55308, // onselect - 0x3a: 0x10703, // div - 0x40: 0x9b02, // mi - 0x41: 0x33308, // seamless - 0x42: 0x2807, // charset - 0x43: 0x5102, // id - 0x44: 0x4fb0a, // onpopstate - 0x45: 0x4d603, // del - 0x46: 0x5f207, // marquee - 0x47: 0x3309, // accesskey - 0x49: 0x5906, // footer - 0x4a: 0x2d106, // applet - 0x4b: 0x2ce05, // ismap - 0x51: 0x34f04, // menu - 0x52: 0x2f04, // body - 0x55: 0x8708, // frameset - 0x56: 0x52507, // onreset - 0x57: 0x14705, // blink - 0x58: 0x8e05, // title - 0x59: 0x39907, // article - 0x5b: 0x13002, // th - 0x5d: 0x15101, // q - 0x5e: 0x58404, // open - 0x5f: 0x31804, // area - 0x61: 0x43b06, // onload - 0x62: 0x3f605, // input - 0x63: 0x11404, // base - 0x64: 0x18807, // colspan - 0x65: 0x51207, // keytype - 0x66: 0x13e02, // dl - 0x68: 0x1d508, // fieldset - 0x6a: 0x31003, // min - 0x6b: 0x10903, // var - 0x6f: 0x2fa06, // header - 0x70: 0x16502, // rt - 0x71: 0x17608, // colgroup - 0x72: 0x25402, // mn - 0x74: 0x16007, // onabort - 0x75: 0x3906, // keygen - 0x76: 0x4bb09, // onoffline - 0x77: 0x23e09, // challenge - 0x78: 0x2d003, // map - 0x7a: 0x30e02, // h4 - 0x7b: 0x3c707, // onerror - 0x7c: 0x30609, // maxlength - 0x7d: 0x31305, // mtext - 0x7e: 0x5805, // tfoot - 0x7f: 0x11804, // font - 0x80: 0x100a, // malignmark - 0x81: 0x45604, // meta - 0x82: 0x9305, // async - 0x83: 0x2c502, // h3 - 0x84: 0x28802, // dd - 0x85: 0x29804, // href - 0x86: 0xa20a, // mediagroup - 0x87: 0x1ba06, // coords - 0x88: 0x41a07, // srclang - 0x89: 0x35e0a, // ondblclick - 0x8a: 0x4005, // value - 0x8c: 0xb308, // oncancel - 0x8e: 0x33a0a, // spellcheck - 0x8f: 0x8705, // frame - 0x91: 0x14403, // big - 0x94: 0x21b06, // action - 0x95: 0x9d03, // dir - 0x97: 0x31908, // readonly - 0x99: 0x43605, // table - 0x9a: 0x5e007, // summary - 0x9b: 0x14103, // wbr - 0x9c: 0x30a, // radiogroup - 0x9d: 0xa004, // name - 0x9f: 0x5ed06, // system - 0xa1: 0x18305, // color - 0xa2: 0x4b06, // canvas - 0xa3: 0x27604, // html - 0xa5: 0x54a09, // onseeking - 0xac: 0x1b505, // shape - 0xad: 0x28003, // rel - 0xae: 0x12710, // oncanplaythrough - 0xaf: 0x3870a, // ondragover - 0xb1: 0x1fd0d, // foreignObject - 0xb3: 0x7704, // rows - 0xb6: 0x44707, // listing - 0xb7: 0x49506, // output - 0xb9: 0x3480b, // contextmenu - 0xbb: 0x13f03, // low - 0xbc: 0x1eb02, // rp - 0xbd: 0x58809, // onsuspend - 0xbe: 0x15c06, // button - 0xbf: 0x4804, // desc - 0xc1: 0x3dd07, // section - 0xc2: 0x5050a, // onprogress - 0xc3: 0x56f09, // onstorage - 0xc4: 0x2f704, // math - 0xc5: 0x4f206, // onplay - 0xc7: 0x5602, // ul - 0xc8: 0x6e07, // pattern - 0xc9: 0x4af0c, // onmousewheel - 0xca: 0x36809, // ondragend - 0xcb: 0xd104, // ruby - 0xcc: 0xc01, // p - 0xcd: 0x32e07, // onclose - 0xce: 0x26105, // meter - 0xcf: 0x13807, // bgsound - 0xd2: 0x27206, // height - 0xd4: 0x101, // b - 0xd5: 0x2ef08, // itemtype - 0xd8: 0x1e007, // caption - 0xd9: 0x10008, // disabled - 0xdc: 0x5ea03, // svg - 0xdd: 0x1bf05, // small - 0xde: 0x44304, // data - 0xe0: 0x4c608, // ononline - 0xe1: 0x2c006, // mglyph - 0xe3: 0x7f05, // embed - 0xe4: 0xf902, // tr - 0xe5: 0x4640b, // onloadstart - 0xe7: 0x3b010, // ondurationchange - 0xed: 0x12503, // bdo - 0xee: 0x4702, // td - 0xef: 0x4f05, // aside - 0xf0: 0x29602, // h2 - 0xf1: 0x50708, // progress - 0xf2: 0x14c0a, // blockquote - 0xf4: 0xba05, // label - 0xf5: 0x601, // i - 0xf7: 0x7707, // rowspan - 0xfb: 0x4f209, // onplaying - 0xfd: 0x2bf03, // img - 0xfe: 0xc008, // optgroup - 0xff: 0x42c07, // content - 0x101: 0x5190c, // onratechange - 0x103: 0x3e80c, // onhashchange - 0x104: 0x6507, // details - 0x106: 0x40908, // download - 0x109: 0xe907, // sandbox - 0x10b: 0x42c0f, // contenteditable - 0x10d: 0x37c0b, // ondragleave - 0x10e: 0x2106, // accept - 0x10f: 0x55508, // selected - 0x112: 0x2170a, // formaction - 0x113: 0x2df06, // center - 0x115: 0x44e10, // onloadedmetadata - 0x116: 0x14804, // link - 0x117: 0x11b04, // time - 0x118: 0x1c40b, // crossorigin - 0x119: 0x3ce07, // onfocus - 0x11a: 0x56204, // wrap - 0x11b: 0x42b04, // icon - 0x11d: 0x2a905, // video - 0x11e: 0x3d905, // class - 0x121: 0x5990e, // onvolumechange - 0x122: 0x3e206, // onblur - 0x123: 0x2e509, // itemscope - 0x124: 0x5db05, // style - 0x127: 0x42706, // public - 0x129: 0x2510e, // formnovalidate - 0x12a: 0x55d06, // onshow - 0x12c: 0x16609, // translate - 0x12d: 0x9704, // cite - 0x12e: 0x2e802, // ms - 0x12f: 0x1190c, // ontimeupdate - 0x130: 0xfd04, // kind - 0x131: 0x2660a, // formtarget - 0x135: 0x3c007, // onended - 0x136: 0x28606, // hidden - 0x137: 0x2c01, // s - 0x139: 0x2470a, // formmethod - 0x13a: 0x44704, // list - 0x13c: 0x27002, // h6 - 0x13d: 0xcd02, // ol - 0x13e: 0x3530b, // oncuechange - 0x13f: 0x20a0d, // foreignobject - 0x143: 0x5c90e, // onbeforeunload - 0x145: 0x3a709, // onemptied - 0x146: 0x17105, // defer - 0x147: 0xef03, // xmp - 0x148: 0xaf05, // audio - 0x149: 0x1903, // kbd - 0x14c: 0x46f09, // onmessage - 0x14d: 0x5c506, // option - 0x14e: 0x4503, // alt - 0x14f: 0x33f07, // checked - 0x150: 0x10c08, // autoplay - 0x152: 0x202, // br - 0x153: 0x2550a, // novalidate - 0x156: 0x7d07, // noembed - 0x159: 0x2ad07, // onclick - 0x15a: 0x4780b, // onmousedown - 0x15b: 0x3b808, // onchange - 0x15e: 0x3fb09, // oninvalid - 0x15f: 0x2e906, // scoped - 0x160: 0x1ae08, // controls - 0x161: 0x32905, // muted - 0x163: 0x4ec06, // usemap - 0x164: 0x1dd0a, // figcaption - 0x165: 0x36806, // ondrag - 0x166: 0x29304, // high - 0x168: 0x3d403, // src - 0x169: 0x17d06, // poster - 0x16b: 0x18d0e, // annotation-xml - 0x16c: 0x5bc04, // step - 0x16d: 0x4, // abbr - 0x16e: 0x1b06, // dialog - 0x170: 0x1202, // li - 0x172: 0x47a02, // mo - 0x175: 0x1fd03, // for - 0x176: 0x1cd03, // ins - 0x178: 0x53004, // size - 0x17a: 0x5207, // default - 0x17b: 0x1a03, // bdi - 0x17c: 0x4ce0a, // onpagehide - 0x17d: 0x9d07, // dirname - 0x17e: 0x23304, // type - 0x17f: 0x21704, // form - 0x180: 0x4c105, // inert - 0x181: 0x12709, // oncanplay - 0x182: 0x8303, // dfn - 0x183: 0x45c08, // tabindex - 0x186: 0x7f02, // em - 0x187: 0x29c04, // lang - 0x189: 0x3a208, // dropzone - 0x18a: 0x4110a, // onkeypress - 0x18b: 0x25b08, // datetime - 0x18c: 0x18804, // cols - 0x18d: 0x1, // a - 0x18e: 0x43b0c, // onloadeddata - 0x191: 0x15606, // border - 0x192: 0x2e05, // tbody - 0x193: 0x24b06, // method - 0x195: 0xbe04, // loop - 0x196: 0x2b406, // iframe - 0x198: 0x2fa04, // head - 0x19e: 0x5b608, // manifest - 0x19f: 0xe109, // autofocus - 0x1a0: 0x16f04, // code - 0x1a1: 0x53406, // strong - 0x1a2: 0x32108, // multiple - 0x1a3: 0xc05, // param - 0x1a6: 0x23007, // enctype - 0x1a7: 0x2dd04, // face - 0x1a8: 0xf109, // plaintext - 0x1a9: 0x13602, // h1 - 0x1aa: 0x56609, // onstalled - 0x1ad: 0x28d06, // script - 0x1ae: 0x30006, // spacer - 0x1af: 0x52c08, // onresize - 0x1b0: 0x49b0b, // onmouseover - 0x1b1: 0x59108, // onunload - 0x1b2: 0x54208, // onseeked - 0x1b4: 0x2330d, // typemustmatch - 0x1b5: 0x1f106, // figure - 0x1b6: 0x48e0a, // onmouseout - 0x1b7: 0x27f03, // pre - 0x1b8: 0x4e205, // width - 0x1bb: 0x7404, // nobr - 0x1be: 0x7002, // tt - 0x1bf: 0x1105, // align - 0x1c0: 0x3f407, // oninput - 0x1c3: 0x42107, // onkeyup - 0x1c6: 0x1e50c, // onafterprint - 0x1c7: 0x210e, // accept-charset - 0x1c8: 0x9806, // itemid - 0x1cb: 0x50e06, // strike - 0x1cc: 0x57a03, // sub - 0x1cd: 0xf905, // track - 0x1ce: 0x39705, // start - 0x1d0: 0x11408, // basefont - 0x1d6: 0x1cf06, // source - 0x1d7: 0x1a806, // legend - 0x1d8: 0x2f905, // thead - 0x1da: 0x2e905, // scope - 0x1dd: 0x21106, // object - 0x1de: 0xa205, // media - 0x1df: 0x18d0a, // annotation - 0x1e0: 0x22c0b, // formenctype - 0x1e2: 0x28b08, // noscript - 0x1e4: 0x53005, // sizes - 0x1e5: 0xd50c, // autocomplete - 0x1e6: 0x7a04, // span - 0x1e7: 0x8508, // noframes - 0x1e8: 0x26a06, // target - 0x1e9: 0x3a006, // ondrop - 0x1ea: 0x3d406, // srcdoc - 0x1ec: 0x5e08, // reversed - 0x1f0: 0x2c707, // isindex - 0x1f3: 0x29808, // hreflang - 0x1f5: 0x4e602, // h5 - 0x1f6: 0x5d507, // address - 0x1fa: 0x30603, // max - 0x1fb: 0xc70b, // placeholder - 0x1fc: 0x31408, // textarea - 0x1fe: 0x4a609, // onmouseup - 0x1ff: 0x3910b, // ondragstart -} - -const atomText = "abbradiogrouparamalignmarkbdialogaccept-charsetbodyaccesskey" + - "genavaluealtdescanvasidefaultfootereversedetailsampatternobr" + - "owspanoembedfnoframesetitleasyncitemidirnamediagroupingaudio" + - "ncancelabelooptgrouplaceholderubyautocompleteautofocusandbox" + - "mplaintextrackindisabledivarautoplaybasefontimeupdatebdoncan" + - "playthrough1bgsoundlowbrbigblinkblockquoteborderbuttonabortr" + - "anslatecodefercolgroupostercolorcolspannotation-xmlcommandra" + - "ggablegendcontrolshapecoordsmallcrossoriginsourcefieldsetfig" + - "captionafterprintfigurequiredforeignObjectforeignobjectforma" + - "ctionbeforeprintformenctypemustmatchallengeformmethodformnov" + - "alidatetimeterformtargeth6heightmlhgroupreloadhiddenoscripth" + - "igh2hreflanghttp-equivideonclickiframeimageimglyph3isindexis" + - "mappletitemrefacenteritemscopeditemtypematheaderspacermaxlen" + - "gth4minmtextareadonlymultiplemutedoncloseamlesspellcheckedon" + - "contextmenuoncuechangeondblclickondragendondragenterondragle" + - "aveondragoverondragstarticleondropzonemptiedondurationchange" + - "onendedonerroronfocusrcdoclassectionbluronhashchangeoninputo" + - "ninvalidonkeydownloadonkeypressrclangonkeyupublicontentedita" + - "bleonloadeddatalistingonloadedmetadatabindexonloadstartonmes" + - "sageonmousedownonmousemoveonmouseoutputonmouseoveronmouseupo" + - "nmousewheelonofflinertononlineonpagehidelonpageshowidth5onpa" + - "usemaponplayingonpopstateonprogresstrikeytypeonratechangeonr" + - "esetonresizestrongonscrollonseekedonseekingonselectedonshowr" + - "aponstalledonstorageonsubmitempropenonsuspendonunloadonvolum" + - "echangeonwaitingoptimumanifestepromptoptionbeforeunloaddress" + - "tylesummarysupsvgsystemarquee" diff --git a/vendor/github.com/appc/spec/discovery/discovery.go b/vendor/github.com/appc/spec/discovery/discovery.go index bee5e96..b2dc659 100644 --- a/vendor/github.com/appc/spec/discovery/discovery.go +++ b/vendor/github.com/appc/spec/discovery/discovery.go @@ -22,8 +22,8 @@ import ( "regexp" "strings" - "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html" - "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" + "golang.org/x/net/html" + "golang.org/x/net/html/atom" ) type acMeta struct { @@ -37,15 +37,17 @@ type ACIEndpoint struct { ASC string } -type Endpoints struct { +// A struct containing both discovered endpoints and keys. Used to avoid +// function duplication (one for endpoints and one for keys, so to avoid two +// doDiscover, two DiscoverWalkFunc) +type discoveryData struct { ACIEndpoints []ACIEndpoint - Keys []string + PublicKeys []string } -func (e *Endpoints) Append(ep Endpoints) { - e.ACIEndpoints = append(e.ACIEndpoints, ep.ACIEndpoints...) - e.Keys = append(e.Keys, ep.Keys...) -} +type ACIEndpoints []ACIEndpoint + +type PublicKeys []string const ( defaultVersion = "latest" @@ -124,7 +126,7 @@ func createTemplateVars(app App) []string { return tplVars } -func doDiscover(pre string, hostHeaders map[string]http.Header, app App, insecure bool) (*Endpoints, error) { +func doDiscover(pre string, hostHeaders map[string]http.Header, app App, insecure InsecureOption) (*discoveryData, error) { app = *app.Copy() if app.Labels["version"] == "" { app.Labels["version"] = defaultVersion @@ -140,7 +142,7 @@ func doDiscover(pre string, hostHeaders map[string]http.Header, app App, insecur tplVars := createTemplateVars(app) - de := &Endpoints{} + dd := &discoveryData{} for _, m := range meta { if !strings.HasPrefix(app.Name.String(), m.prefix) { @@ -159,41 +161,37 @@ func doDiscover(pre string, hostHeaders map[string]http.Header, app App, insecur if !ok { continue } - de.ACIEndpoints = append(de.ACIEndpoints, ACIEndpoint{ACI: aci, ASC: asc}) + dd.ACIEndpoints = append(dd.ACIEndpoints, ACIEndpoint{ACI: aci, ASC: asc}) case "ac-discovery-pubkeys": - de.Keys = append(de.Keys, m.uri) + dd.PublicKeys = append(dd.PublicKeys, m.uri) } } - return de, nil + return dd, nil } // DiscoverWalk will make HTTPS requests to find discovery meta tags and // optionally will use HTTP if insecure is set. hostHeaders specifies the // header to apply depending on the host (e.g. authentication). Based on the // response of the discoverFn it will continue to recurse up the tree. -func DiscoverWalk(app App, hostHeaders map[string]http.Header, insecure bool, discoverFn DiscoverWalkFunc) (err error) { - var ( - eps *Endpoints - ) - +func DiscoverWalk(app App, hostHeaders map[string]http.Header, insecure InsecureOption, discoverFn DiscoverWalkFunc) (dd *discoveryData, err error) { parts := strings.Split(string(app.Name), "/") for i := range parts { end := len(parts) - i pre := strings.Join(parts[:end], "/") - eps, err = doDiscover(pre, hostHeaders, app, insecure) - if derr := discoverFn(pre, eps, err); derr != nil { - return derr + dd, err = doDiscover(pre, hostHeaders, app, insecure) + if derr := discoverFn(pre, dd, err); derr != nil { + return dd, derr } } - return + return nil, fmt.Errorf("discovery failed") } // DiscoverWalkFunc can stop a DiscoverWalk by returning non-nil error. -type DiscoverWalkFunc func(prefix string, eps *Endpoints, err error) error +type DiscoverWalkFunc func(prefix string, dd *discoveryData, err error) error // FailedAttempt represents a failed discovery attempt. This is for debugging // and user feedback. @@ -202,59 +200,58 @@ type FailedAttempt struct { Error error } -func walker(out *Endpoints, attempts *[]FailedAttempt, testFn DiscoverWalkFunc) DiscoverWalkFunc { - return func(pre string, eps *Endpoints, err error) error { +func walker(attempts *[]FailedAttempt, testFn DiscoverWalkFunc) DiscoverWalkFunc { + return func(pre string, dd *discoveryData, err error) error { if err != nil { *attempts = append(*attempts, FailedAttempt{pre, err}) return nil } - out.Append(*eps) - if err := testFn(pre, eps, err); err != nil { + if err := testFn(pre, dd, err); err != nil { return err } return nil } } -// DiscoverEndpoints will make HTTPS requests to find the ac-discovery meta +// DiscoverACIEndpoints will make HTTPS requests to find the ac-discovery meta // tags and optionally will use HTTP if insecure is set. hostHeaders // specifies the header to apply depending on the host (e.g. authentication). // It will not give up until it has exhausted the path or found an image // discovery. -func DiscoverEndpoints(app App, hostHeaders map[string]http.Header, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error) { - out = &Endpoints{} - testFn := func(pre string, eps *Endpoints, err error) error { - if len(out.ACIEndpoints) != 0 { +func DiscoverACIEndpoints(app App, hostHeaders map[string]http.Header, insecure InsecureOption) (ACIEndpoints, []FailedAttempt, error) { + testFn := func(pre string, dd *discoveryData, err error) error { + if len(dd.ACIEndpoints) != 0 { return errEnough } return nil } - err = DiscoverWalk(app, hostHeaders, insecure, walker(out, &attempts, testFn)) + attempts := []FailedAttempt{} + dd, err := DiscoverWalk(app, hostHeaders, insecure, walker(&attempts, testFn)) if err != nil && err != errEnough { return nil, attempts, err } - return out, attempts, nil + return dd.ACIEndpoints, attempts, nil } // DiscoverPublicKey will make HTTPS requests to find the ac-public-keys meta // tags and optionally will use HTTP if insecure is set. hostHeaders // specifies the header to apply depending on the host (e.g. authentication). // It will not give up until it has exhausted the path or found an public key. -func DiscoverPublicKeys(app App, hostHeaders map[string]http.Header, insecure bool) (out *Endpoints, attempts []FailedAttempt, err error) { - out = &Endpoints{} - testFn := func(pre string, eps *Endpoints, err error) error { - if len(out.Keys) != 0 { +func DiscoverPublicKeys(app App, hostHeaders map[string]http.Header, insecure InsecureOption) (PublicKeys, []FailedAttempt, error) { + testFn := func(pre string, dd *discoveryData, err error) error { + if len(dd.PublicKeys) != 0 { return errEnough } return nil } - err = DiscoverWalk(app, hostHeaders, insecure, walker(out, &attempts, testFn)) + attempts := []FailedAttempt{} + dd, err := DiscoverWalk(app, hostHeaders, insecure, walker(&attempts, testFn)) if err != nil && err != errEnough { return nil, attempts, err } - return out, attempts, nil + return dd.PublicKeys, attempts, nil } diff --git a/vendor/github.com/appc/spec/discovery/http.go b/vendor/github.com/appc/spec/discovery/http.go index 3b0d1d4..430bcc6 100644 --- a/vendor/github.com/appc/spec/discovery/http.go +++ b/vendor/github.com/appc/spec/discovery/http.go @@ -15,6 +15,7 @@ package discovery import ( + "crypto/tls" "fmt" "io" "net" @@ -23,17 +24,28 @@ import ( "time" ) +type InsecureOption int + const ( defaultDialTimeout = 5 * time.Second ) +const ( + InsecureNone InsecureOption = 0 + + InsecureTLS InsecureOption = 1 << iota + InsecureHTTP +) + var ( // Client is the default http.Client used for discovery requests. - Client *http.Client + Client *http.Client + ClientInsecureTLS *http.Client // httpDo is the internal object used by discovery to retrieve URLs; it is // defined here so it can be overridden for testing - httpDo httpDoer + httpDo httpDoer + httpDoInsecureTLS httpDoer ) // httpDoer is an interface used to wrap http.Client for real requests and @@ -53,9 +65,17 @@ func init() { Transport: t, } httpDo = Client + + // copy for InsecureTLS + tInsecureTLS := *t + tInsecureTLS.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + ClientInsecureTLS = &http.Client{ + Transport: &tInsecureTLS, + } + httpDoInsecureTLS = ClientInsecureTLS } -func httpsOrHTTP(name string, hostHeaders map[string]http.Header, insecure bool) (urlStr string, body io.ReadCloser, err error) { +func httpsOrHTTP(name string, hostHeaders map[string]http.Header, insecure InsecureOption) (urlStr string, body io.ReadCloser, err error) { fetch := func(scheme string) (urlStr string, res *http.Response, err error) { u, err := url.Parse(scheme + "://" + name) if err != nil { @@ -70,6 +90,10 @@ func httpsOrHTTP(name string, hostHeaders map[string]http.Header, insecure bool) if hostHeader, ok := hostHeaders[u.Host]; ok { req.Header = hostHeader } + if insecure&InsecureTLS != 0 { + res, err = httpDoInsecureTLS.Do(req) + return + } res, err = httpDo.Do(req) return } @@ -80,7 +104,7 @@ func httpsOrHTTP(name string, hostHeaders map[string]http.Header, insecure bool) } urlStr, res, err := fetch("https") if err != nil || res.StatusCode != http.StatusOK { - if insecure { + if insecure&InsecureHTTP != 0 { closeBody(res) urlStr, res, err = fetch("http") } diff --git a/vendor/github.com/appc/spec/discovery/myapp.html b/vendor/github.com/appc/spec/discovery/myapp.html deleted file mode 100644 index 10c80eb..0000000 --- a/vendor/github.com/appc/spec/discovery/myapp.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> - -<html> -<head> - <title>My app</title> - <meta name="ac-discovery" content="example.com https://storage.example.com/{name}-{version}.{ext}?torrent"> - <meta name="ac-discovery" content="example.com hdfs://storage.example.com/{name}-{version}.{ext}"> - <meta name="ac-discovery-cas-prefix" content="example.com https://storage.example.com/cas/"> - <meta name="ac-discovery-pubkeys" content="example.com https://example.com/pubkeys.gpg"> -</head> - -<body> - <h1>My App</h1> -</body> -</html> diff --git a/vendor/github.com/appc/spec/discovery/myapp2.html b/vendor/github.com/appc/spec/discovery/myapp2.html deleted file mode 100644 index 270b4c6..0000000 --- a/vendor/github.com/appc/spec/discovery/myapp2.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> - -<html> -<head> - <title>My app</title> - <meta name="ac-discovery" content="example.com https://storage.example.com/{name}-{version}-{os}-{arch}.{ext}"> - <meta name="ac-discovery" content="example.com https://storage.example.com/{name}-{version}.{ext}"> - <meta name="ac-discovery-cas-prefix" content="example.com https://storage.example.com/cas/"> - <meta name="ac-discovery-pubkeys" content="example.com https://example.com/pubkeys.gpg"> -</head> - -<body> - <h1>My App</h1> -</body> -</html> diff --git a/vendor/github.com/appc/spec/pkg/device/device_linux.go b/vendor/github.com/appc/spec/pkg/device/device_linux.go new file mode 100644 index 0000000..4f895cd --- /dev/null +++ b/vendor/github.com/appc/spec/pkg/device/device_linux.go @@ -0,0 +1,33 @@ +// Copyright 2016 The appc Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// +build linux + +package device + +// with glibc/sysdeps/unix/sysv/linux/sys/sysmacros.h as reference + +func Major(rdev uint64) uint { + return uint((rdev>>8)&0xfff) | (uint(rdev>>32) & ^uint(0xfff)) +} + +func Minor(rdev uint64) uint { + return uint(rdev&0xff) | uint(uint32(rdev>>12) & ^uint32(0xff)) +} + +func Makedev(maj uint, min uint) uint64 { + return uint64(min&0xff) | (uint64(maj&0xfff) << 8) | + ((uint64(min) & ^uint64(0xff)) << 12) | + ((uint64(maj) & ^uint64(0xfff)) << 32) +} diff --git a/vendor/github.com/appc/spec/pkg/device/device_posix.go b/vendor/github.com/appc/spec/pkg/device/device_posix.go index a0bdd77..c2e1b31 100644 --- a/vendor/github.com/appc/spec/pkg/device/device_posix.go +++ b/vendor/github.com/appc/spec/pkg/device/device_posix.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build linux freebsd netbsd openbsd darwin +// +build freebsd netbsd openbsd darwin package device diff --git a/vendor/github.com/appc/spec/schema/image.go b/vendor/github.com/appc/spec/schema/image.go index 48f9232..fac4c79 100644 --- a/vendor/github.com/appc/spec/schema/image.go +++ b/vendor/github.com/appc/spec/schema/image.go @@ -22,7 +22,7 @@ import ( "github.com/appc/spec/schema/types" - "github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil" + "go4.org/errorutil" ) const ( diff --git a/vendor/github.com/appc/spec/schema/pod.go b/vendor/github.com/appc/spec/schema/pod.go index c42bbe2..d4792ff 100644 --- a/vendor/github.com/appc/spec/schema/pod.go +++ b/vendor/github.com/appc/spec/schema/pod.go @@ -22,7 +22,7 @@ import ( "github.com/appc/spec/schema/types" - "github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil" + "go4.org/errorutil" ) const PodManifestKind = types.ACKind("PodManifest") @@ -152,11 +152,12 @@ func (r Mount) assertValid() error { // RuntimeApp describes an application referenced in a PodManifest type RuntimeApp struct { - Name types.ACName `json:"name"` - Image RuntimeImage `json:"image"` - App *types.App `json:"app,omitempty"` - Mounts []Mount `json:"mounts,omitempty"` - Annotations types.Annotations `json:"annotations,omitempty"` + Name types.ACName `json:"name"` + Image RuntimeImage `json:"image"` + App *types.App `json:"app,omitempty"` + ReadOnlyRootFS bool `json:"readOnlyRootFS,omitempty"` + Mounts []Mount `json:"mounts,omitempty"` + Annotations types.Annotations `json:"annotations,omitempty"` } // RuntimeImage describes an image referenced in a RuntimeApp diff --git a/vendor/github.com/appc/spec/schema/types/isolator_linux_specific.go b/vendor/github.com/appc/spec/schema/types/isolator_linux_specific.go index ae4bfee..b390ed9 100644 --- a/vendor/github.com/appc/spec/schema/types/isolator_linux_specific.go +++ b/vendor/github.com/appc/spec/schema/types/isolator_linux_specific.go @@ -96,7 +96,7 @@ func NewLinuxCapabilitiesRetainSet(caps ...string) (*LinuxCapabilitiesRetainSet, } func (l LinuxCapabilitiesRetainSet) AsIsolator() Isolator { - b, err := json.Marshal(l) + b, err := json.Marshal(l.linuxCapabilitiesSetBase.val) if err != nil { panic(err) } @@ -130,7 +130,7 @@ func NewLinuxCapabilitiesRevokeSet(caps ...string) (*LinuxCapabilitiesRevokeSet, } func (l LinuxCapabilitiesRevokeSet) AsIsolator() Isolator { - b, err := json.Marshal(l) + b, err := json.Marshal(l.linuxCapabilitiesSetBase.val) if err != nil { panic(err) } diff --git a/vendor/github.com/appc/spec/schema/types/isolator_resources.go b/vendor/github.com/appc/spec/schema/types/isolator_resources.go index d6d264a..2ac5130 100644 --- a/vendor/github.com/appc/spec/schema/types/isolator_resources.go +++ b/vendor/github.com/appc/spec/schema/types/isolator_resources.go @@ -19,7 +19,7 @@ import ( "errors" "fmt" - "github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource" + "k8s.io/kubernetes/pkg/api/resource" ) var ( @@ -128,6 +128,21 @@ func (r ResourceCPU) AssertValid() error { return nil } +func (r ResourceCPU) AsIsolator() Isolator { + isol := isolatorMap[ResourceCPUName]() + + b, err := json.Marshal(r.val) + if err != nil { + panic(err) + } + valRaw := json.RawMessage(b) + return Isolator{ + Name: ResourceCPUName, + ValueRaw: &valRaw, + value: isol, + } +} + func NewResourceCPUIsolator(request, limit string) (*ResourceCPU, error) { req, err := resource.ParseQuantity(request) if err != nil { @@ -167,6 +182,21 @@ func (r ResourceMemory) AssertValid() error { return nil } +func (r ResourceMemory) AsIsolator() Isolator { + isol := isolatorMap[ResourceMemoryName]() + + b, err := json.Marshal(r.val) + if err != nil { + panic(err) + } + valRaw := json.RawMessage(b) + return Isolator{ + Name: ResourceMemoryName, + ValueRaw: &valRaw, + value: isol, + } +} + func NewResourceMemoryIsolator(request, limit string) (*ResourceMemory, error) { req, err := resource.ParseQuantity(request) if err != nil { diff --git a/vendor/github.com/appc/spec/schema/types/semver.go b/vendor/github.com/appc/spec/schema/types/semver.go index d7d741a..0008181 100644 --- a/vendor/github.com/appc/spec/schema/types/semver.go +++ b/vendor/github.com/appc/spec/schema/types/semver.go @@ -17,7 +17,7 @@ package types import ( "encoding/json" - "github.com/appc/spec/Godeps/_workspace/src/github.com/coreos/go-semver/semver" + "github.com/coreos/go-semver/semver" ) var ( diff --git a/vendor/github.com/appc/spec/schema/types/volume.go b/vendor/github.com/appc/spec/schema/types/volume.go index 6f49078..c5ae591 100644 --- a/vendor/github.com/appc/spec/schema/types/volume.go +++ b/vendor/github.com/appc/spec/schema/types/volume.go @@ -21,10 +21,17 @@ import ( "net/url" "path/filepath" "strconv" + "strings" "github.com/appc/spec/schema/common" ) +const ( + emptyVolumeDefaultMode = "0755" + emptyVolumeDefaultUID = 0 + emptyVolumeDefaultGID = 0 +) + // Volume encapsulates a volume which should be mounted into the filesystem // of all apps in a PodManifest type Volume struct { @@ -37,9 +44,9 @@ type Volume struct { ReadOnly *bool `json:"readOnly,omitempty"` // currently used only by "empty" - Mode string `json:"mode,omitempty"` - UID int `json:"uid,omitempty"` - GID int `json:"gid,omitempty"` + Mode *string `json:"mode,omitempty"` + UID *int `json:"uid,omitempty"` + GID *int `json:"gid,omitempty"` } type volume Volume @@ -54,13 +61,13 @@ func (v Volume) assertValid() error { if v.Source != "" { return errors.New("source for empty volume must be empty") } - if v.Mode == "" { + if v.Mode == nil { return errors.New("mode for empty volume must be set") } - if v.UID == -1 { + if v.UID == nil { return errors.New("uid for empty volume must be set") } - if v.GID == -1 { + if v.GID == nil { return errors.New("gid for empty volume must be set") } return nil @@ -68,6 +75,15 @@ func (v Volume) assertValid() error { if v.Source == "" { return errors.New("source for host volume cannot be empty") } + if v.Mode != nil { + return errors.New("mode for host volume cannot be set") + } + if v.UID != nil { + return errors.New("uid for host volume cannot be set") + } + if v.GID != nil { + return errors.New("gid for host volume cannot be set") + } if !filepath.IsAbs(v.Source) { return errors.New("source for host volume must be absolute path") } @@ -79,21 +95,14 @@ func (v Volume) assertValid() error { func (v *Volume) UnmarshalJSON(data []byte) error { var vv volume - vv.Mode = "0755" - vv.UID = 0 - vv.GID = 0 if err := json.Unmarshal(data, &vv); err != nil { return err } nv := Volume(vv) + maybeSetDefaults(&nv) if err := nv.assertValid(); err != nil { return err } - if nv.Kind != "empty" { - nv.Mode = "" - nv.UID = -1 - nv.GID = -1 - } *v = nv return nil } @@ -106,14 +115,35 @@ func (v Volume) MarshalJSON() ([]byte, error) { } func (v Volume) String() string { - s := fmt.Sprintf("%s,kind=%s,readOnly=%t", v.Name, v.Kind, *v.ReadOnly) + s := []string{ + v.Name.String(), + ",kind=", + v.Kind, + } if v.Source != "" { - s = s + fmt.Sprintf(",source=%s", v.Source) + s = append(s, ",source=") + s = append(s, v.Source) } - if v.Mode != "" && v.UID != -1 && v.GID != -1 { - s = s + fmt.Sprintf(",mode=%s,uid=%d,gid=%d", v.Mode, v.UID, v.GID) + if v.ReadOnly != nil { + s = append(s, ",readOnly=") + s = append(s, strconv.FormatBool(*v.ReadOnly)) } - return s + switch v.Kind { + case "empty": + if *v.Mode != emptyVolumeDefaultMode { + s = append(s, ",mode=") + s = append(s, *v.Mode) + } + if *v.UID != emptyVolumeDefaultUID { + s = append(s, ",uid=") + s = append(s, strconv.Itoa(*v.UID)) + } + if *v.GID != emptyVolumeDefaultGID { + s = append(s, ",gid=") + s = append(s, strconv.Itoa(*v.GID)) + } + } + return strings.Join(s, "") } // VolumeFromString takes a command line volume parameter and returns a volume @@ -121,11 +151,7 @@ func (v Volume) String() string { // Example volume parameters: // database,kind=host,source=/tmp,readOnly=true func VolumeFromString(vp string) (*Volume, error) { - vol := Volume{ - Mode: "0755", - UID: 0, - GID: 0, - } + var vol Volume vp = "name=" + vp vpQuery, err := common.MakeQueryString(vp) @@ -138,6 +164,7 @@ func VolumeFromString(vp string) (*Volume, error) { return nil, err } for key, val := range v { + val := val if len(val) > 1 { return nil, fmt.Errorf("label %s with multiple values %q", key, val) } @@ -160,32 +187,50 @@ func VolumeFromString(vp string) (*Volume, error) { } vol.ReadOnly = &ro case "mode": - vol.Mode = val[0] + vol.Mode = &val[0] case "uid": u, err := strconv.Atoi(val[0]) if err != nil { return nil, err } - vol.UID = u + vol.UID = &u case "gid": g, err := strconv.Atoi(val[0]) if err != nil { return nil, err } - vol.GID = g + vol.GID = &g default: return nil, fmt.Errorf("unknown volume parameter %q", key) } } + + maybeSetDefaults(&vol) + err = vol.assertValid() if err != nil { return nil, err } - if vol.Kind != "empty" { - vol.Mode = "" - vol.UID = -1 - vol.GID = -1 - } return &vol, nil } + +// maybeSetDefaults sets the correct default values for certain fields on a +// Volume if they are not already been set. These fields are not +// pre-populated on all Volumes as the Volume type is polymorphic. +func maybeSetDefaults(vol *Volume) { + if vol.Kind == "empty" { + if vol.Mode == nil { + m := emptyVolumeDefaultMode + vol.Mode = &m + } + if vol.UID == nil { + u := emptyVolumeDefaultUID + vol.UID = &u + } + if vol.GID == nil { + g := emptyVolumeDefaultGID + vol.GID = &g + } + } +} diff --git a/vendor/github.com/appc/spec/schema/version.go b/vendor/github.com/appc/spec/schema/version.go index 395ec35..eaa5f8b 100644 --- a/vendor/github.com/appc/spec/schema/version.go +++ b/vendor/github.com/appc/spec/schema/version.go @@ -22,7 +22,7 @@ const ( // version represents the canonical version of the appc spec and tooling. // For now, the schema and tooling is coupled with the spec itself, so // this must be kept in sync with the VERSION file in the root of the repo. - version string = "0.7.1+git" + version string = "0.8.1" ) var ( diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go index caca9f7..563fde3 100644 --- a/vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/acfullname.go @@ -33,18 +33,18 @@ func (n ACFullname) LatestVersion() (string, error) { app.Labels["arch"] = "amd64" } - endpoint, _, err := discovery.DiscoverEndpoints(*app, nil, false) + endpoints, _, err := discovery.DiscoverACIEndpoints(*app, nil, discovery.InsecureTLS|discovery.InsecureHTTP) //TODO support security if err != nil { return "", errors.Annotate(err, "Latest discovery fail") } r, _ := regexp.Compile(`^(\d+\.)?(\d+\.)?(\*|\d+)(\-[\dA-Za-z]+){0,1}$`) // TODO this is nexus specific - if len(endpoint.ACIEndpoints) == 0 { + if len(endpoints) == 0 { return "", errs.WithF(data.WithField("aci", string(n)), "Discovery does not give an endpoint to check latest version") } - url := getRedirectForLatest(endpoint.ACIEndpoints[0].ACI) + url := getRedirectForLatest(endpoints[0].ACI) logs.WithField("url", url).Debug("latest verion url") for _, part := range strings.Split(url, "/") { @@ -63,7 +63,7 @@ func (n ACFullname) String() string { return string(n) } -/* example.com/yopla:1 */ +/* example.com/dgr/yopla:1 */ func NewACFullName(s string) *ACFullname { n := ACFullname(s) return &n @@ -91,13 +91,20 @@ func (n ACFullname) Version() string { } /* yopla:1 */ -func (n ACFullname) ShortNameId() string { - return strings.Split(string(n), "/")[1] +func (n ACFullname) TinyNameId() string { + split := strings.Split(string(n), "/") + return split[len(split)-1] } -/* yopla */ +/* dgr/yopla */ func (n ACFullname) ShortName() string { - return strings.Split(n.Name(), "/")[1] + return strings.SplitN(n.Name(), "/", 2)[1] +} + +/* yopla */ +func (n ACFullname) TinyName() string { + split := strings.Split(n.Name(), "/") + return split[len(split)-1] } /* example.com */ @@ -105,7 +112,7 @@ func (n ACFullname) DomainName() string { return strings.Split(n.Name(), "/")[0] } -/* example.com/yopla */ +/* example.com/dgr/yopla */ func (n ACFullname) Name() string { return strings.Split(string(n), ":")[0] } diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go index 1166429..512ade5 100644 --- a/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/common.go @@ -34,11 +34,11 @@ const ( func (b BuilderCommand) CommandManifestKey() (string, error) { switch b { case CommandBuild: - return "dgrtool.com/dgr/stage1/build", nil + return "blablacar.github.io/dgr/stage1/build", nil case CommandInit: - return "dgrtool.com/dgr/stage1/init", nil + return "blablacar.github.io/dgr/stage1/init", nil case CommandTry: - return "dgrtool.com/dgr/stage1/try", nil + return "blablacar.github.io/dgr/stage1/try", nil default: return "", errs.WithF(data.WithField("command", b), "Unimplemented command manifest key") } diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go index ff6d7e8..f931a23 100644 --- a/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/dgr-manifest.go @@ -51,7 +51,6 @@ type BuildDefinition struct { type AciManifest struct { NameAndVersion ACFullname `json:"name,omitempty" yaml:"name,omitempty"` - From interface{} `json:"from,omitempty" yaml:"from,omitempty"` Builder BuildDefinition `json:"builder,omitempty" yaml:"builder,omitempty"` Aci AciDefinition `json:"aci,omitempty" yaml:"aci,omitempty"` Tester TestManifest `json:"tester,omitempty" yaml:"tester,omitempty"` @@ -62,23 +61,6 @@ type TestManifest struct { Aci AciDefinition `json:"aci,omitempty" yaml:"aci,omitempty"` } -func (m *AciManifest) GetFroms() ([]ACFullname, error) { - var froms []ACFullname - switch v := m.From.(type) { - case string: - froms = []ACFullname{*NewACFullName(m.From.(string))} - case []interface{}: - for _, from := range m.From.([]interface{}) { - froms = append(froms, *NewACFullName(from.(string))) - } - case nil: - return froms, nil - default: - return nil, errs.WithF(data.WithField("type", v), "Invalid from type format") - } - return froms, nil -} - type AciDefinition struct { App DgrApp `json:"app,omitempty" yaml:"app,omitempty"` Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` diff --git a/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go b/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go index 113dc18..83310bc 100644 --- a/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go +++ b/vendor/github.com/blablacar/dgr/bin-dgr/common/rkt-client.go @@ -3,6 +3,7 @@ package common import ( "bufio" "fmt" + "github.com/appc/spec/discovery" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" @@ -11,16 +12,40 @@ import ( const rktSupportedVersion Version = "1.4.0" +type InsecuOptions []string + +func (i InsecuOptions) ToDiscoveryInsecureOption() discovery.InsecureOption { + val := discovery.InsecureNone + for _, option := range i { + switch strings.ToLower(option) { + case "tls": + val |= discovery.InsecureTLS + case "http": + val |= discovery.InsecureHTTP + } + } + return val +} + +func (i InsecuOptions) HasImage() bool { + for _, option := range i { + if strings.ToLower(option) == "image" { + return true + } + } + return false +} + type RktConfig struct { - Path string `yaml:"path"` - InsecureOptions []string `yaml:"insecureOptions"` - dir string `yaml:"dir"` - LocalConfig string `yaml:"localConfig"` - SystemConfig string `yaml:"systemConfig"` - UserConfig string `yaml:"userConfig"` - TrustKeysFromHttps bool `yaml:"trustKeysFromHttps"` - NoStore bool `yaml:"noStore"` - StoreOnly bool `yaml:"storeOnly"` + Path string `yaml:"path"` + InsecureOptions InsecuOptions `yaml:"insecureOptions"` + dir string `yaml:"dir"` + LocalConfig string `yaml:"localConfig"` + SystemConfig string `yaml:"systemConfig"` + UserConfig string `yaml:"userConfig"` + TrustKeysFromHttps bool `yaml:"trustKeysFromHttps"` + NoStore bool `yaml:"noStore"` + StoreOnly bool `yaml:"storeOnly"` } type RktClient struct { @@ -37,7 +62,7 @@ func NewRktClient(config RktConfig) (*RktClient, error) { rkt := &RktClient{ fields: data.WithField("config", config), config: config, - globalArgs: config.prepareGlobalArgs(), + globalArgs: config.prepareGlobalArgs(config.InsecureOptions), } v, err := rkt.Version() @@ -52,7 +77,7 @@ func NewRktClient(config RktConfig) (*RktClient, error) { return rkt, nil } -func (rktCfg *RktConfig) prepareGlobalArgs() []string { +func (rktCfg *RktConfig) prepareGlobalArgs(insecureOptions []string) []string { args := []string{} cmd := "rkt" @@ -79,12 +104,12 @@ func (rktCfg *RktConfig) prepareGlobalArgs() []string { if rktCfg.dir != "" { args = append(args, "--rkt.dir="+rktCfg.dir) } - args = append(args, "--insecure-options="+strings.Join(rktCfg.InsecureOptions, ",")) + args = append(args, "--insecure-options="+strings.Join(insecureOptions, ",")) return args } -func (rkt *RktClient) argsStore(cmd []string, cmdArgs ...string) []string { - args := rkt.globalArgs[1:] +func (rkt *RktClient) argsStore(cmd []string, globalArgs []string, cmdArgs ...string) []string { + args := globalArgs[1:] args = append(args, cmd...) if rkt.config.NoStore { args = append(args, "--no-store") @@ -125,7 +150,19 @@ func (rkt *RktClient) Version() (Version, error) { } func (rkt *RktClient) Fetch(image string) (string, error) { - hash, err := ExecCmdGetOutput(rkt.globalArgs[0], rkt.argsStore([]string{"fetch"}, "--full", image)...) + hash, err := ExecCmdGetOutput(rkt.globalArgs[0], rkt.argsStore([]string{"fetch"}, rkt.globalArgs, "--full", image)...) + if err != nil { + return "", errs.WithEF(err, rkt.fields.WithField("image", image), "Failed to fetch image") + } + return hash, err +} + +func (rkt *RktClient) FetchInsecure(image string) (string, error) { + globalArgs := rkt.globalArgs + if !rkt.config.InsecureOptions.HasImage() { + globalArgs = rkt.config.prepareGlobalArgs(append(rkt.config.InsecureOptions, "image")) + } + hash, err := ExecCmdGetOutput(rkt.globalArgs[0], rkt.argsStore([]string{"fetch"}, globalArgs, "--full", image)...) if err != nil { return "", errs.WithEF(err, rkt.fields.WithField("image", image), "Failed to fetch image") } diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go b/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go index 6184154..bd7ef36 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go @@ -12,19 +12,21 @@ import ( ) type TemplateDir struct { - fields data.Fields - src string - dst string - Partials *txttmpl.Template + continueOnError bool + fields data.Fields + src string + dst string + Partials *txttmpl.Template } -func NewTemplateDir(path string, targetRoot string) (*TemplateDir, error) { - fields := data.WithField("dir", path) - logs.WithF(fields).Info("Reading template dir") +func NewTemplateDir(path string, targetRoot string, continueOnError bool) (*TemplateDir, error) { + fields := data.WithField("dir", path).WithField("continueOnError", continueOnError) + logs.WithF(fields).Debug("Reading template dir") tmplDir := &TemplateDir{ - fields: fields, - src: path, - dst: targetRoot, + fields: fields, + src: path, + dst: targetRoot, + continueOnError: continueOnError, } return tmplDir, tmplDir.LoadPartial() } @@ -102,7 +104,7 @@ func (t *TemplateDir) processSingleDir(src string, dst string, attributes map[st if err := t.processSingleDir(srcObj, dstObj, attributes); err != nil { return err } - } else if strings.HasSuffix(obj.Name(), ".tmpl") || strings.Contains(obj.Name(), ".tmpl.") { + } else if strings.HasSuffix(obj.Name(), ".tmpl") || (strings.Contains(obj.Name(), ".tmpl.") && (!strings.HasSuffix(obj.Name(), ".cfg"))) { if strings.HasSuffix(obj.Name(), ".tmpl") { dstObj = dstObj[:len(dstObj)-5] } else { @@ -112,10 +114,15 @@ func (t *TemplateDir) processSingleDir(src string, dst string, attributes map[st if err != nil { return err } - if err := template.runTemplate(dstObj, attributes); err != nil { - return err + if err2 := template.runTemplate(dstObj, attributes, !t.continueOnError); err2 != nil { + if t.continueOnError { + err = err2 + logs.WithEF(err, t.fields).Error("Templating failed") + } else { + return err2 + } } } } - return nil + return err } diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/file.go b/vendor/github.com/blablacar/dgr/bin-templater/template/file.go index 481249d..abdd101 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/file.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/file.go @@ -65,9 +65,9 @@ func (t *TemplateFile) loadTemplateConfig(src string) error { return nil } -func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{}) error { +func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{}, failOnNoValue bool) error { if logs.IsTraceEnabled() { - logs.WithF(f.fields).WithField("attributes", attributes).Trace("templating with attributes") + logs.WithF(f.fields).WithField("attributes", attributes).WithField("failOnNoValue", failOnNoValue).Trace("templating with attributes") } fields := f.fields.WithField("dst", dst) @@ -77,7 +77,9 @@ func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{} if err != nil { return errs.WithEF(err, fields, "Cannot open destination file") } - defer func() { out.Close() }() + defer func() { + out.Close() + }() buff := bytes.Buffer{} writer := bufio.NewWriter(&buff) @@ -101,7 +103,12 @@ func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{} for i := 1; scanner.Scan(); i++ { text := scanner.Text() if bytes.Contains([]byte(text), []byte("<no value>")) { - return errs.WithF(fields.WithField("line", i).WithField("text", text), "Templating result have <no value>") + err = errs.WithF(fields.WithField("line", i).WithField("text", text), "Templating result have <no value>") + if failOnNoValue { + return err + } else { + logs.WithE(err).Error("Templating result have <no value>") + } } } @@ -128,5 +135,5 @@ func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{} return errs.WithEF(err, fields.WithField("file", dst), "Check command failed after templating") } } - return nil + return err } diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go index fe59b44..a765006 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go @@ -4,6 +4,7 @@ import ( "bufio" "encoding/json" "github.com/leekchan/gtf" + "gopkg.in/yaml.v2" "io" "os" "path" @@ -117,6 +118,16 @@ func UnmarshalJsonArray(data string) ([]interface{}, error) { return ret, err } +func toJson(data interface{}) (string, error) { + res, err := json.MarshalIndent(data, "", " ") + return string(res), err +} + +func toYaml(data interface{}) (string, error) { + res, err := yaml.Marshal(data) + return string(res), err +} + func IsType(data interface{}, t string) bool { dataType := reflect.TypeOf(data) if dataType == nil { @@ -172,6 +183,14 @@ func IsString(data interface{}) bool { return false } +func IsNil(data interface{}) bool { + dataType := reflect.TypeOf(data) + if dataType == nil { + return true + } + return false +} + func IsMapFirst(data interface{}, element interface{}) bool { switch reflect.TypeOf(data).Kind() { case reflect.Map: @@ -274,6 +293,7 @@ func init() { TemplateFunctions["isKind"] = IsKind TemplateFunctions["isString"] = IsString TemplateFunctions["isMapFirst"] = IsMapFirst + TemplateFunctions["isNil"] = IsNil TemplateFunctions["isMapLast"] = IsMapLast TemplateFunctions["howDeep"] = HowDeep TemplateFunctions["add"] = add @@ -281,4 +301,10 @@ func init() { TemplateFunctions["div"] = div TemplateFunctions["sub"] = sub TemplateFunctions["mod"] = mod + TemplateFunctions["toJson"] = toJson + TemplateFunctions["toYaml"] = toYaml + + TemplateFunctions["IsMapFirst"] = IsMapFirst + TemplateFunctions["IsMapLast"] = IsMapLast + TemplateFunctions["HowDeep"] = HowDeep } diff --git a/vendor/github.com/n0rad/go-erlog/errs/entry.go b/vendor/github.com/n0rad/go-erlog/errs/entry.go index 3d9a6ce..5391d0f 100644 --- a/vendor/github.com/n0rad/go-erlog/errs/entry.go +++ b/vendor/github.com/n0rad/go-erlog/errs/entry.go @@ -118,6 +118,10 @@ func (e *EntryError) Error() string { return buffer.String() } +func (e *EntryError) String() string { + return e.Error() +} + // //func (e *EntryError) Stack() []byte { // buf := bytes.Buffer{} diff --git a/vendor/github.com/n0rad/go-erlog/formatter.go b/vendor/github.com/n0rad/go-erlog/formatter.go index 31d2e43..7d42408 100644 --- a/vendor/github.com/n0rad/go-erlog/formatter.go +++ b/vendor/github.com/n0rad/go-erlog/formatter.go @@ -71,6 +71,11 @@ func (f *ErlogWriterAppender) Fire(event *LogEvent) { // isColored := isTerminal && (runtime.GOOS != "windows") paths := strings.SplitN(event.File, "/", pathSkip+1) + packagePath := event.File + if len(paths) > pathSkip { + packagePath = paths[pathSkip] + } + b := &bytes.Buffer{} fmt.Fprintf(b, "%s %s%-5s%s %s%30s:%-3d%s %s%-44s%s", f.timeColor(event.Level)(time), @@ -78,7 +83,7 @@ func (f *ErlogWriterAppender) Fire(event *LogEvent) { level, reset, f.fileColor(event.Level), - f.reduceFilePath(paths[pathSkip], 30), + f.reduceFilePath(packagePath, 30), event.Line, reset, f.textColor(event.Level), @@ -106,9 +111,15 @@ func (f *ErlogWriterAppender) logError(b *bytes.Buffer, event *LogEvent) { if e, ok := err.(*errs.EntryError); ok { path, line := findFileAndName(e.Stack) paths := strings.SplitN(path, "/", pathSkip+1) + + packagePath := event.File + if len(paths) > pathSkip { + packagePath = paths[pathSkip] + } + fmt.Fprintf(b, " %s%30s:%-3d%s %s%-44s%s", f.fileColor(event.Level), - f.reduceFilePath(paths[pathSkip], 30), + f.reduceFilePath(packagePath, 30), line, reset, f.textColor(event.Level), diff --git a/vendor/go4.org/LICENSE b/vendor/go4.org/LICENSE new file mode 100644 index 0000000..8f71f43 --- /dev/null +++ b/vendor/go4.org/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go b/vendor/go4.org/errorutil/highlight.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/github.com/camlistore/camlistore/pkg/errorutil/highlight.go rename to vendor/go4.org/errorutil/highlight.go diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go index ef2f3e8..ea1a7cd 100644 --- a/vendor/golang.org/x/net/context/context.go +++ b/vendor/golang.org/x/net/context/context.go @@ -36,12 +36,7 @@ // Contexts. package context -import ( - "errors" - "fmt" - "sync" - "time" -) +import "time" // A Context carries a deadline, a cancelation signal, and other values across // API boundaries. @@ -66,7 +61,7 @@ type Context interface { // // // Stream generates values with DoSomething and sends them to out // // until DoSomething returns an error or ctx.Done is closed. - // func Stream(ctx context.Context, out <-chan Value) error { + // func Stream(ctx context.Context, out chan<- Value) error { // for { // v, err := DoSomething(ctx) // if err != nil { @@ -138,48 +133,6 @@ type Context interface { Value(key interface{}) interface{} } -// Canceled is the error returned by Context.Err when the context is canceled. -var Canceled = errors.New("context canceled") - -// DeadlineExceeded is the error returned by Context.Err when the context's -// deadline passes. -var DeadlineExceeded = errors.New("context deadline exceeded") - -// An emptyCtx is never canceled, has no values, and has no deadline. It is not -// struct{}, since vars of this type must have distinct addresses. -type emptyCtx int - -func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { - return -} - -func (*emptyCtx) Done() <-chan struct{} { - return nil -} - -func (*emptyCtx) Err() error { - return nil -} - -func (*emptyCtx) Value(key interface{}) interface{} { - return nil -} - -func (e *emptyCtx) String() string { - switch e { - case background: - return "context.Background" - case todo: - return "context.TODO" - } - return "unknown empty Context" -} - -var ( - background = new(emptyCtx) - todo = new(emptyCtx) -) - // Background returns a non-nil, empty Context. It is never canceled, has no // values, and has no deadline. It is typically used by the main function, // initialization, and tests, and as the top-level Context for incoming @@ -189,7 +142,7 @@ func Background() Context { } // TODO returns a non-nil, empty Context. Code should use context.TODO when -// it's unclear which Context to use or it's is not yet available (because the +// it's unclear which Context to use or it is not yet available (because the // surrounding function has not yet been extended to accept a Context // parameter). TODO is recognized by static analysis tools that determine // whether Contexts are propagated correctly in a program. @@ -201,247 +154,3 @@ func TODO() Context { // A CancelFunc does not wait for the work to stop. // After the first call, subsequent calls to a CancelFunc do nothing. type CancelFunc func() - -// WithCancel returns a copy of parent with a new Done channel. The returned -// context's Done channel is closed when the returned cancel function is called -// or when the parent context's Done channel is closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { - c := newCancelCtx(parent) - propagateCancel(parent, &c) - return &c, func() { c.cancel(true, Canceled) } -} - -// newCancelCtx returns an initialized cancelCtx. -func newCancelCtx(parent Context) cancelCtx { - return cancelCtx{ - Context: parent, - done: make(chan struct{}), - } -} - -// propagateCancel arranges for child to be canceled when parent is. -func propagateCancel(parent Context, child canceler) { - if parent.Done() == nil { - return // parent is never canceled - } - if p, ok := parentCancelCtx(parent); ok { - p.mu.Lock() - if p.err != nil { - // parent has already been canceled - child.cancel(false, p.err) - } else { - if p.children == nil { - p.children = make(map[canceler]bool) - } - p.children[child] = true - } - p.mu.Unlock() - } else { - go func() { - select { - case <-parent.Done(): - child.cancel(false, parent.Err()) - case <-child.Done(): - } - }() - } -} - -// parentCancelCtx follows a chain of parent references until it finds a -// *cancelCtx. This function understands how each of the concrete types in this -// package represents its parent. -func parentCancelCtx(parent Context) (*cancelCtx, bool) { - for { - switch c := parent.(type) { - case *cancelCtx: - return c, true - case *timerCtx: - return &c.cancelCtx, true - case *valueCtx: - parent = c.Context - default: - return nil, false - } - } -} - -// removeChild removes a context from its parent. -func removeChild(parent Context, child canceler) { - p, ok := parentCancelCtx(parent) - if !ok { - return - } - p.mu.Lock() - if p.children != nil { - delete(p.children, child) - } - p.mu.Unlock() -} - -// A canceler is a context type that can be canceled directly. The -// implementations are *cancelCtx and *timerCtx. -type canceler interface { - cancel(removeFromParent bool, err error) - Done() <-chan struct{} -} - -// A cancelCtx can be canceled. When canceled, it also cancels any children -// that implement canceler. -type cancelCtx struct { - Context - - done chan struct{} // closed by the first cancel call. - - mu sync.Mutex - children map[canceler]bool // set to nil by the first cancel call - err error // set to non-nil by the first cancel call -} - -func (c *cancelCtx) Done() <-chan struct{} { - return c.done -} - -func (c *cancelCtx) Err() error { - c.mu.Lock() - defer c.mu.Unlock() - return c.err -} - -func (c *cancelCtx) String() string { - return fmt.Sprintf("%v.WithCancel", c.Context) -} - -// cancel closes c.done, cancels each of c's children, and, if -// removeFromParent is true, removes c from its parent's children. -func (c *cancelCtx) cancel(removeFromParent bool, err error) { - if err == nil { - panic("context: internal error: missing cancel error") - } - c.mu.Lock() - if c.err != nil { - c.mu.Unlock() - return // already canceled - } - c.err = err - close(c.done) - for child := range c.children { - // NOTE: acquiring the child's lock while holding parent's lock. - child.cancel(false, err) - } - c.children = nil - c.mu.Unlock() - - if removeFromParent { - removeChild(c.Context, c) - } -} - -// WithDeadline returns a copy of the parent context with the deadline adjusted -// to be no later than d. If the parent's deadline is already earlier than d, -// WithDeadline(parent, d) is semantically equivalent to parent. The returned -// context's Done channel is closed when the deadline expires, when the returned -// cancel function is called, or when the parent context's Done channel is -// closed, whichever happens first. -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete. -func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { - if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { - // The current deadline is already sooner than the new one. - return WithCancel(parent) - } - c := &timerCtx{ - cancelCtx: newCancelCtx(parent), - deadline: deadline, - } - propagateCancel(parent, c) - d := deadline.Sub(time.Now()) - if d <= 0 { - c.cancel(true, DeadlineExceeded) // deadline has already passed - return c, func() { c.cancel(true, Canceled) } - } - c.mu.Lock() - defer c.mu.Unlock() - if c.err == nil { - c.timer = time.AfterFunc(d, func() { - c.cancel(true, DeadlineExceeded) - }) - } - return c, func() { c.cancel(true, Canceled) } -} - -// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to -// implement Done and Err. It implements cancel by stopping its timer then -// delegating to cancelCtx.cancel. -type timerCtx struct { - cancelCtx - timer *time.Timer // Under cancelCtx.mu. - - deadline time.Time -} - -func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { - return c.deadline, true -} - -func (c *timerCtx) String() string { - return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) -} - -func (c *timerCtx) cancel(removeFromParent bool, err error) { - c.cancelCtx.cancel(false, err) - if removeFromParent { - // Remove this timerCtx from its parent cancelCtx's children. - removeChild(c.cancelCtx.Context, c) - } - c.mu.Lock() - if c.timer != nil { - c.timer.Stop() - c.timer = nil - } - c.mu.Unlock() -} - -// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). -// -// Canceling this context releases resources associated with it, so code should -// call cancel as soon as the operations running in this Context complete: -// -// func slowOperationWithTimeout(ctx context.Context) (Result, error) { -// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) -// defer cancel() // releases resources if slowOperation completes before timeout elapses -// return slowOperation(ctx) -// } -func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { - return WithDeadline(parent, time.Now().Add(timeout)) -} - -// WithValue returns a copy of parent in which the value associated with key is -// val. -// -// Use context Values only for request-scoped data that transits processes and -// APIs, not for passing optional parameters to functions. -func WithValue(parent Context, key interface{}, val interface{}) Context { - return &valueCtx{parent, key, val} -} - -// A valueCtx carries a key-value pair. It implements Value for that key and -// delegates all other calls to the embedded Context. -type valueCtx struct { - Context - key, val interface{} -} - -func (c *valueCtx) String() string { - return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) -} - -func (c *valueCtx) Value(key interface{}) interface{} { - if c.key == key { - return c.val - } - return c.Context.Value(key) -} diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go new file mode 100644 index 0000000..f8cda19 --- /dev/null +++ b/vendor/golang.org/x/net/context/go17.go @@ -0,0 +1,72 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.7 + +package context + +import ( + "context" // standard library's context, as of Go 1.7 + "time" +) + +var ( + todo = context.TODO() + background = context.Background() +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = context.Canceled + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = context.DeadlineExceeded + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + ctx, f := context.WithCancel(parent) + return ctx, CancelFunc(f) +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + ctx, f := context.WithDeadline(parent, deadline) + return ctx, CancelFunc(f) +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return context.WithValue(parent, key, val) +} diff --git a/vendor/golang.org/x/net/context/pre_go17.go b/vendor/golang.org/x/net/context/pre_go17.go new file mode 100644 index 0000000..5a30aca --- /dev/null +++ b/vendor/golang.org/x/net/context/pre_go17.go @@ -0,0 +1,300 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.7 + +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, c) + return c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) *cancelCtx { + return &cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + *cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go b/vendor/golang.org/x/net/html/atom/atom.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/atom.go rename to vendor/golang.org/x/net/html/atom/atom.go diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go b/vendor/golang.org/x/net/html/atom/gen.go similarity index 96% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go rename to vendor/golang.org/x/net/html/atom/gen.go index 9958a71..6bfa866 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom/gen.go +++ b/vendor/golang.org/x/net/html/atom/gen.go @@ -284,8 +284,8 @@ func (t *table) push(i uint32, depth int) bool { } // The lists of element names and attribute keys were taken from -// http://www.whatwg.org/specs/web-apps/current-work/multipage/section-index.html -// as of the "HTML Living Standard - Last Updated 30 May 2012" version. +// https://html.spec.whatwg.org/multipage/indices.html#index +// as of the "HTML Living Standard - Last Updated 21 February 2015" version. var elements = []string{ "a", @@ -352,6 +352,7 @@ var elements = []string{ "map", "mark", "menu", + "menuitem", "meta", "meter", "nav", @@ -385,6 +386,7 @@ var elements = []string{ "table", "tbody", "td", + "template", "textarea", "tfoot", "th", @@ -400,7 +402,10 @@ var elements = []string{ "wbr", } +// https://html.spec.whatwg.org/multipage/indices.html#attributes-3 + var attributes = []string{ + "abbr", "accept", "accept-charset", "accesskey", @@ -410,7 +415,6 @@ var attributes = []string{ "autocomplete", "autofocus", "autoplay", - "border", "challenge", "charset", "checked", @@ -452,7 +456,7 @@ var attributes = []string{ "http-equiv", "icon", "id", - "inert", + "inputmode", "ismap", "itemid", "itemprop", @@ -473,6 +477,7 @@ var attributes = []string{ "mediagroup", "method", "min", + "minlength", "multiple", "muted", "name", @@ -500,6 +505,8 @@ var attributes = []string{ "shape", "size", "sizes", + "sortable", + "sorted", "span", "src", "srcdoc", @@ -521,6 +528,8 @@ var attributes = []string{ var eventHandlers = []string{ "onabort", + "onautocomplete", + "onautocompleteerror", "onafterprint", "onbeforeprint", "onbeforeunload", @@ -552,6 +561,7 @@ var eventHandlers = []string{ "onkeydown", "onkeypress", "onkeyup", + "onlanguagechange", "onload", "onloadeddata", "onloadedmetadata", @@ -580,11 +590,13 @@ var eventHandlers = []string{ "onseeking", "onselect", "onshow", + "onsort", "onstalled", "onstorage", "onsubmit", "onsuspend", "ontimeupdate", + "ontoggle", "onunload", "onvolumechange", "onwaiting", diff --git a/vendor/golang.org/x/net/html/atom/table.go b/vendor/golang.org/x/net/html/atom/table.go new file mode 100644 index 0000000..2605ba3 --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/table.go @@ -0,0 +1,713 @@ +// generated by go run gen.go; DO NOT EDIT + +package atom + +const ( + A Atom = 0x1 + Abbr Atom = 0x4 + Accept Atom = 0x2106 + AcceptCharset Atom = 0x210e + Accesskey Atom = 0x3309 + Action Atom = 0x1f606 + Address Atom = 0x4f307 + Align Atom = 0x1105 + Alt Atom = 0x4503 + Annotation Atom = 0x1670a + AnnotationXml Atom = 0x1670e + Applet Atom = 0x2b306 + Area Atom = 0x2fa04 + Article Atom = 0x38807 + Aside Atom = 0x8305 + Async Atom = 0x7b05 + Audio Atom = 0xa605 + Autocomplete Atom = 0x1fc0c + Autofocus Atom = 0xb309 + Autoplay Atom = 0xce08 + B Atom = 0x101 + Base Atom = 0xd604 + Basefont Atom = 0xd608 + Bdi Atom = 0x1a03 + Bdo Atom = 0xe703 + Bgsound Atom = 0x11807 + Big Atom = 0x12403 + Blink Atom = 0x12705 + Blockquote Atom = 0x12c0a + Body Atom = 0x2f04 + Br Atom = 0x202 + Button Atom = 0x13606 + Canvas Atom = 0x7f06 + Caption Atom = 0x1bb07 + Center Atom = 0x5b506 + Challenge Atom = 0x21f09 + Charset Atom = 0x2807 + Checked Atom = 0x32807 + Cite Atom = 0x3c804 + Class Atom = 0x4de05 + Code Atom = 0x14904 + Col Atom = 0x15003 + Colgroup Atom = 0x15008 + Color Atom = 0x15d05 + Cols Atom = 0x16204 + Colspan Atom = 0x16207 + Command Atom = 0x17507 + Content Atom = 0x42307 + Contenteditable Atom = 0x4230f + Contextmenu Atom = 0x3310b + Controls Atom = 0x18808 + Coords Atom = 0x19406 + Crossorigin Atom = 0x19f0b + Data Atom = 0x44a04 + Datalist Atom = 0x44a08 + Datetime Atom = 0x23c08 + Dd Atom = 0x26702 + Default Atom = 0x8607 + Defer Atom = 0x14b05 + Del Atom = 0x3ef03 + Desc Atom = 0x4db04 + Details Atom = 0x4807 + Dfn Atom = 0x6103 + Dialog Atom = 0x1b06 + Dir Atom = 0x6903 + Dirname Atom = 0x6907 + Disabled Atom = 0x10c08 + Div Atom = 0x11303 + Dl Atom = 0x11e02 + Download Atom = 0x40008 + Draggable Atom = 0x17b09 + Dropzone Atom = 0x39108 + Dt Atom = 0x50902 + Em Atom = 0x6502 + Embed Atom = 0x6505 + Enctype Atom = 0x21107 + Face Atom = 0x5b304 + Fieldset Atom = 0x1b008 + Figcaption Atom = 0x1b80a + Figure Atom = 0x1cc06 + Font Atom = 0xda04 + Footer Atom = 0x8d06 + For Atom = 0x1d803 + ForeignObject Atom = 0x1d80d + Foreignobject Atom = 0x1e50d + Form Atom = 0x1f204 + Formaction Atom = 0x1f20a + Formenctype Atom = 0x20d0b + Formmethod Atom = 0x2280a + Formnovalidate Atom = 0x2320e + Formtarget Atom = 0x2470a + Frame Atom = 0x9a05 + Frameset Atom = 0x9a08 + H1 Atom = 0x26e02 + H2 Atom = 0x29402 + H3 Atom = 0x2a702 + H4 Atom = 0x2e902 + H5 Atom = 0x2f302 + H6 Atom = 0x50b02 + Head Atom = 0x2d504 + Header Atom = 0x2d506 + Headers Atom = 0x2d507 + Height Atom = 0x25106 + Hgroup Atom = 0x25906 + Hidden Atom = 0x26506 + High Atom = 0x26b04 + Hr Atom = 0x27002 + Href Atom = 0x27004 + Hreflang Atom = 0x27008 + Html Atom = 0x25504 + HttpEquiv Atom = 0x2780a + I Atom = 0x601 + Icon Atom = 0x42204 + Id Atom = 0x8502 + Iframe Atom = 0x29606 + Image Atom = 0x29c05 + Img Atom = 0x2a103 + Input Atom = 0x3e805 + Inputmode Atom = 0x3e809 + Ins Atom = 0x1a803 + Isindex Atom = 0x2a907 + Ismap Atom = 0x2b005 + Itemid Atom = 0x33c06 + Itemprop Atom = 0x3c908 + Itemref Atom = 0x5ad07 + Itemscope Atom = 0x2b909 + Itemtype Atom = 0x2c308 + Kbd Atom = 0x1903 + Keygen Atom = 0x3906 + Keytype Atom = 0x53707 + Kind Atom = 0x10904 + Label Atom = 0xf005 + Lang Atom = 0x27404 + Legend Atom = 0x18206 + Li Atom = 0x1202 + Link Atom = 0x12804 + List Atom = 0x44e04 + Listing Atom = 0x44e07 + Loop Atom = 0xf404 + Low Atom = 0x11f03 + Malignmark Atom = 0x100a + Manifest Atom = 0x5f108 + Map Atom = 0x2b203 + Mark Atom = 0x1604 + Marquee Atom = 0x2cb07 + Math Atom = 0x2d204 + Max Atom = 0x2e103 + Maxlength Atom = 0x2e109 + Media Atom = 0x6e05 + Mediagroup Atom = 0x6e0a + Menu Atom = 0x33804 + Menuitem Atom = 0x33808 + Meta Atom = 0x45d04 + Meter Atom = 0x24205 + Method Atom = 0x22c06 + Mglyph Atom = 0x2a206 + Mi Atom = 0x2eb02 + Min Atom = 0x2eb03 + Minlength Atom = 0x2eb09 + Mn Atom = 0x23502 + Mo Atom = 0x3ed02 + Ms Atom = 0x2bc02 + Mtext Atom = 0x2f505 + Multiple Atom = 0x30308 + Muted Atom = 0x30b05 + Name Atom = 0x6c04 + Nav Atom = 0x3e03 + Nobr Atom = 0x5704 + Noembed Atom = 0x6307 + Noframes Atom = 0x9808 + Noscript Atom = 0x3d208 + Novalidate Atom = 0x2360a + Object Atom = 0x1ec06 + Ol Atom = 0xc902 + Onabort Atom = 0x13a07 + Onafterprint Atom = 0x1c00c + Onautocomplete Atom = 0x1fa0e + Onautocompleteerror Atom = 0x1fa13 + Onbeforeprint Atom = 0x6040d + Onbeforeunload Atom = 0x4e70e + Onblur Atom = 0xaa06 + Oncancel Atom = 0xe908 + Oncanplay Atom = 0x28509 + Oncanplaythrough Atom = 0x28510 + Onchange Atom = 0x3a708 + Onclick Atom = 0x31007 + Onclose Atom = 0x31707 + Oncontextmenu Atom = 0x32f0d + Oncuechange Atom = 0x3420b + Ondblclick Atom = 0x34d0a + Ondrag Atom = 0x35706 + Ondragend Atom = 0x35709 + Ondragenter Atom = 0x3600b + Ondragleave Atom = 0x36b0b + Ondragover Atom = 0x3760a + Ondragstart Atom = 0x3800b + Ondrop Atom = 0x38f06 + Ondurationchange Atom = 0x39f10 + Onemptied Atom = 0x39609 + Onended Atom = 0x3af07 + Onerror Atom = 0x3b607 + Onfocus Atom = 0x3bd07 + Onhashchange Atom = 0x3da0c + Oninput Atom = 0x3e607 + Oninvalid Atom = 0x3f209 + Onkeydown Atom = 0x3fb09 + Onkeypress Atom = 0x4080a + Onkeyup Atom = 0x41807 + Onlanguagechange Atom = 0x43210 + Onload Atom = 0x44206 + Onloadeddata Atom = 0x4420c + Onloadedmetadata Atom = 0x45510 + Onloadstart Atom = 0x46b0b + Onmessage Atom = 0x47609 + Onmousedown Atom = 0x47f0b + Onmousemove Atom = 0x48a0b + Onmouseout Atom = 0x4950a + Onmouseover Atom = 0x4a20b + Onmouseup Atom = 0x4ad09 + Onmousewheel Atom = 0x4b60c + Onoffline Atom = 0x4c209 + Ononline Atom = 0x4cb08 + Onpagehide Atom = 0x4d30a + Onpageshow Atom = 0x4fe0a + Onpause Atom = 0x50d07 + Onplay Atom = 0x51706 + Onplaying Atom = 0x51709 + Onpopstate Atom = 0x5200a + Onprogress Atom = 0x52a0a + Onratechange Atom = 0x53e0c + Onreset Atom = 0x54a07 + Onresize Atom = 0x55108 + Onscroll Atom = 0x55f08 + Onseeked Atom = 0x56708 + Onseeking Atom = 0x56f09 + Onselect Atom = 0x57808 + Onshow Atom = 0x58206 + Onsort Atom = 0x58b06 + Onstalled Atom = 0x59509 + Onstorage Atom = 0x59e09 + Onsubmit Atom = 0x5a708 + Onsuspend Atom = 0x5bb09 + Ontimeupdate Atom = 0xdb0c + Ontoggle Atom = 0x5c408 + Onunload Atom = 0x5cc08 + Onvolumechange Atom = 0x5d40e + Onwaiting Atom = 0x5e209 + Open Atom = 0x3cf04 + Optgroup Atom = 0xf608 + Optimum Atom = 0x5eb07 + Option Atom = 0x60006 + Output Atom = 0x49c06 + P Atom = 0xc01 + Param Atom = 0xc05 + Pattern Atom = 0x5107 + Ping Atom = 0x7704 + Placeholder Atom = 0xc30b + Plaintext Atom = 0xfd09 + Poster Atom = 0x15706 + Pre Atom = 0x25e03 + Preload Atom = 0x25e07 + Progress Atom = 0x52c08 + Prompt Atom = 0x5fa06 + Public Atom = 0x41e06 + Q Atom = 0x13101 + Radiogroup Atom = 0x30a + Readonly Atom = 0x2fb08 + Rel Atom = 0x25f03 + Required Atom = 0x1d008 + Reversed Atom = 0x5a08 + Rows Atom = 0x9204 + Rowspan Atom = 0x9207 + Rp Atom = 0x1c602 + Rt Atom = 0x13f02 + Ruby Atom = 0xaf04 + S Atom = 0x2c01 + Samp Atom = 0x4e04 + Sandbox Atom = 0xbb07 + Scope Atom = 0x2bd05 + Scoped Atom = 0x2bd06 + Script Atom = 0x3d406 + Seamless Atom = 0x31c08 + Section Atom = 0x4e207 + Select Atom = 0x57a06 + Selected Atom = 0x57a08 + Shape Atom = 0x4f905 + Size Atom = 0x55504 + Sizes Atom = 0x55505 + Small Atom = 0x18f05 + Sortable Atom = 0x58d08 + Sorted Atom = 0x19906 + Source Atom = 0x1aa06 + Spacer Atom = 0x2db06 + Span Atom = 0x9504 + Spellcheck Atom = 0x3230a + Src Atom = 0x3c303 + Srcdoc Atom = 0x3c306 + Srclang Atom = 0x41107 + Start Atom = 0x38605 + Step Atom = 0x5f704 + Strike Atom = 0x53306 + Strong Atom = 0x55906 + Style Atom = 0x61105 + Sub Atom = 0x5a903 + Summary Atom = 0x61607 + Sup Atom = 0x61d03 + Svg Atom = 0x62003 + System Atom = 0x62306 + Tabindex Atom = 0x46308 + Table Atom = 0x42d05 + Target Atom = 0x24b06 + Tbody Atom = 0x2e05 + Td Atom = 0x4702 + Template Atom = 0x62608 + Textarea Atom = 0x2f608 + Tfoot Atom = 0x8c05 + Th Atom = 0x22e02 + Thead Atom = 0x2d405 + Time Atom = 0xdd04 + Title Atom = 0xa105 + Tr Atom = 0x10502 + Track Atom = 0x10505 + Translate Atom = 0x14009 + Tt Atom = 0x5302 + Type Atom = 0x21404 + Typemustmatch Atom = 0x2140d + U Atom = 0xb01 + Ul Atom = 0x8a02 + Usemap Atom = 0x51106 + Value Atom = 0x4005 + Var Atom = 0x11503 + Video Atom = 0x28105 + Wbr Atom = 0x12103 + Width Atom = 0x50705 + Wrap Atom = 0x58704 + Xmp Atom = 0xc103 +) + +const hash0 = 0xc17da63e + +const maxAtomLen = 19 + +var table = [1 << 9]Atom{ + 0x1: 0x48a0b, // onmousemove + 0x2: 0x5e209, // onwaiting + 0x3: 0x1fa13, // onautocompleteerror + 0x4: 0x5fa06, // prompt + 0x7: 0x5eb07, // optimum + 0x8: 0x1604, // mark + 0xa: 0x5ad07, // itemref + 0xb: 0x4fe0a, // onpageshow + 0xc: 0x57a06, // select + 0xd: 0x17b09, // draggable + 0xe: 0x3e03, // nav + 0xf: 0x17507, // command + 0x11: 0xb01, // u + 0x14: 0x2d507, // headers + 0x15: 0x44a08, // datalist + 0x17: 0x4e04, // samp + 0x1a: 0x3fb09, // onkeydown + 0x1b: 0x55f08, // onscroll + 0x1c: 0x15003, // col + 0x20: 0x3c908, // itemprop + 0x21: 0x2780a, // http-equiv + 0x22: 0x61d03, // sup + 0x24: 0x1d008, // required + 0x2b: 0x25e07, // preload + 0x2c: 0x6040d, // onbeforeprint + 0x2d: 0x3600b, // ondragenter + 0x2e: 0x50902, // dt + 0x2f: 0x5a708, // onsubmit + 0x30: 0x27002, // hr + 0x31: 0x32f0d, // oncontextmenu + 0x33: 0x29c05, // image + 0x34: 0x50d07, // onpause + 0x35: 0x25906, // hgroup + 0x36: 0x7704, // ping + 0x37: 0x57808, // onselect + 0x3a: 0x11303, // div + 0x3b: 0x1fa0e, // onautocomplete + 0x40: 0x2eb02, // mi + 0x41: 0x31c08, // seamless + 0x42: 0x2807, // charset + 0x43: 0x8502, // id + 0x44: 0x5200a, // onpopstate + 0x45: 0x3ef03, // del + 0x46: 0x2cb07, // marquee + 0x47: 0x3309, // accesskey + 0x49: 0x8d06, // footer + 0x4a: 0x44e04, // list + 0x4b: 0x2b005, // ismap + 0x51: 0x33804, // menu + 0x52: 0x2f04, // body + 0x55: 0x9a08, // frameset + 0x56: 0x54a07, // onreset + 0x57: 0x12705, // blink + 0x58: 0xa105, // title + 0x59: 0x38807, // article + 0x5b: 0x22e02, // th + 0x5d: 0x13101, // q + 0x5e: 0x3cf04, // open + 0x5f: 0x2fa04, // area + 0x61: 0x44206, // onload + 0x62: 0xda04, // font + 0x63: 0xd604, // base + 0x64: 0x16207, // colspan + 0x65: 0x53707, // keytype + 0x66: 0x11e02, // dl + 0x68: 0x1b008, // fieldset + 0x6a: 0x2eb03, // min + 0x6b: 0x11503, // var + 0x6f: 0x2d506, // header + 0x70: 0x13f02, // rt + 0x71: 0x15008, // colgroup + 0x72: 0x23502, // mn + 0x74: 0x13a07, // onabort + 0x75: 0x3906, // keygen + 0x76: 0x4c209, // onoffline + 0x77: 0x21f09, // challenge + 0x78: 0x2b203, // map + 0x7a: 0x2e902, // h4 + 0x7b: 0x3b607, // onerror + 0x7c: 0x2e109, // maxlength + 0x7d: 0x2f505, // mtext + 0x7e: 0xbb07, // sandbox + 0x7f: 0x58b06, // onsort + 0x80: 0x100a, // malignmark + 0x81: 0x45d04, // meta + 0x82: 0x7b05, // async + 0x83: 0x2a702, // h3 + 0x84: 0x26702, // dd + 0x85: 0x27004, // href + 0x86: 0x6e0a, // mediagroup + 0x87: 0x19406, // coords + 0x88: 0x41107, // srclang + 0x89: 0x34d0a, // ondblclick + 0x8a: 0x4005, // value + 0x8c: 0xe908, // oncancel + 0x8e: 0x3230a, // spellcheck + 0x8f: 0x9a05, // frame + 0x91: 0x12403, // big + 0x94: 0x1f606, // action + 0x95: 0x6903, // dir + 0x97: 0x2fb08, // readonly + 0x99: 0x42d05, // table + 0x9a: 0x61607, // summary + 0x9b: 0x12103, // wbr + 0x9c: 0x30a, // radiogroup + 0x9d: 0x6c04, // name + 0x9f: 0x62306, // system + 0xa1: 0x15d05, // color + 0xa2: 0x7f06, // canvas + 0xa3: 0x25504, // html + 0xa5: 0x56f09, // onseeking + 0xac: 0x4f905, // shape + 0xad: 0x25f03, // rel + 0xae: 0x28510, // oncanplaythrough + 0xaf: 0x3760a, // ondragover + 0xb0: 0x62608, // template + 0xb1: 0x1d80d, // foreignObject + 0xb3: 0x9204, // rows + 0xb6: 0x44e07, // listing + 0xb7: 0x49c06, // output + 0xb9: 0x3310b, // contextmenu + 0xbb: 0x11f03, // low + 0xbc: 0x1c602, // rp + 0xbd: 0x5bb09, // onsuspend + 0xbe: 0x13606, // button + 0xbf: 0x4db04, // desc + 0xc1: 0x4e207, // section + 0xc2: 0x52a0a, // onprogress + 0xc3: 0x59e09, // onstorage + 0xc4: 0x2d204, // math + 0xc5: 0x4503, // alt + 0xc7: 0x8a02, // ul + 0xc8: 0x5107, // pattern + 0xc9: 0x4b60c, // onmousewheel + 0xca: 0x35709, // ondragend + 0xcb: 0xaf04, // ruby + 0xcc: 0xc01, // p + 0xcd: 0x31707, // onclose + 0xce: 0x24205, // meter + 0xcf: 0x11807, // bgsound + 0xd2: 0x25106, // height + 0xd4: 0x101, // b + 0xd5: 0x2c308, // itemtype + 0xd8: 0x1bb07, // caption + 0xd9: 0x10c08, // disabled + 0xdb: 0x33808, // menuitem + 0xdc: 0x62003, // svg + 0xdd: 0x18f05, // small + 0xde: 0x44a04, // data + 0xe0: 0x4cb08, // ononline + 0xe1: 0x2a206, // mglyph + 0xe3: 0x6505, // embed + 0xe4: 0x10502, // tr + 0xe5: 0x46b0b, // onloadstart + 0xe7: 0x3c306, // srcdoc + 0xeb: 0x5c408, // ontoggle + 0xed: 0xe703, // bdo + 0xee: 0x4702, // td + 0xef: 0x8305, // aside + 0xf0: 0x29402, // h2 + 0xf1: 0x52c08, // progress + 0xf2: 0x12c0a, // blockquote + 0xf4: 0xf005, // label + 0xf5: 0x601, // i + 0xf7: 0x9207, // rowspan + 0xfb: 0x51709, // onplaying + 0xfd: 0x2a103, // img + 0xfe: 0xf608, // optgroup + 0xff: 0x42307, // content + 0x101: 0x53e0c, // onratechange + 0x103: 0x3da0c, // onhashchange + 0x104: 0x4807, // details + 0x106: 0x40008, // download + 0x109: 0x14009, // translate + 0x10b: 0x4230f, // contenteditable + 0x10d: 0x36b0b, // ondragleave + 0x10e: 0x2106, // accept + 0x10f: 0x57a08, // selected + 0x112: 0x1f20a, // formaction + 0x113: 0x5b506, // center + 0x115: 0x45510, // onloadedmetadata + 0x116: 0x12804, // link + 0x117: 0xdd04, // time + 0x118: 0x19f0b, // crossorigin + 0x119: 0x3bd07, // onfocus + 0x11a: 0x58704, // wrap + 0x11b: 0x42204, // icon + 0x11d: 0x28105, // video + 0x11e: 0x4de05, // class + 0x121: 0x5d40e, // onvolumechange + 0x122: 0xaa06, // onblur + 0x123: 0x2b909, // itemscope + 0x124: 0x61105, // style + 0x127: 0x41e06, // public + 0x129: 0x2320e, // formnovalidate + 0x12a: 0x58206, // onshow + 0x12c: 0x51706, // onplay + 0x12d: 0x3c804, // cite + 0x12e: 0x2bc02, // ms + 0x12f: 0xdb0c, // ontimeupdate + 0x130: 0x10904, // kind + 0x131: 0x2470a, // formtarget + 0x135: 0x3af07, // onended + 0x136: 0x26506, // hidden + 0x137: 0x2c01, // s + 0x139: 0x2280a, // formmethod + 0x13a: 0x3e805, // input + 0x13c: 0x50b02, // h6 + 0x13d: 0xc902, // ol + 0x13e: 0x3420b, // oncuechange + 0x13f: 0x1e50d, // foreignobject + 0x143: 0x4e70e, // onbeforeunload + 0x144: 0x2bd05, // scope + 0x145: 0x39609, // onemptied + 0x146: 0x14b05, // defer + 0x147: 0xc103, // xmp + 0x148: 0x39f10, // ondurationchange + 0x149: 0x1903, // kbd + 0x14c: 0x47609, // onmessage + 0x14d: 0x60006, // option + 0x14e: 0x2eb09, // minlength + 0x14f: 0x32807, // checked + 0x150: 0xce08, // autoplay + 0x152: 0x202, // br + 0x153: 0x2360a, // novalidate + 0x156: 0x6307, // noembed + 0x159: 0x31007, // onclick + 0x15a: 0x47f0b, // onmousedown + 0x15b: 0x3a708, // onchange + 0x15e: 0x3f209, // oninvalid + 0x15f: 0x2bd06, // scoped + 0x160: 0x18808, // controls + 0x161: 0x30b05, // muted + 0x162: 0x58d08, // sortable + 0x163: 0x51106, // usemap + 0x164: 0x1b80a, // figcaption + 0x165: 0x35706, // ondrag + 0x166: 0x26b04, // high + 0x168: 0x3c303, // src + 0x169: 0x15706, // poster + 0x16b: 0x1670e, // annotation-xml + 0x16c: 0x5f704, // step + 0x16d: 0x4, // abbr + 0x16e: 0x1b06, // dialog + 0x170: 0x1202, // li + 0x172: 0x3ed02, // mo + 0x175: 0x1d803, // for + 0x176: 0x1a803, // ins + 0x178: 0x55504, // size + 0x179: 0x43210, // onlanguagechange + 0x17a: 0x8607, // default + 0x17b: 0x1a03, // bdi + 0x17c: 0x4d30a, // onpagehide + 0x17d: 0x6907, // dirname + 0x17e: 0x21404, // type + 0x17f: 0x1f204, // form + 0x181: 0x28509, // oncanplay + 0x182: 0x6103, // dfn + 0x183: 0x46308, // tabindex + 0x186: 0x6502, // em + 0x187: 0x27404, // lang + 0x189: 0x39108, // dropzone + 0x18a: 0x4080a, // onkeypress + 0x18b: 0x23c08, // datetime + 0x18c: 0x16204, // cols + 0x18d: 0x1, // a + 0x18e: 0x4420c, // onloadeddata + 0x190: 0xa605, // audio + 0x192: 0x2e05, // tbody + 0x193: 0x22c06, // method + 0x195: 0xf404, // loop + 0x196: 0x29606, // iframe + 0x198: 0x2d504, // head + 0x19e: 0x5f108, // manifest + 0x19f: 0xb309, // autofocus + 0x1a0: 0x14904, // code + 0x1a1: 0x55906, // strong + 0x1a2: 0x30308, // multiple + 0x1a3: 0xc05, // param + 0x1a6: 0x21107, // enctype + 0x1a7: 0x5b304, // face + 0x1a8: 0xfd09, // plaintext + 0x1a9: 0x26e02, // h1 + 0x1aa: 0x59509, // onstalled + 0x1ad: 0x3d406, // script + 0x1ae: 0x2db06, // spacer + 0x1af: 0x55108, // onresize + 0x1b0: 0x4a20b, // onmouseover + 0x1b1: 0x5cc08, // onunload + 0x1b2: 0x56708, // onseeked + 0x1b4: 0x2140d, // typemustmatch + 0x1b5: 0x1cc06, // figure + 0x1b6: 0x4950a, // onmouseout + 0x1b7: 0x25e03, // pre + 0x1b8: 0x50705, // width + 0x1b9: 0x19906, // sorted + 0x1bb: 0x5704, // nobr + 0x1be: 0x5302, // tt + 0x1bf: 0x1105, // align + 0x1c0: 0x3e607, // oninput + 0x1c3: 0x41807, // onkeyup + 0x1c6: 0x1c00c, // onafterprint + 0x1c7: 0x210e, // accept-charset + 0x1c8: 0x33c06, // itemid + 0x1c9: 0x3e809, // inputmode + 0x1cb: 0x53306, // strike + 0x1cc: 0x5a903, // sub + 0x1cd: 0x10505, // track + 0x1ce: 0x38605, // start + 0x1d0: 0xd608, // basefont + 0x1d6: 0x1aa06, // source + 0x1d7: 0x18206, // legend + 0x1d8: 0x2d405, // thead + 0x1da: 0x8c05, // tfoot + 0x1dd: 0x1ec06, // object + 0x1de: 0x6e05, // media + 0x1df: 0x1670a, // annotation + 0x1e0: 0x20d0b, // formenctype + 0x1e2: 0x3d208, // noscript + 0x1e4: 0x55505, // sizes + 0x1e5: 0x1fc0c, // autocomplete + 0x1e6: 0x9504, // span + 0x1e7: 0x9808, // noframes + 0x1e8: 0x24b06, // target + 0x1e9: 0x38f06, // ondrop + 0x1ea: 0x2b306, // applet + 0x1ec: 0x5a08, // reversed + 0x1f0: 0x2a907, // isindex + 0x1f3: 0x27008, // hreflang + 0x1f5: 0x2f302, // h5 + 0x1f6: 0x4f307, // address + 0x1fa: 0x2e103, // max + 0x1fb: 0xc30b, // placeholder + 0x1fc: 0x2f608, // textarea + 0x1fe: 0x4ad09, // onmouseup + 0x1ff: 0x3800b, // ondragstart +} + +const atomText = "abbradiogrouparamalignmarkbdialogaccept-charsetbodyaccesskey" + + "genavaluealtdetailsampatternobreversedfnoembedirnamediagroup" + + "ingasyncanvasidefaultfooterowspanoframesetitleaudionblurubya" + + "utofocusandboxmplaceholderautoplaybasefontimeupdatebdoncance" + + "labelooptgrouplaintextrackindisabledivarbgsoundlowbrbigblink" + + "blockquotebuttonabortranslatecodefercolgroupostercolorcolspa" + + "nnotation-xmlcommandraggablegendcontrolsmallcoordsortedcross" + + "originsourcefieldsetfigcaptionafterprintfigurequiredforeignO" + + "bjectforeignobjectformactionautocompleteerrorformenctypemust" + + "matchallengeformmethodformnovalidatetimeterformtargetheightm" + + "lhgroupreloadhiddenhigh1hreflanghttp-equivideoncanplaythroug" + + "h2iframeimageimglyph3isindexismappletitemscopeditemtypemarqu" + + "eematheaderspacermaxlength4minlength5mtextareadonlymultiplem" + + "utedonclickoncloseamlesspellcheckedoncontextmenuitemidoncuec" + + "hangeondblclickondragendondragenterondragleaveondragoverondr" + + "agstarticleondropzonemptiedondurationchangeonendedonerroronf" + + "ocusrcdocitempropenoscriptonhashchangeoninputmodeloninvalido" + + "nkeydownloadonkeypressrclangonkeyupublicontenteditableonlang" + + "uagechangeonloadeddatalistingonloadedmetadatabindexonloadsta" + + "rtonmessageonmousedownonmousemoveonmouseoutputonmouseoveronm" + + "ouseuponmousewheelonofflineononlineonpagehidesclassectionbef" + + "oreunloaddresshapeonpageshowidth6onpausemaponplayingonpopsta" + + "teonprogresstrikeytypeonratechangeonresetonresizestrongonscr" + + "ollonseekedonseekingonselectedonshowraponsortableonstalledon" + + "storageonsubmitemrefacenteronsuspendontoggleonunloadonvolume" + + "changeonwaitingoptimumanifestepromptoptionbeforeprintstylesu" + + "mmarysupsvgsystemplate" diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go similarity index 93% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/const.go rename to vendor/golang.org/x/net/html/const.go index d7cc8bb..52f651f 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/const.go +++ b/vendor/golang.org/x/net/html/const.go @@ -6,7 +6,7 @@ package html // Section 12.2.3.2 of the HTML5 specification says "The following elements // have varying levels of special parsing rules". -// http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#the-stack-of-open-elements +// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements var isSpecialElementMap = map[string]bool{ "address": true, "applet": true, @@ -24,7 +24,6 @@ var isSpecialElementMap = map[string]bool{ "center": true, "col": true, "colgroup": true, - "command": true, "dd": true, "details": true, "dir": true, @@ -73,17 +72,20 @@ var isSpecialElementMap = map[string]bool{ "script": true, "section": true, "select": true, + "source": true, "style": true, "summary": true, "table": true, "tbody": true, "td": true, + "template": true, "textarea": true, "tfoot": true, "th": true, "thead": true, "title": true, "tr": true, + "track": true, "ul": true, "wbr": true, "xmp": true, diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go similarity index 95% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doc.go rename to vendor/golang.org/x/net/html/doc.go index fac0f54..b453fe1 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doc.go +++ b/vendor/golang.org/x/net/html/doc.go @@ -90,8 +90,8 @@ example, to process each anchor node in depth-first order: f(doc) The relevant specifications include: -http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html and -http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html +https://html.spec.whatwg.org/multipage/syntax.html and +https://html.spec.whatwg.org/multipage/syntax.html#tokenization */ package html diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doctype.go b/vendor/golang.org/x/net/html/doctype.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/doctype.go rename to vendor/golang.org/x/net/html/doctype.go diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/entity.go b/vendor/golang.org/x/net/html/entity.go similarity index 99% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/entity.go rename to vendor/golang.org/x/net/html/entity.go index af8a007..a50c04c 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/entity.go +++ b/vendor/golang.org/x/net/html/entity.go @@ -8,7 +8,7 @@ package html const longestEntityWithoutSemicolon = 6 // entity is a map from HTML entity names to their values. The semicolon matters: -// http://www.whatwg.org/specs/web-apps/current-work/multipage/named-character-references.html +// https://html.spec.whatwg.org/multipage/syntax.html#named-character-references // lists both "amp" and "amp;" as two separate entries. // // Note that the HTML5 list is larger than the HTML4 list at diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/escape.go b/vendor/golang.org/x/net/html/escape.go similarity index 96% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/escape.go rename to vendor/golang.org/x/net/html/escape.go index 75bddff..d856139 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/escape.go +++ b/vendor/golang.org/x/net/html/escape.go @@ -12,7 +12,7 @@ import ( // These replacements permit compatibility with old numeric entities that // assumed Windows-1252 encoding. -// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#consume-a-character-reference +// https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference var replacementTable = [...]rune{ '\u20AC', // First entry is what 0x80 should be replaced with. '\u0081', @@ -55,7 +55,7 @@ var replacementTable = [...]rune{ // Precondition: b[src] == '&' && dst <= src. // attribute should be true if parsing an attribute value. func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) { - // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#consume-a-character-reference + // https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference // i starts at 1 because we already know that s[0] == '&'. i, s := 1, b[src:] diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/foreign.go rename to vendor/golang.org/x/net/html/foreign.go diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go similarity index 98% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/node.go rename to vendor/golang.org/x/net/html/node.go index e4f0712..26b657a 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/node.go +++ b/vendor/golang.org/x/net/html/node.go @@ -5,7 +5,7 @@ package html import ( - "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" + "golang.org/x/net/html/atom" ) // A NodeType is the type of a Node. diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go similarity index 97% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/parse.go rename to vendor/golang.org/x/net/html/parse.go index 3320fbf..be4b2bf 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/parse.go +++ b/vendor/golang.org/x/net/html/parse.go @@ -10,11 +10,11 @@ import ( "io" "strings" - a "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" + a "golang.org/x/net/html/atom" ) // A parser implements the HTML5 parsing algorithm: -// http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tree-construction +// https://html.spec.whatwg.org/multipage/syntax.html#tree-construction type parser struct { // tokenizer provides the tokens for the parser. tokenizer *Tokenizer @@ -59,7 +59,7 @@ func (p *parser) top() *Node { // Stop tags for use in popUntil. These come from section 12.2.3.2. var ( defaultScopeStopTags = map[string][]a.Atom{ - "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object}, + "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object, a.Template}, "math": {a.AnnotationXml, a.Mi, a.Mn, a.Mo, a.Ms, a.Mtext}, "svg": {a.Desc, a.ForeignObject, a.Title}, } @@ -1037,15 +1037,15 @@ func inBodyIM(p *parser) bool { func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { // This is the "adoption agency" algorithm, described at - // http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#adoptionAgency + // https://html.spec.whatwg.org/multipage/syntax.html#adoptionAgency // TODO: this is a fairly literal line-by-line translation of that algorithm. // Once the code successfully parses the comprehensive test suite, we should // refactor this code to be more idiomatic. - // Steps 1-3. The outer loop. + // Steps 1-4. The outer loop. for i := 0; i < 8; i++ { - // Step 4. Find the formatting element. + // Step 5. Find the formatting element. var formattingElement *Node for j := len(p.afe) - 1; j >= 0; j-- { if p.afe[j].Type == scopeMarkerNode { @@ -1070,7 +1070,7 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { return } - // Steps 5-6. Find the furthest block. + // Steps 9-10. Find the furthest block. var furthestBlock *Node for _, e := range p.oe[feIndex:] { if isSpecialElement(e) { @@ -1087,47 +1087,47 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { return } - // Steps 7-8. Find the common ancestor and bookmark node. + // Steps 11-12. Find the common ancestor and bookmark node. commonAncestor := p.oe[feIndex-1] bookmark := p.afe.index(formattingElement) - // Step 9. The inner loop. Find the lastNode to reparent. + // Step 13. The inner loop. Find the lastNode to reparent. lastNode := furthestBlock node := furthestBlock x := p.oe.index(node) - // Steps 9.1-9.3. + // Steps 13.1-13.2 for j := 0; j < 3; j++ { - // Step 9.4. + // Step 13.3. x-- node = p.oe[x] - // Step 9.5. + // Step 13.4 - 13.5. if p.afe.index(node) == -1 { p.oe.remove(node) continue } - // Step 9.6. + // Step 13.6. if node == formattingElement { break } - // Step 9.7. + // Step 13.7. clone := node.clone() p.afe[p.afe.index(node)] = clone p.oe[p.oe.index(node)] = clone node = clone - // Step 9.8. + // Step 13.8. if lastNode == furthestBlock { bookmark = p.afe.index(node) + 1 } - // Step 9.9. + // Step 13.9. if lastNode.Parent != nil { lastNode.Parent.RemoveChild(lastNode) } node.AppendChild(lastNode) - // Step 9.10. + // Step 13.10. lastNode = node } - // Step 10. Reparent lastNode to the common ancestor, + // Step 14. Reparent lastNode to the common ancestor, // or for misnested table nodes, to the foster parent. if lastNode.Parent != nil { lastNode.Parent.RemoveChild(lastNode) @@ -1139,13 +1139,13 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { commonAncestor.AppendChild(lastNode) } - // Steps 11-13. Reparent nodes from the furthest block's children + // Steps 15-17. Reparent nodes from the furthest block's children // to a clone of the formatting element. clone := formattingElement.clone() reparentChildren(clone, furthestBlock) furthestBlock.AppendChild(clone) - // Step 14. Fix up the list of active formatting elements. + // Step 18. Fix up the list of active formatting elements. if oldLoc := p.afe.index(formattingElement); oldLoc != -1 && oldLoc < bookmark { // Move the bookmark with the rest of the list. bookmark-- @@ -1153,13 +1153,15 @@ func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) { p.afe.remove(formattingElement) p.afe.insert(bookmark, clone) - // Step 15. Fix up the stack of open elements. + // Step 19. Fix up the stack of open elements. p.oe.remove(formattingElement) p.oe.insert(p.oe.index(furthestBlock)+1, clone) } } // inBodyEndTagOther performs the "any other end tag" algorithm for inBodyIM. +// "Any other end tag" handling from 12.2.5.5 The rules for parsing tokens in foreign content +// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inforeign func (p *parser) inBodyEndTagOther(tagAtom a.Atom) { for i := len(p.oe) - 1; i >= 0; i-- { if p.oe[i].DataAtom == tagAtom { diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/render.go b/vendor/golang.org/x/net/html/render.go similarity index 99% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/render.go rename to vendor/golang.org/x/net/html/render.go index 4a833b4..d34564f 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/render.go +++ b/vendor/golang.org/x/net/html/render.go @@ -14,7 +14,7 @@ import ( type writer interface { io.Writer - WriteByte(c byte) error // in Go 1.1, use io.ByteWriter + io.ByteWriter WriteString(string) (int, error) } diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/token.go b/vendor/golang.org/x/net/html/token.go similarity index 99% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/token.go rename to vendor/golang.org/x/net/html/token.go index 636ffcb..893e272 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/token.go +++ b/vendor/golang.org/x/net/html/token.go @@ -11,7 +11,7 @@ import ( "strconv" "strings" - "github.com/appc/spec/Godeps/_workspace/src/golang.org/x/net/html/atom" + "golang.org/x/net/html/atom" ) // A TokenType is the type of a Token. diff --git a/vendor/k8s.io/kubernetes/LICENSE b/vendor/k8s.io/kubernetes/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/vendor/k8s.io/kubernetes/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go b/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go similarity index 98% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go rename to vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go index 6c17cf3..2b42e04 100644 --- a/vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/quantity.go +++ b/vendor/k8s.io/kubernetes/pkg/api/resource/quantity.go @@ -23,8 +23,8 @@ import ( "regexp" "strings" - flag "github.com/appc/spec/Godeps/_workspace/src/github.com/spf13/pflag" - "github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf" + flag "github.com/spf13/pflag" + "speter.net/go/exp/math/dec/inf" ) // Quantity is a fixed-point representation of a number. @@ -301,6 +301,14 @@ func (q *Quantity) String() string { return number + string(suffix) } +func (q *Quantity) Add(y Quantity) error { + if q.Format != y.Format { + return fmt.Errorf("format mismatch: %v vs. %v", q.Format, y.Format) + } + q.Amount.Add(q.Amount, y.Amount) + return nil +} + // MarshalJSON implements the json.Marshaller interface. func (q Quantity) MarshalJSON() ([]byte, error) { return []byte(`"` + q.String() + `"`), nil diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go b/vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/k8s.io/kubernetes/pkg/api/resource/suffix.go rename to vendor/k8s.io/kubernetes/pkg/api/resource/suffix.go diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE b/vendor/speter.net/go/exp/math/dec/inf/LICENSE similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/LICENSE rename to vendor/speter.net/go/exp/math/dec/inf/LICENSE diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go b/vendor/speter.net/go/exp/math/dec/inf/dec.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/dec.go rename to vendor/speter.net/go/exp/math/dec/inf/dec.go diff --git a/vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go b/vendor/speter.net/go/exp/math/dec/inf/rounder.go similarity index 100% rename from vendor/github.com/appc/spec/Godeps/_workspace/src/speter.net/go/exp/math/dec/inf/rounder.go rename to vendor/speter.net/go/exp/math/dec/inf/rounder.go diff --git a/work/env.go b/work/env.go index 1b2aed8..15d8fa5 100644 --- a/work/env.go +++ b/work/env.go @@ -140,7 +140,7 @@ func (e *Env) loadPartials() { if ok, err := common.IsDirEmpty(e.path + PATH_TEMPLATES); ok || err != nil { return } - tmplDir, err := template.NewTemplateDir(e.path+PATH_TEMPLATES, "") + tmplDir, err := template.NewTemplateDir(e.path+PATH_TEMPLATES, "", false) if err != nil { logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Failed to load partial templating") } diff --git a/work/service-generate.go b/work/service-generate.go index 2621ef4..fd4d728 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -138,15 +138,16 @@ func (s Service) discoverPod(name common.ACFullname) ([]common.ACFullname, error app.Labels["arch"] = "amd64" } - endpoint, _, err := discovery.DiscoverEndpoints(*app, nil, false) + insecure := discovery.InsecureTLS | discovery.InsecureHTTP + endpoint, _, err := discovery.DiscoverACIEndpoints(*app, nil, insecure) if err != nil { logs.WithEF(err, podFields).Fatal("pod discovery failed") } - if len(endpoint.ACIEndpoints) == 0 { + if len(endpoint) == 0 { logs.WithF(podFields).Fatal("Discovery does not contain a url") } - url := endpoint.ACIEndpoints[0].ACI + url := endpoint[0].ACI url = strings.Replace(url, "=aci", "=pod", 1) // TODO this is nexus specific logUrl := podFields.WithField("url", url) From d807d6ff43eab28a7d4876a4413adc4f55f9748b Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 11:33:55 +0200 Subject: [PATCH 127/163] fix travus --- .travis.yml | 3 ++- gomake.cfg | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 gomake.cfg diff --git a/.travis.yml b/.travis.yml index 68a46c3..3213e4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,5 @@ install: - sudo apt-get install upx script: - - ./build.sh \ No newline at end of file + - ./gomake +fix trv \ No newline at end of file diff --git a/gomake.cfg b/gomake.cfg new file mode 100644 index 0000000..0f58eb1 --- /dev/null +++ b/gomake.cfg @@ -0,0 +1 @@ +upx=true From b4b2356fba38a852d013de33e3cb5350593fe1de Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 13:23:38 +0200 Subject: [PATCH 128/163] fix travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3213e4d..4fd9e80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,4 +8,4 @@ install: script: - ./gomake -fix trv \ No newline at end of file + From 32607bbb8ca4bc74fdb31b074adb57580ad4f263 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 17:45:16 +0200 Subject: [PATCH 129/163] use gomake to build --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 63bef57..12d6b9c 100644 --- a/main.go +++ b/main.go @@ -8,10 +8,10 @@ import ( ) var CommitHash string -var GgnVersion string -var BuildDate string +var Version string +var BuildTime string func main() { rand.Seed(time.Now().UTC().UnixNano()) - commands.Execute(CommitHash, GgnVersion, BuildDate) + commands.Execute(CommitHash, Version, BuildTime) } From 9c98063519910bc6405bf9f5882f10a1e1e17789 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 17:49:58 +0200 Subject: [PATCH 130/163] update deps --- Godeps/Godeps.json | 8 +- .../attributes-merger/attributes/inputs.go | 48 +- .../attributes-merger/attributes/merger.go | 21 +- .../dgr/bin-templater/template/templating.go | 44 ++ .../src/github.com/ugorji/go/codec/0doc.go | 20 +- .../ugorji/go/codec/fast-path.generated.go | 512 +++++++++--------- .../ugorji/go/codec/gen.generated.go | 1 + .../src/github.com/ugorji/go/codec/gen.go | 2 +- vendor/github.com/coreos/fleet/pkg/set.go | 4 +- vendor/github.com/coreos/fleet/unit/fake.go | 2 +- vendor/github.com/n0rad/go-erlog/formatter.go | 19 +- vendor/github.com/n0rad/go-erlog/logger.go | 14 +- .../github.com/n0rad/go-erlog/logs/entry.go | 1 + .../spf13/cobra/bash_completions.go | 2 +- vendor/speter.net/go/exp/math/dec/inf/dec.go | 2 +- 15 files changed, 374 insertions(+), 326 deletions(-) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a2b560e..e818811 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -48,13 +48,13 @@ }, { "ImportPath": "github.com/blablacar/dgr/bin-dgr/common", - "Comment": "70-3-gf4a45eb", - "Rev": "f4a45ebcd77f9ac4b0c586812c82c33f9aef46b3" + "Comment": "71", + "Rev": "6108cd7767e0068eabe2ff38384dfa5e03cd6dac" }, { "ImportPath": "github.com/blablacar/dgr/bin-templater/template", - "Comment": "70-3-gf4a45eb", - "Rev": "f4a45ebcd77f9ac4b0c586812c82c33f9aef46b3" + "Comment": "71", + "Rev": "6108cd7767e0068eabe2ff38384dfa5e03cd6dac" }, { "ImportPath": "github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec", diff --git a/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go b/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go index 56212b9..3d65c41 100644 --- a/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go +++ b/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go @@ -5,35 +5,35 @@ import ( ) type Inputs struct { - Directory string - Files []string + Directory string + Files []string } // constructor func NewInputs(d string) *Inputs { - in := new(Inputs) - in.Directory = d + "/" - return in + in := new(Inputs) + in.Directory = d + "/" + return in } // list input files -func (in *Inputs) ListFiles() error { - list_l1, err := ioutil.ReadDir(in.Directory) - if err != nil { - return err - } - for _, f_l1 := range list_l1 { - if f_l1.IsDir() { - list_l2, err := ioutil.ReadDir(in.Directory + "/" + f_l1.Name()) - if err != nil { - return err - } - for _, f_l2 := range list_l2 { - in.Files = append(in.Files, f_l1.Name()+"/"+f_l2.Name()) - } - } else { - in.Files = append(in.Files, f_l1.Name()) - } - } - return nil +func (in *Inputs) ListFiles() (error){ + list_l1, err := ioutil.ReadDir(in.Directory) + if err != nil{ + return err + } + for _, f_l1 := range list_l1 { + if f_l1.IsDir() { + list_l2, err := ioutil.ReadDir(in.Directory + "/" + f_l1.Name()) + if err != nil{ + return err + } + for _, f_l2 := range list_l2 { + in.Files = append(in.Files, f_l1.Name() + "/" + f_l2.Name()) + } + }else{ + in.Files = append(in.Files, f_l1.Name()) + } + } + return nil } diff --git a/vendor/github.com/blablacar/attributes-merger/attributes/merger.go b/vendor/github.com/blablacar/attributes-merger/attributes/merger.go index 630f14b..42c31c3 100644 --- a/vendor/github.com/blablacar/attributes-merger/attributes/merger.go +++ b/vendor/github.com/blablacar/attributes-merger/attributes/merger.go @@ -1,16 +1,16 @@ package attributes - import ( "encoding/json" "errors" "fmt" - "github.com/peterbourgon/mergemap" - "gopkg.in/yaml.v2" "io/ioutil" - "os" + "gopkg.in/yaml.v2" + "github.com/peterbourgon/mergemap" "strconv" + "os" ) + func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) map[string]interface{} { newMap := make(map[string]interface{}) @@ -60,6 +60,7 @@ func ProcessOverride(omap map[string]interface{}) map[string]interface{} { return omap } + func Merge(envName string, files []string) []byte { // inputDir string, // "out map" to store merged yamls omap := MergeAttributesFiles(files) @@ -86,16 +87,16 @@ func Merge(envName string, files []string) []byte { // inputDir string, // transform YAML to JSON func transform(in interface{}) (_ interface{}, err error) { switch in.(type) { - case map[interface{}]interface{}: + case map[interface{}]interface{}: o := make(map[string]interface{}) for k, v := range in.(map[interface{}]interface{}) { sk := "" switch k.(type) { - case string: + case string: sk = k.(string) - case int: + case int: sk = strconv.Itoa(k.(int)) - default: + default: return nil, errors.New( fmt.Sprintf("type not match: expect map key string or int get: %T", k)) } @@ -106,7 +107,7 @@ func transform(in interface{}) (_ interface{}, err error) { o[sk] = v } return o, nil - case []interface{}: + case []interface{}: in1 := in.([]interface{}) len1 := len(in1) o := make([]interface{}, len1) @@ -117,7 +118,7 @@ func transform(in interface{}) (_ interface{}, err error) { } } return o, nil - default: + default: return in, nil } return in, nil diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go index a765006..3a01ec8 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go @@ -3,6 +3,7 @@ package template import ( "bufio" "encoding/json" + "fmt" "github.com/leekchan/gtf" "gopkg.in/yaml.v2" "io" @@ -269,6 +270,45 @@ func sub(x, y int) int { return x - y } +func eq(args ...interface{}) bool { + if len(args) == 0 { + return false + } + x := args[0] + switch x := x.(type) { + case string, int, int64, byte, float32, float64: + for _, y := range args[1:] { + if x == y { + return true + } + } + return false + } + + for _, y := range args[1:] { + if reflect.DeepEqual(x, y) { + return true + } + } + return false +} + +type Cell struct{ v interface{} } + +func NewCell(v ...interface{}) (*Cell, error) { + switch len(v) { + case 0: + return new(Cell), nil + case 1: + return &Cell{v[0]}, nil + default: + return nil, fmt.Errorf("wrong number of args: want 0 or 1, got %v", len(v)) + } +} + +func (c *Cell) Set(v interface{}) *Cell { c.v = v; return c } +func (c *Cell) Get() interface{} { return c.v } + func init() { TemplateFunctions = make(map[string]interface{}) TemplateFunctions["base"] = path.Base @@ -284,6 +324,8 @@ func init() { TemplateFunctions["contains"] = strings.Contains TemplateFunctions["replace"] = strings.Replace TemplateFunctions["repeat"] = strings.Repeat + TemplateFunctions["hasPrefix"] = strings.HasPrefix + TemplateFunctions["hasSuffix"] = strings.HasSuffix TemplateFunctions["orDef"] = orDef TemplateFunctions["orDefs"] = orDefs TemplateFunctions["ifOrDef"] = ifOrDef @@ -303,6 +345,8 @@ func init() { TemplateFunctions["mod"] = mod TemplateFunctions["toJson"] = toJson TemplateFunctions["toYaml"] = toYaml + TemplateFunctions["cell"] = NewCell + TemplateFunctions["eq"] = eq TemplateFunctions["IsMapFirst"] = IsMapFirst TemplateFunctions["IsMapLast"] = IsMapLast diff --git a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go index fd1385b..caa7e0a 100644 --- a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/0doc.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT license found in the LICENSE file. /* -High Performance, Feature-Rich Idiomatic Go codec/encoding library for +High Performance, Feature-Rich Idiomatic Go codec/encoding library for binc, msgpack, cbor, json. Supported Serialization formats are: @@ -11,7 +11,7 @@ Supported Serialization formats are: - binc: http://github.com/ugorji/binc - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 - json: http://json.org http://tools.ietf.org/html/rfc7159 - - simple: + - simple: To install: @@ -19,7 +19,7 @@ To install: This package understands the 'unsafe' tag, to allow using unsafe semantics: - - When decoding into a struct, you need to read the field name as a string + - When decoding into a struct, you need to read the field name as a string so you can find the struct field it is mapped to. Using `unsafe` will bypass the allocation and copying overhead of []byte->string conversion. @@ -38,9 +38,9 @@ Rich Feature Set includes: - Very High Performance. Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. - Multiple conversions: - Package coerces types where appropriate + Package coerces types where appropriate e.g. decode an int in the stream into a float, etc. - - Corner Cases: + - Corner Cases: Overflows, nil maps/slices, nil values in streams are handled correctly - Standard field renaming via tags - Support for omitting empty fields during an encoding @@ -56,7 +56,7 @@ Rich Feature Set includes: - Fast (no-reflection) encoding/decoding of common maps and slices - Code-generation for faster performance. - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats - - Support indefinite-length formats to enable true streaming + - Support indefinite-length formats to enable true streaming (for formats which support it e.g. json, cbor) - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. This mostly applies to maps, where iteration order is non-deterministic. @@ -67,12 +67,12 @@ Rich Feature Set includes: - Encode/Decode from/to chan types (for iterative streaming support) - Drop-in replacement for encoding/json. `json:` key in struct tag supported. - Provides a RPC Server and Client Codec for net/rpc communication protocol. - - Handle unique idiosynchracies of codecs e.g. - - For messagepack, configure how ambiguities in handling raw bytes are resolved - - For messagepack, provide rpc server/client codec to support + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support msgpack-rpc protocol defined at: https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md - + Extension Support Users can register a function to handle the encoding or decoding of diff --git a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go index fd92fab..d968a50 100644 --- a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/fast-path.generated.go @@ -3470,7 +3470,7 @@ func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3523,7 +3523,7 @@ func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3576,7 +3576,7 @@ func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Enc v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3629,7 +3629,7 @@ func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *E v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3682,7 +3682,7 @@ func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3735,7 +3735,7 @@ func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3788,7 +3788,7 @@ func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3841,7 +3841,7 @@ func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3894,7 +3894,7 @@ func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encod v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -3947,7 +3947,7 @@ func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Enc v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4000,7 +4000,7 @@ func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *E v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4053,7 +4053,7 @@ func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *E v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4106,7 +4106,7 @@ func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *E v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4159,7 +4159,7 @@ func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4212,7 +4212,7 @@ func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4265,7 +4265,7 @@ func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Enc v2 := make([]bytesI, len(v)) var i, l int var vp *bytesI - for k2 := range v { + for k2, _ := range v { l = len(mksv) e2.MustEncode(k2) vp = &v2[i] @@ -4316,7 +4316,7 @@ func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4371,7 +4371,7 @@ func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *En if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4426,7 +4426,7 @@ func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4481,7 +4481,7 @@ func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4536,7 +4536,7 @@ func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *En if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4591,7 +4591,7 @@ func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *En if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4646,7 +4646,7 @@ func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *En if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4701,7 +4701,7 @@ func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e * if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4756,7 +4756,7 @@ func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4811,7 +4811,7 @@ func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4866,7 +4866,7 @@ func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4921,7 +4921,7 @@ func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -4976,7 +4976,7 @@ func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -5031,7 +5031,7 @@ func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e * if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -5086,7 +5086,7 @@ func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e * if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -5141,7 +5141,7 @@ func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]string, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = string(k) i++ } @@ -5195,7 +5195,7 @@ func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5241,7 +5241,7 @@ func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5287,7 +5287,7 @@ func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5333,7 +5333,7 @@ func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5379,7 +5379,7 @@ func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5425,7 +5425,7 @@ func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5471,7 +5471,7 @@ func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5517,7 +5517,7 @@ func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5563,7 +5563,7 @@ func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5609,7 +5609,7 @@ func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5655,7 +5655,7 @@ func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5701,7 +5701,7 @@ func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5747,7 +5747,7 @@ func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5793,7 +5793,7 @@ func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5839,7 +5839,7 @@ func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5885,7 +5885,7 @@ func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5931,7 +5931,7 @@ func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -5977,7 +5977,7 @@ func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6023,7 +6023,7 @@ func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6069,7 +6069,7 @@ func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6115,7 +6115,7 @@ func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6161,7 +6161,7 @@ func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6207,7 +6207,7 @@ func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e * if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6253,7 +6253,7 @@ func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6299,7 +6299,7 @@ func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6345,7 +6345,7 @@ func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6391,7 +6391,7 @@ func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6437,7 +6437,7 @@ func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6483,7 +6483,7 @@ func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *En if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6529,7 +6529,7 @@ func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6575,7 +6575,7 @@ func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6621,7 +6621,7 @@ func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]float64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = float64(k) i++ } @@ -6667,7 +6667,7 @@ func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Enc if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6713,7 +6713,7 @@ func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6759,7 +6759,7 @@ func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6805,7 +6805,7 @@ func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6851,7 +6851,7 @@ func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6897,7 +6897,7 @@ func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6943,7 +6943,7 @@ func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -6989,7 +6989,7 @@ func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7035,7 +7035,7 @@ func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7081,7 +7081,7 @@ func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7127,7 +7127,7 @@ func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7173,7 +7173,7 @@ func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7219,7 +7219,7 @@ func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7265,7 +7265,7 @@ func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7311,7 +7311,7 @@ func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7357,7 +7357,7 @@ func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7403,7 +7403,7 @@ func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *E if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7449,7 +7449,7 @@ func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7495,7 +7495,7 @@ func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7541,7 +7541,7 @@ func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7587,7 +7587,7 @@ func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7633,7 +7633,7 @@ func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7679,7 +7679,7 @@ func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7725,7 +7725,7 @@ func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7771,7 +7771,7 @@ func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7817,7 +7817,7 @@ func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7863,7 +7863,7 @@ func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7909,7 +7909,7 @@ func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -7955,7 +7955,7 @@ func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8001,7 +8001,7 @@ func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8047,7 +8047,7 @@ func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8093,7 +8093,7 @@ func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8139,7 +8139,7 @@ func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8185,7 +8185,7 @@ func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8231,7 +8231,7 @@ func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8277,7 +8277,7 @@ func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8323,7 +8323,7 @@ func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8369,7 +8369,7 @@ func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8415,7 +8415,7 @@ func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8461,7 +8461,7 @@ func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8507,7 +8507,7 @@ func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8553,7 +8553,7 @@ func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8599,7 +8599,7 @@ func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8645,7 +8645,7 @@ func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8691,7 +8691,7 @@ func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8737,7 +8737,7 @@ func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8783,7 +8783,7 @@ func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8829,7 +8829,7 @@ func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8875,7 +8875,7 @@ func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8921,7 +8921,7 @@ func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -8967,7 +8967,7 @@ func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9013,7 +9013,7 @@ func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9059,7 +9059,7 @@ func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9105,7 +9105,7 @@ func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9151,7 +9151,7 @@ func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9197,7 +9197,7 @@ func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9243,7 +9243,7 @@ func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9289,7 +9289,7 @@ func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9335,7 +9335,7 @@ func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9381,7 +9381,7 @@ func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9427,7 +9427,7 @@ func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9473,7 +9473,7 @@ func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9519,7 +9519,7 @@ func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9565,7 +9565,7 @@ func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9611,7 +9611,7 @@ func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9657,7 +9657,7 @@ func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9703,7 +9703,7 @@ func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9749,7 +9749,7 @@ func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9795,7 +9795,7 @@ func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9841,7 +9841,7 @@ func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9887,7 +9887,7 @@ func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9933,7 +9933,7 @@ func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -9979,7 +9979,7 @@ func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10025,7 +10025,7 @@ func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10071,7 +10071,7 @@ func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10117,7 +10117,7 @@ func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10163,7 +10163,7 @@ func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10209,7 +10209,7 @@ func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10255,7 +10255,7 @@ func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10301,7 +10301,7 @@ func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10347,7 +10347,7 @@ func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10393,7 +10393,7 @@ func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10439,7 +10439,7 @@ func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10485,7 +10485,7 @@ func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10531,7 +10531,7 @@ func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10577,7 +10577,7 @@ func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10623,7 +10623,7 @@ func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e * if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10669,7 +10669,7 @@ func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10715,7 +10715,7 @@ func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10761,7 +10761,7 @@ func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10807,7 +10807,7 @@ func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10853,7 +10853,7 @@ func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10899,7 +10899,7 @@ func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *En if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10945,7 +10945,7 @@ func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -10991,7 +10991,7 @@ func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -11037,7 +11037,7 @@ func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]uint64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = uint64(k) i++ } @@ -11083,7 +11083,7 @@ func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encod if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11129,7 +11129,7 @@ func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11175,7 +11175,7 @@ func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11221,7 +11221,7 @@ func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11267,7 +11267,7 @@ func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11313,7 +11313,7 @@ func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11359,7 +11359,7 @@ func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11405,7 +11405,7 @@ func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11451,7 +11451,7 @@ func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11497,7 +11497,7 @@ func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11543,7 +11543,7 @@ func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11589,7 +11589,7 @@ func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11635,7 +11635,7 @@ func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11681,7 +11681,7 @@ func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11727,7 +11727,7 @@ func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11773,7 +11773,7 @@ func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11819,7 +11819,7 @@ func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Enc if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11865,7 +11865,7 @@ func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11911,7 +11911,7 @@ func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -11957,7 +11957,7 @@ func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12003,7 +12003,7 @@ func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12049,7 +12049,7 @@ func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12095,7 +12095,7 @@ func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12141,7 +12141,7 @@ func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12187,7 +12187,7 @@ func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12233,7 +12233,7 @@ func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12279,7 +12279,7 @@ func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12325,7 +12325,7 @@ func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12371,7 +12371,7 @@ func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12417,7 +12417,7 @@ func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12463,7 +12463,7 @@ func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12509,7 +12509,7 @@ func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12555,7 +12555,7 @@ func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *E if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12601,7 +12601,7 @@ func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12647,7 +12647,7 @@ func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12693,7 +12693,7 @@ func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12739,7 +12739,7 @@ func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12785,7 +12785,7 @@ func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12831,7 +12831,7 @@ func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12877,7 +12877,7 @@ func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12923,7 +12923,7 @@ func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -12969,7 +12969,7 @@ func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13015,7 +13015,7 @@ func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13061,7 +13061,7 @@ func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13107,7 +13107,7 @@ func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13153,7 +13153,7 @@ func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13199,7 +13199,7 @@ func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13245,7 +13245,7 @@ func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13291,7 +13291,7 @@ func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *E if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13337,7 +13337,7 @@ func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13383,7 +13383,7 @@ func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13429,7 +13429,7 @@ func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13475,7 +13475,7 @@ func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13521,7 +13521,7 @@ func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13567,7 +13567,7 @@ func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13613,7 +13613,7 @@ func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13659,7 +13659,7 @@ func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13705,7 +13705,7 @@ func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13751,7 +13751,7 @@ func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13797,7 +13797,7 @@ func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13843,7 +13843,7 @@ func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13889,7 +13889,7 @@ func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13935,7 +13935,7 @@ func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -13981,7 +13981,7 @@ func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14027,7 +14027,7 @@ func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *E if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14073,7 +14073,7 @@ func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14119,7 +14119,7 @@ func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14165,7 +14165,7 @@ func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14211,7 +14211,7 @@ func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14257,7 +14257,7 @@ func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14303,7 +14303,7 @@ func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14349,7 +14349,7 @@ func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14395,7 +14395,7 @@ func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14441,7 +14441,7 @@ func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14487,7 +14487,7 @@ func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14533,7 +14533,7 @@ func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14579,7 +14579,7 @@ func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14625,7 +14625,7 @@ func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14671,7 +14671,7 @@ func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *En if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14717,7 +14717,7 @@ func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]int64, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = int64(k) i++ } @@ -14763,7 +14763,7 @@ func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Enc if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -14809,7 +14809,7 @@ func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -14855,7 +14855,7 @@ func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -14901,7 +14901,7 @@ func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -14947,7 +14947,7 @@ func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -14993,7 +14993,7 @@ func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15039,7 +15039,7 @@ func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encode if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15085,7 +15085,7 @@ func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15131,7 +15131,7 @@ func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15177,7 +15177,7 @@ func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15223,7 +15223,7 @@ func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15269,7 +15269,7 @@ func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15315,7 +15315,7 @@ func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15361,7 +15361,7 @@ func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15407,7 +15407,7 @@ func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Enco if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } @@ -15453,7 +15453,7 @@ func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { if e.h.Canonical { v2 := make([]bool, len(v)) var i int - for k := range v { + for k, _ := range v { v2[i] = bool(k) i++ } diff --git a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go index f3c1b70..fb6f4b8 100644 --- a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.generated.go @@ -169,3 +169,4 @@ if {{var "l"}} == 0 { *{{ .Varname }} = {{var "v"}} }{{end}} ` + diff --git a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go index 754672b..a075e7c 100644 --- a/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go +++ b/vendor/github.com/coreos/etcd/Godeps/_workspace/src/github.com/ugorji/go/codec/gen.go @@ -219,7 +219,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeIn } // use a sorted set of im keys, so that we can get consistent output imKeys := make([]string, 0, len(x.im)) - for k := range x.im { + for k, _ := range x.im { imKeys = append(imKeys, k) } sort.Strings(imKeys) diff --git a/vendor/github.com/coreos/fleet/pkg/set.go b/vendor/github.com/coreos/fleet/pkg/set.go index 6b8ceca..f05cdee 100644 --- a/vendor/github.com/coreos/fleet/pkg/set.go +++ b/vendor/github.com/coreos/fleet/pkg/set.go @@ -81,7 +81,7 @@ func (us *unsafeSet) Length() int { // Values returns the values of the Set in an unspecified order. func (us *unsafeSet) Values() (values []string) { values = make([]string, 0) - for val := range us.d { + for val, _ := range us.d { values = append(values, val) } return @@ -90,7 +90,7 @@ func (us *unsafeSet) Values() (values []string) { // Copy creates a new Set containing the values of the first func (us *unsafeSet) Copy() Set { cp := NewUnsafeSet() - for val := range us.d { + for val, _ := range us.d { cp.Add(val) } diff --git a/vendor/github.com/coreos/fleet/unit/fake.go b/vendor/github.com/coreos/fleet/unit/fake.go index 2ecf970..bc82352 100644 --- a/vendor/github.com/coreos/fleet/unit/fake.go +++ b/vendor/github.com/coreos/fleet/unit/fake.go @@ -56,7 +56,7 @@ func (fum *FakeUnitManager) Units() ([]string, error) { defer fum.RUnlock() lst := make([]string, 0, len(fum.u)) - for name := range fum.u { + for name, _ := range fum.u { lst = append(lst, name) } return lst, nil diff --git a/vendor/github.com/n0rad/go-erlog/formatter.go b/vendor/github.com/n0rad/go-erlog/formatter.go index 7d42408..fccd846 100644 --- a/vendor/github.com/n0rad/go-erlog/formatter.go +++ b/vendor/github.com/n0rad/go-erlog/formatter.go @@ -4,8 +4,6 @@ import ( "bytes" "fmt" "github.com/mgutz/ansi" - "github.com/n0rad/go-erlog/data" - "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "io" "runtime" @@ -13,6 +11,8 @@ import ( "strings" "sync" "time" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/data" ) var pathSkip int = 0 @@ -38,6 +38,7 @@ type ErlogWriterAppender struct { mu sync.Mutex } + func init() { _, file, _, _ := runtime.Caller(0) paths := strings.Split(file, "/") @@ -69,7 +70,7 @@ func (f *ErlogWriterAppender) Fire(event *LogEvent) { level := f.textLevel(event.Level) // isColored := isTerminal && (runtime.GOOS != "windows") - paths := strings.SplitN(event.File, "/", pathSkip+1) + paths := strings.SplitN(event.File, "/", pathSkip + 1) packagePath := event.File if len(paths) > pathSkip { @@ -110,7 +111,7 @@ func (f *ErlogWriterAppender) logError(b *bytes.Buffer, event *LogEvent) { for err := event.Err; err != nil; { if e, ok := err.(*errs.EntryError); ok { path, line := findFileAndName(e.Stack) - paths := strings.SplitN(path, "/", pathSkip+1) + paths := strings.SplitN(path, "/", pathSkip + 1) packagePath := event.File if len(paths) > pathSkip { @@ -185,13 +186,13 @@ func (f *ErlogWriterAppender) reduceFilePath(path string, max int) string { reducedSize := len(path) var buffer bytes.Buffer for i, e := range split { - if reducedSize > max && i+1 < splitlen { + if reducedSize > max && i + 1 < splitlen { buffer.WriteByte(e[0]) reducedSize -= len(e) - 1 } else { buffer.WriteString(e) } - if i+1 < splitlen { + if i + 1 < splitlen { buffer.WriteByte('/') } } @@ -268,9 +269,9 @@ func (f *ErlogWriterAppender) levelColor(level logs.Level) string { func needsQuoting(text string) bool { for _, ch := range text { if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.') { + (ch >= 'A' && ch <= 'Z') || + (ch >= '0' && ch <= '9') || + ch == '-' || ch == '.') { return false } } diff --git a/vendor/github.com/n0rad/go-erlog/logger.go b/vendor/github.com/n0rad/go-erlog/logger.go index 4643109..74f4f68 100644 --- a/vendor/github.com/n0rad/go-erlog/logger.go +++ b/vendor/github.com/n0rad/go-erlog/logger.go @@ -150,11 +150,11 @@ func (l *ErlogLogger) LogEntry(entry *logs.Entry) { func (l *ErlogLogger) GetLevel() logs.Level { return l.Level } func (l *ErlogLogger) SetLevel(level logs.Level) { l.Level = level } -func (l *ErlogLogger) IsTraceEnabled() bool { return logs.TRACE.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsDebugEnabled() bool { return logs.DEBUG.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsInfoEnabled() bool { return logs.INFO.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsWarnEnabled() bool { return logs.WARN.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsErrorEnabled() bool { return logs.ERROR.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsPanicEnabled() bool { return logs.PANIC.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsFatalEnabled() bool { return logs.FATAL.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsTraceEnabled() bool { return logs.TRACE.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsDebugEnabled() bool { return logs.DEBUG.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsInfoEnabled() bool { return logs.INFO.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsWarnEnabled() bool { return logs.WARN.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsErrorEnabled() bool { return logs.ERROR.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsPanicEnabled() bool { return logs.PANIC.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsFatalEnabled() bool { return logs.FATAL.IsEnableFor(l.Level) } func (l *ErlogLogger) IsLevelEnabled(level logs.Level) bool { return level.IsEnableFor(l.Level) } diff --git a/vendor/github.com/n0rad/go-erlog/logs/entry.go b/vendor/github.com/n0rad/go-erlog/logs/entry.go index 1d7ffa2..0eb4c13 100644 --- a/vendor/github.com/n0rad/go-erlog/logs/entry.go +++ b/vendor/github.com/n0rad/go-erlog/logs/entry.go @@ -49,6 +49,7 @@ func WithE(err error) *Entry { return WithError(err) } + /////////////////////////////////// func (e *Entry) WithFields(data data.Fields) *Entry { diff --git a/vendor/github.com/spf13/cobra/bash_completions.go b/vendor/github.com/spf13/cobra/bash_completions.go index 321f90f..3a421bc 100644 --- a/vendor/github.com/spf13/cobra/bash_completions.go +++ b/vendor/github.com/spf13/cobra/bash_completions.go @@ -275,7 +275,7 @@ func writeRequiredFlag(cmd *Command, out *bytes.Buffer) { fmt.Fprintf(out, " must_have_one_flag=()\n") flags := cmd.NonInheritedFlags() flags.VisitAll(func(flag *pflag.Flag) { - for key := range flag.Annotations { + for key, _ := range flag.Annotations { switch key { case BashCompOneRequiredFlag: format := " must_have_one_flag+=(\"--%s" diff --git a/vendor/speter.net/go/exp/math/dec/inf/dec.go b/vendor/speter.net/go/exp/math/dec/inf/dec.go index ffaa4cd..d17ad94 100644 --- a/vendor/speter.net/go/exp/math/dec/inf/dec.go +++ b/vendor/speter.net/go/exp/math/dec/inf/dec.go @@ -104,7 +104,7 @@ var bigInt = [...]*big.Int{ var exp10cache [64]big.Int = func() [64]big.Int { e10, e10i := [64]big.Int{}, bigInt[1] - for i := range e10 { + for i, _ := range e10 { e10[i].Set(e10i) e10i = new(big.Int).Mul(e10i, bigInt[10]) } From faf787ff5499034936a28c8ad3717ea394ab903e Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 18:36:26 +0200 Subject: [PATCH 131/163] update gomake --- gomake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gomake b/gomake index 560c06b..2ad2d06 100755 --- a/gomake +++ b/gomake @@ -76,15 +76,14 @@ build() { for e in "${current[@]}"; do echo_green "Building $e" - GOOS="${e%-*}" GOARCH="${e#*-}" \ - $(cd ${work_path} && godep go build -ldflags "-X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.Version=${version}-`git rev-parse --short HEAD`" \ + $(cd ${work_path} && GOOS="${e%-*}" GOARCH="${e#*-}" godep go build -ldflags "-X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.Version=${version}-`git rev-parse --short HEAD`" \ -o ${target_name}/${app}-v${version}-${e}/${app}) if [ ${upx} ]; then - if [ "${e%-*}" != "darwin" ]; then +# if [ "${e%-*}" != "darwin" ]; then echo_green "Compressing ${e}" upx ${work_path}/${target_name}/${app}-v${version}-${e}/${app} &> /dev/null - fi +# fi fi if [ "${e%-*}" == "windows" ]; then From b33e6b61944ba128d82ca0fc6e4ba03f63462e00 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 4 Jul 2016 18:45:11 +0200 Subject: [PATCH 132/163] update gomake --- gomake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gomake b/gomake index 2ad2d06..1464902 100755 --- a/gomake +++ b/gomake @@ -76,14 +76,12 @@ build() { for e in "${current[@]}"; do echo_green "Building $e" - $(cd ${work_path} && GOOS="${e%-*}" GOARCH="${e#*-}" godep go build -ldflags "-X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.Version=${version}-`git rev-parse --short HEAD`" \ + $(cd ${work_path} && GOOS="${e%-*}" GOARCH="${e#*-}" godep go build -ldflags "-s -w -X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.Version=${version}-`git rev-parse --short HEAD`" \ -o ${target_name}/${app}-v${version}-${e}/${app}) if [ ${upx} ]; then -# if [ "${e%-*}" != "darwin" ]; then - echo_green "Compressing ${e}" - upx ${work_path}/${target_name}/${app}-v${version}-${e}/${app} &> /dev/null -# fi + echo_green "Compressing ${e}" + upx ${work_path}/${target_name}/${app}-v${version}-${e}/${app} &> /dev/null fi if [ "${e%-*}" == "windows" ]; then From aa939d2722c2bc4c8099fc0ab1ccdb44cebd6f11 Mon Sep 17 00:00:00 2001 From: "n.bouteillier" <n.bouteillier@blablacar.com> Date: Wed, 5 Oct 2016 11:53:36 +0200 Subject: [PATCH 133/163] Char Escape. --- gomake | 2 +- .../attributes-merger/attributes/inputs.go | 48 +++++++++---------- .../attributes-merger/attributes/merger.go | 21 ++++---- vendor/github.com/n0rad/go-erlog/formatter.go | 19 ++++---- vendor/github.com/n0rad/go-erlog/logger.go | 14 +++--- .../github.com/n0rad/go-erlog/logs/entry.go | 1 - work/unit-generate.go | 23 ++++++++- 7 files changed, 73 insertions(+), 55 deletions(-) diff --git a/gomake b/gomake index 1464902..f010bb0 100755 --- a/gomake +++ b/gomake @@ -67,7 +67,7 @@ build() { [ ! -z ${version+x} ] || version="0" [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep - [ -f /usr/bin/upx ] || (echo "upx is required to build" && exit 1) + [ -f $(which upx) ] || (echo "upx is required to build" && exit 1) echo_green "Save Dependencies" godep save ./${work_path}/... || echo_yellow "Cannot save dependencies. Continuing" diff --git a/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go b/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go index 3d65c41..56212b9 100644 --- a/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go +++ b/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go @@ -5,35 +5,35 @@ import ( ) type Inputs struct { - Directory string - Files []string + Directory string + Files []string } // constructor func NewInputs(d string) *Inputs { - in := new(Inputs) - in.Directory = d + "/" - return in + in := new(Inputs) + in.Directory = d + "/" + return in } // list input files -func (in *Inputs) ListFiles() (error){ - list_l1, err := ioutil.ReadDir(in.Directory) - if err != nil{ - return err - } - for _, f_l1 := range list_l1 { - if f_l1.IsDir() { - list_l2, err := ioutil.ReadDir(in.Directory + "/" + f_l1.Name()) - if err != nil{ - return err - } - for _, f_l2 := range list_l2 { - in.Files = append(in.Files, f_l1.Name() + "/" + f_l2.Name()) - } - }else{ - in.Files = append(in.Files, f_l1.Name()) - } - } - return nil +func (in *Inputs) ListFiles() error { + list_l1, err := ioutil.ReadDir(in.Directory) + if err != nil { + return err + } + for _, f_l1 := range list_l1 { + if f_l1.IsDir() { + list_l2, err := ioutil.ReadDir(in.Directory + "/" + f_l1.Name()) + if err != nil { + return err + } + for _, f_l2 := range list_l2 { + in.Files = append(in.Files, f_l1.Name()+"/"+f_l2.Name()) + } + } else { + in.Files = append(in.Files, f_l1.Name()) + } + } + return nil } diff --git a/vendor/github.com/blablacar/attributes-merger/attributes/merger.go b/vendor/github.com/blablacar/attributes-merger/attributes/merger.go index 42c31c3..630f14b 100644 --- a/vendor/github.com/blablacar/attributes-merger/attributes/merger.go +++ b/vendor/github.com/blablacar/attributes-merger/attributes/merger.go @@ -1,16 +1,16 @@ package attributes + import ( "encoding/json" "errors" "fmt" - "io/ioutil" - "gopkg.in/yaml.v2" "github.com/peterbourgon/mergemap" - "strconv" + "gopkg.in/yaml.v2" + "io/ioutil" "os" + "strconv" ) - func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) map[string]interface{} { newMap := make(map[string]interface{}) @@ -60,7 +60,6 @@ func ProcessOverride(omap map[string]interface{}) map[string]interface{} { return omap } - func Merge(envName string, files []string) []byte { // inputDir string, // "out map" to store merged yamls omap := MergeAttributesFiles(files) @@ -87,16 +86,16 @@ func Merge(envName string, files []string) []byte { // inputDir string, // transform YAML to JSON func transform(in interface{}) (_ interface{}, err error) { switch in.(type) { - case map[interface{}]interface{}: + case map[interface{}]interface{}: o := make(map[string]interface{}) for k, v := range in.(map[interface{}]interface{}) { sk := "" switch k.(type) { - case string: + case string: sk = k.(string) - case int: + case int: sk = strconv.Itoa(k.(int)) - default: + default: return nil, errors.New( fmt.Sprintf("type not match: expect map key string or int get: %T", k)) } @@ -107,7 +106,7 @@ func transform(in interface{}) (_ interface{}, err error) { o[sk] = v } return o, nil - case []interface{}: + case []interface{}: in1 := in.([]interface{}) len1 := len(in1) o := make([]interface{}, len1) @@ -118,7 +117,7 @@ func transform(in interface{}) (_ interface{}, err error) { } } return o, nil - default: + default: return in, nil } return in, nil diff --git a/vendor/github.com/n0rad/go-erlog/formatter.go b/vendor/github.com/n0rad/go-erlog/formatter.go index fccd846..7d42408 100644 --- a/vendor/github.com/n0rad/go-erlog/formatter.go +++ b/vendor/github.com/n0rad/go-erlog/formatter.go @@ -4,6 +4,8 @@ import ( "bytes" "fmt" "github.com/mgutz/ansi" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "io" "runtime" @@ -11,8 +13,6 @@ import ( "strings" "sync" "time" - "github.com/n0rad/go-erlog/errs" - "github.com/n0rad/go-erlog/data" ) var pathSkip int = 0 @@ -38,7 +38,6 @@ type ErlogWriterAppender struct { mu sync.Mutex } - func init() { _, file, _, _ := runtime.Caller(0) paths := strings.Split(file, "/") @@ -70,7 +69,7 @@ func (f *ErlogWriterAppender) Fire(event *LogEvent) { level := f.textLevel(event.Level) // isColored := isTerminal && (runtime.GOOS != "windows") - paths := strings.SplitN(event.File, "/", pathSkip + 1) + paths := strings.SplitN(event.File, "/", pathSkip+1) packagePath := event.File if len(paths) > pathSkip { @@ -111,7 +110,7 @@ func (f *ErlogWriterAppender) logError(b *bytes.Buffer, event *LogEvent) { for err := event.Err; err != nil; { if e, ok := err.(*errs.EntryError); ok { path, line := findFileAndName(e.Stack) - paths := strings.SplitN(path, "/", pathSkip + 1) + paths := strings.SplitN(path, "/", pathSkip+1) packagePath := event.File if len(paths) > pathSkip { @@ -186,13 +185,13 @@ func (f *ErlogWriterAppender) reduceFilePath(path string, max int) string { reducedSize := len(path) var buffer bytes.Buffer for i, e := range split { - if reducedSize > max && i + 1 < splitlen { + if reducedSize > max && i+1 < splitlen { buffer.WriteByte(e[0]) reducedSize -= len(e) - 1 } else { buffer.WriteString(e) } - if i + 1 < splitlen { + if i+1 < splitlen { buffer.WriteByte('/') } } @@ -269,9 +268,9 @@ func (f *ErlogWriterAppender) levelColor(level logs.Level) string { func needsQuoting(text string) bool { for _, ch := range text { if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.') { + (ch >= 'A' && ch <= 'Z') || + (ch >= '0' && ch <= '9') || + ch == '-' || ch == '.') { return false } } diff --git a/vendor/github.com/n0rad/go-erlog/logger.go b/vendor/github.com/n0rad/go-erlog/logger.go index 74f4f68..4643109 100644 --- a/vendor/github.com/n0rad/go-erlog/logger.go +++ b/vendor/github.com/n0rad/go-erlog/logger.go @@ -150,11 +150,11 @@ func (l *ErlogLogger) LogEntry(entry *logs.Entry) { func (l *ErlogLogger) GetLevel() logs.Level { return l.Level } func (l *ErlogLogger) SetLevel(level logs.Level) { l.Level = level } -func (l *ErlogLogger) IsTraceEnabled() bool { return logs.TRACE.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsDebugEnabled() bool { return logs.DEBUG.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsInfoEnabled() bool { return logs.INFO.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsWarnEnabled() bool { return logs.WARN.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsErrorEnabled() bool { return logs.ERROR.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsPanicEnabled() bool { return logs.PANIC.IsEnableFor(l.Level) } -func (l *ErlogLogger) IsFatalEnabled() bool { return logs.FATAL.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsTraceEnabled() bool { return logs.TRACE.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsDebugEnabled() bool { return logs.DEBUG.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsInfoEnabled() bool { return logs.INFO.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsWarnEnabled() bool { return logs.WARN.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsErrorEnabled() bool { return logs.ERROR.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsPanicEnabled() bool { return logs.PANIC.IsEnableFor(l.Level) } +func (l *ErlogLogger) IsFatalEnabled() bool { return logs.FATAL.IsEnableFor(l.Level) } func (l *ErlogLogger) IsLevelEnabled(level logs.Level) bool { return level.IsEnableFor(l.Level) } diff --git a/vendor/github.com/n0rad/go-erlog/logs/entry.go b/vendor/github.com/n0rad/go-erlog/logs/entry.go index 0eb4c13..1d7ffa2 100644 --- a/vendor/github.com/n0rad/go-erlog/logs/entry.go +++ b/vendor/github.com/n0rad/go-erlog/logs/entry.go @@ -49,7 +49,6 @@ func WithE(err error) *Entry { return WithError(err) } - /////////////////////////////////// func (e *Entry) WithFields(data data.Fields) *Entry { diff --git a/work/unit-generate.go b/work/unit-generate.go index 402cfe5..497cdec 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -38,7 +38,7 @@ func (u *Unit) Generate(tmpl *template.Templating) error { if err != nil { logs.WithEF(err, u.Fields).Panic("Cannot marshall attributes") } - res := strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + res := strings.Replace(string(out), "\\\"", "\\\\\\\\\"", -1) res = strings.Replace(res, "'", "\\'", -1) data["attributes"] = res @@ -71,9 +71,20 @@ func (u Unit) GenerateAttributes() map[string]interface{} { func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { var envAttr bytes.Buffer var envAttrVars bytes.Buffer + var forbidenSplitChar []string + var shouldSplit bool + + forbidenSplitChar = []string{`:`, `"`, `,`, `'`} num := 0 for i, c := range data["attributes"].(string) { if i%1950 == 0 { + shouldSplit = true + } + if stringInSlice(string(c), forbidenSplitChar) && i%1950 < 49 { + envAttr.WriteRune(c) + continue + } + if shouldSplit { if num != 0 { envAttr.WriteString("'\n") } @@ -83,6 +94,7 @@ func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { envAttrVars.WriteString("${ATTR_") envAttrVars.WriteString(strconv.Itoa(num)) envAttrVars.WriteString("}") + shouldSplit = false num++ } envAttr.WriteRune(c) @@ -92,3 +104,12 @@ func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { data["environmentAttributes"] = envAttr.String() data["environmentAttributesVars"] = envAttrVars.String() } + +func stringInSlice(a string, list []string) bool { + for _, b := range list { + if b == a { + return true + } + } + return false +} From cb65738c39ba578d47bb471933d74c65c15ccc91 Mon Sep 17 00:00:00 2001 From: "n.bouteillier" <n.bouteillier@blablacar.com> Date: Wed, 5 Oct 2016 11:53:36 +0200 Subject: [PATCH 134/163] Char Escape. --- work/unit-generate.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/work/unit-generate.go b/work/unit-generate.go index 497cdec..2152766 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -38,8 +38,10 @@ func (u *Unit) Generate(tmpl *template.Templating) error { if err != nil { logs.WithEF(err, u.Fields).Panic("Cannot marshall attributes") } - res := strings.Replace(string(out), "\\\"", "\\\\\\\\\"", -1) - res = strings.Replace(res, "'", "\\'", -1) + res := strings.Replace(string(out), "\\\"", `\\\"`, -1) + res = strings.Replace(res, "'", `\\'`, -1) + res = strings.Replace(res, `"\\\"`, `"\\\\\\"`, -1) + res = strings.Replace(res, `\\\""`, `\\\\\\""`, -1) data["attributes"] = res u.prepareEnvironmentAttributes(data) @@ -71,16 +73,16 @@ func (u Unit) GenerateAttributes() map[string]interface{} { func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { var envAttr bytes.Buffer var envAttrVars bytes.Buffer - var forbidenSplitChar []string + var forbiddenSplitChar []string var shouldSplit bool - forbidenSplitChar = []string{`:`, `"`, `,`, `'`} + forbiddenSplitChar = []string{`:`, `"`, `,`, `'`, `\`} num := 0 for i, c := range data["attributes"].(string) { if i%1950 == 0 { shouldSplit = true } - if stringInSlice(string(c), forbidenSplitChar) && i%1950 < 49 { + if stringInSlice(string(c), forbiddenSplitChar) && i%1950 < 49 { envAttr.WriteRune(c) continue } From 4e7fb58b35fa9cc38b459784e3eff61a9d84a037 Mon Sep 17 00:00:00 2001 From: "n.bouteillier" <n.bouteillier@blablacar.com> Date: Mon, 17 Oct 2016 19:38:23 +0200 Subject: [PATCH 135/163] Generate Base64 attr.. --- work/unit-generate.go | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/work/unit-generate.go b/work/unit-generate.go index 2152766..e48f920 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -11,6 +11,7 @@ import ( "os" "strconv" "strings" + "encoding/base64" ) func (u *Unit) Generate(tmpl *template.Templating) error { @@ -38,13 +39,13 @@ func (u *Unit) Generate(tmpl *template.Templating) error { if err != nil { logs.WithEF(err, u.Fields).Panic("Cannot marshall attributes") } - res := strings.Replace(string(out), "\\\"", `\\\"`, -1) + res := strings.Replace(string(out), "\\\"", `\x5c\x22`, -1) res = strings.Replace(res, "'", `\\'`, -1) - res = strings.Replace(res, `"\\\"`, `"\\\\\\"`, -1) - res = strings.Replace(res, `\\\""`, `\\\\\\""`, -1) data["attributes"] = res + data["attributesBase64"] = "base64,"+ base64.StdEncoding.EncodeToString([]byte(out)) - u.prepareEnvironmentAttributes(data) + data["environmentAttributes"],data["environmentAttributesVars"] = u.prepareEnvironmentAttributes(data["attributes"].(string),"ATTR_") + data["environmentAttributesBase64"] ,data["environmentAttributesVarsBase64"] = u.prepareEnvironmentAttributes( data["attributesBase64"].(string),"ATTR_BASE64_") var b bytes.Buffer err = tmpl.Execute(&b, data) @@ -70,15 +71,14 @@ func (u Unit) GenerateAttributes() map[string]interface{} { return data } -func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { +func (u Unit) prepareEnvironmentAttributes(data string,attrName string) (string,string){ var envAttr bytes.Buffer var envAttrVars bytes.Buffer - var forbiddenSplitChar []string + var forbiddenSplitChar = []string{`:`, `.`, `"`, `,`, `'`, `*`} var shouldSplit bool - forbiddenSplitChar = []string{`:`, `"`, `,`, `'`, `\`} num := 0 - for i, c := range data["attributes"].(string) { + for i, c := range data { if i%1950 == 0 { shouldSplit = true } @@ -90,11 +90,12 @@ func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { if num != 0 { envAttr.WriteString("'\n") } - envAttr.WriteString("Environment='ATTR_") - envAttr.WriteString(strconv.Itoa(num)) + attrIndex := strconv.Itoa(num) + envAttr.WriteString("Environment='"+attrName) + envAttr.WriteString(attrIndex) envAttr.WriteString("=") - envAttrVars.WriteString("${ATTR_") - envAttrVars.WriteString(strconv.Itoa(num)) + envAttrVars.WriteString("${"+attrName) + envAttrVars.WriteString(attrIndex) envAttrVars.WriteString("}") shouldSplit = false num++ @@ -102,9 +103,7 @@ func (u Unit) prepareEnvironmentAttributes(data map[string]interface{}) { envAttr.WriteRune(c) } envAttr.WriteString("'\n") - - data["environmentAttributes"] = envAttr.String() - data["environmentAttributesVars"] = envAttrVars.String() + return envAttr.String(),envAttrVars.String() } func stringInSlice(a string, list []string) bool { From eae447945dd9398909ed5e6e28b362b81e929869 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Tue, 18 Oct 2016 11:20:51 +0200 Subject: [PATCH 136/163] fmt --- work/unit-generate.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/work/unit-generate.go b/work/unit-generate.go index e48f920..580010c 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -2,6 +2,7 @@ package work import ( "bytes" + "encoding/base64" "encoding/json" "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/utils" @@ -11,7 +12,6 @@ import ( "os" "strconv" "strings" - "encoding/base64" ) func (u *Unit) Generate(tmpl *template.Templating) error { @@ -42,10 +42,10 @@ func (u *Unit) Generate(tmpl *template.Templating) error { res := strings.Replace(string(out), "\\\"", `\x5c\x22`, -1) res = strings.Replace(res, "'", `\\'`, -1) data["attributes"] = res - data["attributesBase64"] = "base64,"+ base64.StdEncoding.EncodeToString([]byte(out)) + data["attributesBase64"] = "base64," + base64.StdEncoding.EncodeToString([]byte(out)) - data["environmentAttributes"],data["environmentAttributesVars"] = u.prepareEnvironmentAttributes(data["attributes"].(string),"ATTR_") - data["environmentAttributesBase64"] ,data["environmentAttributesVarsBase64"] = u.prepareEnvironmentAttributes( data["attributesBase64"].(string),"ATTR_BASE64_") + data["environmentAttributes"], data["environmentAttributesVars"] = u.prepareEnvironmentAttributes(data["attributes"].(string), "ATTR_") + data["environmentAttributesBase64"], data["environmentAttributesVarsBase64"] = u.prepareEnvironmentAttributes(data["attributesBase64"].(string), "ATTR_BASE64_") var b bytes.Buffer err = tmpl.Execute(&b, data) @@ -71,7 +71,7 @@ func (u Unit) GenerateAttributes() map[string]interface{} { return data } -func (u Unit) prepareEnvironmentAttributes(data string,attrName string) (string,string){ +func (u Unit) prepareEnvironmentAttributes(data string, attrName string) (string, string) { var envAttr bytes.Buffer var envAttrVars bytes.Buffer var forbiddenSplitChar = []string{`:`, `.`, `"`, `,`, `'`, `*`} @@ -91,10 +91,10 @@ func (u Unit) prepareEnvironmentAttributes(data string,attrName string) (string, envAttr.WriteString("'\n") } attrIndex := strconv.Itoa(num) - envAttr.WriteString("Environment='"+attrName) + envAttr.WriteString("Environment='" + attrName) envAttr.WriteString(attrIndex) envAttr.WriteString("=") - envAttrVars.WriteString("${"+attrName) + envAttrVars.WriteString("${" + attrName) envAttrVars.WriteString(attrIndex) envAttrVars.WriteString("}") shouldSplit = false @@ -103,7 +103,7 @@ func (u Unit) prepareEnvironmentAttributes(data string,attrName string) (string, envAttr.WriteRune(c) } envAttr.WriteString("'\n") - return envAttr.String(),envAttrVars.String() + return envAttr.String(), envAttrVars.String() } func stringInSlice(a string, list []string) bool { From a2ad41cb98553cc301095fa360c30fcfe5c8f2b9 Mon Sep 17 00:00:00 2001 From: "n.bouteillier" <n.bouteillier@blablacar.com> Date: Tue, 18 Oct 2016 18:15:43 +0200 Subject: [PATCH 137/163] Fix \ at env split Times. && add = as a forbiden Split char. --- work/unit-generate.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/work/unit-generate.go b/work/unit-generate.go index 580010c..a01928b 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -74,17 +74,21 @@ func (u Unit) GenerateAttributes() map[string]interface{} { func (u Unit) prepareEnvironmentAttributes(data string, attrName string) (string, string) { var envAttr bytes.Buffer var envAttrVars bytes.Buffer - var forbiddenSplitChar = []string{`:`, `.`, `"`, `,`, `'`, `*`} + var forbiddenSplitChar = []string{`:`, `.`, `"`, `,`, `'`, `*`, `=`, `\`} var shouldSplit bool num := 0 for i, c := range data { + y := i + charBuffer := string(c) + if i%1950 == 0 { shouldSplit = true } - if stringInSlice(string(c), forbiddenSplitChar) && i%1950 < 49 { - envAttr.WriteRune(c) - continue + for y > 1 && (stringInSlice(string(data[y]), forbiddenSplitChar) || stringInSlice(string(data[y-1]), forbiddenSplitChar)) && shouldSplit { + envAttr.Truncate(envAttr.Len() - 1) + charBuffer = string(data[y-1]) + charBuffer + y-- } if shouldSplit { if num != 0 { @@ -100,7 +104,7 @@ func (u Unit) prepareEnvironmentAttributes(data string, attrName string) (string shouldSplit = false num++ } - envAttr.WriteRune(c) + envAttr.WriteString(charBuffer) } envAttr.WriteString("'\n") return envAttr.String(), envAttrVars.String() From 4e8003721b9735a190927cd802d216a51d73326b Mon Sep 17 00:00:00 2001 From: "n.bouteillier" <n.bouteillier@blablacar.com> Date: Wed, 26 Oct 2016 16:34:12 +0200 Subject: [PATCH 138/163] Fix issue with double \ on old systemd. - use base64 for >229 :disappointed: --- work/unit-generate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/work/unit-generate.go b/work/unit-generate.go index a01928b..ebf09a5 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -39,8 +39,8 @@ func (u *Unit) Generate(tmpl *template.Templating) error { if err != nil { logs.WithEF(err, u.Fields).Panic("Cannot marshall attributes") } - res := strings.Replace(string(out), "\\\"", `\x5c\x22`, -1) - res = strings.Replace(res, "'", `\\'`, -1) + res := strings.Replace(string(out), "\\\"", "\\\\\\\"", -1) + res = strings.Replace(res, "'", `\'`, -1) data["attributes"] = res data["attributesBase64"] = "base64," + base64.StdEncoding.EncodeToString([]byte(out)) From 0d4be6107348f93641e7ce9700cdc86404f154f6 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Sun, 6 Nov 2016 23:00:03 +0100 Subject: [PATCH 139/163] fmt & follow env link --- commands/genautocomplete.go | 3 ++- commands/ggn.go | 5 ++-- commands/prepare-service.go | 7 +++--- commands/version.go | 3 ++- ggn/home.go | 7 +++--- gomake | 50 ++++++++++++++++++++++++++++++------- main.go | 5 ++-- utils/attribute-files.go | 3 ++- work/env-check.go | 3 ++- work/env-list-units.go | 3 ++- work/env.go | 15 +++++------ work/service-check.go | 3 ++- work/service-generate.go | 7 +++--- work/service-update.go | 5 ++-- work/service.go | 11 ++++---- work/unit-command.go | 3 ++- work/unit-generate.go | 9 ++++--- work/unit.go | 4 ++- work/work.go | 20 +++++++++++++-- 19 files changed, 116 insertions(+), 50 deletions(-) diff --git a/commands/genautocomplete.go b/commands/genautocomplete.go index 13f8ec7..e3b150a 100644 --- a/commands/genautocomplete.go +++ b/commands/genautocomplete.go @@ -1,11 +1,12 @@ package commands import ( + "os" + "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/work" "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" - "os" ) var autocompleteTarget string diff --git a/commands/ggn.go b/commands/ggn.go index 4db38ca..543f464 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -3,6 +3,9 @@ package commands import ( "bufio" "fmt" + "os" + "strings" + "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/work" @@ -10,8 +13,6 @@ import ( "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" "github.com/spf13/pflag" - "os" - "strings" ) const FLEET_SUPPORTED_VERSION = "0.11.5" diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 3208c21..6da59a2 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -1,12 +1,13 @@ package commands import ( - "github.com/blablacar/ggn/work" - "github.com/n0rad/go-erlog/logs" - "github.com/spf13/cobra" "os" "strings" "time" + + "github.com/blablacar/ggn/work" + "github.com/n0rad/go-erlog/logs" + "github.com/spf13/cobra" ) func prepareServiceCommands(service *work.Service) *cobra.Command { diff --git a/commands/version.go b/commands/version.go index 7ed4b32..a770cf7 100644 --- a/commands/version.go +++ b/commands/version.go @@ -2,8 +2,9 @@ package commands import ( "fmt" - "github.com/spf13/cobra" "os" + + "github.com/spf13/cobra" ) var versionCmd = &cobra.Command{ diff --git a/ggn/home.go b/ggn/home.go index 9b3863d..70d5346 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -1,13 +1,14 @@ package ggn import ( + "io/ioutil" + "os" + "time" + "github.com/ghodss/yaml" "github.com/mitchellh/go-homedir" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" - "io/ioutil" - "os" - "time" ) type Config struct { diff --git a/gomake b/gomake index f010bb0..e2937d6 100755 --- a/gomake +++ b/gomake @@ -31,9 +31,21 @@ Usage: gomake [-v version][-t token] command... -W, --work-path=path set working path, default is ./ EOF +go_files=`find . -name '*.go' 2> /dev/null | grep -v ${target_name}/ | grep -v vendor/ | grep -v .git` +err_count=0 + +#color_red() { +# echo -n -e "\e[0;31m" +#} +# +#color_reset() { +# echo -n -e "\e[0m" +#} echo_red() { - echo -e "\e[0;31m${@}\e[0m" + echo -n -e "\e[0;31m" + echo "${@}" + echo -n -e "\e[0m" } echo_purple() { @@ -48,6 +60,11 @@ echo_yellow() { echo -e "\e[0;93m${@}\e[0m" } +err_count() { + c=$(echo -e "${1}" | wc -l) + ((err_count+=${c})) +} + gomake_update() { echo_green "Downloading gomake" wget -q -O ${work_path}/gomake.tmp https://raw.githubusercontent.com/n0rad/gomake/master/gomake @@ -66,11 +83,26 @@ build() { [ -z "$1" ] || osarchi="$1" [ ! -z ${version+x} ] || version="0" - [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep - [ -f $(which upx) ] || (echo "upx is required to build" && exit 1) + mkdir -p ${work_path}/${target_name}/bindata + + if [ `type -t pre-build`"" == 'function' ]; then + pre-build + fi + + [ -f /usr/bin/upx ] || (echo "upx is required to build" && exit 1) + + echo_green "Goimports" + [ -f ${GOPATH}/bin/goimports ] || go get -u golang.org/x/tools/cmd/goimports + goimports -w ${go_files} - echo_green "Save Dependencies" - godep save ./${work_path}/... || echo_yellow "Cannot save dependencies. Continuing" +# echo_green "Save Dependencies" +# [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep +# godep save ./${work_path}/... || echo_yellow "Cannot save dependencies. Continuing" + + if [ "$(ls -A ${work_path}/${target_name}/bindata)" ]; then + [ -f ${GOPATH}/bin/go-bindata ] || go get -u github.com/jteeuwen/go-bindata/... + go-bindata -nomemcopy -pkg dist -prefix dist/bindata -o ${work_path}/${target_name}/bindata.go ${work_path}/${target_name}/bindata/... + fi IFS=',' read -ra current <<< "$osarchi" for e in "${current[@]}"; do @@ -101,8 +133,6 @@ quality() { start=`date +%s` cd ${work_path} - go_files=`find . -name '*.go' 2> /dev/null | grep -v ${target_name}/ | grep -v vendor/ | grep -v .git` - echo_green "Format" gofmt -w -s ${go_files} @@ -111,7 +141,9 @@ quality() { echo_green "Err check" [ -f ${GOPATH}/bin/errcheck ] || go get -u github.com/kisielk/errcheck - errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go' + res=$(errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go') + err_count "${res}" + echo_red "${res}" echo_green "Lint" [ -f ${GOPATH}/bin/golint ] || go get -u github.com/golang/lint/golint @@ -253,7 +285,7 @@ fi command_count=0 for i in "${commands[@]}"; do case ${i} in - test|build|release|clean|quality|gomake_update) ${i}; ((++command_count));; + test|build|release|clean|quality|gomake_update|install) ${i}; ((++command_count));; *) echo_red "Unknown command '${i}'"; echo ${helper}; exit 1;; esac done diff --git a/main.go b/main.go index 12d6b9c..2be3467 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,11 @@ package main import ( - "github.com/blablacar/ggn/commands" - _ "github.com/n0rad/go-erlog/register" "math/rand" "time" + + "github.com/blablacar/ggn/commands" + _ "github.com/n0rad/go-erlog/register" ) var CommitHash string diff --git a/utils/attribute-files.go b/utils/attribute-files.go index a478f25..b71522c 100644 --- a/utils/attribute-files.go +++ b/utils/attribute-files.go @@ -1,9 +1,10 @@ package utils import ( + "strings" + "github.com/blablacar/attributes-merger/attributes" "github.com/google/cadvisor/utils" - "strings" ) func AttributeFiles(path string) ([]string, error) { diff --git a/work/env-check.go b/work/env-check.go index ac360cd..e68c83e 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -1,8 +1,9 @@ package work import ( - "github.com/n0rad/go-erlog/logs" "sync" + + "github.com/n0rad/go-erlog/logs" ) func (e Env) Check() { diff --git a/work/env-list-units.go b/work/env-list-units.go index f50103c..07ecdf4 100644 --- a/work/env-list-units.go +++ b/work/env-list-units.go @@ -2,9 +2,10 @@ package work import ( "bufio" - "github.com/n0rad/go-erlog/logs" "strings" "sync" + + "github.com/n0rad/go-erlog/logs" ) var statusCache map[string]UnitStatus diff --git a/work/env.go b/work/env.go index 15d8fa5..118fe8c 100644 --- a/work/env.go +++ b/work/env.go @@ -2,6 +2,14 @@ package work import ( "fmt" + "io/ioutil" + "math/rand" + "os" + "strings" + "sync" + txttmpl "text/template" + "time" + "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/dgr/bin-templater/template" @@ -12,13 +20,6 @@ import ( "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" "gopkg.in/yaml.v2" - "io/ioutil" - "math/rand" - "os" - "strings" - "sync" - txttmpl "text/template" - "time" ) const PATH_SERVICES = "/services" diff --git a/work/service-check.go b/work/service-check.go index ca190d5..c9110a8 100644 --- a/work/service-check.go +++ b/work/service-check.go @@ -1,8 +1,9 @@ package work import ( - "github.com/n0rad/go-erlog/logs" "sync" + + "github.com/n0rad/go-erlog/logs" ) func (s *Service) Check() error { diff --git a/work/service-generate.go b/work/service-generate.go index fd4d728..7da33b9 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -1,15 +1,16 @@ package work import ( + "io/ioutil" + "net/http" + "strings" + "github.com/appc/spec/discovery" "github.com/appc/spec/schema" "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/dgr/bin-templater/template" "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" - "io/ioutil" - "net/http" - "strings" ) func (s *Service) Generate() error { diff --git a/work/service-update.go b/work/service-update.go index f734748..8c42d8a 100644 --- a/work/service-update.go +++ b/work/service-update.go @@ -3,13 +3,14 @@ package work import ( "bufio" "fmt" - "github.com/mgutz/ansi" - "github.com/n0rad/go-erlog/logs" "os" "strings" "sync" "sync/atomic" "time" + + "github.com/mgutz/ansi" + "github.com/n0rad/go-erlog/logs" ) func (s *Service) Update() error { diff --git a/work/service.go b/work/service.go index 905c59d..7259baa 100644 --- a/work/service.go +++ b/work/service.go @@ -3,6 +3,12 @@ package work import ( "encoding/json" "fmt" + "io/ioutil" + "os" + "strings" + "sync" + "time" + "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/ggn" @@ -14,11 +20,6 @@ import ( "github.com/n0rad/go-erlog/logs" "golang.org/x/net/context" "gopkg.in/yaml.v2" - "io/ioutil" - "os" - "strings" - "sync" - "time" ) type Service struct { diff --git a/work/unit-command.go b/work/unit-command.go index 9a2f4f2..b094c3f 100644 --- a/work/unit-command.go +++ b/work/unit-command.go @@ -1,10 +1,11 @@ package work import ( - "github.com/n0rad/go-erlog/logs" "os" "strconv" "time" + + "github.com/n0rad/go-erlog/logs" ) func (u *Unit) Start(command string) error { diff --git a/work/unit-generate.go b/work/unit-generate.go index ebf09a5..16a33b0 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -4,14 +4,15 @@ import ( "bytes" "encoding/base64" "encoding/json" - "github.com/blablacar/dgr/bin-templater/template" - "github.com/blablacar/ggn/utils" - "github.com/n0rad/go-erlog/logs" - "github.com/peterbourgon/mergemap" "io/ioutil" "os" "strconv" "strings" + + "github.com/blablacar/dgr/bin-templater/template" + "github.com/blablacar/ggn/utils" + "github.com/n0rad/go-erlog/logs" + "github.com/peterbourgon/mergemap" ) func (u *Unit) Generate(tmpl *template.Templating) error { diff --git a/work/unit.go b/work/unit.go index c4ddd26..3358335 100644 --- a/work/unit.go +++ b/work/unit.go @@ -3,17 +3,19 @@ package work import ( "bufio" "encoding/json" + "github.com/coreos/fleet/unit" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" - "github.com/blablacar/dgr/bin-dgr/common" "io/ioutil" "os" "strings" "sync" "time" + + "github.com/blablacar/dgr/bin-dgr/common" ) type Unit struct { diff --git a/work/work.go b/work/work.go index 692777a..be131b9 100644 --- a/work/work.go +++ b/work/work.go @@ -1,11 +1,12 @@ package work import ( + "io/ioutil" + "os" + "github.com/blablacar/ggn/ggn" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" - "io/ioutil" - "os" ) const PATH_ENV = "/env" @@ -39,6 +40,21 @@ func (w Work) ListEnvs() []string { var envs []string for _, file := range files { + if file.Mode()&os.ModeSymlink == os.ModeSymlink { + followed_file, err := os.Readlink(path + "/" + file.Name()) + if err != nil { + continue + } + if followed_file[0] != '/' { + followed_file = path + "/" + followed_file + } + file, err = os.Lstat(followed_file) + if err != nil { + continue + } + logs.WithField("followed_link", file.Name()).Trace("Followed Link") + } + if !file.IsDir() { continue } From 0c6039029971aaec0f498ef8b0577547c059afc8 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Mon, 21 Nov 2016 11:10:08 +0100 Subject: [PATCH 140/163] update gomake --- gomake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gomake b/gomake index e2937d6..f1ff87c 100755 --- a/gomake +++ b/gomake @@ -20,6 +20,7 @@ Usage: gomake [-v version][-t token] command... build build (current platform only by default) quality Format, Fix, check error handled, lint, vet, misspell, ineffassign, Gocyclo test run go tests + install install release to \$GOPATH/bin release clean, build all platform, test, check git is clean, tag, push tag & build ZIPs gomake_update self updating by downloading and replacing with latest version @@ -89,14 +90,12 @@ build() { pre-build fi - [ -f /usr/bin/upx ] || (echo "upx is required to build" && exit 1) - echo_green "Goimports" [ -f ${GOPATH}/bin/goimports ] || go get -u golang.org/x/tools/cmd/goimports goimports -w ${go_files} # echo_green "Save Dependencies" -# [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep + [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep # godep save ./${work_path}/... || echo_yellow "Cannot save dependencies. Continuing" if [ "$(ls -A ${work_path}/${target_name}/bindata)" ]; then @@ -113,6 +112,7 @@ build() { if [ ${upx} ]; then echo_green "Compressing ${e}" + [ -f /usr/bin/upx ] || (echo "upx is required to compress" && exit 1) upx ${work_path}/${target_name}/${app}-v${version}-${e}/${app} &> /dev/null fi @@ -285,7 +285,7 @@ fi command_count=0 for i in "${commands[@]}"; do case ${i} in - test|build|release|clean|quality|gomake_update|install) ${i}; ((++command_count));; + test|build|release|clean|quality|install|gomake_update) ${i}; ((++command_count));; *) echo_red "Unknown command '${i}'"; echo ${helper}; exit 1;; esac done From 0645261f33c7ba44320117adf77154e8e02e5a14 Mon Sep 17 00:00:00 2001 From: Julien Dehee <julien.dehee@blablacar.com> Date: Sun, 20 Nov 2016 15:36:21 +0100 Subject: [PATCH 141/163] support file inclusion in env and service attributes --- .../common-attributes/test/includeFile.yml | 2 + examples/config.yml | 1 + examples/env/prod-dc1/attributes/test.yml | 6 +++ .../services/test-service/attributes/test.yml | 4 ++ work/env.go | 45 +++++++++++++++++ work/env_test.go | 39 +++++++++++++++ work/service.go | 49 +++++++++++++++++++ work/service_test.go | 27 ++++++++++ work/spec.go | 1 + 9 files changed, 174 insertions(+) create mode 100644 examples/common-attributes/test/includeFile.yml create mode 100644 examples/config.yml create mode 100644 examples/env/prod-dc1/attributes/test.yml create mode 100644 examples/env/prod-dc1/services/test-service/attributes/test.yml create mode 100644 work/env_test.go create mode 100644 work/service_test.go diff --git a/examples/common-attributes/test/includeFile.yml b/examples/common-attributes/test/includeFile.yml new file mode 100644 index 0000000..3614c07 --- /dev/null +++ b/examples/common-attributes/test/includeFile.yml @@ -0,0 +1,2 @@ +default: + includeGlobal: includeGlobalValue diff --git a/examples/config.yml b/examples/config.yml new file mode 100644 index 0000000..ede149d --- /dev/null +++ b/examples/config.yml @@ -0,0 +1 @@ +workPath: ../examples diff --git a/examples/env/prod-dc1/attributes/test.yml b/examples/env/prod-dc1/attributes/test.yml new file mode 100644 index 0000000..c07097f --- /dev/null +++ b/examples/env/prod-dc1/attributes/test.yml @@ -0,0 +1,6 @@ +include: + - test.includeFile + - env:prod-dc2:test.includeFile + +default: + attribute: attributeValue diff --git a/examples/env/prod-dc1/services/test-service/attributes/test.yml b/examples/env/prod-dc1/services/test-service/attributes/test.yml new file mode 100644 index 0000000..d15f8c6 --- /dev/null +++ b/examples/env/prod-dc1/services/test-service/attributes/test.yml @@ -0,0 +1,4 @@ +include: + - test.includeFile + - env:prod-dc2:test.includeFile + - env::test.includeFile diff --git a/work/env.go b/work/env.go index 118fe8c..c4603b5 100644 --- a/work/env.go +++ b/work/env.go @@ -153,10 +153,55 @@ func (e *Env) loadAttributes() { if err != nil { logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Cannot load attribute files") } + files, err = e.addIncludeFiles(files) + if err != nil { + logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Cannot load include files") + } + e.attributes = attributes.MergeAttributesFiles(files) logs.WithFields(e.fields).WithField("attributes", e.attributes).Debug("Attributes loaded") } +func (e *Env) addIncludeFiles(files []string) ([]string, error) { + type includeFiles struct { + Include []string + } + for _, file := range files { + var f includeFiles + yml, err := ioutil.ReadFile(file) + if err != nil { + return nil, err + } + err = yaml.Unmarshal(yml, &f) + for _, inclusion := range f.Include { + sepCount := strings.Count(inclusion, ":") + if sepCount == 2 { + fields := strings.Split(inclusion, ":") + includeFile := strings.Replace(fields[2], ".", "/", -1) + ".yml" + if fields[1] == "" { + logs.WithField("include", inclusion).Fatal("Trying to include environment attributes from itself") + } else { // env:prod-dc1:some.include + includeFile = fmt.Sprintf("%v%v/%v%v/%v", + ggn.Home.Config.WorkPath, + PATH_ENV, + fields[1], + PATH_COMMON_ATTRIBUTES, + includeFile, + ) + files = append(files, includeFile) + } + } else { // some.global.include + includeFile := strings.Replace(inclusion, ".", "/", -1) + ".yml" + includeFile = fmt.Sprintf("%v%v/%v", ggn.Home.Config.WorkPath, PATH_COMMON_ATTRIBUTES, includeFile) + files = append(files, includeFile) + + } + } + } + return files, nil + +} + func (e Env) ListServices() []string { path := e.path + PATH_SERVICES files, err := ioutil.ReadDir(path) diff --git a/work/env_test.go b/work/env_test.go new file mode 100644 index 0000000..9e78e6f --- /dev/null +++ b/work/env_test.go @@ -0,0 +1,39 @@ +package work + +import ( + "testing" + + "github.com/blablacar/ggn/ggn" +) + +func itemInSlice(a string, s []string) bool { + for _, x := range s { + if a == x { + return true + } + } + return false +} + +func TestAddEnvIncludeFiles(t *testing.T) { + ggn.Home.Config.WorkPath = "../examples" + env := Env{} + files := []string{"../examples/env/prod-dc1/attributes/test.yml"} + files, err := env.addIncludeFiles(files) + if err != nil { + t.Logf("addIncludeFiles returned an error : %v", err) + t.Fail() + } + for _, includeFile := range []string{ + "../examples/common-attributes/test/includeFile.yml", + "../examples/env/prod-dc2/common-attributes/test/includeFile.yml", + } { + if !itemInSlice(includeFile, files) { + t.Logf("File not included : %v", includeFile) + for _, f := range files { + t.Log(f) + } + t.Fail() + } + } +} diff --git a/work/service.go b/work/service.go index 7259baa..6a8cd1e 100644 --- a/work/service.go +++ b/work/service.go @@ -250,11 +250,60 @@ func (s *Service) loadAttributes() { if err != nil { logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Cannot load Attributes files") } + files, err = s.addIncludeFiles(files) + if err != nil { + logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Cannot load include files") + } attr = attributes.MergeAttributesFilesForMap(attr, files) s.attributes = attr logs.WithFields(s.fields).WithField("attributes", s.attributes).Debug("Attributes loaded") } +func (s *Service) addIncludeFiles(files []string) ([]string, error) { + type includeFiles struct { + Include []string + } + for _, file := range files { + var f includeFiles + yml, err := ioutil.ReadFile(file) + if err != nil { + return nil, err + } + err = yaml.Unmarshal(yml, &f) + for _, inclusion := range f.Include { + sepCount := strings.Count(inclusion, ":") + if sepCount == 2 { + fields := strings.Split(inclusion, ":") + includeFile := strings.Replace(fields[2], ".", "/", -1) + ".yml" + if fields[1] == "" { // env::some.include + includeFile = fmt.Sprintf("%v%v/%v", + s.env.path, + PATH_COMMON_ATTRIBUTES, + includeFile, + ) + files = append(files, includeFile) + } else { // env:prod-dc1:some.include + includeFile = fmt.Sprintf("%v%v/%v%v/%v", + ggn.Home.Config.WorkPath, + PATH_ENV, + fields[1], + PATH_COMMON_ATTRIBUTES, + includeFile, + ) + files = append(files, includeFile) + } + + } else { // some.global.include + includeFile := strings.Replace(inclusion, ".", "/", -1) + ".yml" + includeFile = fmt.Sprintf("%v%v/%v", ggn.Home.Config.WorkPath, PATH_COMMON_ATTRIBUTES, includeFile) + files = append(files, includeFile) + + } + } + } + return files, nil +} + func (s *Service) loadUnitTemplate(filename string) (*template.Templating, error) { path := s.path + filename source, err := ioutil.ReadFile(path) diff --git a/work/service_test.go b/work/service_test.go new file mode 100644 index 0000000..a170d17 --- /dev/null +++ b/work/service_test.go @@ -0,0 +1,27 @@ +package work + +import "testing" + +func TestAddServiceIncludeFiles(t *testing.T) { + service := Service{} + service.env.path = "../examples/env/prod-dc1" + files := []string{"../examples/env/prod-dc1/services/test-service/attributes/test.yml"} + files, err := service.addIncludeFiles(files) + if err != nil { + t.Logf("addIncludeFiles returned an error : %v", err) + t.Fail() + } + for _, includeFile := range []string{ + "../examples/common-attributes/test/includeFile.yml", + "../examples/env/prod-dc2/common-attributes/test/includeFile.yml", + "../examples/env/prod-dc1/common-attributes/test/includeFile.yml", + } { + if !itemInSlice(includeFile, files) { + t.Logf("File not included : %v", includeFile) + for _, f := range files { + t.Log(f) + } + t.Fail() + } + } +} diff --git a/work/spec.go b/work/spec.go index 1d6c98b..5dbfe69 100644 --- a/work/spec.go +++ b/work/spec.go @@ -6,6 +6,7 @@ import ( const PATH_ATTRIBUTES = "/attributes" const PATH_TEMPLATES = "/templates" +const PATH_COMMON_ATTRIBUTES = "/common-attributes" const ACTIVE_ACTIVE = "active" const SUB_RUNNING = "running" From c0f0bc06175944b4f2eeb395b299697655a2ba94 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 29 Dec 2016 16:02:12 +0100 Subject: [PATCH 142/163] bump gomake --- gomake | 99 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 43 deletions(-) diff --git a/gomake b/gomake index f1ff87c..7f225d8 100755 --- a/gomake +++ b/gomake @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -efo pipefail # TODO u : ${target_name:=dist} : ${work_path:=.} @@ -9,7 +9,10 @@ set -e : ${release_osarchi:="linux-amd64,darwin-amd64,windows-amd64"} : ${version:=0} : ${token:=} - : ${upx:=} + : ${upx:=false} + : ${build_packages:=} + : ${build_ldflags:="-s -w -X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.BuildVersion=\${version} -X main.BuildCommit=`git rev-parse --short HEAD`"} + : ${errcheck:=true} read -d '' helper <<EOF || true Usage: gomake [-v version][-t token] command... @@ -68,7 +71,9 @@ err_count() { gomake_update() { echo_green "Downloading gomake" - wget -q -O ${work_path}/gomake.tmp https://raw.githubusercontent.com/n0rad/gomake/master/gomake + curl --fail --silent --show-error --location --remote-time --compressed \ + -o ${work_path}/gomake.tmp \ + https://raw.githubusercontent.com/n0rad/gomake/master/gomake chmod +x ${work_path}/gomake.tmp mv ${work_path}/gomake.tmp ${work_path}/$0 } @@ -79,7 +84,7 @@ clean() { } build() { - start=`date +%s` + start=$(date +%s) [ -z "$1" ] || osarchi="$1" [ ! -z ${version+x} ] || version="0" @@ -91,62 +96,68 @@ build() { fi echo_green "Goimports" - [ -f ${GOPATH}/bin/goimports ] || go get -u golang.org/x/tools/cmd/goimports + command -v goimports > /dev/null || go get -u golang.org/x/tools/cmd/goimports goimports -w ${go_files} -# echo_green "Save Dependencies" - [ -f ${GOPATH}/bin/godep ] || go get github.com/tools/godep -# godep save ./${work_path}/... || echo_yellow "Cannot save dependencies. Continuing" + echo_green "Format" + gofmt -w -s ${go_files} + + echo_green "Fix" + go tool fix ${go_files} if [ "$(ls -A ${work_path}/${target_name}/bindata)" ]; then - [ -f ${GOPATH}/bin/go-bindata ] || go get -u github.com/jteeuwen/go-bindata/... + command -v go-bindata > /dev/null || go get -u github.com/jteeuwen/go-bindata/... go-bindata -nomemcopy -pkg dist -prefix dist/bindata -o ${work_path}/${target_name}/bindata.go ${work_path}/${target_name}/bindata/... fi + ldflags=$(eval echo ${build_ldflags}) IFS=',' read -ra current <<< "$osarchi" for e in "${current[@]}"; do echo_green "Building $e" - $(cd ${work_path} && GOOS="${e%-*}" GOARCH="${e#*-}" godep go build -ldflags "-s -w -X main.BuildTime=`date -u '+%Y-%m-%d_%H:%M:%S_UTC'` -X main.Version=${version}-`git rev-parse --short HEAD`" \ - -o ${target_name}/${app}-v${version}-${e}/${app}) + binaryPath=$(targetBinaryPath ${e}) + $(cd ${work_path} && GOOS="${e%-*}" GOARCH="${e#*-}" go build -ldflags "${ldflags}" -o ${target_name}/${binaryPath} ${build_packages}) - if [ ${upx} ]; then - echo_green "Compressing ${e}" - [ -f /usr/bin/upx ] || (echo "upx is required to compress" && exit 1) - upx ${work_path}/${target_name}/${app}-v${version}-${e}/${app} &> /dev/null + if [ "$upx" = true ]; then + echo_green "Compressing ${e}" # TODO compress on release only + command -v upx > /dev/null || (echo "upx is required to compress" && exit 1) + upx ${work_path}/${target_name}/${binaryPath} &> /dev/null fi if [ "${e%-*}" == "windows" ]; then - mv ${work_path}/${target_name}/${app}-v${version}-${e}/${app} ${work_path}/${target_name}/${app}-v${version}-${e}/${app}.exe + mv ${work_path}/${target_name}/${binaryPath} ${work_path}/${target_name}/${binaryPath}.exe fi done echo_purple "Build duration : $((`date +%s`-${start}))s" } +targetBinaryPath() { + if [ "${1%-*}" == "windows" ]; then + echo ${app}-v${version}-${1}/${app}.exe + else + echo ${app}-v${version}-${1}/${app} + fi +} install() { echo_green "Installing" - cp ${work_path}/${target_name}/${app}-v${version}-$(go env GOHOSTOS)-$(go env GOHOSTARCH)/${app}* ${GOPATH}/bin/ + cp ${work_path}/${target_name}/$(targetBinaryPath $(go env GOHOSTOS)-$(go env GOHOSTARCH)) ${GOPATH}/bin/ } quality() { - start=`date +%s` + start=$(date +%s) cd ${work_path} - echo_green "Format" - gofmt -w -s ${go_files} - - echo_green "Fix" - go tool fix ${go_files} - - echo_green "Err check" - [ -f ${GOPATH}/bin/errcheck ] || go get -u github.com/kisielk/errcheck - res=$(errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go') - err_count "${res}" - echo_red "${res}" + if [ "${errcheck}" = true ]; then + echo_green "Err check" + command -v errcheck > /dev/null || go get -u github.com/kisielk/errcheck + res=$(errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go') + err_count "${res}" + echo_red "${res}" + fi echo_green "Lint" - [ -f ${GOPATH}/bin/golint ] || go get -u github.com/golang/lint/golint + command -v golint > /dev/null || go get -u github.com/golang/lint/golint for i in ${go_files}; do golint ${i} | grep -v 'should have comment ' || true done @@ -155,17 +166,17 @@ quality() { go tool vet ${go_files} || true echo_green "Misspell" - [ -f ${GOPATH}/bin/misspell ] || go get -u github.com/client9/misspell/cmd/misspell + command -v misspell > /dev/null || go get -u github.com/client9/misspell/cmd/misspell misspell -source=text ${go_files} echo_green "Ineffassign" - [ -f ${GOPATH}/bin/ineffassign ] || go get -u github.com/gordonklaus/ineffassign + command -v ineffassign > /dev/null || go get -u github.com/gordonklaus/ineffassign for i in ${go_files}; do ineffassign -n ${i} || true done echo_green "Gocyclo" - [ -f ${GOPATH}/bin/gocyclo ] || go get -u github.com/fzipp/gocyclo + command -v gocyclo > /dev/null || go get -u github.com/fzipp/gocyclo gocyclo -over 15 ${go_files} || true cd - @@ -201,7 +212,7 @@ require_clean_work_tree() { } release() { - start=`date +%s` + start=$(date +%s) if [ "${repo%%/*}" != "github.com" ]; then echo "Push to '${repo%%/*}' not implemented" exit 1 @@ -225,21 +236,19 @@ release() { echo_green "Compress release" cd ${work_path}/${target_name} - for i in *-* ; do - if [ -d "$i" ]; then - tar czf ${i}.tar.gz ${i} - fi + for i in $(find . -type d -name "*-v${version}-*-*" | sed 's|./||') ; do + tar czf ${i}.tar.gz ${i} done cd - git tag v${version} -a -m "Version $version" - git push --tags + git push origin v${version} sleep 5 posturl=$(curl --data "{\"tag_name\": \"v${version}\",\"target_commitish\": \"master\",\"name\": \"v${version}\",\"body\": \"Release of version ${version}\",\"draft\": false,\"prerelease\": false}" https://api.github.com/repos/${github_repo}/releases?access_token=${token} | grep "\"upload_url\"" | sed -ne 's/.*\(http[^"]*\).*/\1/p') - for i in ${work_path}/${target_name}/*.tar.gz ; do + for i in $(find ${work_path}/${target_name} -type f -name "*.tar.gz") ; do fullpath=$(ls ${i}) filename=${fullpath##*/} curl -i -X POST -H "Content-Type: application/x-gzip" --data-binary "@${fullpath}" "${posturl%\{?name,label\}}?name=${filename}&label=${filename}&access_token=${token}" @@ -248,9 +257,13 @@ release() { } test() { - start=`date +%s` + start=$(date +%s) echo_green "Testing" - godep go test -cover $(go list ${work_path}/... | grep -v vendor/) + go test -cover $(go list ${work_path}/... | grep -v vendor/) + + if [ `type -t extra-test`"" == 'function' ]; then + extra-test + fi echo_purple "Test duration : $((`date +%s`-${start}))s" } @@ -258,7 +271,7 @@ test() { ######################################### ######################################### -global_start=`date +%s` +global_start=$(date +%s) commands=() while [ $# -gt 0 ]; do From 4eacbf077250106ce07e9c04b3667f91aaf870b6 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 29 Dec 2016 16:20:23 +0100 Subject: [PATCH 143/163] ignore pipefail for errcheck --- gomake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gomake b/gomake index 7f225d8..e0bfac3 100755 --- a/gomake +++ b/gomake @@ -151,7 +151,7 @@ quality() { if [ "${errcheck}" = true ]; then echo_green "Err check" command -v errcheck > /dev/null || go get -u github.com/kisielk/errcheck - res=$(errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go') + res=$(set +o pipefail; errcheck ./... | grep -v 'vendor/' | grep -v 'Close(' | grep -v '_test.go') err_count "${res}" echo_red "${res}" fi From 41732df7a8be6b2f011b1d219d7ed9d556eac27a Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 30 Dec 2016 12:27:13 +0100 Subject: [PATCH 144/163] fix version and commit hash --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 2be3467..865c25e 100644 --- a/main.go +++ b/main.go @@ -8,11 +8,11 @@ import ( _ "github.com/n0rad/go-erlog/register" ) -var CommitHash string -var Version string +var BuildCommit string +var BuildVersion string var BuildTime string func main() { rand.Seed(time.Now().UTC().UnixNano()) - commands.Execute(CommitHash, Version, BuildTime) + commands.Execute(BuildCommit, BuildVersion, BuildTime) } From 366f814b8fc8005866f2ef23b040f5026e59d5c3 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Thu, 2 Feb 2017 14:15:21 +0100 Subject: [PATCH 145/163] expose all notes manifest attributes on '.service_nodes' --- work/unit-generate.go | 1 + 1 file changed, 1 insertion(+) diff --git a/work/unit-generate.go b/work/unit-generate.go index 16a33b0..081cbe4 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -35,6 +35,7 @@ func (u *Unit) Generate(tmpl *template.Templating) error { } data["aciList"] = aciList data["acis"] = acis + data["service_nodes"] = u.Service.nodesAsJsonMap out, err := json.Marshal(data) if err != nil { From 96793423c80edf74bee87f70a281092242bd1e74 Mon Sep 17 00:00:00 2001 From: Jean Baptiste Favre <debian@jbfavre.org> Date: Thu, 2 Feb 2017 18:37:17 +0100 Subject: [PATCH 146/163] Service dependency against a minimal GGN version If a service declares a dependency against a minimal version of GGN, unit file generation for this service ill be blocked if ggn doesn't fullfill version requirement. This allow to safely upgrade service manifest and prevent service operation with uncompatible ggn versions. --- commands/ggn.go | 10 +++------- commands/version.go | 11 ++++++----- ggn/context.go | 4 ++++ work/service-generate.go | 11 +++++++++++ work/spec.go | 1 + 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/commands/ggn.go b/commands/ggn.go index 543f464..db3718e 100644 --- a/commands/ggn.go +++ b/commands/ggn.go @@ -17,14 +17,10 @@ import ( const FLEET_SUPPORTED_VERSION = "0.11.5" -var CommitHash string -var GgnVersion string -var BuildDate string - func Execute(commitHash string, ggnVersion string, buildDate string) { - CommitHash = commitHash - GgnVersion = ggnVersion - BuildDate = buildDate + ggn.CommitHash = commitHash + ggn.GgnVersion = ggnVersion + ggn.BuildDate = buildDate checkFleetVersion() diff --git a/commands/version.go b/commands/version.go index a770cf7..b3fa329 100644 --- a/commands/version.go +++ b/commands/version.go @@ -4,6 +4,7 @@ import ( "fmt" "os" + "github.com/blablacar/ggn/ggn" "github.com/spf13/cobra" ) @@ -13,12 +14,12 @@ var versionCmd = &cobra.Command{ Long: `Print the version number of cnt`, Run: func(cmd *cobra.Command, args []string) { fmt.Print("ggn\n\n") - fmt.Printf("version : %s\n", GgnVersion) - if BuildDate != "" { - fmt.Printf("build date : %s\n", BuildDate) + fmt.Printf("version : %s\n", ggn.GgnVersion) + if ggn.BuildDate != "" { + fmt.Printf("build date : %s\n", ggn.BuildDate) } - if CommitHash != "" { - fmt.Printf("CommitHash : %s\n", CommitHash) + if ggn.CommitHash != "" { + fmt.Printf("CommitHash : %s\n", ggn.CommitHash) } os.Exit(0) }, diff --git a/ggn/context.go b/ggn/context.go index b5dba11..b22fbce 100644 --- a/ggn/context.go +++ b/ggn/context.go @@ -6,6 +6,10 @@ import ( var Home HomeStruct +var CommitHash string +var GgnVersion string +var BuildDate string + func GetUserAndHost() string { user := os.Getenv("USER") if Home.Config.User != "" { diff --git a/work/service-generate.go b/work/service-generate.go index 7da33b9..1cc224a 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -9,6 +9,7 @@ import ( "github.com/appc/spec/schema" "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/dgr/bin-templater/template" + "github.com/blablacar/ggn/ggn" "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" ) @@ -36,6 +37,16 @@ func (s *Service) Generate() error { } } + if len(s.manifest.GgnMinimalVersion) > 0 { + var currentVersion = common.Version(ggn.GgnVersion) + logs.WithField("version", s.manifest.GgnMinimalVersion).Debug("Found ggn minimal version") + if s.manifest.GgnMinimalVersion.GreaterThan(currentVersion) { + logs.WithFields(s.fields). + WithField("ggn-minimalversion", s.manifest.GgnMinimalVersion). + WithField("ggn-version", currentVersion). + Fatal("You don't use the minimal required version of ggn for this service") + } + } if len(s.nodesAsJsonMap) == 0 { logs.WithFields(s.fields).Fatal("No node to process in manifest") return nil diff --git a/work/spec.go b/work/spec.go index 5dbfe69..d2a2d55 100644 --- a/work/spec.go +++ b/work/spec.go @@ -42,6 +42,7 @@ type HookInfo struct { } type ServiceManifest struct { + GgnMinimalVersion common.Version `yaml:"ggnminimalversion"` ConcurrentUpdater int `yaml:"concurrentUpdater"` Containers []common.ACFullname `yaml:"containers"` ExecStartPre []string `yaml:"execStartPre"` From 3729666492e314f9c0b1acd63b67bc560520e78f Mon Sep 17 00:00:00 2001 From: Jean Baptiste Favre <debian@jbfavre.org> Date: Fri, 3 Feb 2017 12:23:39 +0100 Subject: [PATCH 147/163] Fix camel case for yaml attributes --- work/spec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/work/spec.go b/work/spec.go index d2a2d55..4eed20c 100644 --- a/work/spec.go +++ b/work/spec.go @@ -42,7 +42,7 @@ type HookInfo struct { } type ServiceManifest struct { - GgnMinimalVersion common.Version `yaml:"ggnminimalversion"` + GgnMinimalVersion common.Version `yaml:"ggnMinimalVersion"` ConcurrentUpdater int `yaml:"concurrentUpdater"` Containers []common.ACFullname `yaml:"containers"` ExecStartPre []string `yaml:"execStartPre"` From 7b724bb6fc152e9b38febf6091116f4e65780c68 Mon Sep 17 00:00:00 2001 From: Jean Baptiste Favre <debian@jbfavre.org> Date: Fri, 3 Feb 2017 12:24:43 +0100 Subject: [PATCH 148/163] Clean log --- work/service-generate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/work/service-generate.go b/work/service-generate.go index 1cc224a..ea105c9 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -42,8 +42,8 @@ func (s *Service) Generate() error { logs.WithField("version", s.manifest.GgnMinimalVersion).Debug("Found ggn minimal version") if s.manifest.GgnMinimalVersion.GreaterThan(currentVersion) { logs.WithFields(s.fields). - WithField("ggn-minimalversion", s.manifest.GgnMinimalVersion). - WithField("ggn-version", currentVersion). + WithField("minimalversion", s.manifest.GgnMinimalVersion). + WithField("version", currentVersion). Fatal("You don't use the minimal required version of ggn for this service") } } From 9b9c4b1a9e1a769044daf134e7dfc36f2696e660 Mon Sep 17 00:00:00 2001 From: Jean Baptiste Favre <debian@jbfavre.org> Date: Sun, 5 Feb 2017 14:29:35 +0100 Subject: [PATCH 149/163] Fix for feature "expose all notes manifest attributes in '.service_nodes'" This feature is very usefull but cause problems with large services. Unit's files get too big and service start could fail because of that. This PR aims to add a new yaml property 'exposeNodesInUnitEnv' as boolean to make '.service_nodes' optional. Set to 'true', service nodes will be exposed. Set to 'false' (or not set), they won't --- work/spec.go | 13 +++++++------ work/unit-generate.go | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/work/spec.go b/work/spec.go index 4eed20c..2e3dd29 100644 --- a/work/spec.go +++ b/work/spec.go @@ -42,12 +42,13 @@ type HookInfo struct { } type ServiceManifest struct { - GgnMinimalVersion common.Version `yaml:"ggnMinimalVersion"` - ConcurrentUpdater int `yaml:"concurrentUpdater"` - Containers []common.ACFullname `yaml:"containers"` - ExecStartPre []string `yaml:"execStartPre"` - ExecStart []string `yaml:"execStart"` - Nodes interface{} `yaml:"nodes"` + ExposeNodesInUnitEnv bool `yaml:"exposeNodesInUnitEnv"` + GgnMinimalVersion common.Version `yaml:"ggnMinimalVersion"` + ConcurrentUpdater int `yaml:"concurrentUpdater"` + Containers []common.ACFullname `yaml:"containers"` + ExecStartPre []string `yaml:"execStartPre"` + ExecStart []string `yaml:"execStart"` + Nodes interface{} `yaml:"nodes"` } type UnitType int diff --git a/work/unit-generate.go b/work/unit-generate.go index 081cbe4..167574a 100644 --- a/work/unit-generate.go +++ b/work/unit-generate.go @@ -35,7 +35,9 @@ func (u *Unit) Generate(tmpl *template.Templating) error { } data["aciList"] = aciList data["acis"] = acis - data["service_nodes"] = u.Service.nodesAsJsonMap + if u.Service.manifest.ExposeNodesInUnitEnv { + data["service_nodes"] = u.Service.nodesAsJsonMap + } out, err := json.Marshal(data) if err != nil { From 3efddd9230378dd28527bff3e994ff30b97276f4 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 22 Mar 2017 11:42:06 +0100 Subject: [PATCH 150/163] add isAvailable to service update & check --- work/env-check.go | 4 ++-- work/env.go | 24 +++++++++++++++++------- work/service-update.go | 5 ++++- work/service.go | 4 ++-- work/unit.go | 33 ++++++++++++++++++++++++++++----- 5 files changed, 53 insertions(+), 17 deletions(-) diff --git a/work/env-check.go b/work/env-check.go index e68c83e..a3e5db2 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -11,8 +11,8 @@ func (e Env) Check() { logs.WithFields(e.fields).Debug("Running check") info := HookInfo{Command: "env/check", Action: "env/check"} - e.RunEarlyHook(info) - defer e.RunLateHook(info) + e.RunEarlyHookFatal(info) + defer e.RunLateHookFatal(info) e.concurrentChecker(e.ListServices()) diff --git a/work/env.go b/work/env.go index c4603b5..632882a 100644 --- a/work/env.go +++ b/work/env.go @@ -18,6 +18,7 @@ import ( "github.com/coreos/etcd/client" "github.com/juju/errors" "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "gopkg.in/yaml.v2" ) @@ -261,20 +262,28 @@ func (e Env) ListMachineNames() ([]string, error) { const PATH_HOOKS = "/hooks" -func (e Env) RunEarlyHook(info HookInfo) { - e.runHook("/early", info) +func (e Env) RunEarlyHookFatal(info HookInfo) { + if err := e.runHookAndGetNumRun("/early", info); err != nil { + logs.WithE(err).Fatal("hook failed") + } } -func (e Env) RunLateHook(info HookInfo) { - e.runHook("/late", info) +func (e Env) RunLateHookFatal(info HookInfo) { + if err := e.runHookAndGetNumRun("/late", info); err != nil { + logs.WithE(err).Fatal("hook failed") + } } -func (e Env) runHook(path string, info HookInfo) { +func (e Env) RunHook(info HookInfo) error { + return e.runHookAndGetNumRun("/command", info) +} + +func (e Env) runHookAndGetNumRun(path string, info HookInfo) error { logs.WithFields(e.fields).WithField("path", path).WithField("info", info).Debug("Running hook") files, err := ioutil.ReadDir(e.path + PATH_HOOKS + path) if err != nil { logs.WithEF(err, e.fields).Debug("Cannot read hook directory") - return + return nil } envs := map[string]string{} @@ -302,10 +311,11 @@ func (e Env) runHook(path string, info HookInfo) { logs.WithFields(hookFields).Debug("Running Hook") if err := common.ExecCmd("bash", "-c", strings.Join(args, " ")); err != nil { - logs.WithFields(hookFields).Fatal("Hook status is failed") + return errs.WithF(hookFields, "Hook status is failed") } } } + return nil } const FLEETCTL_ENDPOINT = "FLEETCTL_ENDPOINT" diff --git a/work/service-update.go b/work/service-update.go index 8c42d8a..5c21d3e 100644 --- a/work/service-update.go +++ b/work/service-update.go @@ -41,10 +41,13 @@ ask: if same { logs.WithFields(uField).Info("Remote service is already up to date") if !u.IsRunning() { - logs.WithFields(uField).Info("But service is not running") + logs.WithFields(uField).Warn("But service is not running") + } else if !u.IsAvailable("service/update") { + logs.WithFields(uField).Warn("But service is not available") } else if !BuildFlags.All { return } + } if BuildFlags.Yes { diff --git a/work/service.go b/work/service.go index 6a8cd1e..95dfc40 100644 --- a/work/service.go +++ b/work/service.go @@ -237,9 +237,9 @@ func (s *Service) runHook(isEarly bool, command string, action string) { Attributes: string(out), } if isEarly { - s.GetEnv().RunEarlyHook(info) + s.GetEnv().RunEarlyHookFatal(info) } else { - s.GetEnv().RunLateHook(info) + s.GetEnv().RunLateHookFatal(info) } } diff --git a/work/unit.go b/work/unit.go index 3358335..71c1ec4 100644 --- a/work/unit.go +++ b/work/unit.go @@ -80,8 +80,8 @@ func (u *Unit) Check(command string) { Action: "check", Command: command, } - u.Service.GetEnv().RunEarlyHook(info) - defer u.Service.GetEnv().RunLateHook(info) + u.Service.GetEnv().RunEarlyHookFatal(info) + defer u.Service.GetEnv().RunLateHookFatal(info) statuses := u.Service.GetEnv().ListUnits() var status UnitStatus @@ -108,7 +108,10 @@ func (u *Unit) Check(command string) { } if !same { logs.WithFields(u.Fields).Warn("Unit is not up to date") - return + } + + if !u.IsAvailable(command) { + logs.WithFields(u.Fields).Warn("Unit is not available") } } @@ -178,9 +181,9 @@ func (u *Unit) runHook(isEarly bool, command string, action string) { Attributes: string(out), } if isEarly { - u.Service.GetEnv().RunEarlyHook(info) + u.Service.GetEnv().RunEarlyHookFatal(info) } else { - u.Service.GetEnv().RunLateHook(info) + u.Service.GetEnv().RunLateHookFatal(info) } } @@ -234,3 +237,23 @@ func (u *Unit) IsLoaded() bool { } return false } + +func (u *Unit) IsAvailable(command string) bool { + out, err := json.Marshal(u.GenerateAttributes()) + if err != nil { + logs.WithEF(err, u.Fields).Fatal("Cannot marshall attributes") + } + info := HookInfo{ + Service: u.Service, + Unit: u, + Action: "unit/isAvailable", + Command: command, + Attributes: string(out), + } + + if err = u.Service.GetEnv().RunHook(info); err != nil { + logs.WithEF(err, u.Fields).Debug("isAvailable hook failed") + return false + } + return true +} From 3ee2723011c96d2f07c2e10438da79836e4c6949 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 22 Mar 2017 12:00:04 +0100 Subject: [PATCH 151/163] [#71] add LOG_LEVEL to hook envs --- work/env.go | 1 + 1 file changed, 1 insertion(+) diff --git a/work/env.go b/work/env.go index 632882a..24a3793 100644 --- a/work/env.go +++ b/work/env.go @@ -299,6 +299,7 @@ func (e Env) runHookAndGetNumRun(path string, info HookInfo) error { envs["ACTION"] = info.Action envs["ATTRIBUTES"] = info.Attributes envs["GGN_HOME_PATH"] = ggn.Home.Path + envs["LOG_LEVEL"] = logs.GetLevel().String() for _, f := range files { if !f.IsDir() { From e5ee5152bb1e8dacccad7e54a60dbc695217a7a4 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 22 Mar 2017 17:50:29 +0100 Subject: [PATCH 152/163] update gomake to not use upx for darwin --- gomake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gomake b/gomake index e0bfac3..de15187 100755 --- a/gomake +++ b/gomake @@ -119,9 +119,11 @@ build() { $(cd ${work_path} && GOOS="${e%-*}" GOARCH="${e#*-}" go build -ldflags "${ldflags}" -o ${target_name}/${binaryPath} ${build_packages}) if [ "$upx" = true ]; then - echo_green "Compressing ${e}" # TODO compress on release only - command -v upx > /dev/null || (echo "upx is required to compress" && exit 1) - upx ${work_path}/${target_name}/${binaryPath} &> /dev/null + if [ "${e%-*}" != "darwin" ]; then + echo_green "Compressing ${e}" # TODO compress on release only + command -v upx > /dev/null || (echo "upx is required to compress" && exit 1) + upx ${work_path}/${target_name}/${binaryPath} &> /dev/null + fi fi if [ "${e%-*}" == "windows" ]; then From 5b05a2b93e6305c8339d91fb87fa814857155ba5 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 22 Mar 2017 19:18:01 +0100 Subject: [PATCH 153/163] allow to not specify service name but node directly --- commands/prepare-env.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/commands/prepare-env.go b/commands/prepare-env.go index 4d27a0a..98084a4 100644 --- a/commands/prepare-env.go +++ b/commands/prepare-env.go @@ -2,6 +2,7 @@ package commands import ( "github.com/blablacar/ggn/work" + "github.com/n0rad/go-erlog/logs" "github.com/spf13/cobra" ) @@ -52,9 +53,37 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { } envCmd.AddCommand(generateCmd, fleetctlCmd, checkCmd, listUnitsCmd, listMachinesCmd) + unitNames := make(map[string]struct{}) + conflictUnits := make(map[string]struct{}) for _, serviceName := range env.ListServices() { service := env.LoadService(serviceName) envCmd.AddCommand(prepareServiceCommands(service)) + + for _, unitName := range service.ListUnits() { + if _, ok := unitNames[unitName]; ok { + conflictUnits[unitName] = struct{}{} + } + unitNames[unitName] = struct{}{} + } + } + + for _, serviceName := range env.ListServices() { + service := env.LoadService(serviceName) + for _, unitName := range service.ListUnits() { + unit := service.LoadUnit(unitName) + if _, ok := conflictUnits[unitName]; ok { + envCmd.AddCommand(&cobra.Command{ + Use: unit.Name, + Short: getShortDescription(unit, "Run command for"), + Run: func(cmd *cobra.Command, args []string) { + logs.WithField("unit", unitName).Fatal("unit name in conflict. please specify service") + }, + }) + } else { + envCmd.AddCommand(prepareUnitCommands(unit)) + } + + } } return envCmd From 47e78f8a06a8af864fecc4f538fd28ccbd8e7dc3 Mon Sep 17 00:00:00 2001 From: Olivier Biesmans <olivier.biesmans@blablacar.com> Date: Tue, 8 Aug 2017 11:26:12 +0200 Subject: [PATCH 154/163] Fix for OS X folks --- gomake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gomake b/gomake index de15187..8e1cdcb 100755 --- a/gomake +++ b/gomake @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -efo pipefail # TODO u : ${target_name:=dist} From 7be736d5e429936d4bc38461da2b0dfb9eef2c81 Mon Sep 17 00:00:00 2001 From: Olivier Biesmans <olivier.biesmans@blablacar.com> Date: Tue, 8 Aug 2017 11:43:40 +0200 Subject: [PATCH 155/163] Fleet v1.0.0 compatibility --- work/env-check.go | 4 ++-- work/env.go | 12 ++++++++++-- work/service.go | 4 ++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/work/env-check.go b/work/env-check.go index a3e5db2..aa49627 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -18,7 +18,7 @@ func (e Env) Check() { // e.Generate() - // units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") + // units, _, err := e.RunFleetCmdGetOutput("list-unit-files", "-no-legend", "-fields", "unit") // if err != nil { // e.log.WithError(err).Fatal("Cannot list unit files") // } @@ -65,7 +65,7 @@ func (e Env) concurrentChecker(services []string) { // // e.Generate() // -// units, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-unit-files", "-no-legend", "-fields", "unit") +// units, _, err := e.RunFleetCmdGetOutput("list-unit-files", "-no-legend", "-fields", "unit") // if err != nil { // e.log.WithError(err).Fatal("Cannot list unit files") // } diff --git a/work/env.go b/work/env.go index 24a3793..632932a 100644 --- a/work/env.go +++ b/work/env.go @@ -32,6 +32,7 @@ type Config struct { Password string `yaml:"password,omitempty"` Strict_host_key_checking bool `yaml:"strict_host_key_checking,omitempty"` Sudo bool `yaml:"sudo,omitempty"` + Driver string `yaml:"driver,omitempty"` } `yaml:"fleet,omitempty"` } @@ -81,7 +82,7 @@ func (e Env) GetAttributes() map[string]interface{} { } func (e Env) FleetctlListUnits() { - stdout, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-units", "--full", "--no-legend") + stdout, _, err := e.RunFleetCmdGetOutput("list-units", "--full", "--no-legend") if err != nil { logs.WithEF(err, e.fields).Fatal("Failed to list-units") } @@ -93,7 +94,7 @@ func (e Env) FleetctlListUnits() { } func (e Env) FleetctlListMachines() { - stdout, _, err := e.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-machines", "--full", "--no-legend") + stdout, _, err := e.RunFleetCmdGetOutput("list-machines", "--full", "--no-legend") if err != nil { logs.WithEF(err, e.fields).Fatal("Failed to list-machines") } @@ -129,6 +130,11 @@ func (e *Env) loadConfig() { } } + // backward compatibility with fleet < 1.0.0 : etcd as default driver + if e.config.Fleet.Driver == "" { + e.config.Fleet.Driver = "etcd" + } + src := strings.Split(e.config.Fleet.Endpoint, ",") dest := make([]string, len(src)) perm := rand.Perm(len(src)) @@ -323,6 +329,7 @@ const FLEETCTL_ENDPOINT = "FLEETCTL_ENDPOINT" const FLEETCTL_SSH_USERNAME = "FLEETCTL_SSH_USERNAME" const FLEETCTL_STRICT_HOST_KEY_CHECKING = "FLEETCTL_STRICT_HOST_KEY_CHECKING" const FLEETCTL_SUDO = "FLEETCTL_SUDO" +const FLEETCTL_DRIVER = "FLEETCTL_DRIVER" func (e Env) RunFleetCmd(args ...string) error { _, _, err := e.runFleetCmdInternal(false, args) @@ -356,6 +363,7 @@ func (e Env) runFleetCmdInternal(getOutput bool, args []string) (string, string, } envs := map[string]string{} + envs[FLEETCTL_DRIVER] = e.config.Fleet.Driver envs[FLEETCTL_ENDPOINT] = e.config.Fleet.Endpoint if e.config.Fleet.Username != "" { envs[FLEETCTL_SSH_USERNAME] = e.config.Fleet.Username diff --git a/work/service.go b/work/service.go index 95dfc40..c31a9e4 100644 --- a/work/service.go +++ b/work/service.go @@ -159,7 +159,7 @@ func (s *Service) ListUnits() []string { } func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this method should be in unit - stdout, stderr, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "cat", unit) + stdout, stderr, err := s.env.RunFleetCmdGetOutput("cat", unit) if err != nil && stderr == "Unit "+unit+" not found" { return "", nil } @@ -167,7 +167,7 @@ func (s *Service) GetFleetUnitContent(unit string) (string, error) { //TODO this } func (s *Service) FleetListUnits(command string) { - stdout, _, err := s.env.RunFleetCmdGetOutput("-strict-host-key-checking=false", "list-units", "--full", "--no-legend") + stdout, _, err := s.env.RunFleetCmdGetOutput("list-units", "--full", "--no-legend") if err != nil { logs.WithEF(err, s.fields).Fatal("Failed to list-units") } From 8d5ab478ef6d47ef2dfe4bda68c190be3cb7a1d7 Mon Sep 17 00:00:00 2001 From: obiesmans <obiesmans@users.noreply.github.com> Date: Mon, 21 Aug 2017 14:32:21 +0200 Subject: [PATCH 156/163] Add templating to service manifests (#76) * Add templating to service manifests --- commands/prepare-service.go | 12 +-- commands/prepare-unit.go | 1 + .../dgr/bin-templater/template/directory.go | 11 ++- .../dgr/bin-templater/template/file.go | 11 ++- .../dgr/bin-templater/template/templating.go | 5 +- work/build.go | 9 +- work/env-check.go | 41 -------- work/env.go | 1 + work/service-generate.go | 10 ++ work/service.go | 97 ++++++++++++++----- work/service_test.go | 60 +++++++++++- .../cassandra-tmpl/service-manifest.yml | 5 + work/unit-command.go | 1 + 13 files changed, 173 insertions(+), 91 deletions(-) create mode 100644 work/testdata/cassandra-tmpl/service-manifest.yml diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 6da59a2..81bfe47 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -94,22 +94,14 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { }, } + serviceCmd.PersistentFlags().StringVarP(&work.BuildFlags.ManifestAttributes, "manifest-attributes", "A", "{}", "Attributes to template the service manifest with.") + lockCmd.Flags().StringVarP(&ttl, "duration", "t", "1h", "lock duration") updateCmd.Flags().BoolVarP(&work.BuildFlags.All, "all", "a", false, "process all units, even up to date") updateCmd.Flags().BoolVarP(&work.BuildFlags.Yes, "yes", "y", false, "process units without asking") serviceCmd.AddCommand(generateCmd, lockCmd, unlockCmd, updateCmd, checkCmd, diffCmd, listCmd) - // var units []string - // hystrix.Go("list_units", func() error { - // units = service.ListUnits() - // return nil - // }, func(err error) error { - // entry := service.GetLog() - // entry.WithError(err).Warn("Cannot list units. Some command may be missing") - // return nil - // }) - for _, unitName := range service.ListUnits() { unit := service.LoadUnit(unitName) serviceCmd.AddCommand(prepareUnitCommands(unit)) diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index 495d01f..a507c9f 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -120,6 +120,7 @@ func prepareUnitCommands(unit *work.Unit) *cobra.Command { }, } + unitCmd.PersistentFlags().StringVarP(&work.BuildFlags.ManifestAttributes, "manifest-attributes", "A", "{}", "Attributes to template the service manifest with.") journalCmd.Flags().BoolVarP(&follow, "follow", "f", false, "follow") journalCmd.Flags().IntVarP(&lines, "lines", "l", 10, "lines") updateCmd.Flags().BoolVarP(&work.BuildFlags.Force, "force", "f", false, "force update even if up to date") diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go b/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go index bd7ef36..2275bae 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/directory.go @@ -1,14 +1,15 @@ package template import ( - "github.com/leekchan/gtf" - "github.com/n0rad/go-erlog/data" - "github.com/n0rad/go-erlog/errs" - "github.com/n0rad/go-erlog/logs" "io/ioutil" "os" "strings" txttmpl "text/template" + + "github.com/leekchan/gtf" + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/logs" ) type TemplateDir struct { @@ -114,7 +115,7 @@ func (t *TemplateDir) processSingleDir(src string, dst string, attributes map[st if err != nil { return err } - if err2 := template.runTemplate(dstObj, attributes, !t.continueOnError); err2 != nil { + if err2 := template.RunTemplate(dstObj, attributes, !t.continueOnError); err2 != nil { if t.continueOnError { err = err2 logs.WithEF(err, t.fields).Error("Templating failed") diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/file.go b/vendor/github.com/blablacar/dgr/bin-templater/template/file.go index abdd101..2f23ffd 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/file.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/file.go @@ -3,14 +3,15 @@ package template import ( "bufio" "bytes" - "github.com/n0rad/go-erlog/data" - "github.com/n0rad/go-erlog/errs" - "github.com/n0rad/go-erlog/logs" - "gopkg.in/yaml.v2" "io/ioutil" "os" "os/exec" txttmpl "text/template" + + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/n0rad/go-erlog/logs" + "gopkg.in/yaml.v2" ) type TemplateFile struct { @@ -65,7 +66,7 @@ func (t *TemplateFile) loadTemplateConfig(src string) error { return nil } -func (f *TemplateFile) runTemplate(dst string, attributes map[string]interface{}, failOnNoValue bool) error { +func (f *TemplateFile) RunTemplate(dst string, attributes map[string]interface{}, failOnNoValue bool) error { if logs.IsTraceEnabled() { logs.WithF(f.fields).WithField("attributes", attributes).WithField("failOnNoValue", failOnNoValue).Trace("templating with attributes") } diff --git a/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go index 3a01ec8..49fdc43 100644 --- a/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go +++ b/vendor/github.com/blablacar/dgr/bin-templater/template/templating.go @@ -4,8 +4,6 @@ import ( "bufio" "encoding/json" "fmt" - "github.com/leekchan/gtf" - "gopkg.in/yaml.v2" "io" "os" "path" @@ -14,6 +12,9 @@ import ( "strings" txttmpl "text/template" "time" + + "github.com/leekchan/gtf" + "gopkg.in/yaml.v2" ) type Templating struct { diff --git a/work/build.go b/work/build.go index 19c9df8..22f532f 100644 --- a/work/build.go +++ b/work/build.go @@ -1,10 +1,11 @@ package work type Flags struct { - All bool - Yes bool - Force bool - GenerateManifests []string + All bool + Yes bool + Force bool + GenerateManifests []string + ManifestAttributes string } var BuildFlags = Flags{} diff --git a/work/env-check.go b/work/env-check.go index aa49627..09d35e1 100644 --- a/work/env-check.go +++ b/work/env-check.go @@ -15,23 +15,6 @@ func (e Env) Check() { defer e.RunLateHookFatal(info) e.concurrentChecker(e.ListServices()) - - // e.Generate() - - // units, _, err := e.RunFleetCmdGetOutput("list-unit-files", "-no-legend", "-fields", "unit") - // if err != nil { - // e.log.WithError(err).Fatal("Cannot list unit files") - // } - // - // for _, unitName := range strings.Split(units, "\n") { - // unitInfo := strings.Split(unitName, "_") - // if len(unitInfo) != 3 { - // e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") - // continue - // } - // split := strings.Split(unitInfo[2], ".") - // e.LoadService(unitInfo[1]).LoadUnit(split[0]).Check("env/check") - // } } func (e Env) concurrentChecker(services []string) { @@ -55,27 +38,3 @@ func (e Env) concurrentChecker(services []string) { close(aChan) wg.Wait() } - -//import ( -// "strings" -//) -// -//func (e Env) Check() { -// e.log.Debug("Running command") -// -// e.Generate() -// -// units, _, err := e.RunFleetCmdGetOutput("list-unit-files", "-no-legend", "-fields", "unit") -// if err != nil { -// e.log.WithError(err).Fatal("Cannot list unit files") -// } -// -// for _, unitName := range strings.Split(units, "\n") { -// unitInfo := strings.Split(unitName, "_") -// if len(unitInfo) != 3 { -// e.log.WithField("unit", unitName).Warn("Unknown unit format for GGN") -// continue -// } -// e.LoadService(unitInfo[1]).LoadUnit(unitName).Check() -// } -//} diff --git a/work/env.go b/work/env.go index 632932a..1f7491d 100644 --- a/work/env.go +++ b/work/env.go @@ -221,6 +221,7 @@ func (e Env) ListServices() []string { if !file.IsDir() { continue } + if _, err := os.Stat(path + "/" + file.Name() + PATH_SERVICE_MANIFEST); os.IsNotExist(err) { continue } diff --git a/work/service-generate.go b/work/service-generate.go index ea105c9..b6adddd 100644 --- a/work/service-generate.go +++ b/work/service-generate.go @@ -22,6 +22,16 @@ func (s *Service) Generate() error { return nil } + if err := s.LoadManifestAttributes(BuildFlags.ManifestAttributes); err != nil { + logs.WithE(err).Fatal("Loading manifest attributes failed") + } + + logs.WithFields(s.fields).Debug("Templating service manifest") + err := s.reloadService() + if err != nil { + return errs.WithEF(err, s.fields, "Cannot render service template") + } + logs.WithFields(s.fields).Debug("Generating units") serviceTmpl, err := s.loadUnitTemplate(PATH_UNIT_SERVICE_TEMPLATE) diff --git a/work/service.go b/work/service.go index c31a9e4..1140580 100644 --- a/work/service.go +++ b/work/service.go @@ -23,21 +23,22 @@ import ( ) type Service struct { - fields data.Fields - env Env - path string - Name string - hasTimer bool - manifest ServiceManifest - nodesAsJsonMap []interface{} - lockPath string - attributes map[string]interface{} - generated bool - generatedMutex *sync.Mutex - units map[string]*Unit - unitsMutex *sync.Mutex - aciList []string - aciListMutex *sync.Mutex + fields data.Fields + env Env + path string + Name string + hasTimer bool + manifest ServiceManifest + nodesAsJsonMap []interface{} + lockPath string + attributes map[string]interface{} + generated bool + generatedMutex *sync.Mutex + units map[string]*Unit + unitsMutex *sync.Mutex + aciList []string + aciListMutex *sync.Mutex + manifestAttributes map[string]interface{} } func NewService(path string, name string, env Env) *Service { @@ -63,12 +64,21 @@ func NewService(path string, name string, env Env) *Service { logs.WithFields(service.fields).Debug("New service") - service.loadManifest() + service.loadManifest(false) service.loadAttributes() service.prepareNodesAsJsonMap() return service } +func (s *Service) reloadService() error { + if err := s.loadManifest(true); err != nil { + return err + } + s.loadAttributes() + s.prepareNodesAsJsonMap() + return nil +} + func (s *Service) prepareNodesAsJsonMap() { if s.manifest.Nodes == nil || len(s.manifest.Nodes.([]interface{})) == 0 { logs.WithFields(s.fields).Warn("No nodes defined in service") @@ -317,20 +327,52 @@ func (s *Service) loadUnitTemplate(filename string) (*template.Templating, error return template, nil } -func (s *Service) manifestPath() string { - return s.path + PATH_SERVICE_MANIFEST +func (s *Service) renderManifest() ([]byte, error) { + path := s.path + PATH_SERVICE_MANIFEST + fstat, err := os.Stat(path) + if err != nil { + return nil, err + } + t, err := template.NewTemplateFile(nil, path, fstat.Mode()) + if err != nil { + return nil, err + } + + manifest, err := ioutil.TempFile(os.TempDir(), "prefix") + defer os.Remove(manifest.Name()) + err = t.RunTemplate(manifest.Name(), s.manifestAttributes, true) + if err != nil { + return nil, err + } + return ioutil.ReadFile(manifest.Name()) } -func (s *Service) loadManifest() { +func (s *Service) readManifest(renderManifest bool) ([]byte, error) { + var err error + var manifest []byte + + manifestPath := s.path + PATH_SERVICE_MANIFEST + + if renderManifest { + manifest, err = s.renderManifest() + } else { + manifest, err = ioutil.ReadFile(manifestPath) + } + + return manifest, err +} + +func (s *Service) loadManifest(renderManifest bool) error { manifest := ServiceManifest{} - path := s.manifestPath() - source, err := ioutil.ReadFile(path) + + source, err := s.readManifest(renderManifest) if err != nil { - logs.WithEF(err, s.fields).WithField("path", path).Warn("Cannot find manifest for service") + return errs.WithEF(err, s.fields, "Cannot find manifest for service") } + err = yaml.Unmarshal([]byte(source), &manifest) if err != nil { - logs.WithEF(err, s.fields).Fatal("Cannot Read service manifest") + return errs.WithEF(err, s.fields, "Cannot Read service manifest") } if manifest.ConcurrentUpdater == 0 { @@ -339,4 +381,13 @@ func (s *Service) loadManifest() { logs.WithFields(s.fields).WithField("manifest", manifest).Debug("Manifest loaded") s.manifest = manifest + return nil +} + +func (s *Service) LoadManifestAttributes(attr string) error { + s.manifestAttributes = make(map[string]interface{}) + if err := json.Unmarshal([]byte(attr), &s.manifestAttributes); err != nil { + return err + } + return nil } diff --git a/work/service_test.go b/work/service_test.go index a170d17..6940fb3 100644 --- a/work/service_test.go +++ b/work/service_test.go @@ -1,6 +1,10 @@ package work -import "testing" +import ( + "os" + "regexp" + "testing" +) func TestAddServiceIncludeFiles(t *testing.T) { service := Service{} @@ -25,3 +29,57 @@ func TestAddServiceIncludeFiles(t *testing.T) { } } } + +func TestRenderManifest(t *testing.T) { + attr := make(map[string]interface{}) + attr["version"] = 123 + service := Service{ + path: "./testdata/cassandra-tmpl", + manifestAttributes: attr, + } + + template, err := service.renderManifest() + if err != nil { + t.Fatalf("Unexpected error : %q", err) + } + + foundVersion, _ := regexp.Match("pod-cassandra:123", template) + if !foundVersion { + t.Errorf("Unexpected template rendering : %q", template) + } +} + +func TestReadManifest(t *testing.T) { + attr := make(map[string]interface{}) + attr["version"] = 123 + service := Service{ + path: "./testdata/cassandra-tmpl", + manifestAttributes: attr, + } + + nowhere := Service{path: "/nowhere"} + _, err := nowhere.readManifest(false) + if !os.IsNotExist(err) { + t.Errorf("Unexpected error on non-existant manifest : %q", err) + } + + manifest, _ := service.readManifest(false) + foundTag, _ := regexp.Match("pod-cassandra:{{.version}}", manifest) + if !foundTag { + t.Errorf("Unexpected manifest content : %q", manifest) + } +} + +func TestReloadService(t *testing.T) { + attr := make(map[string]interface{}) + attr["version"] = 123 + service := Service{ + path: "./testdata/cassandra-tmpl", + manifestAttributes: attr, + } + service.reloadService() + if service.manifest.Containers[0] != "aci.blbl.cr/pod-cassandra:123" { + t.Errorf("Unexpected manifest content : %q", service.manifest) + } + +} diff --git a/work/testdata/cassandra-tmpl/service-manifest.yml b/work/testdata/cassandra-tmpl/service-manifest.yml new file mode 100644 index 0000000..8366862 --- /dev/null +++ b/work/testdata/cassandra-tmpl/service-manifest.yml @@ -0,0 +1,5 @@ +containers: + - aci.blbl.cr/pod-cassandra:{{.version}} + +nodes: + - hostname: cassandra1 diff --git a/work/unit-command.go b/work/unit-command.go index b094c3f..6dcc51d 100644 --- a/work/unit-command.go +++ b/work/unit-command.go @@ -17,6 +17,7 @@ func (u *Unit) Start(command string) error { logs.WithFields(u.Fields).Debug("unit is not loaded yet") if err := u.Service.Generate(); err != nil { logs.WithEF(err, u.Fields).Fatal("Generate failed") + return err } u.Load(command) } else { From ccc2b1a52fdda6333c763647ea658b05650023f7 Mon Sep 17 00:00:00 2001 From: obiesmans <obiesmans@users.noreply.github.com> Date: Fri, 25 Aug 2017 12:54:45 +0200 Subject: [PATCH 157/163] Fix: use all attributes to render the manifest (#77) --- work/service.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/work/service.go b/work/service.go index 1140580..241e885 100644 --- a/work/service.go +++ b/work/service.go @@ -18,6 +18,7 @@ import ( "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" + "github.com/peterbourgon/mergemap" "golang.org/x/net/context" "gopkg.in/yaml.v2" ) @@ -340,7 +341,8 @@ func (s *Service) renderManifest() ([]byte, error) { manifest, err := ioutil.TempFile(os.TempDir(), "prefix") defer os.Remove(manifest.Name()) - err = t.RunTemplate(manifest.Name(), s.manifestAttributes, true) + + err = t.RunTemplate(manifest.Name(), mergemap.Merge(s.manifestAttributes, s.attributes), true) if err != nil { return nil, err } From af5c18fe2c1a305d22226b6756c7bd768a1fc809 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Wed, 8 Nov 2017 12:54:11 +0100 Subject: [PATCH 158/163] support overriding environment name --- commands/prepare-env.go | 14 +++++++------- commands/prepare-service.go | 16 ++++++++-------- commands/prepare-unit.go | 2 +- commands/prepare.go | 4 ++-- work/env.go | 27 ++++++++++++++++++--------- work/service.go | 2 +- work/unit.go | 2 +- 7 files changed, 38 insertions(+), 29 deletions(-) diff --git a/commands/prepare-env.go b/commands/prepare-env.go index 98084a4..c931925 100644 --- a/commands/prepare-env.go +++ b/commands/prepare-env.go @@ -8,13 +8,13 @@ import ( func prepareEnvCommands(env *work.Env) *cobra.Command { envCmd := &cobra.Command{ - Use: env.GetName(), - Short: "Run command for " + env.GetName(), + Use: env.GetDirName(), + Short: "Run command for " + env.GetDirName(), } checkCmd := &cobra.Command{ Use: "check", - Short: "Check of " + env.GetName(), + Short: "Check of " + env.GetDirName(), Run: func(cmd *cobra.Command, args []string) { env.Check() }, @@ -22,7 +22,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { fleetctlCmd := &cobra.Command{ Use: "fleetctl", - Short: "Run fleetctl command on " + env.GetName(), + Short: "Run fleetctl command on " + env.GetDirName(), Run: func(cmd *cobra.Command, args []string) { env.Fleetctl(args) }, @@ -30,7 +30,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { listUnitsCmd := &cobra.Command{ Use: "list-units", - Short: "Run list-units command on " + env.GetName(), + Short: "Run list-units command on " + env.GetDirName(), Run: func(cmd *cobra.Command, args []string) { env.FleetctlListUnits() }, @@ -38,7 +38,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { listMachinesCmd := &cobra.Command{ Use: "list-machines", - Short: "Run list-machines command on " + env.GetName(), + Short: "Run list-machines command on " + env.GetDirName(), Run: func(cmd *cobra.Command, args []string) { env.FleetctlListMachines() }, @@ -46,7 +46,7 @@ func prepareEnvCommands(env *work.Env) *cobra.Command { generateCmd := &cobra.Command{ Use: "generate", - Short: "Generate units for " + env.GetName(), + Short: "Generate units for " + env.GetDirName(), Run: func(cmd *cobra.Command, args []string) { env.Generate() }, diff --git a/commands/prepare-service.go b/commands/prepare-service.go index 81bfe47..4ae781f 100644 --- a/commands/prepare-service.go +++ b/commands/prepare-service.go @@ -15,12 +15,12 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { serviceCmd := &cobra.Command{ Use: service.Name, - Short: "run command for " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "run command for " + service.Name + " on env " + service.GetEnv().GetDirName(), } generateCmd := &cobra.Command{ Use: "generate", - Short: "generate units for " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "generate units for " + service.Name + " on env " + service.GetEnv().GetDirName(), Long: `generate units using remote resolved or local pod/aci manifests`, Run: func(cmd *cobra.Command, args []string) { if err := service.Generate(); err != nil { @@ -31,7 +31,7 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { checkCmd := &cobra.Command{ Use: "check [manifest...]", - Short: "Check units for " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "Check units for " + service.Name + " on env " + service.GetEnv().GetDirName(), Run: func(cmd *cobra.Command, args []string) { if err := service.Check(); err != nil { logs.WithE(err).Fatal("Check failed") @@ -41,7 +41,7 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { diffCmd := &cobra.Command{ Use: "diff [manifest...]", - Short: "diff units for " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "diff units for " + service.Name + " on env " + service.GetEnv().GetDirName(), Run: func(cmd *cobra.Command, args []string) { service.Diff() }, @@ -49,7 +49,7 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { lockCmd := &cobra.Command{ Use: "lock [message...]", - Short: "lock " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "lock " + service.Name + " on env " + service.GetEnv().GetDirName(), Long: `Add a lock to the service in etcd to prevent somebody else to do modification actions on this service/units.` + `lock is ignored if set by the current user`, Run: func(cmd *cobra.Command, args []string) { @@ -69,7 +69,7 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { unlockCmd := &cobra.Command{ Use: "unlock", - Short: "unlock " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "unlock " + service.Name + " on env " + service.GetEnv().GetDirName(), Run: func(cmd *cobra.Command, args []string) { service.Unlock("service/unlock") }, @@ -77,7 +77,7 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { listCmd := &cobra.Command{ Use: "list-units", - Short: "list-units on " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "list-units on " + service.Name + " on env " + service.GetEnv().GetDirName(), Run: func(cmd *cobra.Command, args []string) { service.FleetListUnits("service/unlock") }, @@ -85,7 +85,7 @@ func prepareServiceCommands(service *work.Service) *cobra.Command { updateCmd := &cobra.Command{ Use: "update", - Short: "update " + service.Name + " on env " + service.GetEnv().GetName(), + Short: "update " + service.Name + " on env " + service.GetEnv().GetDirName(), Run: func(cmd *cobra.Command, args []string) { err := service.Update() if err != nil { diff --git a/commands/prepare-unit.go b/commands/prepare-unit.go index a507c9f..589e9ee 100644 --- a/commands/prepare-unit.go +++ b/commands/prepare-unit.go @@ -131,5 +131,5 @@ func prepareUnitCommands(unit *work.Unit) *cobra.Command { } func getShortDescription(unit *work.Unit, action string) string { - return action + " '" + unit.Name + "' from '" + unit.Service.GetName() + "' on env '" + unit.Service.GetEnv().GetName() + "'" + return action + " '" + unit.Name + "' from '" + unit.Service.GetName() + "' on env '" + unit.Service.GetEnv().GetDirName() + "'" } diff --git a/commands/prepare.go b/commands/prepare.go index e1b5e98..ddfaf65 100644 --- a/commands/prepare.go +++ b/commands/prepare.go @@ -19,8 +19,8 @@ func loadEnvCommandsReturnNewRoot(osArgs []string, rootCmd *cobra.Command) *cobr env := work.LoadEnv(envNames) envCmd := &cobra.Command{ - Use: env.GetName(), - Short: "Run command for " + env.GetName(), + Use: env.GetDirName(), + Short: "Run command for " + env.GetDirName(), Run: func(cmd *cobra.Command, args []string) { newRootCmd.AddCommand(prepareEnvCommands(env)) diff --git a/work/env.go b/work/env.go index 1f7491d..6978278 100644 --- a/work/env.go +++ b/work/env.go @@ -34,11 +34,12 @@ type Config struct { Sudo bool `yaml:"sudo,omitempty"` Driver string `yaml:"driver,omitempty"` } `yaml:"fleet,omitempty"` + EnvName string `yaml:"envName,omitempty"` } type Env struct { path string - name string + dirName string fields data.Fields attributes map[string]interface{} config Config @@ -59,7 +60,7 @@ func NewEnvironment(root string, name string) *Env { services: map[string]*Service{}, servicesMutex: &sync.Mutex{}, path: path, - name: name, + dirName: name, fields: fields, config: Config{}, } @@ -69,8 +70,12 @@ func NewEnvironment(root string, name string) *Env { return env } -func (e Env) GetName() string { - return e.name +func (e Env) GetDirName() string { + return e.dirName +} + +func (e Env) GetEnvName() string { + return e.config.EnvName } func (e Env) GetFields() data.Fields { @@ -134,6 +139,9 @@ func (e *Env) loadConfig() { if e.config.Fleet.Driver == "" { e.config.Fleet.Driver = "etcd" } + if e.config.EnvName == "" { + e.config.EnvName = e.dirName + } src := strings.Split(e.config.Fleet.Endpoint, ",") dest := make([]string, len(src)) @@ -239,7 +247,7 @@ func (e Env) ListMachineNames() ([]string, error) { return inMemoryNames, nil } - data, modification := ggn.Home.LoadMachinesCacheWithDate(e.name) + data, modification := ggn.Home.LoadMachinesCacheWithDate(e.dirName) if data == "" || modification.Add(12*time.Hour).Before(time.Now()) { logs.WithFields(e.fields).Debug("reloading list machines cache") datatmp, _, err := e.RunFleetCmdGetOutput("list-machines", "--fields=metadata", "--no-legend") @@ -247,7 +255,7 @@ func (e Env) ListMachineNames() ([]string, error) { return nil, errors.Annotate(err, "Cannot list-machines") } data = datatmp - ggn.Home.SaveMachinesCache(e.name, data) + ggn.Home.SaveMachinesCache(e.dirName, data) } var names []string @@ -257,7 +265,7 @@ func (e Env) ListMachineNames() ([]string, error) { metas := strings.Split(machine, ",") for _, meta := range metas { elem := strings.Split(meta, "=") - if elem[0] == "name" { + if elem[0] == "dirName" { // TODO this is specific to blablacar's metadata ?? names = append(names, elem[1]) } @@ -294,7 +302,8 @@ func (e Env) runHookAndGetNumRun(path string, info HookInfo) error { } envs := map[string]string{} - envs["ENV"] = e.name + envs["ENVDIR"] = e.dirName + envs["ENV"] = e.config.EnvName envs["COMMAND"] = info.Command if info.Unit != nil { envs["UNIT"] = info.Unit.GetName() @@ -310,7 +319,7 @@ func (e Env) runHookAndGetNumRun(path string, info HookInfo) error { for _, f := range files { if !f.IsDir() { - hookFields := data.WithField("name", f.Name()) + hookFields := data.WithField("dirName", f.Name()) args := []string{e.path + PATH_HOOKS + path + "/" + f.Name()} for key, val := range envs { diff --git a/work/service.go b/work/service.go index 241e885..c43a322 100644 --- a/work/service.go +++ b/work/service.go @@ -184,7 +184,7 @@ func (s *Service) FleetListUnits(command string) { } unitStatuses := strings.Split(stdout, "\n") - prefix := s.env.GetName() + "_" + s.Name + "_" + prefix := s.env.GetEnvName() + "_" + s.Name + "_" for _, unitStatus := range unitStatuses { if strings.HasPrefix(unitStatus, prefix) { fmt.Println(unitStatus) diff --git a/work/unit.go b/work/unit.go index 71c1ec4..db31e5f 100644 --- a/work/unit.go +++ b/work/unit.go @@ -34,7 +34,7 @@ type Unit struct { func NewUnit(path string, hostname string, utype UnitType, service *Service) *Unit { l := service.GetFields() - filename := service.GetEnv().GetName() + "_" + service.GetName() + "_" + hostname + utype.String() + filename := service.GetEnv().GetEnvName() + "_" + service.GetName() + "_" + hostname + utype.String() name := hostname if utype != TYPE_SERVICE { From f4c3c7fa5778c5ad7c501524232c779b78b9708b Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 19 Jan 2018 15:31:51 +0100 Subject: [PATCH 159/163] Improve attribute merger error logs --- Godeps/Godeps.json | 5 -- .../attributes-merger/attributes/inputs.go | 39 ----------- .../attributes => work}/merger.go | 69 ++++++------------- work/service.go | 8 ++- 4 files changed, 26 insertions(+), 95 deletions(-) delete mode 100644 vendor/github.com/blablacar/attributes-merger/attributes/inputs.go rename {vendor/github.com/blablacar/attributes-merger/attributes => work}/merger.go (60%) diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index e818811..ca4d323 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -41,11 +41,6 @@ "Comment": "v0.8.1", "Rev": "b889d03467ae08bb6c13241762a64305b69bcf82" }, - { - "ImportPath": "github.com/blablacar/attributes-merger/attributes", - "Comment": "0.1-6-g431a372", - "Rev": "431a37282b0ef85175c8c30eb79f3918c378c7d1" - }, { "ImportPath": "github.com/blablacar/dgr/bin-dgr/common", "Comment": "71", diff --git a/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go b/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go deleted file mode 100644 index 56212b9..0000000 --- a/vendor/github.com/blablacar/attributes-merger/attributes/inputs.go +++ /dev/null @@ -1,39 +0,0 @@ -package attributes - -import ( - "io/ioutil" -) - -type Inputs struct { - Directory string - Files []string -} - -// constructor -func NewInputs(d string) *Inputs { - in := new(Inputs) - in.Directory = d + "/" - return in -} - -// list input files -func (in *Inputs) ListFiles() error { - list_l1, err := ioutil.ReadDir(in.Directory) - if err != nil { - return err - } - for _, f_l1 := range list_l1 { - if f_l1.IsDir() { - list_l2, err := ioutil.ReadDir(in.Directory + "/" + f_l1.Name()) - if err != nil { - return err - } - for _, f_l2 := range list_l2 { - in.Files = append(in.Files, f_l1.Name()+"/"+f_l2.Name()) - } - } else { - in.Files = append(in.Files, f_l1.Name()) - } - } - return nil -} diff --git a/vendor/github.com/blablacar/attributes-merger/attributes/merger.go b/work/merger.go similarity index 60% rename from vendor/github.com/blablacar/attributes-merger/attributes/merger.go rename to work/merger.go index 630f14b..c5edd94 100644 --- a/vendor/github.com/blablacar/attributes-merger/attributes/merger.go +++ b/work/merger.go @@ -1,17 +1,18 @@ -package attributes +package work import ( - "encoding/json" "errors" "fmt" - "github.com/peterbourgon/mergemap" - "gopkg.in/yaml.v2" "io/ioutil" - "os" "strconv" + + "github.com/n0rad/go-erlog/data" + "github.com/n0rad/go-erlog/errs" + "github.com/peterbourgon/mergemap" + "gopkg.in/yaml.v2" ) -func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) map[string]interface{} { +func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) (map[string]interface{}, error) { newMap := make(map[string]interface{}) newMap["default"] = omap @@ -19,30 +20,25 @@ func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) map // loop over attributes files // merge override files to default files for _, file := range files { - var data interface{} + var contentData interface{} yml, err := ioutil.ReadFile(file) if err != nil { - panic(err) + return newMap, errs.WithEF(err, data.WithField("file", file), "Failed to read file") } - // yaml to data - err = yaml.Unmarshal(yml, &data) + // yaml to contentData + err = yaml.Unmarshal(yml, &contentData) if err != nil { - panic(err) + return newMap, errs.WithEF(err, data.WithField("file", file), "Failed to unmarshal file") } - data, err = transform(data) + contentData, err = transformYampToJson(contentData) if err != nil { - panic(err) + return newMap, errs.WithEF(err, data.WithField("file", file), "Failed to transform file to json") } - // data to map - json := data.(map[string]interface{}) + // contentData to map + json := contentData.(map[string]interface{}) omap = mergemap.Merge(newMap, json) } - return ProcessOverride(newMap) -} - -func MergeAttributesFiles(files []string) map[string]interface{} { - omap := make(map[string]interface{}) - return MergeAttributesFilesForMap(omap, files) + return ProcessOverride(newMap), nil } func ProcessOverride(omap map[string]interface{}) map[string]interface{} { @@ -60,31 +56,8 @@ func ProcessOverride(omap map[string]interface{}) map[string]interface{} { return omap } -func Merge(envName string, files []string) []byte { // inputDir string, - // "out map" to store merged yamls - omap := MergeAttributesFiles(files) - - envjson := os.Getenv(envName) - if envjson != "" { - var envattr map[string]interface{} - err := json.Unmarshal([]byte(envjson), &envattr) - if err != nil { - panic(err) - } - omap = mergemap.Merge(omap, envattr) - } - - // map to json - out, err := json.Marshal(omap) - if err != nil { - panic(err) - } - - return out -} - -// transform YAML to JSON -func transform(in interface{}) (_ interface{}, err error) { +// transformYampToJson YAML to JSON +func transformYampToJson(in interface{}) (_ interface{}, err error) { switch in.(type) { case map[interface{}]interface{}: o := make(map[string]interface{}) @@ -99,7 +72,7 @@ func transform(in interface{}) (_ interface{}, err error) { return nil, errors.New( fmt.Sprintf("type not match: expect map key string or int get: %T", k)) } - v, err = transform(v) + v, err = transformYampToJson(v) if err != nil { return nil, err } @@ -111,7 +84,7 @@ func transform(in interface{}) (_ interface{}, err error) { len1 := len(in1) o := make([]interface{}, len1) for i := 0; i < len1; i++ { - o[i], err = transform(in1[i]) + o[i], err = transformYampToJson(in1[i]) if err != nil { return nil, err } diff --git a/work/service.go b/work/service.go index c43a322..92947e0 100644 --- a/work/service.go +++ b/work/service.go @@ -9,7 +9,6 @@ import ( "sync" "time" - "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/utils" @@ -88,7 +87,7 @@ func (s *Service) prepareNodesAsJsonMap() { tmpRes, err := utils.TransformYamlToJson(s.manifest.Nodes) var res []interface{} = tmpRes.([]interface{}) if err != nil { - logs.WithEF(err, s.fields).Fatal("Cannot transform yaml to json") + logs.WithEF(err, s.fields).Fatal("Cannot transformYampToJson yaml to json") } if res[0].(map[string]interface{})[NODE_HOSTNAME].(string) == "*" { @@ -265,7 +264,10 @@ func (s *Service) loadAttributes() { if err != nil { logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Cannot load include files") } - attr = attributes.MergeAttributesFilesForMap(attr, files) + attr, err = MergeAttributesFilesForMap(attr, files) + if err != nil { + logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Failed to merge attributes") + } s.attributes = attr logs.WithFields(s.fields).WithField("attributes", s.attributes).Debug("Attributes loaded") } From 1e8d0be2f496a6da6d23d5c8804a8a0b8f740681 Mon Sep 17 00:00:00 2001 From: Arnaud Lemaire <alemaire@norad.fr> Date: Fri, 19 Jan 2018 15:44:18 +0100 Subject: [PATCH 160/163] fix attribute merger for env --- utils/attribute-files.go | 3 +-- utils/inputs.go | 39 +++++++++++++++++++++++++++++++++++++++ {work => utils}/merger.go | 7 ++++++- work/env.go | 6 ++++-- work/service.go | 2 +- 5 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 utils/inputs.go rename {work => utils}/merger.go (93%) diff --git a/utils/attribute-files.go b/utils/attribute-files.go index b71522c..40fd7d7 100644 --- a/utils/attribute-files.go +++ b/utils/attribute-files.go @@ -3,7 +3,6 @@ package utils import ( "strings" - "github.com/blablacar/attributes-merger/attributes" "github.com/google/cadvisor/utils" ) @@ -13,7 +12,7 @@ func AttributeFiles(path string) ([]string, error) { return res, nil } - in := attributes.NewInputs(path) + in := NewInputs(path) // initialize input files list err := in.ListFiles() if err != nil { diff --git a/utils/inputs.go b/utils/inputs.go new file mode 100644 index 0000000..4e02f23 --- /dev/null +++ b/utils/inputs.go @@ -0,0 +1,39 @@ +package utils + +import ( + "io/ioutil" +) + +type Inputs struct { + Directory string + Files []string +} + +// constructor +func NewInputs(d string) *Inputs { + in := new(Inputs) + in.Directory = d + "/" + return in +} + +// list input files +func (in *Inputs) ListFiles() error { + list_l1, err := ioutil.ReadDir(in.Directory) + if err != nil { + return err + } + for _, f_l1 := range list_l1 { + if f_l1.IsDir() { + list_l2, err := ioutil.ReadDir(in.Directory + "/" + f_l1.Name()) + if err != nil { + return err + } + for _, f_l2 := range list_l2 { + in.Files = append(in.Files, f_l1.Name()+"/"+f_l2.Name()) + } + } else { + in.Files = append(in.Files, f_l1.Name()) + } + } + return nil +} diff --git a/work/merger.go b/utils/merger.go similarity index 93% rename from work/merger.go rename to utils/merger.go index c5edd94..1a23d71 100644 --- a/work/merger.go +++ b/utils/merger.go @@ -1,4 +1,4 @@ -package work +package utils import ( "errors" @@ -41,6 +41,11 @@ func MergeAttributesFilesForMap(omap map[string]interface{}, files []string) (ma return ProcessOverride(newMap), nil } +func MergeAttributesFiles(files []string) (map[string]interface{}, error) { + omap := make(map[string]interface{}) + return MergeAttributesFilesForMap(omap, files) +} + func ProcessOverride(omap map[string]interface{}) map[string]interface{} { // merge override to default inside the file _, okd := omap["default"] diff --git a/work/env.go b/work/env.go index 6978278..78e166f 100644 --- a/work/env.go +++ b/work/env.go @@ -10,7 +10,6 @@ import ( txttmpl "text/template" "time" - "github.com/blablacar/attributes-merger/attributes" "github.com/blablacar/dgr/bin-dgr/common" "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/ggn" @@ -173,7 +172,10 @@ func (e *Env) loadAttributes() { logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Cannot load include files") } - e.attributes = attributes.MergeAttributesFiles(files) + e.attributes, err = utils.MergeAttributesFiles(files) + if err != nil { + logs.WithEF(err, e.fields).WithField("path", e.path+PATH_ATTRIBUTES).Fatal("Failed to merge attributes") + } logs.WithFields(e.fields).WithField("attributes", e.attributes).Debug("Attributes loaded") } diff --git a/work/service.go b/work/service.go index 92947e0..28d2c79 100644 --- a/work/service.go +++ b/work/service.go @@ -264,7 +264,7 @@ func (s *Service) loadAttributes() { if err != nil { logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Cannot load include files") } - attr, err = MergeAttributesFilesForMap(attr, files) + attr, err = utils.MergeAttributesFilesForMap(attr, files) if err != nil { logs.WithEF(err, s.fields).WithField("path", s.path+PATH_ATTRIBUTES).Fatal("Failed to merge attributes") } From 13c0209f9a957020d1c020b3a2db3c9d0e37444a Mon Sep 17 00:00:00 2001 From: Thomas Perronin <gecko-splinter@hotmail.com> Date: Thu, 8 Nov 2018 09:49:32 +0100 Subject: [PATCH 161/163] add config to get user from env (#78) --- ggn/context.go | 7 ++++++- ggn/home.go | 7 ++++--- work/service.go | 3 ++- work/service_test.go | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ggn/context.go b/ggn/context.go index b22fbce..03f0c16 100644 --- a/ggn/context.go +++ b/ggn/context.go @@ -11,7 +11,12 @@ var GgnVersion string var BuildDate string func GetUserAndHost() string { - user := os.Getenv("USER") + var user string + if Home.Config.EnvVarUser != "" { + user = os.Getenv(Home.Config.EnvVarUser) + } else { + user = os.Getenv("USER") + } if Home.Config.User != "" { user = Home.Config.User } diff --git a/ggn/home.go b/ggn/home.go index 70d5346..ecac350 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -6,14 +6,15 @@ import ( "time" "github.com/ghodss/yaml" - "github.com/mitchellh/go-homedir" + homedir "github.com/mitchellh/go-homedir" "github.com/n0rad/go-erlog/data" "github.com/n0rad/go-erlog/logs" ) type Config struct { - WorkPath string `yaml:"workPath,omitempty"` - User string `yaml:"user,omitempty"` + WorkPath string `yaml:"workPath,omitempty"` + User string `yaml:"user,omitempty"` + EnvVarUser string `yaml:"envVarUser,omitempty"` } type HomeStruct struct { diff --git a/work/service.go b/work/service.go index 28d2c79..080c713 100644 --- a/work/service.go +++ b/work/service.go @@ -9,6 +9,8 @@ import ( "sync" "time" + "context" + "github.com/blablacar/dgr/bin-templater/template" "github.com/blablacar/ggn/ggn" "github.com/blablacar/ggn/utils" @@ -18,7 +20,6 @@ import ( "github.com/n0rad/go-erlog/errs" "github.com/n0rad/go-erlog/logs" "github.com/peterbourgon/mergemap" - "golang.org/x/net/context" "gopkg.in/yaml.v2" ) diff --git a/work/service_test.go b/work/service_test.go index 6940fb3..ae7e870 100644 --- a/work/service_test.go +++ b/work/service_test.go @@ -79,7 +79,7 @@ func TestReloadService(t *testing.T) { } service.reloadService() if service.manifest.Containers[0] != "aci.blbl.cr/pod-cassandra:123" { - t.Errorf("Unexpected manifest content : %q", service.manifest) + t.Errorf("Unexpected manifest content : %q", service.manifest.Containers[0]) } } From edcb5f3962b49097c7f2663a7135a3a43dfde276 Mon Sep 17 00:00:00 2001 From: Thomas Perronin <gecko-splinter@hotmail.com> Date: Fri, 9 Nov 2018 10:53:46 +0100 Subject: [PATCH 162/163] bump travis golang version (#79) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4fd9e80..a94b9ec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.6 + - 1.11 install: - sudo apt-get install upx From fc804a34b7979d0b4efc3b3c13232044d0051c5e Mon Sep 17 00:00:00 2001 From: Thomas Perronin <gecko-splinter@hotmail.com> Date: Wed, 14 Nov 2018 15:57:22 +0100 Subject: [PATCH 163/163] add override env configuration in home config file (#80) --- ggn/home.go | 11 +++++++++++ work/env.go | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/ggn/home.go b/ggn/home.go index ecac350..0b17802 100644 --- a/ggn/home.go +++ b/ggn/home.go @@ -15,6 +15,17 @@ type Config struct { WorkPath string `yaml:"workPath,omitempty"` User string `yaml:"user,omitempty"` EnvVarUser string `yaml:"envVarUser,omitempty"` + + OverrideConfig map[string]struct { + Fleet struct { + Endpoint string `yaml:"endpoint,omitempty"` + Username string `yaml:"username,omitempty"` + Password string `yaml:"password,omitempty"` + Strict_host_key_checking *bool `yaml:"strict_host_key_checking,omitempty"` + Sudo *bool `yaml:"sudo,omitempty"` + Driver string `yaml:"driver,omitempty"` + } `yaml:"fleet,omitempty"` + } `yaml:"overrideConfig,omitempty"` } type HomeStruct struct { diff --git a/work/env.go b/work/env.go index 78e166f..25cc956 100644 --- a/work/env.go +++ b/work/env.go @@ -149,6 +149,38 @@ func (e *Env) loadConfig() { dest[v] = src[i] } e.config.Fleet.Endpoint = strings.Join(dest, ",") + + if _, ok := ggn.Home.Config.OverrideConfig[e.config.EnvName]; ok { + e.overrideFleetEnv() + } +} + +func (e *Env) overrideFleetEnv() { + overridedEnv := ggn.Home.Config.OverrideConfig[e.config.EnvName] + if overridedEnv.Fleet.Endpoint != "" { + src := strings.Split(overridedEnv.Fleet.Endpoint, ",") + dest := make([]string, len(src)) + perm := rand.Perm(len(src)) + for i, v := range perm { + dest[v] = src[i] + } + e.config.Fleet.Endpoint = strings.Join(dest, ",") + } + if overridedEnv.Fleet.Username != "" { + e.config.Fleet.Username = overridedEnv.Fleet.Username + } + if overridedEnv.Fleet.Driver != "" { + e.config.Fleet.Driver = overridedEnv.Fleet.Driver + } + if overridedEnv.Fleet.Password != "" { + e.config.Fleet.Password = overridedEnv.Fleet.Password + } + if overridedEnv.Fleet.Strict_host_key_checking != nil { + e.config.Fleet.Strict_host_key_checking = *overridedEnv.Fleet.Strict_host_key_checking + } + if overridedEnv.Fleet.Sudo != nil { + e.config.Fleet.Sudo = *overridedEnv.Fleet.Sudo + } } func (e *Env) loadPartials() {